-
Notifications
You must be signed in to change notification settings - Fork 0
/
ScreenInfo.hpp
40 lines (38 loc) · 1.1 KB
/
ScreenInfo.hpp
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
#ifndef H_ScreenInfo
#define H_ScreenInfo
//----------------------------------------------------------------------------
#include <QRect>
#include <vector>
//----------------------------------------------------------------------------
class QApplication;
//----------------------------------------------------------------------------
/// Information about all attached screens
class ScreenInfo
{
public:
/// A screen
struct Screen {
/// The total geometry
QRect geometry;
/// The (relative) target for the common rectangle
QRect target;
};
private:
/// All screens
std::vector<Screen> screens;
/// The common rectangle
QRect commonRect;
public:
/// Constructor
ScreenInfo();
/// Destructor
~ScreenInfo();
/// The number of screens
unsigned screenCount() const { return screens.size(); }
/// A specfic screen
const Screen& screen(unsigned index) const { return screens[index]; }
/// The common rectangle
const QRect& common() const { return commonRect; }
};
//----------------------------------------------------------------------------
#endif