From 3bee40ad8ecbcf8a661a453f10b839267c2131b8 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 27 Aug 2020 15:42:01 +0200 Subject: [PATCH] clean out unused experience settings --- nymea-app/stylecontroller.cpp | 22 ------------------- nymea-app/stylecontroller.h | 10 --------- .../appsettings/LookAndFeelSettingsPage.qml | 19 ---------------- 3 files changed, 51 deletions(-) diff --git a/nymea-app/stylecontroller.cpp b/nymea-app/stylecontroller.cpp index 9a135b8d..1074226b 100644 --- a/nymea-app/stylecontroller.cpp +++ b/nymea-app/stylecontroller.cpp @@ -75,28 +75,6 @@ QStringList StyleController::allStyles() const return dir.entryList(QDir::Dirs); } -QString StyleController::currentExperience() const -{ - QSettings settings; - return settings.value("experience", "Default").toString(); -} - -void StyleController::setCurrentExperience(const QString ¤tExperience) -{ - QSettings settings; - if (settings.value("experience").toString() != currentExperience) { - settings.setValue("experience", currentExperience); - emit currentExperienceChanged(); - } -} - -QStringList StyleController::allExperiences() const -{ - QDir dir(":/ui/experiences"); - qDebug() << "experiences:" << dir.entryList(); - return QStringList() << "Default" << dir.entryList(); -} - void StyleController::setSystemFont(const QFont &font) { QApplication::setFont(font); diff --git a/nymea-app/stylecontroller.h b/nymea-app/stylecontroller.h index 14f50c81..70293ad3 100644 --- a/nymea-app/stylecontroller.h +++ b/nymea-app/stylecontroller.h @@ -39,9 +39,6 @@ class StyleController : public QObject Q_PROPERTY(QString currentStyle READ currentStyle WRITE setCurrentStyle NOTIFY currentStyleChanged) Q_PROPERTY(QStringList allStyles READ allStyles CONSTANT) - Q_PROPERTY(QString currentExperience READ currentExperience WRITE setCurrentExperience NOTIFY currentExperienceChanged) - Q_PROPERTY(QStringList allExperiences READ allExperiences CONSTANT) - public: explicit StyleController(QObject *parent = nullptr); @@ -50,17 +47,10 @@ public: QStringList allStyles() const; - QString currentExperience() const; - void setCurrentExperience(const QString ¤tExperience); - - QStringList allExperiences() const; - Q_INVOKABLE void setSystemFont(const QFont &font); signals: void currentStyleChanged(); - void currentExperienceChanged(); - }; #endif // STYLECONTROLLER_H diff --git a/nymea-app/ui/appsettings/LookAndFeelSettingsPage.qml b/nymea-app/ui/appsettings/LookAndFeelSettingsPage.qml index 8d0370b1..66d6a1d5 100644 --- a/nymea-app/ui/appsettings/LookAndFeelSettingsPage.qml +++ b/nymea-app/ui/appsettings/LookAndFeelSettingsPage.qml @@ -120,25 +120,6 @@ SettingsPageBase { onClicked: settings.showConnectionTabs = checked } - RowLayout { - Layout.leftMargin: app.margins - Layout.rightMargin: app.margins - visible: settings.showHiddenOptions - - Label { - Layout.fillWidth: true - text: qsTr("Experience mode") - } - - ComboBox { - currentIndex: model.indexOf(styleController.currentExperience) - model: styleController.allExperiences - onActivated: { - styleController.currentExperience = model[index] - } - } - } - SettingsPageSectionHeader { text: qsTr("Regional") }