This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
/
qidevice.h
55 lines (39 loc) · 1.49 KB
/
qidevice.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
#ifndef QIDEVICE_H
#define QIDEVICE_H
#include <QObject>
#include <QVariantMap>
/// Device information provider
class QIDevice : public QObject
{
Q_OBJECT
Q_PROPERTY(bool screenFillStatusBar READ screenFillStatusBar WRITE setScreenFillStatusBar NOTIFY screenFillStatusBarChanged)
Q_PROPERTY(int screenWidth READ screenWidth WRITE setScreenWidth NOTIFY screenWidthChanged)
Q_PROPERTY(int screenHeight READ screenHeight WRITE setScreenHeight NOTIFY screenHeightChanged)
Q_PROPERTY(QString identifierForVendor READ identifierForVendor WRITE setIdentifierForVendor NOTIFY identifierForVendorChanged)
public:
~QIDevice();
/// It is truth if the status bar area should be filled by the application
bool screenFillStatusBar() const;
void setScreenFillStatusBar(bool screenFillStatusBar);
int screenWidth() const;
void setScreenWidth(int screenWidth);
int screenHeight() const;
void setScreenHeight(int screenHeight);
static QIDevice* instance();
QString identifierForVendor() const;
void setIdentifierForVendor(const QString &identifierForVendor);
signals:
void screenFillStatusBarChanged();
void screenHeightChanged();
void screenWidthChanged();
void identifierForVendorChanged();
private:
// Fetch device specific information.
QVariantMap fetch() const;
QIDevice(QObject* parent = 0);
bool m_screenFillStatusBar;
int m_screenWidth;
int m_screenHeight;
QString m_identifierForVendor;
};
#endif // QIDEVICE_H