17 #ifndef DEVICECONFIGPARSER_H 18 #define DEVICECONFIGPARSER_H 23 class DeviceConfigParser:
public QObject
26 Q_PROPERTY(QString name READ name WRITE setName 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)
39 DeviceConfigParser(QObject *parent =
nullptr);
42 void setName(
const QString &name);
44 Qt::ScreenOrientation primaryOrientation()
const;
45 Qt::ScreenOrientations supportedOrientations()
const;
46 Qt::ScreenOrientation landscapeOrientation()
const;
47 Qt::ScreenOrientation invertedLandscapeOrientation()
const;
48 Qt::ScreenOrientation portraitOrientation()
const;
49 Qt::ScreenOrientation invertedPortraitOrientation()
const;
50 QString category()
const;
51 bool supportsMultiColorLed()
const;
60 QStringList readOrientationsFromConfig(
const QString &key)
const;
61 QString readOrientationFromConfig(
const QString &key)
const;
62 Qt::ScreenOrientation stringToOrientation(
const QString &orientationString, Qt::ScreenOrientation defaultValue)
const;
63 bool readBoolFromConfig(
const QString &key,
bool defaultValue)
const;