2018-11-07 11:10:38 +00:00
|
|
|
#ifndef UTILS_H
|
|
|
|
#define UTILS_H
|
2018-11-26 16:50:25 +00:00
|
|
|
#include <QObject>
|
2018-11-07 11:10:38 +00:00
|
|
|
#include <QWindow>
|
2018-11-26 16:50:25 +00:00
|
|
|
#include <QtGlobal>
|
2018-11-07 11:10:38 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2018-11-18 13:33:45 +00:00
|
|
|
namespace Utils {
|
2018-11-26 16:50:25 +00:00
|
|
|
Q_NAMESPACE
|
2018-11-17 15:45:21 +00:00
|
|
|
void
|
|
|
|
SetDPMS(bool on);
|
|
|
|
void
|
2018-12-01 12:10:52 +00:00
|
|
|
SetScreensaver(WId wid, bool on);
|
|
|
|
void
|
2018-11-17 15:45:21 +00:00
|
|
|
AlwaysOnTop(WId wid, bool on);
|
2018-11-19 05:07:22 +00:00
|
|
|
QString
|
|
|
|
createTimestamp(int seconds);
|
2018-12-06 08:13:14 +00:00
|
|
|
void
|
|
|
|
launchAboutQt();
|
2018-11-18 13:33:45 +00:00
|
|
|
}
|
2018-11-26 16:50:25 +00:00
|
|
|
|
|
|
|
class UtilsClass : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public slots:
|
|
|
|
void SetDPMS(bool on) { Utils::SetDPMS(on); };
|
|
|
|
void AlwaysOnTop(WId wid, bool on) { Utils::AlwaysOnTop(wid, on); };
|
2018-12-06 08:13:14 +00:00
|
|
|
void launchAboutQt() { Utils::launchAboutQt(); };
|
|
|
|
|
2018-11-26 16:50:25 +00:00
|
|
|
QString createTimestamp(int seconds)
|
|
|
|
{
|
|
|
|
return Utils::createTimestamp(seconds);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-11-07 11:10:38 +00:00
|
|
|
#endif
|