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
aef6f4ee
Commit
aef6f4ee
authored
Aug 12, 2011
by
oberion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first working version with the senseSoar
parent
d80f8c9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
116 additions
and
0 deletions
+116
-0
MainWindow.cc
src/ui/MainWindow.cc
+112
-0
MainWindow.h
src/ui/MainWindow.h
+4
-0
No files found.
src/ui/MainWindow.cc
View file @
aef6f4ee
...
...
@@ -1666,6 +1666,14 @@ void MainWindow::UASCreated(UASInterface* uas)
}
break
;
case
MAV_AUTOPILOT_SENSESOAR
:
{
this
->
buildSenseSoarWidgets
();
this
->
connectSenseSoarWidgets
();
this
->
arrangeSenseSoarCenterStack
();
this
->
connectSenseSoarActions
();
break
;
}
default:
case
(
MAV_AUTOPILOT_GENERIC
):
case
(
MAV_AUTOPILOT_ARDUPILOTMEGA
):
...
...
@@ -2005,4 +2013,108 @@ void MainWindow::loadDataView(QString fileName)
QList
<
QAction
*>
MainWindow
::
listLinkMenuActions
(
void
)
{
return
ui
.
menuNetwork
->
actions
();
}
void
MainWindow
::
buildSenseSoarWidgets
()
{
if
(
!
linechartWidget
)
{
// Center widgets
linechartWidget
=
new
Linecharts
(
this
);
addToCentralWidgetsMenu
(
linechartWidget
,
tr
(
"Realtime Plot"
),
SLOT
(
showCentralWidget
()),
CENTRAL_LINECHART
);
}
if
(
!
hudWidget
)
{
hudWidget
=
new
HUD
(
320
,
240
,
this
);
addToCentralWidgetsMenu
(
hudWidget
,
tr
(
"Head Up Display"
),
SLOT
(
showCentralWidget
()),
CENTRAL_HUD
);
}
if
(
!
dataplotWidget
)
{
dataplotWidget
=
new
QGCDataPlot2D
(
this
);
addToCentralWidgetsMenu
(
dataplotWidget
,
"Logfile Plot"
,
SLOT
(
showCentralWidget
()),
CENTRAL_DATA_PLOT
);
}
#ifdef QGC_OSG_ENABLED
if
(
!
_3DWidget
)
{
_3DWidget
=
Q3DWidgetFactory
::
get
(
"PIXHAWK"
);
addToCentralWidgetsMenu
(
_3DWidget
,
tr
(
"Local 3D"
),
SLOT
(
showCentralWidget
()),
CENTRAL_3D_LOCAL
);
}
#endif
#ifdef QGC_OSGEARTH_ENABLED
if
(
!
_3DMapWidget
)
{
_3DMapWidget
=
Q3DWidgetFactory
::
get
(
"MAP3D"
);
addToCentralWidgetsMenu
(
_3DMapWidget
,
tr
(
"OSG Earth 3D"
),
SLOT
(
showCentralWidget
()),
CENTRAL_OSGEARTH
);
}
#endif
#if (defined _MSC_VER) | (defined Q_OS_MAC)
if
(
!
gEarthWidget
)
{
gEarthWidget
=
new
QGCGoogleEarthView
(
this
);
addToCentralWidgetsMenu
(
gEarthWidget
,
tr
(
"Google Earth"
),
SLOT
(
showCentralWidget
()),
CENTRAL_GOOGLE_EARTH
);
}
#endif
// Dock widgets
if
(
!
parametersDockWidget
)
{
parametersDockWidget
=
new
QDockWidget
(
tr
(
"Calibration and Onboard Parameters"
),
this
);
parametersDockWidget
->
setWidget
(
new
ParameterInterface
(
this
)
);
parametersDockWidget
->
setObjectName
(
"PARAMETER_INTERFACE_DOCKWIDGET"
);
addToToolsMenu
(
parametersDockWidget
,
tr
(
"Calibration and Parameters"
),
SLOT
(
showToolWidget
(
bool
)),
MENU_PARAMETERS
,
Qt
::
RightDockWidgetArea
);
}
if
(
!
hsiDockWidget
)
{
hsiDockWidget
=
new
QDockWidget
(
tr
(
"Horizontal Situation Indicator"
),
this
);
hsiDockWidget
->
setWidget
(
new
HSIDisplay
(
this
)
);
hsiDockWidget
->
setObjectName
(
"HORIZONTAL_SITUATION_INDICATOR_DOCK_WIDGET"
);
addToToolsMenu
(
hsiDockWidget
,
tr
(
"Horizontal Situation"
),
SLOT
(
showToolWidget
(
bool
)),
MENU_HSI
,
Qt
::
BottomDockWidgetArea
);
}
if
(
!
rcViewDockWidget
)
{
rcViewDockWidget
=
new
QDockWidget
(
tr
(
"Radio Control"
),
this
);
rcViewDockWidget
->
setWidget
(
new
QGCRemoteControlView
(
this
)
);
rcViewDockWidget
->
setObjectName
(
"RADIO_CONTROL_CHANNELS_DOCK_WIDGET"
);
addToToolsMenu
(
rcViewDockWidget
,
tr
(
"Radio Control"
),
SLOT
(
showToolWidget
(
bool
)),
MENU_RC_VIEW
,
Qt
::
BottomDockWidgetArea
);
}
if
(
!
headUpDockWidget
)
{
headUpDockWidget
=
new
QDockWidget
(
tr
(
"HUD"
),
this
);
headUpDockWidget
->
setWidget
(
new
HUD
(
320
,
240
,
this
));
headUpDockWidget
->
setObjectName
(
"HEAD_UP_DISPLAY_DOCK_WIDGET"
);
addToToolsMenu
(
headUpDockWidget
,
tr
(
"Head Up Display"
),
SLOT
(
showToolWidget
(
bool
)),
MENU_HUD
,
Qt
::
RightDockWidgetArea
);
}
}
void
MainWindow
::
connectSenseSoarWidgets
()
{
}
void
MainWindow
::
arrangeSenseSoarCenterStack
()
{
if
(
!
centerStack
)
{
qDebug
()
<<
"Center Stack not Created!"
;
return
;
}
if
(
linechartWidget
&&
(
centerStack
->
indexOf
(
linechartWidget
)
==
-
1
))
centerStack
->
addWidget
(
linechartWidget
);
#ifdef QGC_OSG_ENABLED
if
(
_3DWidget
&&
(
centerStack
->
indexOf
(
_3DWidget
)
==
-
1
))
centerStack
->
addWidget
(
_3DWidget
);
#endif
#ifdef QGC_OSGEARTH_ENABLED
if
(
_3DMapWidget
&&
(
centerStack
->
indexOf
(
_3DMapWidget
)
==
-
1
))
centerStack
->
addWidget
(
_3DMapWidget
);
#endif
#if (defined _MSC_VER) | (defined Q_OS_MAC)
if
(
gEarthWidget
&&
(
centerStack
->
indexOf
(
gEarthWidget
)
==
-
1
))
centerStack
->
addWidget
(
gEarthWidget
);
#endif
if
(
hudWidget
&&
(
centerStack
->
indexOf
(
hudWidget
)
==
-
1
))
centerStack
->
addWidget
(
hudWidget
);
if
(
dataplotWidget
&&
(
centerStack
->
indexOf
(
dataplotWidget
)
==
-
1
))
centerStack
->
addWidget
(
dataplotWidget
);
}
void
MainWindow
::
connectSenseSoarActions
()
{
}
\ No newline at end of file
src/ui/MainWindow.h
View file @
aef6f4ee
...
...
@@ -352,18 +352,22 @@ protected:
void
buildCommonWidgets
();
void
buildPxWidgets
();
void
buildSlugsWidgets
();
void
buildSenseSoarWidgets
();
void
connectCommonWidgets
();
void
connectPxWidgets
();
void
connectSlugsWidgets
();
void
connectSenseSoarWidgets
();
void
arrangeCommonCenterStack
();
void
arrangePxCenterStack
();
void
arrangeSlugsCenterStack
();
void
arrangeSenseSoarCenterStack
();
void
connectCommonActions
();
void
connectPxActions
();
void
connectSlugsActions
();
void
connectSenseSoarActions
();
void
configureWindowName
();
...
...
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