diff --git a/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.cpp b/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.cpp index 054fefd70..530bb543e 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.cpp @@ -49,6 +49,7 @@ GeneralSettings::GeneralSettings() : m_autoSelect(true), m_useUDPMirror(false), m_useExpertMode(false), + m_collectUsageData(true), m_dialog(0) {} @@ -125,6 +126,7 @@ QWidget *GeneralSettings::createPage(QWidget *parent) m_page->checkAutoSelect->setChecked(m_autoSelect); m_page->cbUseUDPMirror->setChecked(m_useUDPMirror); m_page->cbExpertMode->setChecked(m_useExpertMode); + m_page->cbUsageData->setChecked(m_collectUsageData); m_page->colorButton->setColor(StyleHelper::baseColor()); connect(m_page->resetButton, SIGNAL(clicked()), this, SLOT(resetInterfaceColor())); @@ -145,6 +147,7 @@ void GeneralSettings::apply() m_useExpertMode = m_page->cbExpertMode->isChecked(); m_autoConnect = m_page->checkAutoConnect->isChecked(); m_autoSelect = m_page->checkAutoSelect->isChecked(); + m_collectUsageData = m_page->cbUsageData->isChecked(); } void GeneralSettings::finish() @@ -161,6 +164,7 @@ void GeneralSettings::readSettings(QSettings *qs) m_autoSelect = qs->value(QLatin1String("AutoSelect"), m_autoSelect).toBool(); m_useUDPMirror = qs->value(QLatin1String("UDPMirror"), m_useUDPMirror).toBool(); m_useExpertMode = qs->value(QLatin1String("ExpertMode"), m_useExpertMode).toBool(); + m_collectUsageData = qs->value(QLatin1String("CollectUsageData"), m_collectUsageData).toBool(); qs->endGroup(); } @@ -179,6 +183,7 @@ void GeneralSettings::saveSettings(QSettings *qs) qs->setValue(QLatin1String("AutoSelect"), m_autoSelect); qs->setValue(QLatin1String("UDPMirror"), m_useUDPMirror); qs->setValue(QLatin1String("ExpertMode"), m_useExpertMode); + qs->setValue(QLatin1String("CollectUsageData"), m_collectUsageData); qs->endGroup(); } @@ -249,6 +254,11 @@ bool GeneralSettings::useUDPMirror() const return m_useUDPMirror; } +bool GeneralSettings::collectUsageData() const +{ + return m_collectUsageData; +} + bool GeneralSettings::useExpertMode() const { return m_useExpertMode; diff --git a/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.h b/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.h index b03e71704..01c1c5f70 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.h @@ -57,6 +57,7 @@ public: bool autoConnect() const; bool autoSelect() const; bool useUDPMirror() const; + bool collectUsageData() const; void readSettings(QSettings *qs); void saveSettings(QSettings *qs); bool useExpertMode() const; @@ -79,6 +80,7 @@ private: bool m_autoSelect; bool m_useUDPMirror; bool m_useExpertMode; + bool m_collectUsageData; QPointer m_dialog; QList m_codecs; }; diff --git a/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.ui b/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.ui index 6eda799c1..2a727171f 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.ui +++ b/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.ui @@ -11,7 +11,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -20,17 +29,73 @@ General settings - - + + - User interface color: + Language: - + + + + Expert Mode: + + + + + + + + + + + + + + false + + + + + + true + + + + + + + Automatically connect an OpenPilot USB device: + + + true + + + + + + + + + + true + + + + - + + 0 + + + 0 + + + 0 + + 0 @@ -82,46 +147,46 @@ - + + + + User interface color: + + + + + + + Gather and upload usage data: + + + + - + + 0 + + + 0 + + + 0 + + 0 - - + + - - true - - - - - Save configuration settings on exit: - - - true - - - - - - - Automatically connect an OpenPilot USB device: - - - true - - - - + @@ -131,58 +196,14 @@ - - - - Automatically select an OpenPilot USB device: - - - true - - - - - - - false - - - - - - true - - - - - - - - - - - Use UDP Mirror + Use UDP Mirror: - - - - Expert Mode - - - - - - - - - - - + @@ -202,10 +223,33 @@ - - + + - Language: + Save configuration settings on exit: + + + true + + + + + + + Automatically select an OpenPilot USB device: + + + true + + + + + + + + + + true