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
cbab8c0b
Commit
cbab8c0b
authored
Sep 13, 2010
by
Bryan Godbolt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://github.com/pixhawk/qgroundcontrol
parents
7e910bba
0c856c8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
32 deletions
+57
-32
MainWindow.cc
src/ui/MainWindow.cc
+47
-26
MainWindow.h
src/ui/MainWindow.h
+3
-2
MainWindow.ui
src/ui/MainWindow.ui
+7
-4
No files found.
src/ui/MainWindow.cc
View file @
cbab8c0b
...
...
@@ -131,6 +131,7 @@ void MainWindow::buildWidgets()
mapWidget
=
new
MapWidget
(
this
);
protocolWidget
=
new
XMLCommProtocolWidget
(
this
);
dataplotWidget
=
new
QGCDataPlot2D
(
this
);
map3DWidget
=
new
QWidget
(
this
);
// FIXME Lionel, insert visualizer here
// Dock widgets
controlDockWidget
=
new
QDockWidget
(
tr
(
"Control"
),
this
);
...
...
@@ -354,7 +355,7 @@ void MainWindow::connectActions()
connect
(
ui
.
actionPilotView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadPilotView
()));
connect
(
ui
.
actionEngineerView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadEngineerView
()));
connect
(
ui
.
actionOperatorView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadOperatorView
()));
connect
(
ui
.
action
SettingsView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadSettings
View
()));
connect
(
ui
.
action
3DView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
load3D
View
()));
connect
(
ui
.
actionShow_full_view
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadAllView
()));
connect
(
ui
.
actionShow_MAVLink_view
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadMAVLinkView
()));
connect
(
ui
.
actionShow_data_analysis_view
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadDataView
()));
...
...
@@ -869,36 +870,56 @@ void MainWindow::loadOperatorView()
this
->
show
();
}
void
MainWindow
::
load
Settings
View
()
void
MainWindow
::
load
3D
View
()
{
clearView
();
clearView
();
// LINE CHART
if
(
linechart
Widget
)
{
QStackedWidget
*
centerStack
=
dynamic_cast
<
QStackedWidget
*>
(
centralWidget
());
if
(
centerStack
)
{
linechart
Widget
->
setActive
(
true
);
centerStack
->
setCurrentWidget
(
linechart
Widget
);
}
}
// 3D map
if
(
map3D
Widget
)
{
QStackedWidget
*
centerStack
=
dynamic_cast
<
QStackedWidget
*>
(
centralWidget
());
if
(
centerStack
)
{
//map3D
Widget->setActive(true);
centerStack
->
setCurrentWidget
(
map3D
Widget
);
}
}
/*
// COMM XML
QDockWidget* container1 = new QDockWidget(tr("MAVLink XML to C Code Generator"), this);
container1->setWidget(protocol);
addDockWidget(Qt::LeftDockWidgetArea, container1);*/
// UAS CONTROL
if
(
controlDockWidget
)
{
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
controlDockWidget
);
controlDockWidget
->
show
();
}
// ONBOARD PARAMETERS
if
(
parameters
DockWidget
)
{
addDockWidget
(
Qt
::
RightDockWidgetArea
,
parameters
DockWidget
);
parameters
DockWidget
->
show
();
}
// UAS LIST
if
(
list
DockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
list
DockWidget
);
list
DockWidget
->
show
();
}
this
->
show
();
}
// WAYPOINT LIST
if
(
waypointsDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
waypointsDockWidget
);
waypointsDockWidget
->
show
();
}
// HORIZONTAL SITUATION INDICATOR
if
(
hsiDockWidget
)
{
HSIDisplay
*
hsi
=
dynamic_cast
<
HSIDisplay
*>
(
hsiDockWidget
->
widget
()
);
if
(
hsi
)
{
hsi
->
start
();
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
hsiDockWidget
);
hsiDockWidget
->
show
();
}
}
this
->
show
();
}
void
MainWindow
::
loadEngineerView
()
{
...
...
src/ui/MainWindow.h
View file @
cbab8c0b
...
...
@@ -111,8 +111,8 @@ public slots:
void
loadEngineerView
();
/** @brief Load view for operator */
void
loadOperatorView
();
/** @brief Load
view for general settings
*/
void
load
Settings
View
();
/** @brief Load
3D view
*/
void
load
3D
View
();
/** @brief Load view with all widgets */
void
loadAllView
();
/** @brief Load MAVLink XML generator view */
...
...
@@ -160,6 +160,7 @@ protected:
QPointer
<
MapWidget
>
mapWidget
;
QPointer
<
XMLCommProtocolWidget
>
protocolWidget
;
QPointer
<
QGCDataPlot2D
>
dataplotWidget
;
QPointer
<
QWidget
>
map3DWidget
;
// Dock widgets
QPointer
<
QDockWidget
>
controlDockWidget
;
QPointer
<
QDockWidget
>
infoDockWidget
;
...
...
src/ui/MainWindow.ui
View file @
cbab8c0b
...
...
@@ -38,7 +38,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
1000
</width>
<height>
2
1
</height>
<height>
2
2
</height>
</rect>
</property>
<widget
class=
"QMenu"
name=
"menuMGround"
>
...
...
@@ -75,7 +75,7 @@
<addaction
name=
"actionEngineerView"
/>
<addaction
name=
"actionPilotView"
/>
<addaction
name=
"actionOperatorView"
/>
<addaction
name=
"action
Settings
View"
/>
<addaction
name=
"action
3D
View"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"actionShow_MAVLink_view"
/>
<addaction
name=
"actionShow_data_analysis_view"
/>
...
...
@@ -240,13 +240,16 @@
<string>
Shop the 2D map and system status
</string>
</property>
</action>
<action
name=
"action
Settings
View"
>
<action
name=
"action
3D
View"
>
<property
name=
"icon"
>
<iconset
resource=
"../../mavground.qrc"
>
<normaloff>
:/images/categories/preferences-system.svg
</normaloff>
:/images/categories/preferences-system.svg
</iconset>
</property>
<property
name=
"text"
>
<string>
Show settings view
</string>
<string>
Show 3D view
</string>
</property>
<property
name=
"toolTip"
>
<string>
Show 3D view
</string>
</property>
</action>
<action
name=
"actionSimulate"
>
...
...
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