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
a082814a
Commit
a082814a
authored
Jun 08, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:mavlink/qgroundcontrol into mavlink-ftp
parents
4d85f0b5
8714e12a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
49 deletions
+53
-49
MainWindow.cc
src/ui/MainWindow.cc
+37
-30
MainWindow.ui
src/ui/MainWindow.ui
+16
-19
No files found.
src/ui/MainWindow.cc
View file @
a082814a
...
@@ -217,8 +217,6 @@ void MainWindow::init()
...
@@ -217,8 +217,6 @@ void MainWindow::init()
toolBar
=
new
QGCToolBar
(
this
);
toolBar
=
new
QGCToolBar
(
this
);
this
->
addToolBar
(
toolBar
);
this
->
addToolBar
(
toolBar
);
ui
.
actionHardwareConfig
->
setText
(
tr
(
"Config"
));
// Add actions for average users (displayed next to each other)
// Add actions for average users (displayed next to each other)
QList
<
QAction
*>
actions
;
QList
<
QAction
*>
actions
;
actions
<<
ui
.
actionFlightView
;
actions
<<
ui
.
actionFlightView
;
...
@@ -229,10 +227,12 @@ void MainWindow::init()
...
@@ -229,10 +227,12 @@ void MainWindow::init()
// Add actions for advanced users (displayed in dropdown under "advanced")
// Add actions for advanced users (displayed in dropdown under "advanced")
QList
<
QAction
*>
advancedActions
;
QList
<
QAction
*>
advancedActions
;
advancedActions
<<
ui
.
actionSimulation
_
View
;
advancedActions
<<
ui
.
actionSimulationView
;
advancedActions
<<
ui
.
actionEngineersView
;
advancedActions
<<
ui
.
actionEngineersView
;
toolBar
->
setPerspectiveChangeAdvancedActions
(
advancedActions
);
toolBar
->
setPerspectiveChangeAdvancedActions
(
advancedActions
);
}
else
{
ui
.
actionHardwareConfig
->
setText
(
tr
(
"Hardware"
));
}
}
customStatusBar
=
new
QGCStatusBar
(
this
);
customStatusBar
=
new
QGCStatusBar
(
this
);
...
@@ -267,7 +267,7 @@ void MainWindow::init()
...
@@ -267,7 +267,7 @@ void MainWindow::init()
apmToolBar
->
setFlightPlanViewAction
(
ui
.
actionMissionView
);
apmToolBar
->
setFlightPlanViewAction
(
ui
.
actionMissionView
);
apmToolBar
->
setHardwareViewAction
(
ui
.
actionHardwareConfig
);
apmToolBar
->
setHardwareViewAction
(
ui
.
actionHardwareConfig
);
apmToolBar
->
setSoftwareViewAction
(
ui
.
actionSoftwareConfig
);
apmToolBar
->
setSoftwareViewAction
(
ui
.
actionSoftwareConfig
);
apmToolBar
->
setSimulationViewAction
(
ui
.
actionSimulation
_
View
);
apmToolBar
->
setSimulationViewAction
(
ui
.
actionSimulationView
);
apmToolBar
->
setTerminalViewAction
(
ui
.
actionTerminalView
);
apmToolBar
->
setTerminalViewAction
(
ui
.
actionTerminalView
);
QDockWidget
*
widget
=
new
QDockWidget
(
tr
(
"APM Tool Bar"
),
this
);
QDockWidget
*
widget
=
new
QDockWidget
(
tr
(
"APM Tool Bar"
),
this
);
...
@@ -436,10 +436,10 @@ QString MainWindow::getWindowStateKey()
...
@@ -436,10 +436,10 @@ QString MainWindow::getWindowStateKey()
{
{
if
(
UASManager
::
instance
()
->
getActiveUAS
())
if
(
UASManager
::
instance
()
->
getActiveUAS
())
{
{
return
QString
::
number
(
currentView
)
+
"_windowstate_"
+
UASManager
::
instance
()
->
getActiveUAS
()
->
getAutopilotTypeName
();
return
QString
::
number
(
currentView
)
+
"_windowstate_"
+
QString
::
number
(
getCustomMode
())
+
"_"
+
UASManager
::
instance
()
->
getActiveUAS
()
->
getAutopilotTypeName
();
}
}
else
else
return
QString
::
number
(
currentView
)
+
"_windowstate
"
;
return
QString
::
number
(
currentView
)
+
"_windowstate
_"
+
QString
::
number
(
getCustomMode
())
;
}
}
QString
MainWindow
::
getWindowGeometryKey
()
QString
MainWindow
::
getWindowGeometryKey
()
...
@@ -544,6 +544,15 @@ void MainWindow::buildCommonWidgets()
...
@@ -544,6 +544,15 @@ void MainWindow::buildCommonWidgets()
addToCentralStackedWidget
(
pilotView
,
VIEW_FLIGHT
,
"Pilot"
);
addToCentralStackedWidget
(
pilotView
,
VIEW_FLIGHT
,
"Pilot"
);
}
}
if
(
!
terminalView
)
{
terminalView
=
new
SubMainWindow
(
this
);
terminalView
->
setObjectName
(
"VIEW_TERMINAL"
);
TerminalConsole
*
terminalConsole
=
new
TerminalConsole
(
this
);
terminalView
->
setCentralWidget
(
terminalConsole
);
addToCentralStackedWidget
(
terminalView
,
VIEW_TERMINAL
,
tr
(
"Terminal View"
));
}
if
(
getCustomMode
()
==
CUSTOM_MODE_APM
)
{
if
(
getCustomMode
()
==
CUSTOM_MODE_APM
)
{
if
(
!
configView
)
if
(
!
configView
)
{
{
...
@@ -560,14 +569,7 @@ void MainWindow::buildCommonWidgets()
...
@@ -560,14 +569,7 @@ void MainWindow::buildCommonWidgets()
softwareConfigView
->
setCentralWidget
(
new
ApmSoftwareConfig
(
this
));
softwareConfigView
->
setCentralWidget
(
new
ApmSoftwareConfig
(
this
));
addToCentralStackedWidget
(
softwareConfigView
,
VIEW_SOFTWARE_CONFIG
,
"Software"
);
addToCentralStackedWidget
(
softwareConfigView
,
VIEW_SOFTWARE_CONFIG
,
"Software"
);
}
}
if
(
!
terminalView
)
{
terminalView
=
new
SubMainWindow
(
this
);
terminalView
->
setObjectName
(
"VIEW_TERMINAL"
);
TerminalConsole
*
terminalConsole
=
new
TerminalConsole
(
this
);
terminalView
->
setCentralWidget
(
terminalConsole
);
addToCentralStackedWidget
(
terminalView
,
VIEW_TERMINAL
,
tr
(
"Terminal View"
));
}
}
else
{
}
else
{
if
(
!
configView
)
if
(
!
configView
)
{
{
...
@@ -597,7 +599,7 @@ void MainWindow::buildCommonWidgets()
...
@@ -597,7 +599,7 @@ void MainWindow::buildCommonWidgets()
}
}
#endif
#endif
#if QGC_GOOGLE_EARTH_ENABLED
#if
def
QGC_GOOGLE_EARTH_ENABLED
if
(
!
googleEarthView
)
if
(
!
googleEarthView
)
{
{
googleEarthView
=
new
SubMainWindow
(
this
);
googleEarthView
=
new
SubMainWindow
(
this
);
...
@@ -1264,19 +1266,29 @@ void MainWindow::connectCommonActions()
...
@@ -1264,19 +1266,29 @@ void MainWindow::connectCommonActions()
perspectives
->
addAction
(
ui
.
actionEngineersView
);
perspectives
->
addAction
(
ui
.
actionEngineersView
);
perspectives
->
addAction
(
ui
.
actionMavlinkView
);
perspectives
->
addAction
(
ui
.
actionMavlinkView
);
perspectives
->
addAction
(
ui
.
actionFlightView
);
perspectives
->
addAction
(
ui
.
actionFlightView
);
perspectives
->
addAction
(
ui
.
actionSimulation
_
View
);
perspectives
->
addAction
(
ui
.
actionSimulationView
);
perspectives
->
addAction
(
ui
.
actionMissionView
);
perspectives
->
addAction
(
ui
.
actionMissionView
);
//perspectives->addAction(ui.actionConfiguration_2);
//perspectives->addAction(ui.actionConfiguration_2);
perspectives
->
addAction
(
ui
.
actionHardwareConfig
);
perspectives
->
addAction
(
ui
.
actionHardwareConfig
);
if
(
getCustomMode
()
==
CUSTOM_MODE_APM
)
{
perspectives
->
addAction
(
ui
.
actionSoftwareConfig
);
perspectives
->
addAction
(
ui
.
actionSoftwareConfig
);
}
perspectives
->
addAction
(
ui
.
actionTerminalView
);
perspectives
->
addAction
(
ui
.
actionTerminalView
);
perspectives
->
addAction
(
ui
.
actionUnconnectedView
);
perspectives
->
addAction
(
ui
.
actionUnconnectedView
);
perspectives
->
addAction
(
ui
.
actionGoogleEarthView
);
perspectives
->
addAction
(
ui
.
actionGoogleEarthView
);
perspectives
->
addAction
(
ui
.
actionLocal3DView
);
perspectives
->
addAction
(
ui
.
actionLocal3DView
);
perspectives
->
setExclusive
(
true
);
perspectives
->
setExclusive
(
true
);
/* Hide the actions that are not relevant */
ui
.
actionSoftwareConfig
->
setVisible
(
getCustomMode
()
==
CUSTOM_MODE_APM
);
#ifndef QGC_MAVGEN_ENABLED
ui
.
actionMavlinkView
->
setVisible
(
false
);
#endif
#ifndef QGC_GOOGLE_EARTH_ENABLED
ui
.
actionGoogleEarthView
->
setVisible
(
false
);
#endif
#ifndef QGC_OSG_ENABLED
ui
.
actionLocal3DView
->
setVisible
(
false
);
#endif
// Mark the right one as selected
// Mark the right one as selected
if
(
currentView
==
VIEW_ENGINEER
)
if
(
currentView
==
VIEW_ENGINEER
)
{
{
...
@@ -1295,8 +1307,8 @@ void MainWindow::connectCommonActions()
...
@@ -1295,8 +1307,8 @@ void MainWindow::connectCommonActions()
}
}
if
(
currentView
==
VIEW_SIMULATION
)
if
(
currentView
==
VIEW_SIMULATION
)
{
{
ui
.
actionSimulation
_
View
->
setChecked
(
true
);
ui
.
actionSimulationView
->
setChecked
(
true
);
ui
.
actionSimulation
_
View
->
activate
(
QAction
::
Trigger
);
ui
.
actionSimulationView
->
activate
(
QAction
::
Trigger
);
}
}
if
(
currentView
==
VIEW_MISSION
)
if
(
currentView
==
VIEW_MISSION
)
{
{
...
@@ -1360,21 +1372,16 @@ void MainWindow::connectCommonActions()
...
@@ -1360,21 +1372,16 @@ void MainWindow::connectCommonActions()
// Views actions
// Views actions
connect
(
ui
.
actionFlightView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadPilotView
()));
connect
(
ui
.
actionFlightView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadPilotView
()));
connect
(
ui
.
actionSimulation
_
View
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadSimulationView
()));
connect
(
ui
.
actionSimulationView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadSimulationView
()));
connect
(
ui
.
actionEngineersView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadEngineerView
()));
connect
(
ui
.
actionEngineersView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadEngineerView
()));
connect
(
ui
.
actionMissionView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadOperatorView
()));
connect
(
ui
.
actionMissionView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadOperatorView
()));
connect
(
ui
.
actionUnconnectedView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadUnconnectedView
()));
connect
(
ui
.
actionUnconnectedView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadUnconnectedView
()));
connect
(
ui
.
actionHardwareConfig
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadHardwareConfigView
()));
connect
(
ui
.
actionHardwareConfig
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadHardwareConfigView
()));
connect
(
ui
.
actionGoogleEarthView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadGoogleEarthView
()));
connect
(
ui
.
actionGoogleEarthView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadGoogleEarthView
()));
connect
(
ui
.
actionLocal3DView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadLocal3DView
()));
connect
(
ui
.
actionLocal3DView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadLocal3DView
()));
connect
(
ui
.
actionSimulationView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadSimulationView
()));
connect
(
ui
.
actionHardwareConfig
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadHardwareConfigView
()));
connect
(
ui
.
actionHardwareConfig
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadHardwareConfigView
()));
if
(
getCustomMode
()
==
CUSTOM_MODE_APM
)
{
connect
(
ui
.
actionSoftwareConfig
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadSoftwareConfigView
()));
connect
(
ui
.
actionSoftwareConfig
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadSoftwareConfigView
()));
connect
(
ui
.
actionTerminalView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadTerminalView
()));
connect
(
ui
.
actionTerminalView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadTerminalView
()));
}
connect
(
ui
.
actionMavlinkView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadMAVLinkView
()));
connect
(
ui
.
actionMavlinkView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadMAVLinkView
()));
// Help Actions
// Help Actions
...
@@ -2051,7 +2058,7 @@ void MainWindow::loadSimulationView()
...
@@ -2051,7 +2058,7 @@ void MainWindow::loadSimulationView()
{
{
storeViewState
();
storeViewState
();
currentView
=
VIEW_SIMULATION
;
currentView
=
VIEW_SIMULATION
;
ui
.
actionSimulation
_
View
->
setChecked
(
true
);
ui
.
actionSimulationView
->
setChecked
(
true
);
loadViewState
();
loadViewState
();
}
}
}
}
...
...
src/ui/MainWindow.ui
View file @
a082814a
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
1024
</width>
<width>
1024
</width>
<height>
2
2
</height>
<height>
2
1
</height>
</rect>
</rect>
</property>
</property>
<widget
class=
"QMenu"
name=
"menuMGround"
>
<widget
class=
"QMenu"
name=
"menuMGround"
>
...
@@ -95,13 +95,13 @@
...
@@ -95,13 +95,13 @@
<property
name=
"title"
>
<property
name=
"title"
>
<string>
Perspectives
</string>
<string>
Perspectives
</string>
</property>
</property>
<addaction
name=
"actionMissionView"
/>
<addaction
name=
"actionFlightView"
/>
<addaction
name=
"actionFlightView"
/>
<addaction
name=
"actionMissionView"
/>
<addaction
name=
"actionHardwareConfig"
/>
<addaction
name=
"actionHardwareConfig"
/>
<addaction
name=
"actionSoftwareConfig"
/>
<addaction
name=
"actionSoftwareConfig"
/>
<addaction
name=
"actionTerminalView"
/>
<addaction
name=
"actionTerminalView"
/>
<addaction
name=
"actionEngineersView"
/>
<addaction
name=
"actionSimulationView"
/>
<addaction
name=
"actionSimulationView"
/>
<addaction
name=
"actionEngineersView"
/>
<addaction
name=
"actionGoogleEarthView"
/>
<addaction
name=
"actionGoogleEarthView"
/>
<addaction
name=
"actionLocal3DView"
/>
<addaction
name=
"actionLocal3DView"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"separator"
/>
...
@@ -401,30 +401,21 @@
...
@@ -401,30 +401,21 @@
</property>
</property>
</action>
</action>
<action
name=
"actionFirmwareUpdateView"
>
<action
name=
"actionFirmwareUpdateView"
>
<property
name=
"icon"
>
<iconset
resource=
"../../qgroundcontrol.qrc"
>
<normaloff>
:/files/images/status/software-update-available.svg
</normaloff>
:/files/images/status/software-update-available.svg
</iconset>
</property>
<property
name=
"text"
>
<string>
Firmware Update
</string>
</property>
<property
name=
"toolTip"
>
<string>
Update the firmware of one of the connected autopilots
</string>
</property>
</action>
<action
name=
"actionSimulation_View"
>
<property
name=
"checkable"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
<bool>
true
</bool>
</property>
</property>
<property
name=
"visible"
>
<bool>
false
</bool>
</property>
<property
name=
"icon"
>
<property
name=
"icon"
>
<iconset
resource=
"../../qgroundcontrol.qrc"
>
<iconset
resource=
"../../qgroundcontrol.qrc"
>
<normaloff>
:/files/images/
control/launch.svg
</normaloff>
:/files/images/control/launch
.svg
</iconset>
<normaloff>
:/files/images/
status/software-update-available.svg
</normaloff>
:/files/images/status/software-update-available
.svg
</iconset>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Simulation
</string>
<string>
Firmware Update
</string>
</property>
</property>
<property
name=
"toolTip"
>
<property
name=
"toolTip"
>
<string>
Open the simulation view
</string>
<string>
Update the firmware of one of the connected autopilots
</string>
</property>
</property>
</action>
</action>
<action
name=
"actionHardwareConfig"
>
<action
name=
"actionHardwareConfig"
>
...
@@ -436,7 +427,7 @@
...
@@ -436,7 +427,7 @@
<normaloff>
:/files/images/categories/preferences-system.svg
</normaloff>
:/files/images/categories/preferences-system.svg
</iconset>
<normaloff>
:/files/images/categories/preferences-system.svg
</normaloff>
:/files/images/categories/preferences-system.svg
</iconset>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Hardware
</string>
<string>
Config
</string>
</property>
</property>
<property
name=
"toolTip"
>
<property
name=
"toolTip"
>
<string>
Configuration options of the vehicle.
</string>
<string>
Configuration options of the vehicle.
</string>
...
@@ -487,11 +478,17 @@
...
@@ -487,11 +478,17 @@
</property>
</property>
</action>
</action>
<action
name=
"actionGoogleEarthView"
>
<action
name=
"actionGoogleEarthView"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Google Earth
</string>
<string>
Google Earth
</string>
</property>
</property>
</action>
</action>
<action
name=
"actionLocal3DView"
>
<action
name=
"actionLocal3DView"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Local 3D View
</string>
<string>
Local 3D View
</string>
</property>
</property>
...
...
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