FluentUI/src/WindowHelper.h

45 lines
1.0 KiB
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-04-27 17:29:39 +08:00
/**
* @brief The WindowHelper class
*/
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-27 17:29:39 +08:00
/**
* @brief initWindow FluWindow
* @param window
*/
2023-04-11 23:12:31 +08:00
Q_INVOKABLE void initWindow(QQuickWindow* window);
2023-04-27 17:29:39 +08:00
/**
2023-05-11 18:24:58 +08:00
* @brief deleteWindow QMLWindow close
2023-04-27 17:29:39 +08:00
*/
2023-05-11 18:24:58 +08:00
Q_INVOKABLE void deleteWindow();
2023-04-27 17:29:39 +08:00
/**
* @brief createRegister FluRegsiterFluWindowregisterForWindowResult
* @param window
* @param path
* @return
*/
Q_INVOKABLE QVariant createRegister(QQuickWindow* window,const QString& path);
2023-04-27 17:29:39 +08:00
2023-02-27 23:04:52 +08:00
private:
2023-04-11 23:12:31 +08:00
QQuickWindow* window;
2023-02-27 18:46:39 +08:00
};
#endif // WINDOWHELPER_H