FluentUI/src/WindowHelper.h

30 lines
652 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>
#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-02-27 23:04:52 +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-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