Add "Send anonymous telemetry" checkbox to Preferences dialog

This commit is contained in:
Dmitri Ovodok 2019-12-24 14:49:00 +02:00
parent 02f6aae684
commit bc3e62b281
3 changed files with 281 additions and 262 deletions

View file

@ -98,7 +98,7 @@ void Preferences::init(bool storeInMemoryOnly)
{PREF_APP_STARTUP_STARTSCORE, new StringPreference(":/data/My_First_Score.mscx", false)},
{PREF_UI_APP_STARTUP_SHOWTOURS, new BoolPreference(true)},
{PREF_APP_WORKSPACE, new StringPreference("Basic", false)},
{PREF_APP_TELEMETRY_ALLOWED, new BoolPreference(false)},
{PREF_APP_TELEMETRY_ALLOWED, new BoolPreference(false, false)},
{PREF_APP_STARTUP_TELEMETRY_ACCESS_REQUESTED, new StringPreference("", false)},
{PREF_EXPORT_AUDIO_NORMALIZE, new BoolPreference(true)},
{PREF_EXPORT_AUDIO_SAMPLERATE, new IntPreference(44100, false)},

View file

@ -372,6 +372,7 @@ void PreferenceDialog::updateValues(bool useDefaultValues)
showSplashScreen->setChecked(preferences.getBool(PREF_UI_APP_STARTUP_SHOWSPLASHSCREEN));
showStartcenter->setChecked(preferences.getBool(PREF_UI_APP_STARTUP_SHOWSTARTCENTER));
showTours->setChecked(preferences.getBool(PREF_UI_APP_STARTUP_SHOWTOURS));
collectTelemetry->setChecked(preferences.getBool(PREF_APP_TELEMETRY_ALLOWED));
alsaDriver->setChecked(preferences.getBool(PREF_IO_ALSA_USEALSAAUDIO));
jackDriver->setChecked(preferences.getBool(PREF_IO_JACK_USEJACKAUDIO) || preferences.getBool(PREF_IO_JACK_USEJACKMIDI));
@ -965,6 +966,7 @@ void PreferenceDialog::apply()
preferences.setPreference(PREF_UI_APP_STARTUP_SHOWSPLASHSCREEN, showSplashScreen->isChecked());
preferences.setPreference(PREF_UI_APP_STARTUP_SHOWSTARTCENTER, showStartcenter->isChecked());
preferences.setPreference(PREF_UI_APP_STARTUP_SHOWTOURS, showTours->isChecked());
preferences.setPreference(PREF_APP_TELEMETRY_ALLOWED, collectTelemetry->isChecked());
preferences.setPreference(PREF_UI_CANVAS_BG_USECOLOR, bgColorButton->isChecked());
preferences.setPreference(PREF_UI_CANVAS_BG_COLOR, bgColorLabel->color());
preferences.setPreference(PREF_UI_CANVAS_FG_USECOLOR, fgColorButton->isChecked());

View file

