FluentUI/src/FluApp.h

36 lines
655 B
C
Raw Normal View History

2023-02-26 23:47:07 +08:00
#ifndef FLUAPP_H
#define FLUAPP_H
#include <QObject>
#include <QWindow>
#include <QJsonObject>
#include "stdafx.h"
class FluApp : public QObject
{
Q_OBJECT
Q_PROPERTY_AUTO(QString,initialRoute);
2023-02-27 18:46:39 +08:00
Q_PROPERTY_AUTO(bool,isDark);
2023-02-26 23:47:07 +08:00
Q_PROPERTY_AUTO(QJsonObject,routes);
public:
static FluApp *getInstance();
2023-02-27 18:46:39 +08:00
explicit FluApp(QObject *parent = nullptr);
2023-02-26 23:47:07 +08:00
Q_INVOKABLE void run();
Q_INVOKABLE void navigate(const QString& route);
Q_INVOKABLE void setAppWindow(QWindow *window);
2023-02-27 18:46:39 +08:00
Q_INVOKABLE void getWIdByWindow(QWindow *window);
2023-02-26 23:47:07 +08:00
private:
static FluApp* m_instance;
QWindow *appWindow;
};
#endif // FLUAPP_H