mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML-UI: allow toggling verbose mode from the UI
Hidden in the Developer menu. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
41c59c1c8d
commit
c3ebeadb34
3 changed files with 28 additions and 0 deletions
|
@ -106,6 +106,15 @@ MobileComponents.ApplicationWindow {
|
||||||
stackView.push(themetest)
|
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
|
] // end actions
|
||||||
|
|
|
@ -387,6 +387,19 @@ void QMLManager::setLocationServiceEnabled(bool locationServiceEnabled)
|
||||||
locationProvider->serviceEnable(m_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
|
QString QMLManager::cloudPassword() const
|
||||||
{
|
{
|
||||||
return m_cloudPassword;
|
return m_cloudPassword;
|
||||||
|
|
|
@ -19,6 +19,7 @@ class QMLManager : public QObject
|
||||||
Q_PROPERTY(int timeThreshold READ timeThreshold WRITE setTimeThreshold NOTIFY timeThresholdChanged)
|
Q_PROPERTY(int timeThreshold READ timeThreshold WRITE setTimeThreshold NOTIFY timeThresholdChanged)
|
||||||
Q_PROPERTY(bool loadFromCloud READ loadFromCloud WRITE setLoadFromCloud NOTIFY loadFromCloudChanged)
|
Q_PROPERTY(bool loadFromCloud READ loadFromCloud WRITE setLoadFromCloud NOTIFY loadFromCloudChanged)
|
||||||
Q_PROPERTY(QString startPageText READ startPageText WRITE setStartPageText NOTIFY startPageTextChanged)
|
Q_PROPERTY(QString startPageText READ startPageText WRITE setStartPageText NOTIFY startPageTextChanged)
|
||||||
|
Q_PROPERTY(bool verboseEnabled READ verboseEnabled WRITE setVerboseEnabled NOTIFY verboseEnabledChanged)
|
||||||
public:
|
public:
|
||||||
QMLManager();
|
QMLManager();
|
||||||
~QMLManager();
|
~QMLManager();
|
||||||
|
@ -37,6 +38,9 @@ public:
|
||||||
bool locationServiceEnabled() const;
|
bool locationServiceEnabled() const;
|
||||||
void setLocationServiceEnabled(bool locationServiceEnable);
|
void setLocationServiceEnabled(bool locationServiceEnable);
|
||||||
|
|
||||||
|
bool verboseEnabled() const;
|
||||||
|
void setVerboseEnabled(bool verboseMode);
|
||||||
|
|
||||||
int distanceThreshold() const;
|
int distanceThreshold() const;
|
||||||
void setDistanceThreshold(int distance);
|
void setDistanceThreshold(int distance);
|
||||||
|
|
||||||
|
@ -83,6 +87,7 @@ private:
|
||||||
bool m_saveCloudPassword;
|
bool m_saveCloudPassword;
|
||||||
QString m_logText;
|
QString m_logText;
|
||||||
bool m_locationServiceEnabled;
|
bool m_locationServiceEnabled;
|
||||||
|
bool m_verboseEnabled;
|
||||||
int m_distanceThreshold;
|
int m_distanceThreshold;
|
||||||
int m_timeThreshold;
|
int m_timeThreshold;
|
||||||
GpsLocation *locationProvider;
|
GpsLocation *locationProvider;
|
||||||
|
@ -97,6 +102,7 @@ signals:
|
||||||
void cloudPasswordChanged();
|
void cloudPasswordChanged();
|
||||||
void saveCloudPasswordChanged();
|
void saveCloudPasswordChanged();
|
||||||
void locationServiceEnabledChanged();
|
void locationServiceEnabledChanged();
|
||||||
|
void verboseEnabledChanged();
|
||||||
void logTextChanged();
|
void logTextChanged();
|
||||||
void timeThresholdChanged();
|
void timeThresholdChanged();
|
||||||
void distanceThresholdChanged();
|
void distanceThresholdChanged();
|
||||||
|
|
Loading…
Add table
Reference in a new issue