Kylin/Fluent/App.h

32 lines
750 B
C
Raw Normal View History

2024-08-21 23:26:43 +08:00
#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