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
7048ce94
Commit
7048ce94
authored
Aug 25, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checkpoint: This is looking sweet
parent
1aa7b9b9
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
229 additions
and
138 deletions
+229
-138
cogwheels.png
files/images/px4/menu/cogwheels.png
+0
-0
firmware_upgrade.png
files/images/px4/menu/firmware_upgrade.png
+0
-0
plane.png
files/images/px4/menu/plane.png
+0
-0
remote.png
files/images/px4/menu/remote.png
+0
-0
sensors.png
files/images/px4/menu/sensors.png
+0
-0
style-dark.css
files/styles/style-dark.css
+16
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+5
-0
QGCConfigView.cc
src/ui/QGCConfigView.cc
+23
-12
QGCConfigView.ui
src/ui/QGCConfigView.ui
+3
-0
QGCPX4VehicleConfig.cc
src/ui/QGCPX4VehicleConfig.cc
+3
-2
QGCPX4VehicleConfig.ui
src/ui/QGCPX4VehicleConfig.ui
+179
-124
No files found.
files/images/px4/menu/cogwheels.png
0 → 100644
View file @
7048ce94
14.4 KB
files/images/px4/menu/firmware_upgrade.png
0 → 100644
View file @
7048ce94
13.7 KB
files/images/px4/menu/plane.png
0 → 100644
View file @
7048ce94
25 KB
files/images/px4/menu/remote.png
0 → 100644
View file @
7048ce94
14.7 KB
files/images/px4/menu/sensors.png
0 → 100644
View file @
7048ce94
9.93 KB
files/styles/style-dark.css
View file @
7048ce94
...
...
@@ -358,6 +358,16 @@ QPushButton, QToolButton {
background-color
:
qlineargradient
(
x1
:
0
,
y1
:
0
,
x2
:
0
,
y2
:
1
,
stop
:
0
#777
,
stop
:
1
#333
);
}
QPushButton
#advancedMenuButton
,
QPushButton
#airframeMenuButton
,
QPushButton
#firmwareMenuButton
,
QPushButton
#generalMenuButton
,
QPushButton
#rcMenuButton
,
QPushButton
#sensorMenuButton
{
background-color
:
qlineargradient
(
x1
:
0
,
y1
:
0
,
x2
:
0
,
y2
:
1
,
stop
:
0
#333
,
stop
:
1
#111
);
border-radius
:
5px
;
min-height
:
64px
;
max-height
:
64px
;
min-width
:
80px
;
border
:
1px
solid
#000000
;
}
QPushButton
#planePushButton
,
QPushButton
#flyingWingPushButton
,
QPushButton
#quadXPushButton
,
QPushButton
#quadPlusPushButton
,
QPushButton
#hexaXPushButton
,
QPushButton
#hexaPlusPushButton
,
QPushButton
#octoXPushButton
,
QPushButton
#octoPlusPushButton
,
QPushButton
#hPushButton
{
...
...
@@ -392,6 +402,12 @@ QWidget#containerWidget {
border
:
2px
solid
#CCCCCC
;
}
QWidget
#navBarWidget
{
background-color
:
qlineargradient
(
spread
:
pad
,
x1
:
0
,
y1
:
0
,
x2
:
1
,
y2
:
0
,
stop
:
0
#404040
,
stop
:
1
#727272
);
border-radius
:
0px
;
border
:
1px
solid
#222222
;
}
QPushButton
#connectButton
,
QPushButton
#controlButton
{
background-color
:
qlineargradient
(
x1
:
0
,
y1
:
0
,
x2
:
0
,
y2
:
1
,
stop
:
0
#73D95D
,
stop
:
1
#18A154
);
}
...
...
qgroundcontrol.qrc
View file @
7048ce94
...
...
@@ -175,6 +175,11 @@
<file>files/images/px4/calibration/accel_z-.png</file>
<file>files/images/px4/calibration/accel_y+.png</file>
<file>files/images/px4/calibration/mag_calibration_figure8.png</file>
<file>files/images/px4/menu/sensors.png</file>
<file>files/images/px4/menu/firmware_upgrade.png</file>
<file>files/images/px4/menu/plane.png</file>
<file>files/images/px4/menu/remote.png</file>
<file>files/images/px4/menu/cogwheels.png</file>
</qresource>
<qresource prefix="/general">
<file alias="vera.ttf">files/styles/Vera.ttf</file>
...
...
src/ui/QGCConfigView.cc
View file @
7048ce94
...
...
@@ -18,8 +18,14 @@ QGCConfigView::QGCConfigView(QWidget *parent) :
// The config screens are required for firmware uploading
if
(
MainWindow
::
instance
()
->
getCustomMode
()
==
MainWindow
::
CUSTOM_MODE_PX4
)
{
ui
->
gridLayout
->
removeWidget
(
ui
->
waitingLabel
);
ui
->
waitingLabel
->
setVisible
(
false
);
delete
ui
->
waitingLabel
;
config
=
new
QGCPX4VehicleConfig
();
ui
->
gridLayout
->
addWidget
(
config
);
}
else
{
//don't show a configuration widget if no vehicle is connected
//show a placeholder informational widget instead
...
...
@@ -37,23 +43,28 @@ void QGCConfigView::activeUASChanged(UASInterface* uas)
if
(
mav
==
uas
)
return
;
//remove all child widgets since they could contain stale data
//for example, when we switch from one PX4 UAS to another UAS
foreach
(
QObject
*
obj
,
ui
->
gridLayout
->
children
())
{
QWidget
*
w
=
dynamic_cast
<
QWidget
*>
(
obj
);
if
(
w
)
{
if
(
obj
!=
ui
->
waitingLabel
)
{
ui
->
gridLayout
->
removeWidget
(
w
);
delete
obj
;
}
}
}
int
type
=
-
1
;
if
(
mav
)
type
=
mav
->
getAutopilotType
();
mav
=
uas
;
if
(
NULL
!=
mav
)
{
if
(
NULL
!=
uas
&&
type
!=
uas
->
getAutopilotType
())
{
ui
->
gridLayout
->
removeWidget
(
ui
->
waitingLabel
);
ui
->
waitingLabel
->
setVisible
(
false
);
//remove all child widgets since they could contain stale data
//for example, when we switch from one PX4 UAS to another UAS
foreach
(
QObject
*
obj
,
ui
->
gridLayout
->
children
())
{
QWidget
*
w
=
dynamic_cast
<
QWidget
*>
(
obj
);
if
(
w
)
{
if
(
obj
!=
ui
->
waitingLabel
)
{
ui
->
gridLayout
->
removeWidget
(
w
);
delete
obj
;
}
}
}
int
autopilotType
=
mav
->
getAutopilotType
();
switch
(
autopilotType
)
{
case
MAV_AUTOPILOT_PX4
:
...
...
src/ui/QGCConfigView.ui
View file @
7048ce94
...
...
@@ -14,6 +14,9 @@
<string>
Form
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"waitingLabel"
>
<property
name=
"text"
>
...
...
src/ui/QGCPX4VehicleConfig.cc
View file @
7048ce94
...
...
@@ -89,6 +89,7 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
ui
->
airframeMenuButton
->
setEnabled
(
false
);
ui
->
sensorMenuButton
->
setEnabled
(
false
);
ui
->
rcMenuButton
->
setEnabled
(
false
);
ui
->
generalMenuButton
->
hide
();
px4AirframeConfig
=
new
QGCPX4AirframeConfig
(
this
);
ui
->
airframeLayout
->
addWidget
(
px4AirframeConfig
);
...
...
@@ -554,7 +555,7 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
// Load tabs for general configuration
foreach
(
QString
dir
,
generaldir
.
entryList
(
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
))
{
QPushButton
*
button
=
new
QPushButton
(
ui
->
leftNavScrollAreaWidgetContent
s
);
QPushButton
*
button
=
new
QPushButton
(
thi
s
);
connect
(
button
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
menuButtonClicked
()));
ui
->
navBarLayout
->
insertWidget
(
2
,
button
);
button
->
setMinimumHeight
(
75
);
...
...
@@ -598,7 +599,7 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
// Load additional tabs for vehicle specific configuration
foreach
(
QString
dir
,
vehicledir
.
entryList
(
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
))
{
QPushButton
*
button
=
new
QPushButton
(
ui
->
leftNavScrollAreaWidgetContent
s
);
QPushButton
*
button
=
new
QPushButton
(
thi
s
);
connect
(
button
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
menuButtonClicked
()));
ui
->
navBarLayout
->
insertWidget
(
2
,
button
);
...
...
src/ui/QGCPX4VehicleConfig.ui
View file @
7048ce94
This diff is collapsed.
Click to expand it.
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