diff options
-rw-r--r-- | qt-mobile/qml/main.qml | 9 | ||||
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 13 | ||||
-rw-r--r-- | qt-mobile/qmlmanager.h | 6 |
3 files changed, 28 insertions, 0 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index cd1e2501a..30e79e22c 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -106,6 +106,15 @@ MobileComponents.ApplicationWindow { stackView.push(themetest) } } + Action { + checkable: true + checked: manager.verboseEnabled + text: checked ? "Disable verbose (for adb logcat)" : "Enable verbose (for adb logcat)" + onToggled: { + manager.verboseEnabled = checked; + checked = !checked; + } + } } ] // end actions diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index f922b9b51..ca4102370 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -387,6 +387,19 @@ void QMLManager::setLocationServiceEnabled(bool locationServiceEnabled) locationProvider->serviceEnable(m_locationServiceEnabled); } +bool QMLManager::verboseEnabled() const +{ + return m_verboseEnabled; +} + +void QMLManager::setVerboseEnabled(bool verboseMode) +{ + m_verboseEnabled = verboseMode; + verbose = verboseMode; + qDebug() << "verbose is" << verbose; + emit verboseEnabledChanged(); +} + QString QMLManager::cloudPassword() const { return m_cloudPassword; diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h index 37161c832..e9b0d27e7 100644 --- a/qt-mobile/qmlmanager.h +++ b/qt-mobile/qmlmanager.h @@ -19,6 +19,7 @@ class QMLManager : public QObject Q_PROPERTY(int timeThreshold READ timeThreshold WRITE setTimeThreshold NOTIFY timeThresholdChanged) Q_PROPERTY(bool loadFromCloud READ loadFromCloud WRITE setLoadFromCloud NOTIFY loadFromCloudChanged) Q_PROPERTY(QString startPageText READ startPageText WRITE setStartPageText NOTIFY startPageTextChanged) + Q_PROPERTY(bool verboseEnabled READ verboseEnabled WRITE setVerboseEnabled NOTIFY verboseEnabledChanged) public: QMLManager(); ~QMLManager(); @@ -37,6 +38,9 @@ public: bool locationServiceEnabled() const; void setLocationServiceEnabled(bool locationServiceEnable); + bool verboseEnabled() const; + void setVerboseEnabled(bool verboseMode); + int distanceThreshold() const; void setDistanceThreshold(int distance); @@ -83,6 +87,7 @@ private: bool m_saveCloudPassword; QString m_logText; bool m_locationServiceEnabled; + bool m_verboseEnabled; int m_distanceThreshold; int m_timeThreshold; GpsLocation *locationProvider; @@ -97,6 +102,7 @@ signals: void cloudPasswordChanged(); void saveCloudPasswordChanged(); void locationServiceEnabledChanged(); + void verboseEnabledChanged(); void logTextChanged(); void timeThresholdChanged(); void distanceThresholdChanged(); |