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