2021-05-20 06:25:52 +00:00
|
|
|
#ifndef STATUSWINDOW_H
|
|
|
|
#define STATUSWINDOW_H
|
|
|
|
|
|
|
|
#include <QQuickWindow>
|
2021-06-01 10:01:47 +00:00
|
|
|
#include <QScreen>
|
2021-05-20 06:25:52 +00:00
|
|
|
|
|
|
|
class StatusWindow: public QQuickWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2021-06-01 10:01:47 +00:00
|
|
|
Q_PROPERTY(bool isFullScreen READ isFullScreen NOTIFY isFullScreenChanged)
|
|
|
|
|
2021-05-20 06:25:52 +00:00
|
|
|
public:
|
2022-07-21 09:04:07 +00:00
|
|
|
explicit StatusWindow(QQuickWindow *parent = nullptr);
|
2021-05-20 06:25:52 +00:00
|
|
|
|
2021-06-01 10:01:47 +00:00
|
|
|
Q_INVOKABLE void toggleFullScreen();
|
|
|
|
|
2022-07-21 09:04:07 +00:00
|
|
|
Q_INVOKABLE void updatePosition();
|
2021-06-01 10:01:47 +00:00
|
|
|
|
|
|
|
bool isFullScreen() const;
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void isFullScreenChanged();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void removeTitleBar();
|
|
|
|
void showTitleBar();
|
2022-07-21 09:04:07 +00:00
|
|
|
#ifdef Q_OS_WIN
|
|
|
|
void removeTitleBarWin();
|
|
|
|
void showTitleBarWin();
|
|
|
|
#elif defined Q_OS_MACOS
|
|
|
|
void removeTitleBarMac();
|
|
|
|
void showTitleBarMac();
|
|
|
|
#endif
|
2021-06-01 10:01:47 +00:00
|
|
|
|
2021-05-20 06:25:52 +00:00
|
|
|
private:
|
2021-06-01 10:01:47 +00:00
|
|
|
bool m_isFullScreen;
|
2021-05-20 06:25:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // STATUSWINDOW_H
|