@ -100,265 +100,7 @@
<string>General</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" rowspan="2">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Program Start</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="emptySession">
<property name="text">
<string>Start empty</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="showStartcenter">
<property name="text">
<string>Show start center</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="lastSession">
<property name="text">
<string>Continue last session</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
<widget class="QRadioButton" name="scoreSession">
<property name="text">
<string>Start with score:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="sessionScore">
<property name="accessibleName">
<string>Start with score</string>
</property>
<property name="accessibleDescription">
<string>Insert path to starting score</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="startWithButton">
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="accessibleName">
<string>Choose starting score</string>
</property>
<property name="accessibleDescription">
<string>Opens a file dialog for selecting the starting score</string>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
<normaloff>:/data/icons/document-open.svg</normaloff>:/data/icons/document-open.svg</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="showSplashScreen">
<property name="text">
<string>Show splash screen</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="newSession">
<property name="text">
<string>Start with new score</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="playPanelShow">
<property name="text">
<string>Show play panel</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="navigatorShow">
<property name="text">
<string>Show navigator</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="showTours">
<property name="text">
<string>Show tours</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="1">
<widget class="QGroupBox" name="oscServer">
<property name="title">
<string>OSC Remote Control</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string extracomment="The UDP port number on which the MuseScore OSC server will listen on">Port number:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="oscPort">
<property name="accessibleName">
<string>Port number</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>5282</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_15">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QGroupBox" name="autoSave">
<property name="title">
<string>Auto Save</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>9</number>
</property>
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item>
<widget class="QLabel" name="label_25">
<property name="text">
<string>Save every:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="autoSaveTime">
<property name="accessibleName">
<string>Select delay (in minutes) between auto saves</string>
</property>
<property name="suffix">
<string extracomment="minutes">min</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="value">
<number>2</number>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_10">
<property name="title">
<string>Language</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QComboBox" name="language">
<property name="accessibleName">
<string>Select language</string>
</property>
<property name="accessibleDescription">
<string>Select the language of the user interface</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="updateTranslation">
<property name="text">
<string>Update Translations</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" rowspan="3">
<item row="3" column="0" rowspan="3">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>Folders</string>
@ -665,7 +407,7 @@
</layout>
</widget>
</item>
<item row="1" column="1" rowspan="2">
<item row="2" column="1" rowspan="2">
<widget class="QGroupBox" name="groupBox_12">
<property name="title">
<string>Theme</string>
@ -757,7 +499,87 @@
</layout>
</widget>
</item>
<item row="5" column="0">
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_10">
<property name="title">
<string>Language</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QComboBox" name="language">
<property name="accessibleName">
<string>Select language</string>
</property>
<property name="accessibleDescription">
<string>Select the language of the user interface</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="updateTranslation">
<property name="text">
<string>Update Translations</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="1">
<widget class="QGroupBox" name="oscServer">
<property name="title">
<string>OSC Remote Control</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string extracomment="The UDP port number on which the MuseScore OSC server will listen on">Port number:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="oscPort">
<property name="accessibleName">
<string>Port number</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>5282</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_15">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="6" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -770,6 +592,200 @@
</property>
</spacer>
</item>
<item row="0" column="0" rowspan="3">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Program Start</string>
</property>
<layout class="QGridLayout" name="programStartGridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="emptySession">
<property name="text">
<string>Start empty</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="showStartcenter">
<property name="text">
<string>Show start center</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="lastSession">
<property name="text">
<string>Continue last session</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
<widget class="QRadioButton" name="scoreSession">
<property name="text">
<string>Start with score:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="sessionScore">
<property name="accessibleName">
<string>Start with score</string>
</property>
<property name="accessibleDescription">
<string>Insert path to starting score</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="startWithButton">
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="accessibleName">
<string>Choose starting score</string>
</property>
<property name="accessibleDescription">
<string>Opens a file dialog for selecting the starting score</string>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
<normaloff>:/data/icons/document-open.svg</normaloff>:/data/icons/document-open.svg</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="showSplashScreen">
<property name="text">
<string>Show splash screen</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="newSession">
<property name="text">
<string>Start with new score</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="playPanelShow">
<property name="text">
<string>Show play panel</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="navigatorShow">
<property name="text">
<string>Show navigator</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="showTours">
<property name="text">
<string>Show tours</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="1">
<widget class="QGroupBox" name="autoSave">
<property name="title">
<string>Auto Save</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>9</number>
</property>
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item>
<widget class="QLabel" name="label_25">
<property name="text">
<string>Save every:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="autoSaveTime">
<property name="accessibleName">
<string>Select delay (in minutes) between auto saves</string>
</property>
<property name="suffix">
<string extracomment="minutes">min</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="value">
<number>2</number>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_15">
<property name="title">
<string>Telemetry</string>
</property>
<layout class="QGridLayout" name="gridLayout_14">
<item row="0" column="0">
<widget class="QCheckBox" name="collectTelemetry">
<property name="text">
<string>Send anonymous telemetry to MuseScore</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabCanvas">
@ -4189,6 +4205,7 @@ Adjusting latency can help synchronize your MIDI hardware with MuseScore's inter
<tabstop>myExtensionsButton</tabstop>
<tabstop>language</tabstop>
<tabstop>updateTranslation</tabstop>
<tabstop>collectTelemetry</tabstop>
<tabstop>styleName</tabstop>
<tabstop>iconWidth</tabstop>
<tabstop>iconHeight</tabstop>