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
069dced8
Commit
069dced8
authored
Jul 12, 2013
by
Bill Bonney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix to toolbar size, and to remove QGCToolbar (compile time option)
parent
e24d2ada
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
36 deletions
+26
-36
Button.qml
qml/components/Button.qml
+1
-1
MainWindow.cc
src/ui/MainWindow.cc
+25
-35
No files found.
qml/components/Button.qml
View file @
069dced8
...
...
@@ -18,7 +18,7 @@ Rectangle {
id
:
buttonLabel
anchors.top
:
parent
.
top
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.margins
:
2
anchors.margins
:
5
text
:
label
color
:
"
white
"
font.pointSize
:
10
...
...
src/ui/MainWindow.cc
View file @
069dced8
...
...
@@ -168,7 +168,9 @@ MainWindow::MainWindow(QWidget *parent):
centerStack
=
new
QStackedWidget
(
this
);
setCentralWidget
(
centerStack
);
// Load Toolbar
#ifdef QGC_TOOLBAR_ENABLED
toolBar
=
new
QGCToolBar
(
this
);
this
->
addToolBar
(
toolBar
);
...
...
@@ -187,6 +189,28 @@ MainWindow::MainWindow(QWidget *parent):
advancedActions
<<
ui
.
actionEngineersView
;
toolBar
->
setPerspectiveChangeAdvancedActions
(
advancedActions
);
#else
// Add the APM 'toolbar'
APMToolBar
*
apmToolBar
=
new
APMToolBar
(
this
);
apmToolBar
->
setFlightViewAction
(
ui
.
actionFlightView
);
apmToolBar
->
setFlightPlanViewAction
(
ui
.
actionMissionView
);
apmToolBar
->
setHardwareViewAction
(
ui
.
actionHardwareConfig
);
apmToolBar
->
setSoftwareViewAction
(
ui
.
actionSoftwareConfig
);
apmToolBar
->
setSimulationViewAction
(
ui
.
actionSimulation_View
);
apmToolBar
->
setTerminalViewAction
(
ui
.
actionSimulation_View
);
QDockWidget
*
widget
=
new
QDockWidget
(
tr
(
"APM Tool Bar"
),
this
);
widget
->
setWidget
(
apmToolBar
);
widget
->
setMinimumHeight
(
72
);
widget
->
setMaximumHeight
(
72
);
widget
->
setMinimumWidth
(
1024
);
widget
->
setFeatures
(
QDockWidget
::
NoDockWidgetFeatures
);
widget
->
setTitleBarWidget
(
new
QWidget
(
this
));
// Disables the title bar
// /*widget*/->setStyleSheet("QDockWidget { border: 0px solid #FFFFFF; border-radius: 0px; border-bottom: 0px;}");
this
->
addDockWidget
(
Qt
::
TopDockWidgetArea
,
widget
);
#endif
customStatusBar
=
new
QGCStatusBar
(
this
);
setStatusBar
(
customStatusBar
);
statusBar
()
->
setSizeGripEnabled
(
true
);
...
...
@@ -342,15 +366,6 @@ MainWindow::~MainWindow()
void
MainWindow
::
resizeEvent
(
QResizeEvent
*
event
)
{
if
(
width
()
>
1200
)
{
toolBar
->
setToolButtonStyle
(
Qt
::
ToolButtonTextBesideIcon
);
}
else
{
toolBar
->
setToolButtonStyle
(
Qt
::
ToolButtonIconOnly
);
}
QMainWindow
::
resizeEvent
(
event
);
}
...
...
@@ -604,18 +619,6 @@ void MainWindow::buildCommonWidgets()
createDockWidget
(
simView
,
new
PrimaryFlightDisplay
(
320
,
240
,
this
),
tr
(
"Primary Flight Display"
),
"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET"
,
VIEW_SIMULATION
,
Qt
::
RightDockWidgetArea
,
this
->
width
()
/
1.5
);
createDockWidget
(
pilotView
,
new
PrimaryFlightDisplay
(
320
,
240
,
this
),
tr
(
"Primary Flight Display"
),
"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET"
,
VIEW_FLIGHT
,
Qt
::
LeftDockWidgetArea
,
this
->
width
()
/
1.8
);
// Add Our new 'toolbar'
// Create the APM Toolbar
APMToolBar
*
apmToolBar
=
new
APMToolBar
(
this
);
apmToolBar
->
setFlightViewAction
(
ui
.
actionFlightView
);
apmToolBar
->
setFlightPlanViewAction
(
ui
.
actionMissionView
);
apmToolBar
->
setHardwareViewAction
(
ui
.
actionHardwareConfig
);
apmToolBar
->
setSoftwareViewAction
(
ui
.
actionSoftwareConfig
);
apmToolBar
->
setSimulationViewAction
(
ui
.
actionSimulation_View
);
apmToolBar
->
setTerminalViewAction
(
ui
.
actionSimulation_View
);
createDockWidget
(
pilotView
,
apmToolBar
,
tr
(
"APM Tool Bar"
),
"APM_TOOLBAR_DOCKWIDGET"
,
VIEW_FLIGHT
,
Qt
::
TopDockWidgetArea
,
this
->
width
(),
70
);
QGCTabbedInfoView
*
infoview
=
new
QGCTabbedInfoView
(
this
);
infoview
->
addSource
(
mavlinkDecoder
);
createDockWidget
(
pilotView
,
infoview
,
tr
(
"Info View"
),
"UAS_INFO_INFOVIEW_DOCKWIDGET"
,
VIEW_FLIGHT
,
Qt
::
LeftDockWidgetArea
);
...
...
@@ -858,19 +861,6 @@ void MainWindow::loadDockWidget(QString name)
{
createDockWidget
(
centerStack
->
currentWidget
(),
new
UASQuickView
(
this
),
tr
(
"Quick View"
),
"UAS_INFO_QUICKVIEW_DOCKWIDGET"
,
currentView
,
Qt
::
LeftDockWidgetArea
);
}
else
if
(
name
==
"APM_TOOLBAR_DOCKWIDGET"
)
{
// Add Our new 'toolbar'
// Create the APM Toolbar
APMToolBar
*
apmToolBar
=
new
APMToolBar
(
this
);
apmToolBar
->
setFlightViewAction
(
ui
.
actionFlightView
);
apmToolBar
->
setFlightPlanViewAction
(
ui
.
actionMissionView
);
apmToolBar
->
setHardwareViewAction
(
ui
.
actionHardwareConfig
);
apmToolBar
->
setSoftwareViewAction
(
ui
.
actionSoftwareConfig
);
apmToolBar
->
setSimulationViewAction
(
ui
.
actionSimulation_View
);
apmToolBar
->
setTerminalViewAction
(
ui
.
actionSimulation_View
);
createDockWidget
(
centerStack
->
currentWidget
(),
apmToolBar
,
tr
(
"APM Tool Bar"
),
"APM_TOOLBAR_DOCKWIDGET"
,
currentView
,
Qt
::
TopDockWidgetArea
,
this
->
width
(),
70
);
}
else
{
if
(
customWidgetNameToFilenameMap
.
contains
(
name
))
...
...
@@ -965,7 +955,7 @@ void MainWindow::showHILConfigurationWidget(UASInterface* uas)
//createDockWidget(centerStack->currentWidget(),tool,"Unnamed Tool " + QString::number(ui.menuTools->actions().size()),"UNNAMED_TOOL_" + QString::number(ui.menuTools->actions().size())+"DOCK",currentView,Qt::BottomDockWidgetArea);
QGCHilConfiguration
*
hconf
=
new
QGCHilConfiguration
(
mav
,
this
);
QString
hilDockName
=
tr
(
"HIL Config %1"
).
arg
(
uas
->
getUASName
());
QString
hilDockName
=
tr
(
"HIL Config %1"
).
arg
(
uas
->
getUASName
());
QDockWidget
*
hilDock
=
createDockWidget
(
simView
,
hconf
,
hilDockName
,
hilDockName
.
toUpper
().
replace
(
" "
,
"_"
),
VIEW_SIMULATION
,
Qt
::
LeftDockWidgetArea
);
hilDocks
.
insert
(
mav
->
getUASID
(),
hilDock
);
...
...
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