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
5d57365a
Commit
5d57365a
authored
Sep 04, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working on main window cleanup
parent
18128431
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
MainWindow.cc
src/ui/MainWindow.cc
+17
-14
MainWindow.h
src/ui/MainWindow.h
+2
-1
No files found.
src/ui/MainWindow.cc
View file @
5d57365a
...
...
@@ -316,7 +316,7 @@ void MainWindow::buildCustomWidget()
ui
.
menuTools
->
addAction
(
showAction
);
// Load visibility for view (default is off)
dock
->
setVisible
(
tool
->
isVisible
(
currentView
));
//
dock->setVisible(tool->isVisible(currentView));
// Load dock widget location (default is bottom)
Qt
::
DockWidgetArea
location
=
static_cast
<
Qt
::
DockWidgetArea
>
(
tool
->
getDockWidgetArea
(
currentView
));
...
...
@@ -401,14 +401,6 @@ void MainWindow::buildCommonWidgets()
addToCentralWidgetsMenu
(
dataplotWidget
,
"Logfile Plot"
,
SLOT
(
showCentralWidget
()),
CENTRAL_DATA_PLOT
);
}
// if (!linechartWidget) {
// // Center widgets
// linechartWidget = new Linecharts(this);
// linechartWidget->addSource(mavlinkDecoder);
// 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
);
...
...
@@ -1390,7 +1382,7 @@ void MainWindow::connectSlugsActions()
void
MainWindow
::
showHelp
()
{
if
(
!
QDesktopServices
::
openUrl
(
QUrl
(
"http://qgroundcontrol.org/users/"
)))
{
if
(
!
QDesktopServices
::
openUrl
(
QUrl
(
"http://qgroundcontrol.org/users/
start
"
)))
{
QMessageBox
msgBox
;
msgBox
.
setIcon
(
QMessageBox
::
Critical
);
msgBox
.
setText
(
"Could not open help in browser"
);
...
...
@@ -1416,7 +1408,7 @@ void MainWindow::showCredits()
void
MainWindow
::
showRoadMap
()
{
if
(
!
QDesktopServices
::
openUrl
(
QUrl
(
"http://qgroundcontrol.org/
roadmap/
"
)))
{
if
(
!
QDesktopServices
::
openUrl
(
QUrl
(
"http://qgroundcontrol.org/
dev/roadmap
"
)))
{
QMessageBox
msgBox
;
msgBox
.
setIcon
(
QMessageBox
::
Critical
);
msgBox
.
setText
(
"Could not open roadmap in browser"
);
...
...
@@ -1523,7 +1515,15 @@ void MainWindow::UASCreated(UASInterface* uas)
// Connect the UAS to the full user interface
if
(
uas
!=
NULL
)
{
if
(
uas
!=
NULL
)
{
if
(
!
linechartWidget
)
{
// Center widgets
linechartWidget
=
new
Linecharts
(
this
);
linechartWidget
->
addSource
(
mavlinkDecoder
);
addToCentralWidgetsMenu
(
linechartWidget
,
tr
(
"Realtime Plot"
),
SLOT
(
showCentralWidget
()),
CENTRAL_LINECHART
);
}
// Set default settings
setDefaultSettingsForAp
();
...
...
@@ -1639,7 +1639,9 @@ void MainWindow::UASCreated(UASInterface* uas)
break
;
default:
case
(
MAV_AUTOPILOT_GENERIC
):
break
;
case
(
MAV_AUTOPILOT_ARDUPILOTMEGA
):
break
;
case
(
MAV_AUTOPILOT_PIXHAWK
):
{
// Build Pixhawk Widgets
buildPxWidgets
();
...
...
@@ -1716,7 +1718,8 @@ void MainWindow::clearView()
QAction
*
temp
;
// Set tool widget visibility settings for this view
foreach
(
int
key
,
toolsMenuActions
.
keys
())
{
foreach
(
int
key
,
toolsMenuActions
.
keys
())
{
temp
=
toolsMenuActions
[
key
];
QString
chKey
=
buildMenuKey
(
SUB_SECTION_CHECKED
,
static_cast
<
TOOLS_WIDGET_NAMES
>
(
key
),
currentView
);
...
...
@@ -1923,7 +1926,7 @@ void MainWindow::presentView()
}
}
this
->
setWindowState
(
windowStateVal
);
//
this->setWindowState(windowStateVal);
this
->
show
();
}
...
...
src/ui/MainWindow.h
View file @
5d57365a
...
...
@@ -273,7 +273,7 @@ protected:
typedef
enum
_SETTINGS_SECTIONS
{
SECTION_MENU
,
SUB_SECTION_CHECKED
,
SUB_SECTION_LOCATION
,
SUB_SECTION_LOCATION
}
SETTINGS_SECTIONS
;
typedef
enum
_VIEW_SECTIONS
{
...
...
@@ -282,6 +282,7 @@ protected:
VIEW_PILOT
,
VIEW_MAVLINK
,
VIEW_UNCONNECTED
,
///< View in unconnected mode, when no UAS is available
VIEW_FULL
///< All widgets, mostly intended for multi-screen setups
}
VIEW_SECTIONS
;
...
...
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