Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
7048ce94
Commit
7048ce94
authored
Aug 25, 2013
by
Lorenz Meier
Browse files
Checkpoint: This is looking sweet
parent
1aa7b9b9
Changes
11
Hide whitespace changes
Inline
Side-by-side
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 {
...
@@ -358,6 +358,16 @@ QPushButton, QToolButton {
background-color
:
qlineargradient
(
x1
:
0
,
y1
:
0
,
x2
:
0
,
y2
:
1
,
stop
:
0
#777
,
stop
:
1
#333
);
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
#planePushButton
,
QPushButton
#flyingWingPushButton
,
QPushButton
#quadXPushButton
,
QPushButton
#quadPlusPushButton
,
QPushButton
#hexaXPushButton
,
QPushButton
#hexaPlusPushButton
,
QPushButton
#quadPlusPushButton
,
QPushButton
#hexaXPushButton
,
QPushButton
#hexaPlusPushButton
,
QPushButton
#octoXPushButton
,
QPushButton
#octoPlusPushButton
,
QPushButton
#hPushButton
{
QPushButton
#octoXPushButton
,
QPushButton
#octoPlusPushButton
,
QPushButton
#hPushButton
{
...
@@ -392,6 +402,12 @@ QWidget#containerWidget {
...
@@ -392,6 +402,12 @@ QWidget#containerWidget {
border
:
2px
solid
#CCCCCC
;
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
{
QPushButton
#connectButton
,
QPushButton
#controlButton
{
background-color
:
qlineargradient
(
x1
:
0
,
y1
:
0
,
x2
:
0
,
y2
:
1
,
stop
:
0
#73D95D
,
stop
:
1
#18A154
);
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 @@
...
@@ -175,6 +175,11 @@
<file>files/images/px4/calibration/accel_z-.png</file>
<file>files/images/px4/calibration/accel_z-.png</file>
<file>files/images/px4/calibration/accel_y+.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/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>
<qresource prefix="/general">
<qresource prefix="/general">
<file alias="vera.ttf">files/styles/Vera.ttf</file>
<file alias="vera.ttf">files/styles/Vera.ttf</file>
...
...
src/ui/QGCConfigView.cc
View file @
7048ce94
...
@@ -18,8 +18,14 @@ QGCConfigView::QGCConfigView(QWidget *parent) :
...
@@ -18,8 +18,14 @@ QGCConfigView::QGCConfigView(QWidget *parent) :
// The config screens are required for firmware uploading
// The config screens are required for firmware uploading
if
(
MainWindow
::
instance
()
->
getCustomMode
()
==
MainWindow
::
CUSTOM_MODE_PX4
)
{
if
(
MainWindow
::
instance
()
->
getCustomMode
()
==
MainWindow
::
CUSTOM_MODE_PX4
)
{
ui
->
gridLayout
->
removeWidget
(
ui
->
waitingLabel
);
ui
->
waitingLabel
->
setVisible
(
false
);
delete
ui
->
waitingLabel
;
config
=
new
QGCPX4VehicleConfig
();
config
=
new
QGCPX4VehicleConfig
();
ui
->
gridLayout
->
addWidget
(
config
);
ui
->
gridLayout
->
addWidget
(
config
);
}
else
{
}
else
{
//don't show a configuration widget if no vehicle is connected
//don't show a configuration widget if no vehicle is connected
//show a placeholder informational widget instead
//show a placeholder informational widget instead
...
@@ -37,23 +43,28 @@ void QGCConfigView::activeUASChanged(UASInterface* uas)
...
@@ -37,23 +43,28 @@ void QGCConfigView::activeUASChanged(UASInterface* uas)
if
(
mav
==
uas
)
if
(
mav
==
uas
)
return
;
return
;
//remove all child widgets since they could contain stale data
int
type
=
-
1
;
//for example, when we switch from one PX4 UAS to another UAS
if
(
mav
)
foreach
(
QObject
*
obj
,
ui
->
gridLayout
->
children
())
{
type
=
mav
->
getAutopilotType
();
QWidget
*
w
=
dynamic_cast
<
QWidget
*>
(
obj
);
if
(
w
)
{
if
(
obj
!=
ui
->
waitingLabel
)
{
ui
->
gridLayout
->
removeWidget
(
w
);
delete
obj
;
}
}
}
mav
=
uas
;
mav
=
uas
;
if
(
NULL
!=
mav
)
{
if
(
NULL
!=
uas
&&
type
!=
uas
->
getAutopilotType
())
{
ui
->
gridLayout
->
removeWidget
(
ui
->
waitingLabel
);
ui
->
gridLayout
->
removeWidget
(
ui
->
waitingLabel
);
ui
->
waitingLabel
->
setVisible
(
false
);
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
();
int
autopilotType
=
mav
->
getAutopilotType
();
switch
(
autopilotType
)
{
switch
(
autopilotType
)
{
case
MAV_AUTOPILOT_PX4
:
case
MAV_AUTOPILOT_PX4
:
...
...
src/ui/QGCConfigView.ui
View file @
7048ce94
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
<string>
Form
</string>
<string>
Form
</string>
</property>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<item
row=
"0"
column=
"0"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"waitingLabel"
>
<widget
class=
"QLabel"
name=
"waitingLabel"
>
<property
name=
"text"
>
<property
name=
"text"
>
...
...
src/ui/QGCPX4VehicleConfig.cc
View file @
7048ce94
...
@@ -89,6 +89,7 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
...
@@ -89,6 +89,7 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
ui
->
airframeMenuButton
->
setEnabled
(
false
);
ui
->
airframeMenuButton
->
setEnabled
(
false
);
ui
->
sensorMenuButton
->
setEnabled
(
false
);
ui
->
sensorMenuButton
->
setEnabled
(
false
);
ui
->
rcMenuButton
->
setEnabled
(
false
);
ui
->
rcMenuButton
->
setEnabled
(
false
);
ui
->
generalMenuButton
->
hide
();
px4AirframeConfig
=
new
QGCPX4AirframeConfig
(
this
);
px4AirframeConfig
=
new
QGCPX4AirframeConfig
(
this
);
ui
->
airframeLayout
->
addWidget
(
px4AirframeConfig
);
ui
->
airframeLayout
->
addWidget
(
px4AirframeConfig
);
...
@@ -554,7 +555,7 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
...
@@ -554,7 +555,7 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
// Load tabs for general configuration
// Load tabs for general configuration
foreach
(
QString
dir
,
generaldir
.
entryList
(
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
))
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
()));
connect
(
button
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
menuButtonClicked
()));
ui
->
navBarLayout
->
insertWidget
(
2
,
button
);
ui
->
navBarLayout
->
insertWidget
(
2
,
button
);
button
->
setMinimumHeight
(
75
);
button
->
setMinimumHeight
(
75
);
...
@@ -598,7 +599,7 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
...
@@ -598,7 +599,7 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
// Load additional tabs for vehicle specific configuration
// Load additional tabs for vehicle specific configuration
foreach
(
QString
dir
,
vehicledir
.
entryList
(
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
))
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
()));
connect
(
button
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
menuButtonClicked
()));
ui
->
navBarLayout
->
insertWidget
(
2
,
button
);
ui
->
navBarLayout
->
insertWidget
(
2
,
button
);
...
...
src/ui/QGCPX4VehicleConfig.ui
View file @
7048ce94
...
@@ -19,134 +19,187 @@
...
@@ -19,134 +19,187 @@
<property
name=
"windowTitle"
>
<property
name=
"windowTitle"
>
<string>
Form
</string>
<string>
Form
</string>
</property>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_11"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_11"
stretch=
"0,0"
>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<item>
<item>
<widget
class=
"QScrollArea"
name=
"leftNavScrollArea"
>
<widget
class=
"QWidget"
name=
"navBarWidget"
native=
"true"
>
<property
name=
"minimumSize"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<size>
<property
name=
"margin"
>
<width>
135
</width>
<number>
0
</number>
<height>
0
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
135
</width>
<height>
16777215
</height>
</size>
</property>
<property
name=
"widgetResizable"
>
<bool>
true
</bool>
</property>
<widget
class=
"QWidget"
name=
"leftNavScrollAreaWidgetContents"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
133
</width>
<height>
886
</height>
</rect>
</property>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_12"
>
<item>
<item>
<layout
class=
"QVBoxLayout"
name=
"navBarLayout"
>
<layout
class=
"QVBoxLayout"
name=
"navBarLayout"
>
<property
name=
"sizeConstraint"
>
<property
name=
"sizeConstraint"
>
<enum>
QLayout::SetMinAndMaxSize
</enum>
<enum>
QLayout::SetMinAndMaxSize
</enum>
</property>
</property>
<property
name=
"leftMargin"
>
<item>
<number>
12
</number>
<widget
class=
"QPushButton"
name=
"firmwareMenuButton"
>
</property>
<property
name=
"text"
>
<property
name=
"topMargin"
>
<string>
Firmware
<number>
12
</number>
</property>
<property
name=
"rightMargin"
>
<number>
24
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
12
</number>
</property>
<item>
<widget
class=
"QPushButton"
name=
"firmwareMenuButton"
>
<property
name=
"text"
>
<string>
Firmware
Upgrade
</string>
Upgrade
</string>
</property>
</property>
</widget>
<property
name=
"icon"
>
</item>
<iconset
resource=
"../../qgroundcontrol.qrc"
>
<item>
<normaloff>
:/files/images/px4/menu/firmware_upgrade.png
</normaloff>
:/files/images/px4/menu/firmware_upgrade.png
</iconset>
<widget
class=
"QPushButton"
name=
"rcMenuButton"
>
</property>
<property
name=
"minimumSize"
>
<property
name=
"iconSize"
>
<size>
<size>
<width>
100
</width>
<width>
64
</width>
<height>
75
</height>
<height>
64
</height>
</size>
</size>
</property>
</property>
<property
name=
"maximumSize"
>
</widget>
<size>
</item>
<width>
16777215
</width>
<item>
<height>
16777215
</height>
<widget
class=
"QPushButton"
name=
"rcMenuButton"
>
</size>
<property
name=
"minimumSize"
>
</property>
<size>
<property
name=
"text"
>
<width>
100
</width>
<string>
RC
<height>
75
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
16777215
</height>
</size>
</property>
<property
name=
"text"
>
<string>
Radio
Calibration
</string>
Calibration
</string>
</property>
</property>
</widget>
<property
name=
"icon"
>
</item>
<iconset
resource=
"../../qgroundcontrol.qrc"
>
<item>
<normaloff>
:/files/images/px4/menu/remote.png
</normaloff>
:/files/images/px4/menu/remote.png
</iconset>
<widget
class=
"QPushButton"
name=
"sensorMenuButton"
>
</property>
<property
name=
"minimumSize"
>
<property
name=
"iconSize"
>
<size>
<size>
<width>
100
</width>
<width>
64
</width>
<height>
75
</height>
<height>
64
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
</widget>
<string>
Sensor
</item>
<item>
<widget
class=
"QPushButton"
name=
"sensorMenuButton"
>
<property
name=
"minimumSize"
>
<size>
<width>
100
</width>
<height>
75
</height>
</size>
</property>
<property
name=
"text"
>
<string>
Sensor
Calibration
</string>
Calibration
</string>
</property>
</property>
</widget>
<property
name=
"icon"
>
</item>
<iconset
resource=
"../../qgroundcontrol.qrc"
>
<item>
<normaloff>
:/files/images/px4/menu/sensors.png
</normaloff>
:/files/images/px4/menu/sensors.png
</iconset>
<widget
class=
"QPushButton"
name=
"airframeMenuButton"
>
</property>
<property
name=
"text"
>
<property
name=
"iconSize"
>
<string>
Airframe
<size>
<width>
64
</width>
<height>
64
</height>
</size>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"airframeMenuButton"
>
<property
name=
"text"
>
<string>
Airframe
Config
</string>
Config
</string>
</property>
</property>
</widget>
<property
name=
"icon"
>
</item>
<iconset
resource=
"../../qgroundcontrol.qrc"
>
<item>
<normaloff>
:/files/images/px4/menu/plane.png
</normaloff>
:/files/images/px4/menu/plane.png
</iconset>
<widget
class=
"QPushButton"
name=
"generalMenuButton"
>
</property>
<property
name=
"minimumSize"
>
<property
name=
"iconSize"
>
<size>
<size>
<width>
100
</width>
<width>
64
</width>
<height>
75
</height>
<height>
64
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
</widget>
<string>
General
</item>
<item>
<widget
class=
"QPushButton"
name=
"generalMenuButton"
>
<property
name=
"minimumSize"
>
<size>
<width>
100
</width>
<height>
75
</height>
</size>
</property>
<property
name=
"text"
>
<string>
General
Config
</string>
Config
</string>
</property>
</property>
</widget>
<property
name=
"icon"
>
</item>
<iconset
resource=
"../../qgroundcontrol.qrc"
>
<item>
<normaloff>
:/files/images/px4/menu/cogwheels.png
</normaloff>
:/files/images/px4/menu/cogwheels.png
</iconset>
<widget
class=
"QPushButton"
name=
"advancedMenuButton"
>
</property>
<property
name=
"minimumSize"
>
<property
name=
"iconSize"
>
<size>
<size>
<width>
100
</width>
<width>
64
</width>
<height>
75
</height>
<height>
64
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
</widget>
<string>
Advanced
</item>
<item>
<widget
class=
"QPushButton"
name=
"advancedMenuButton"
>
<property
name=
"minimumSize"
>
<size>
<width>
100
</width>
<height>
75
</height>
</size>
</property>
<property
name=
"text"
>
<string>
Advanced
Config
</string>
Config
</string>
</property>
</property>
</widget>
<property
name=
"icon"
>
</item>
<iconset
resource=
"../../qgroundcontrol.qrc"
>
<item>
<normaloff>
:/files/images/px4/menu/cogwheels.png
</normaloff>
:/files/images/px4/menu/cogwheels.png
</iconset>
<spacer
name=
"verticalSpacer_2"
>
</property>
<property
name=
"orientation"
>
<property
name=
"iconSize"
>
<enum>
Qt::Vertical
</enum>
<size>
</property>
<width>
64
</width>
<property
name=
"sizeHint"
stdset=
"0"
>
<height>
64
</height>
<size>
</size>
<width>
20
</width>
</property>
<height>
40
</height>
</widget>
</size>
</item>
</property>
<item>
</spacer>
<spacer
name=
"verticalSpacer_2"
>
</item>
<property
name=
"orientation"
>
</layout>
<enum>
Qt::Vertical
</enum>
</item>
</property>
</layout>
<property
name=
"sizeHint"
stdset=
"0"
>
</widget>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</item>
<item>
<item>
...
@@ -154,7 +207,7 @@ Config</string>
...
@@ -154,7 +207,7 @@ Config</string>
<item>
<item>
<widget
class=
"QStackedWidget"
name=
"stackedWidget"
>
<widget
class=
"QStackedWidget"
name=
"stackedWidget"
>
<property
name=
"currentIndex"
>
<property
name=
"currentIndex"
>
<number>
2
</number>
<number>
5
</number>
</property>
</property>
<widget
class=
"QWidget"
name=
"firmwareTab"
>
<widget
class=
"QWidget"
name=
"firmwareTab"
>
<layout
class=
"QVBoxLayout"
name=
"firmwareLayout"
>
<layout
class=
"QVBoxLayout"
name=
"firmwareLayout"
>
...
@@ -1123,8 +1176,8 @@ Config</string>
...
@@ -1123,8 +1176,8 @@ Config</string>
<rect>
<rect>
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
5
9
7
</width>
<width>
57
1
</width>
<height>
74
0
</height>
<height>
7
6
4
</height>
</rect>
</rect>
</property>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_7"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_7"
>
...
@@ -1253,6 +1306,8 @@ Config</string>
...
@@ -1253,6 +1306,8 @@ Config</string>
<container>
1
</container>
<container>
1
</container>
</customwidget>
</customwidget>
</customwidgets>
</customwidgets>
<resources/>
<resources>
<include
location=
"../../qgroundcontrol.qrc"
/>
</resources>
<connections/>
<connections/>
</ui>
</ui>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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