Changeset View
Changeset View
Standalone View
Standalone View
backends/upower/ddcutilbrightness.h
- This file was moved from daemon/backends/upower/ddcutilbrightness.h.
Show All 18 Lines | |||||
19 | 19 | | |||
20 | #ifndef DDCUTILBRIGHTNESS_H | 20 | #ifndef DDCUTILBRIGHTNESS_H | ||
21 | #define DDCUTILBRIGHTNESS_H | 21 | #define DDCUTILBRIGHTNESS_H | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | #include <QVector> | 24 | #include <QVector> | ||
25 | #include <QTimer> | 25 | #include <QTimer> | ||
26 | 26 | | |||
27 | #ifdef WITH_DDCUTIL | 27 | #ifdef WITH_DDCUTIL | ||
broulik: Doesn't this need to stay `ifdef`? | |||||
28 | #include <ddcutil_c_api.h> | 28 | #include <ddcutil_c_api.h> | ||
29 | #endif | 29 | #endif | ||
30 | 30 | | |||
31 | class DDCutilBrightness: public QObject | 31 | class DDCutilBrightness: public QObject | ||
32 | { | 32 | { | ||
33 | Q_OBJECT | 33 | Q_OBJECT | ||
34 | public: | 34 | public: | ||
35 | DDCutilBrightness(); | 35 | DDCutilBrightness(); | ||
36 | void detect(); | 36 | void detect(); | ||
37 | bool isSupported() const; | 37 | bool isSupported() const; | ||
38 | long brightness(); | 38 | long brightness(); | ||
39 | long brightnessMax(); | 39 | long brightnessMax(); | ||
40 | void setBrightness(long value); | 40 | void setBrightness(long value); | ||
41 | 41 | | |||
42 | private Q_SLOTS: | 42 | private Q_SLOTS: | ||
43 | void setBrightnessAfterFilter(); | 43 | void setBrightnessAfterFilter(); | ||
44 | 44 | | |||
45 | private: | 45 | private: | ||
46 | #ifdef WITH_DDCUTIL | 46 | #ifdef WITH_DDCUTIL | ||
47 | QVector<DDCA_Display_Handle> m_displayHandleList; | 47 | QVector<DDCA_Display_Handle> m_displayHandleList; | ||
48 | QVector<DDCA_Display_Info> m_displayInfoList; | 48 | QVector<DDCA_Display_Info> m_displayInfoList; | ||
49 | #endif //ifdef WITH_DDCUTIL | 49 | #endif //ifdef WITH_DDCUTIL | ||
50 | //Per display properties | 50 | //Per display properties | ||
51 | //destription mapped to vcp values for easy retrieval | 51 | //destription mapped to vcp values for easy retrieval | ||
52 | QVector<QMap<QString, int> > m_descrToVcp_perDisp; | 52 | QVector<int> m_usedVcp; | ||
53 | QVector<QMap<int, QMap<int, QString> > > m_vcpTovcpValueWithDescr_perDisp; | 53 | QVector<QVector<uint16_t>> m_supportedVcp_perDisp; | ||
54 | | ||||
55 | 54 | | |||
56 | long m_tmpCurrentBrightness; | 55 | long m_tmpCurrentBrightness; | ||
57 | QTimer m_setBrightnessEventFilter; | 56 | QTimer m_setBrightnessEventFilter; | ||
58 | int m_lastBrightnessKnown; | 57 | int m_lastBrightnessKnown; | ||
59 | int m_lastMaxBrightnessKnown; | 58 | int m_lastMaxBrightnessKnown; | ||
60 | }; | 59 | }; | ||
61 | 60 | | |||
62 | #endif //DDCUTILBRIGHTNESS_H | 61 | #endif //DDCUTILBRIGHTNESS_H |
Doesn't this need to stay ifdef?