mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-30 15:06:52 +08:00
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
#ifndef FLUAPP_H
|
|
#define FLUAPP_H
|
|
|
|
#include <QObject>
|
|
#include <QWindow>
|
|
#include <QJsonArray>
|
|
#include <QQmlContext>
|
|
#include <QJsonObject>
|
|
#include <QQmlEngine>
|
|
#include "FluRegister.h"
|
|
#include "FramelessView.h"
|
|
#include "stdafx.h"
|
|
|
|
class FluApp : public QObject
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY_AUTO(QString,initialRoute);
|
|
Q_PROPERTY_AUTO(QJsonObject,routes);
|
|
|
|
public:
|
|
|
|
static FluApp *getInstance();
|
|
|
|
explicit FluApp(QObject *parent = nullptr);
|
|
|
|
Q_INVOKABLE void run();
|
|
|
|
Q_INVOKABLE void navigate(const QString& route,const QJsonObject& argument = {},FluRegister* fluRegister = nullptr);
|
|
|
|
Q_INVOKABLE void init(QWindow *window,QMap<QString, QVariant> properties);
|
|
|
|
Q_SIGNAL void windowReady(FramelessView *view);
|
|
|
|
Q_INVOKABLE bool equalsWindow(FramelessView *view,QWindow *window);
|
|
|
|
Q_INVOKABLE QJsonArray awesomelist(const QString& keyword = "");
|
|
|
|
Q_INVOKABLE void clipText(const QString& text);
|
|
|
|
Q_INVOKABLE QString uuid();
|
|
|
|
private:
|
|
QMap<QString, QVariant> properties;
|
|
static FluApp* m_instance;
|
|
QWindow *appWindow;
|
|
|
|
};
|
|
|
|
#endif // FLUAPP_H
|