2016-12-30 22:27:55 +11:00
|
|
|
#ifndef THELIBS_GLOBAL_H
|
|
|
|
#define THELIBS_GLOBAL_H
|
|
|
|
|
|
|
|
#include <QtCore/qglobal.h>
|
2017-01-07 22:25:41 +11:00
|
|
|
#include <QObject>
|
|
|
|
#include <QApplication>
|
|
|
|
#include <QStyle>
|
|
|
|
#include <QStyleFactory>
|
2017-06-10 18:02:00 +10:00
|
|
|
#include <QSettings>
|
2016-12-30 22:27:55 +11:00
|
|
|
|
2018-08-03 22:31:27 +10:00
|
|
|
#ifdef Q_OS_UNIX
|
|
|
|
#include <QDBusMessage>
|
|
|
|
#include <QDBusReply>
|
|
|
|
#include <QDBusConnection>
|
|
|
|
#endif
|
|
|
|
|
2016-12-30 22:27:55 +11:00
|
|
|
#if defined(THELIBS_LIBRARY)
|
|
|
|
# define THELIBSSHARED_EXPORT Q_DECL_EXPORT
|
|
|
|
#else
|
|
|
|
# define THELIBSSHARED_EXPORT Q_DECL_IMPORT
|
|
|
|
#endif
|
|
|
|
|
2017-01-07 22:25:41 +11:00
|
|
|
class THELIBSSHARED_EXPORT theLibsGlobal : public QObject {
|
|
|
|
Q_OBJECT
|
2018-08-03 22:31:27 +10:00
|
|
|
public:
|
|
|
|
static theLibsGlobal* instance();
|
2017-01-07 22:25:41 +11:00
|
|
|
|
2018-08-03 22:31:27 +10:00
|
|
|
static float getDPIScaling();
|
2018-07-24 16:45:39 +10:00
|
|
|
|
2018-08-03 22:31:27 +10:00
|
|
|
public slots:
|
|
|
|
bool powerStretchEnabled();
|
|
|
|
bool allowSystemAnimations();
|
2017-01-07 22:25:41 +11:00
|
|
|
|
2018-08-03 22:31:27 +10:00
|
|
|
private slots:
|
|
|
|
void powerStretchChangedPrivate(bool isOn);
|
2017-01-07 22:25:41 +11:00
|
|
|
|
2018-08-03 22:31:27 +10:00
|
|
|
signals:
|
|
|
|
void powerStretchChanged(bool isOn);
|
2017-01-07 22:25:41 +11:00
|
|
|
|
2018-08-03 22:31:27 +10:00
|
|
|
private:
|
|
|
|
theLibsGlobal();
|
2017-01-07 22:25:41 +11:00
|
|
|
|
2018-08-03 22:31:27 +10:00
|
|
|
bool powerStretch = false;
|
|
|
|
QSettings* themeSettings;
|
2017-01-07 22:25:41 +11:00
|
|
|
};
|
|
|
|
|
2016-12-30 22:27:55 +11:00
|
|
|
#endif // THELIBS_GLOBAL_H
|