-
Notifications
You must be signed in to change notification settings - Fork 1
/
screeninfo.h
60 lines (45 loc) · 1.51 KB
/
screeninfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef SCREENINFO_H
#define SCREENINFO_H
#include <QObject>
#include <QQmlListProperty>
class ScreenInfoScreen;
class ScreenInfo : public QObject
{
Q_OBJECT
Q_PROPERTY(QQmlListProperty<ScreenInfoScreen> screens READ screens NOTIFY screensChanged)
Q_PROPERTY(bool fullScreen READ fullScreen WRITE setFullScreen NOTIFY fullScreenChanged)
Q_PROPERTY(int topMost READ topMost WRITE setTopMost NOTIFY topMostChanged)
Q_PROPERTY(int bottomMost READ bottomMost WRITE setBottomMost NOTIFY bottomMostChanged)
Q_PROPERTY(int leftMost READ leftMost WRITE setLeftMost NOTIFY leftMostChanged)
Q_PROPERTY(int rightMost READ rightMost WRITE setRightMost NOTIFY rightMostChanged)
public:
explicit ScreenInfo(QObject *parent = 0);
QQmlListProperty<ScreenInfoScreen> screens();
bool fullScreen() const;
int topMost() const;
int bottomMost() const;
int leftMost() const;
int rightMost() const;
Q_INVOKABLE void apply();
signals:
void screensChanged();
void fullScreenChanged(bool arg);
void topMostChanged(int arg);
void bottomMostChanged(int arg);
void leftMostChanged(int arg);
void rightMostChanged(int arg);
public slots:
void setFullScreen(bool arg);
void setTopMost(int arg);
void setBottomMost(int arg);
void setLeftMost(int arg);
void setRightMost(int arg);
private:
QList<ScreenInfoScreen*> m_screens;
bool m_fullScreen;
int m_topMost;
int m_bottomMost;
int m_leftMost;
int m_rightMost;
};
#endif // SCREENINFO_H