FluentUI/src/WindowHelper.h

29 lines
632 B
C
Raw Normal View History

2023-02-27 18:46:39 +08:00
#ifndef WINDOWHELPER_H
#define WINDOWHELPER_H
#include <QObject>
#include <QQuickWindow>
2023-04-27 09:38:57 +08:00
#include <QtQml/qqml.h>
2023-02-27 18:46:39 +08:00
#include <QQuickItem>
2023-02-27 23:04:52 +08:00
#include <QWindow>
2023-03-13 18:23:46 +08:00
#include <QJsonObject>
2023-02-27 18:46:39 +08:00
2023-02-27 23:04:52 +08:00
class WindowHelper : public QObject
2023-02-27 18:46:39 +08:00
{
Q_OBJECT
2023-04-27 09:38:57 +08:00
QML_NAMED_ELEMENT(WindowHelper)
2023-02-27 18:46:39 +08:00
public:
explicit WindowHelper(QObject *parent = nullptr);
2023-04-11 23:12:31 +08:00
Q_INVOKABLE void initWindow(QQuickWindow* window);
Q_INVOKABLE void destoryWindow();
Q_INVOKABLE QVariant createRegister(QQuickWindow* window,const QString& path);
2023-04-12 00:15:38 +08:00
Q_INVOKABLE void firstUpdate();
2023-02-27 23:04:52 +08:00
private:
2023-04-11 23:12:31 +08:00
QQuickWindow* window;
2023-04-12 00:15:38 +08:00
bool isFisrt=true;
2023-02-27 18:46:39 +08:00
};
#endif // WINDOWHELPER_H