diff options
Diffstat (limited to 'utils/wpseditor/gui/src/qwpsstate.h')
-rw-r--r-- | utils/wpseditor/gui/src/qwpsstate.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/utils/wpseditor/gui/src/qwpsstate.h b/utils/wpseditor/gui/src/qwpsstate.h new file mode 100644 index 0000000000..eb43531de6 --- /dev/null +++ b/utils/wpseditor/gui/src/qwpsstate.h | |||
@@ -0,0 +1,54 @@ | |||
1 | #ifndef __WPSSTATE_H__ | ||
2 | #define __WPSSTATE_H__ | ||
3 | |||
4 | #include <QObject> | ||
5 | #include "wpsstate.h" | ||
6 | |||
7 | class QWpsState : public QObject { | ||
8 | Q_OBJECT | ||
9 | |||
10 | |||
11 | Q_CLASSINFO("QWpsState", "WPS State"); | ||
12 | Q_PROPERTY(int FontHeight READ fontHeight WRITE setFontHeight DESIGNABLE true USER true) | ||
13 | Q_CLASSINFO("FontHeight", "minimum=6;maximum=20;value=10"); | ||
14 | Q_PROPERTY(int FontWidth READ fontWidth WRITE setFontWidth DESIGNABLE true USER true) | ||
15 | Q_CLASSINFO("FontWidth", "minimum=4;maximum=20;value=8"); | ||
16 | Q_PROPERTY(int Volume READ volume WRITE setVolume DESIGNABLE true USER true) | ||
17 | Q_CLASSINFO("Volume", "minimum=-74;maximum=24;value=-15"); | ||
18 | Q_PROPERTY(int Battery READ battery WRITE setBattery DESIGNABLE true USER true) | ||
19 | Q_CLASSINFO("Battery", "minimum=0;maximum=100;value=50"); | ||
20 | |||
21 | wpsstate state; | ||
22 | |||
23 | public: | ||
24 | QWpsState(); | ||
25 | |||
26 | int fontHeight() const { | ||
27 | return state.fontheight; | ||
28 | } | ||
29 | void setFontHeight(int val); | ||
30 | |||
31 | int fontWidth() const { | ||
32 | return state.fontwidth; | ||
33 | } | ||
34 | void setFontWidth(int val); | ||
35 | |||
36 | int battery() const { | ||
37 | return state.battery_level; | ||
38 | } | ||
39 | void setBattery(int val); | ||
40 | |||
41 | int volume() const { | ||
42 | return state.volume; | ||
43 | } | ||
44 | public slots: | ||
45 | void setVolume(int val); | ||
46 | |||
47 | |||
48 | |||
49 | |||
50 | |||
51 | signals: | ||
52 | void stateChanged ( wpsstate state ); | ||
53 | }; | ||
54 | #endif // __WPSSTATE_H__ | ||