Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
769e6952
Commit
769e6952
authored
May 05, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'thread_test' of github.com:mavlink/qgroundcontrol into thread_test
parents
206294e1
6be9c52b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
3 deletions
+40
-3
QGCSettingsWidget.cc
src/ui/QGCSettingsWidget.cc
+13
-0
QGCSettingsWidget.h
src/ui/QGCSettingsWidget.h
+1
-0
QGCSettingsWidget.ui
src/ui/QGCSettingsWidget.ui
+26
-3
No files found.
src/ui/QGCSettingsWidget.cc
View file @
769e6952
...
...
@@ -35,6 +35,9 @@ QGCSettingsWidget::QGCSettingsWidget(QWidget *parent, Qt::WindowFlags flags) :
this
->
window
()
->
setWindowTitle
(
tr
(
"QGroundControl Settings"
));
// Settings reset
connect
(
ui
->
resetSettingsButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
resetSettings
()));
// Audio preferences
ui
->
audioMuteCheckBox
->
setChecked
(
GAudioOutput
::
instance
()
->
isMuted
());
connect
(
ui
->
audioMuteCheckBox
,
SIGNAL
(
toggled
(
bool
)),
GAudioOutput
::
instance
(),
SLOT
(
mute
(
bool
)));
...
...
@@ -193,3 +196,13 @@ void QGCSettingsWidget::selectCustomMode(int mode)
MainWindow
::
instance
()
->
setCustomMode
(
static_cast
<
enum
MainWindow
::
CUSTOM_MODE
>
(
ui
->
customModeComboBox
->
itemData
(
mode
).
toInt
()));
MainWindow
::
instance
()
->
showInfoMessage
(
tr
(
"Please restart QGroundControl"
),
tr
(
"The optimization selection was changed. The application needs to be closed and restarted to put all optimizations into effect."
));
}
void
QGCSettingsWidget
::
resetSettings
()
{
QSettings
settings
;
settings
.
sync
();
settings
.
clear
();
// Write current application version
settings
.
setValue
(
"QGC_APPLICATION_VERSION"
,
QGC_APPLICATION_VERSION
);
settings
.
sync
();
}
src/ui/QGCSettingsWidget.h
View file @
769e6952
...
...
@@ -23,6 +23,7 @@ public slots:
void
setDefaultStyle
();
void
selectStylesheet
();
void
selectCustomMode
(
int
mode
);
void
resetSettings
();
private:
MainWindow
*
mainWindow
;
...
...
src/ui/QGCSettingsWidget.ui
View file @
769e6952
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
5
28
</width>
<height>
455
</height>
<width>
5
34
</width>
<height>
517
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
...
...
@@ -159,11 +159,34 @@
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
0
</height>
<height>
2
0
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox_2"
>
<property
name=
"title"
>
<string>
Danger Zone
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
columnstretch=
"10,0"
>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Delete all settings, layouts and restore defaults
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"resetSettingsButton"
>
<property
name=
"text"
>
<string>
Reset Settings
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment