FluentUI/src/WindowHelper.h

37 lines
953 B
C
Raw Normal View History

2023-02-27 18:46:39 +08:00
#ifndef WINDOWHELPER_H
#define WINDOWHELPER_H
#include <QObject>
#include <QQuickWindow>
#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 23:04:52 +08:00
#include "FramelessView.h"
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
public:
explicit WindowHelper(QObject *parent = nullptr);
2023-03-13 21:18:51 +08:00
Q_INVOKABLE void initWindow(FramelessView* window);
2023-02-27 18:46:39 +08:00
Q_INVOKABLE void setTitle(const QString& text);
2023-03-02 18:21:43 +08:00
Q_INVOKABLE void setMinimumWidth(int width);
Q_INVOKABLE void setMaximumWidth(int width);
Q_INVOKABLE void setMinimumHeight(int height);
Q_INVOKABLE void setMaximumHeight(int height);
2023-03-13 21:18:51 +08:00
Q_INVOKABLE QJsonObject getArgument();
Q_INVOKABLE QVariant getPageRegister();
2023-03-13 18:23:46 +08:00
Q_INVOKABLE void updateWindow();
2023-03-28 11:53:25 +08:00
Q_INVOKABLE void setOpacity(qreal opacity);
2023-03-13 18:23:46 +08:00
Q_INVOKABLE void setModality(int type);
2023-03-13 21:18:51 +08:00
Q_INVOKABLE QVariant createRegister(const QString& path);
2023-02-27 18:46:39 +08:00
2023-02-27 23:04:52 +08:00
private:
FramelessView* window;
2023-02-27 18:46:39 +08:00
};
#endif // WINDOWHELPER_H