2023-05-22 16:17:51 +08:00
|
|
|
|
#ifndef WINDOWHELPER_H
|
2023-02-27 18:46:39 +08:00
|
|
|
|
#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
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief createRegister 创建一个FluRegsiter对象,在FluWindow中registerForWindowResult方法调用
|
|
|
|
|
* @param window
|
|
|
|
|
* @param path
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2023-04-15 09:45:54 +08:00
|
|
|
|
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
|