23class DeviceConfig:
public QObject
26 Q_PROPERTY(QString name READ name NOTIFY changed)
29 Q_PROPERTY(Qt::ScreenOrientation primaryOrientation READ primaryOrientation NOTIFY changed)
30 Q_PROPERTY(Qt::ScreenOrientations supportedOrientations READ supportedOrientations NOTIFY changed)
31 Q_PROPERTY(Qt::ScreenOrientation landscapeOrientation READ landscapeOrientation NOTIFY changed)
32 Q_PROPERTY(Qt::ScreenOrientation invertedLandscapeOrientation READ invertedLandscapeOrientation NOTIFY changed)
33 Q_PROPERTY(Qt::ScreenOrientation portraitOrientation READ portraitOrientation NOTIFY changed)
34 Q_PROPERTY(Qt::ScreenOrientation invertedPortraitOrientation READ invertedPortraitOrientation NOTIFY changed)
35 Q_PROPERTY(QString category READ category NOTIFY changed)
36 Q_PROPERTY(
bool supportsMultiColorLed READ supportsMultiColorLed NOTIFY changed)
38 Q_PROPERTY(quint8 sensorLocationX READ sensorLocationX NOTIFY changed FINAL)
39 Q_PROPERTY(quint8 sensorLocationY READ sensorLocationY NOTIFY changed FINAL)
40 Q_PROPERTY(quint8 sensorRadius READ sensorRadius NOTIFY changed FINAL)
42 Q_PROPERTY(quint16 collapsedPanelHeight READ collapsedPanelHeight NOTIFY changed)
45 DeviceConfig(QObject *parent =
nullptr);
50 Qt::ScreenOrientation primaryOrientation()
const;
51 Qt::ScreenOrientations supportedOrientations()
const;
52 Qt::ScreenOrientation landscapeOrientation()
const;
53 Qt::ScreenOrientation invertedLandscapeOrientation()
const;
54 Qt::ScreenOrientation portraitOrientation()
const;
55 Qt::ScreenOrientation invertedPortraitOrientation()
const;
56 QString category()
const;
57 bool supportsMultiColorLed()
const;
59 quint8 sensorLocationX()
const;
60 quint8 sensorLocationY()
const;
61 quint8 sensorRadius()
const;
63 quint16 collapsedPanelHeight()
const;
66 Q_INVOKABLE
void refresh() { Q_EMIT changed(); }
75 std::unique_ptr<DeviceInfo> m_info;
77 Qt::ScreenOrientation stringToOrientation(
const std::string &orientationString, Qt::ScreenOrientation defaultValue)
const;