17 #ifndef DEVICECONFIGPARSER_H 18 #define DEVICECONFIGPARSER_H 23 class DeviceConfigParser:
public QObject
26 Q_PROPERTY(QString name READ name WRITE setName NOTIFY changed)
28 Q_PROPERTY(Qt::ScreenOrientation primaryOrientation READ primaryOrientation NOTIFY changed)
29 Q_PROPERTY(Qt::ScreenOrientations supportedOrientations READ supportedOrientations NOTIFY changed)
30 Q_PROPERTY(Qt::ScreenOrientation landscapeOrientation READ landscapeOrientation NOTIFY changed)
31 Q_PROPERTY(Qt::ScreenOrientation invertedLandscapeOrientation READ invertedLandscapeOrientation NOTIFY changed)
32 Q_PROPERTY(Qt::ScreenOrientation portraitOrientation READ portraitOrientation NOTIFY changed)
33 Q_PROPERTY(Qt::ScreenOrientation invertedPortraitOrientation READ invertedPortraitOrientation NOTIFY changed)
34 Q_PROPERTY(QString category READ category NOTIFY changed)
37 DeviceConfigParser(QObject *parent =
nullptr);
40 void setName(
const QString &name);
42 Qt::ScreenOrientation primaryOrientation()
const;
43 Qt::ScreenOrientations supportedOrientations()
const;
44 Qt::ScreenOrientation landscapeOrientation()
const;
45 Qt::ScreenOrientation invertedLandscapeOrientation()
const;
46 Qt::ScreenOrientation portraitOrientation()
const;
47 Qt::ScreenOrientation invertedPortraitOrientation()
const;
48 QString category()
const;
57 QStringList readOrientationsFromConfig(
const QString &key)
const;
58 QString readOrientationFromConfig(
const QString &key)
const;
59 Qt::ScreenOrientation stringToOrientation(
const QString &orientationString, Qt::ScreenOrientation defaultValue)
const;