32 lines
750 B
C++
32 lines
750 B
C++
#ifndef APP_H
|
|
#define APP_H
|
|
|
|
#include <QObject>
|
|
#include <QQmlEngine>
|
|
|
|
class App : public QObject {
|
|
Q_OBJECT
|
|
QML_ELEMENT
|
|
QML_SINGLETON
|
|
Q_PROPERTY(QString windowIcon READ windowIcon WRITE setWindowIcon NOTIFY windowIconChanged)
|
|
Q_PROPERTY(bool useSystemAppBar READ useSystemAppBar WRITE setUseSystemAppBar NOTIFY useSystemAppBarChanged)
|
|
|
|
public:
|
|
App(QObject *parent = nullptr);
|
|
QString windowIcon() const;
|
|
void setWindowIcon(const QString &icon);
|
|
|
|
bool useSystemAppBar() const;
|
|
void setUseSystemAppBar(bool use);
|
|
|
|
signals:
|
|
void windowIconChanged();
|
|
void useSystemAppBarChanged();
|
|
|
|
private:
|
|
QString m_windowIcon;
|
|
bool m_useSystemAppBar = false;
|
|
};
|
|
|
|
#endif // APP_H
|