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
5c298fa1
Commit
5c298fa1
authored
Nov 26, 2010
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to have 2D and 3D view in parallel
parent
157fe762
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
3 deletions
+78
-3
qgroundcontrol.pri
qgroundcontrol.pri
+6
-0
MainWindow.cc
src/ui/MainWindow.cc
+58
-2
MainWindow.h
src/ui/MainWindow.h
+3
-0
MainWindow.ui
src/ui/MainWindow.ui
+11
-1
No files found.
qgroundcontrol.pri
View file @
5c298fa1
...
...
@@ -177,6 +177,12 @@ linux-g++ {
#-lflite_cmu_us_rms \
#-lflite_cmu_us_slt \
QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
QMAKE_PRE_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/debug/.
QMAKE_PRE_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/release/.
}
linux-g++-64 {
...
...
src/ui/MainWindow.cc
View file @
5c298fa1
...
...
@@ -136,8 +136,8 @@ void MainWindow::buildWidgets()
protocolWidget
=
new
XMLCommProtocolWidget
(
this
);
dataplotWidget
=
new
QGCDataPlot2D
(
this
);
#ifdef QGC_OSG_ENABLED
//
_3DWidget = Q3DWidgetFactory::get("PIXHAWK");
_3DWidget
=
Q3DWidgetFactory
::
get
(
"MAP3D"
);
_3DWidget
=
Q3DWidgetFactory
::
get
(
"PIXHAWK"
);
_3D
Map
Widget
=
Q3DWidgetFactory
::
get
(
"MAP3D"
);
#endif
// Dock widgets
...
...
@@ -232,6 +232,7 @@ void MainWindow::arrangeCenterStack()
if
(
mapWidget
)
centerStack
->
addWidget
(
mapWidget
);
#ifdef QGC_OSG_ENABLED
if
(
_3DWidget
)
centerStack
->
addWidget
(
_3DWidget
);
if
(
_3DMapWidget
)
centerStack
->
addWidget
(
_3DMapWidget
);
#endif
if
(
hudWidget
)
centerStack
->
addWidget
(
hudWidget
);
if
(
dataplotWidget
)
centerStack
->
addWidget
(
dataplotWidget
);
...
...
@@ -373,6 +374,7 @@ void MainWindow::connectActions()
connect
(
ui
.
actionEngineerView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadEngineerView
()));
connect
(
ui
.
actionOperatorView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadOperatorView
()));
connect
(
ui
.
action3DView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
load3DView
()));
connect
(
ui
.
action3DMapView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
load3DMapView
()));
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
()));
...
...
@@ -960,6 +962,60 @@ void MainWindow::loadGlobalOperatorView()
}
void
MainWindow
::
load3DMapView
()
{
#ifdef QGC_OSG_ENABLED
clearView
();
// 3D map
if
(
_3DWidget
)
{
QStackedWidget
*
centerStack
=
dynamic_cast
<
QStackedWidget
*>
(
centralWidget
());
if
(
centerStack
)
{
//map3DWidget->setActive(true);
centerStack
->
setCurrentWidget
(
_3DMapWidget
);
}
}
// UAS CONTROL
if
(
controlDockWidget
)
{
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
controlDockWidget
);
controlDockWidget
->
show
();
}
// UAS LIST
if
(
listDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
listDockWidget
);
listDockWidget
->
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
();
}
}
#endif
this
->
show
();
}
void
MainWindow
::
load3DView
()
{
#ifdef QGC_OSG_ENABLED
...
...
src/ui/MainWindow.h
View file @
5c298fa1
...
...
@@ -113,6 +113,8 @@ public slots:
void
loadOperatorView
();
/** @brief Load 3D view */
void
load3DView
();
/** @brief Load 3D map view */
void
load3DMapView
();
/** @brief Load view with all widgets */
void
loadAllView
();
/** @brief Load MAVLink XML generator view */
...
...
@@ -164,6 +166,7 @@ protected:
QPointer
<
QGCDataPlot2D
>
dataplotWidget
;
#ifdef QGC_OSG_ENABLED
QPointer
<
QWidget
>
_3DWidget
;
QPointer
<
QWidget
>
_3DMapWidget
;
#endif
// Dock widgets
QPointer
<
QDockWidget
>
controlDockWidget
;
...
...
src/ui/MainWindow.ui
View file @
5c298fa1
...
...
@@ -75,6 +75,7 @@
<addaction
name=
"actionEngineerView"
/>
<addaction
name=
"actionPilotView"
/>
<addaction
name=
"actionOperatorView"
/>
<addaction
name=
"action3DMapView"
/>
<addaction
name=
"action3DView"
/>
<addaction
name=
"actionGlobalOperatorView"
/>
<addaction
name=
"separator"
/>
...
...
@@ -234,7 +235,7 @@
<normaloff>
:/images/categories/preferences-system.svg
</normaloff>
:/images/categories/preferences-system.svg
</iconset>
</property>
<property
name=
"text"
>
<string>
Show 3D view
</string>
<string>
Show 3D
local
view
</string>
</property>
<property
name=
"toolTip"
>
<string>
Show 3D view
</string>
...
...
@@ -318,6 +319,15 @@
<string>
Show Global operator view
</string>
</property>
</action>
<action
name=
"action3DMapView"
>
<property
name=
"icon"
>
<iconset
resource=
"../../mavground.qrc"
>
<normaloff>
:/images/categories/applications-internet.svg
</normaloff>
:/images/categories/applications-internet.svg
</iconset>
</property>
<property
name=
"text"
>
<string>
Show 3D Globe view
</string>
</property>
</action>
</widget>
<layoutdefault
spacing=
"6"
margin=
"11"
/>
<resources>
...
...
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