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
d7a47fad
Commit
d7a47fad
authored
Sep 28, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Map provider to use is now in settings
parent
7d841636
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
2 deletions
+69
-2
SettingsDialog.cc
src/ui/SettingsDialog.cc
+34
-1
SettingsDialog.h
src/ui/SettingsDialog.h
+4
-0
SettingsDialog.ui
src/ui/SettingsDialog.ui
+31
-1
No files found.
src/ui/SettingsDialog.cc
View file @
d7a47fad
...
...
@@ -37,6 +37,7 @@
#include "QGCFileDialog.h"
#include "QGCMessageBox.h"
#include "MainToolBar.h"
#include "FlightMapSettings.h"
SettingsDialog
::
SettingsDialog
(
QWidget
*
parent
,
int
showTab
,
Qt
::
WindowFlags
flags
)
:
QDialog
(
parent
,
flags
),
...
...
@@ -94,7 +95,18 @@ _ui(new Ui::SettingsDialog)
connect
(
_ui
->
styleChooser
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
styleChanged
(
int
)));
connect
(
_ui
->
browseSavedFilesLocation
,
&
QPushButton
::
clicked
,
this
,
&
SettingsDialog
::
_selectSavedFilesDirectory
);
connect
(
_ui
->
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
SettingsDialog
::
_validateBeforeClose
);
// Flight Map settings
FlightMapSettings
*
fmSettings
=
FlightMapSettings
::
instance
();
_ui
->
bingMapRadio
->
setChecked
(
fmSettings
->
mapProvider
()
==
"Bing"
);
_ui
->
googleMapRadio
->
setChecked
(
fmSettings
->
mapProvider
()
==
"Google"
);
_ui
->
openMapRadio
->
setChecked
(
fmSettings
->
mapProvider
()
==
"Open"
);
connect
(
_ui
->
bingMapRadio
,
&
QRadioButton
::
clicked
,
this
,
&
SettingsDialog
::
_bingMapRadioClicked
);
connect
(
_ui
->
googleMapRadio
,
&
QRadioButton
::
clicked
,
this
,
&
SettingsDialog
::
_googleMapRadioClicked
);
connect
(
_ui
->
openMapRadio
,
&
QRadioButton
::
clicked
,
this
,
&
SettingsDialog
::
_openMapRadioClicked
);
switch
(
showTab
)
{
case
ShowCommLinks
:
_ui
->
tabWidget
->
setCurrentWidget
(
pLinkConf
);
...
...
@@ -193,3 +205,24 @@ void SettingsDialog::on_showRSSI_clicked(bool checked)
{
_mainWindow
->
getMainToolBar
()
->
viewStateChanged
(
TOOL_BAR_SHOW_RSSI
,
checked
);
}
void
SettingsDialog
::
_bingMapRadioClicked
(
bool
checked
)
{
if
(
checked
)
{
FlightMapSettings
::
instance
()
->
setMapProvider
(
"Bing"
);
}
}
void
SettingsDialog
::
_googleMapRadioClicked
(
bool
checked
)
{
if
(
checked
)
{
FlightMapSettings
::
instance
()
->
setMapProvider
(
"Google"
);
}
}
void
SettingsDialog
::
_openMapRadioClicked
(
bool
checked
)
{
if
(
checked
)
{
FlightMapSettings
::
instance
()
->
setMapProvider
(
"Open"
);
}
}
src/ui/SettingsDialog.h
View file @
d7a47fad
...
...
@@ -62,6 +62,10 @@ private slots:
void
on_showMav_clicked
(
bool
checked
);
void
on_showRSSI_clicked
(
bool
checked
);
void
_bingMapRadioClicked
(
bool
checked
);
void
_googleMapRadioClicked
(
bool
checked
);
void
_openMapRadioClicked
(
bool
checked
);
private:
MainWindow
*
_mainWindow
;
...
...
src/ui/SettingsDialog.ui
View file @
d7a47fad
...
...
@@ -7,7 +7,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
500
</width>
<height>
596
</height>
<height>
689
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
...
...
@@ -115,6 +115,36 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox_4"
>
<property
name=
"title"
>
<string>
Map Provider
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QRadioButton"
name=
"bingMapRadio"
>
<property
name=
"text"
>
<string>
Bing
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"googleMapRadio"
>
<property
name=
"text"
>
<string>
Google
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"openMapRadio"
>
<property
name=
"text"
>
<string>
Open Streets
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox"
>
<property
name=
"sizePolicy"
>
...
...
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