Commit 5407cd31 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Add a "showTitle" property to SensorFaceController

Can be used by faces to determine if they should show a title at all.
parent f9ff4480
......@@ -375,6 +375,24 @@ void SensorFaceController::setTitle(const QString &title)
emit titleChanged();
bool SensorFaceController::showTitle() const
return d->appearanceGroup.readEntry("showTitle", true);
void SensorFaceController::setShowTitle(bool show)
if (show == showTitle()) {
d->appearanceGroup.writeEntry("showTitle", show);
emit showTitleChanged();
QJsonArray SensorFaceController::totalSensors() const
return d->totalSensors;
......@@ -45,6 +45,7 @@ class SENSORFACES_EXPORT SensorFaceController : public QObject
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
Q_PROPERTY(bool showTitle READ showTitle WRITE setShowTitle NOTIFY showTitleChanged)
Q_PROPERTY(QString faceId READ faceId WRITE setFaceId NOTIFY faceIdChanged)
Q_PROPERTY(QJsonArray totalSensors READ totalSensors WRITE setTotalSensors NOTIFY totalSensorsChanged)
Q_PROPERTY(QJsonArray highPrioritySensorIds READ highPrioritySensorIds WRITE setHighPrioritySensorIds NOTIFY highPrioritySensorIdsChanged)
......@@ -86,6 +87,9 @@ public:
QString title() const;
void setTitle(const QString &title);
bool showTitle() const;
void setShowTitle(bool show);
QJsonArray totalSensors() const;
void setTotalSensors(const QJsonArray &sensor);
......@@ -124,6 +128,7 @@ public:
void faceIdChanged();
void titleChanged();
void showTitleChanged();
void totalSensorsChanged();
void highPrioritySensorIdsChanged();
void lowPrioritySensorIdsChanged();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment