status-desktop/ui/StatusQ/sandbox/statuswindow.h

41 lines
740 B
C
Raw Normal View History

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