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
fc01014c
Commit
fc01014c
authored
Feb 17, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify UI to fit latest designer sketches
parent
d84e7c94
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
215 additions
and
151 deletions
+215
-151
qgroundcontrol.qrc
qgroundcontrol.qrc
+6
-0
AirframeComponent.cc
src/AutoPilotPlugins/PX4/AirframeComponent.cc
+2
-2
AirframeComponent.h
src/AutoPilotPlugins/PX4/AirframeComponent.h
+1
-1
AirframeComponentIcon.png
src/AutoPilotPlugins/PX4/AirframeComponentIcon.png
+0
-0
AirframeComponentSummary.qml
src/AutoPilotPlugins/PX4/AirframeComponentSummary.qml
+6
-5
FlightModesComponent.cc
src/AutoPilotPlugins/PX4/FlightModesComponent.cc
+2
-2
FlightModesComponent.h
src/AutoPilotPlugins/PX4/FlightModesComponent.h
+1
-1
FlightModesComponentIcon.png
src/AutoPilotPlugins/PX4/FlightModesComponentIcon.png
+0
-0
FlightModesComponentSummary.qml
src/AutoPilotPlugins/PX4/FlightModesComponentSummary.qml
+10
-9
RadioComponent.cc
src/AutoPilotPlugins/PX4/RadioComponent.cc
+2
-2
RadioComponent.h
src/AutoPilotPlugins/PX4/RadioComponent.h
+1
-1
RadioComponentIcon.png
src/AutoPilotPlugins/PX4/RadioComponentIcon.png
+0
-0
RadioComponentSummary.qml
src/AutoPilotPlugins/PX4/RadioComponentSummary.qml
+12
-11
SafetyComponent.cc
src/AutoPilotPlugins/PX4/SafetyComponent.cc
+3
-2
SafetyComponent.h
src/AutoPilotPlugins/PX4/SafetyComponent.h
+1
-1
SafetyComponentSummary.qml
src/AutoPilotPlugins/PX4/SafetyComponentSummary.qml
+13
-12
SensorsComponent.cc
src/AutoPilotPlugins/PX4/SensorsComponent.cc
+2
-2
SensorsComponent.h
src/AutoPilotPlugins/PX4/SensorsComponent.h
+1
-1
SensorsComponentIcon.png
src/AutoPilotPlugins/PX4/SensorsComponentIcon.png
+0
-0
SensorsComponentSummary.qml
src/AutoPilotPlugins/PX4/SensorsComponentSummary.qml
+10
-9
QGCPalette.cc
src/QGCPalette.cc
+12
-2
QGCPalette.h
src/QGCPalette.h
+12
-0
QGCButton.qml
src/QmlControls/QGCButton.qml
+1
-1
QmlTest.qml
src/QmlControls/QmlTest.qml
+40
-0
SetupButton.qml
src/QmlControls/SetupButton.qml
+8
-11
FirmwareUpgrade.qml
src/VehicleSetup/FirmwareUpgrade.qml
+2
-1
FirmwareUpgradeIcon.png
src/VehicleSetup/FirmwareUpgradeIcon.png
+0
-0
SetupView.ui
src/VehicleSetup/SetupView.ui
+12
-0
SetupViewButtons.qml
src/VehicleSetup/SetupViewButtons.qml
+4
-4
VehicleComponent.h
src/VehicleSetup/VehicleComponent.h
+2
-2
VehicleSummary.qml
src/VehicleSetup/VehicleSummary.qml
+49
-69
VehicleSummaryIcon.png
src/VehicleSetup/VehicleSummaryIcon.png
+0
-0
No files found.
qgroundcontrol.qrc
View file @
fc01014c
...
@@ -269,6 +269,12 @@
...
@@ -269,6 +269,12 @@
<file alias="AirframeComponentSummary.qml">src/AutoPilotPlugins/PX4/AirframeComponentSummary.qml</file>
<file alias="AirframeComponentSummary.qml">src/AutoPilotPlugins/PX4/AirframeComponentSummary.qml</file>
<file alias="QGroundControl/Controls/setupButtonImage.png">files/Setup/cogwheels.png</file>
<file alias="QGroundControl/Controls/setupButtonImage.png">files/Setup/cogwheels.png</file>
<file alias="QGroundControl/Controls/SensorsComponentIcon.png">src/AutoPilotPlugins/PX4/SensorsComponentIcon.png</file>
<file alias="QGroundControl/Controls/RadioComponentIcon.png">src/AutoPilotPlugins/PX4/RadioComponentIcon.png</file>
<file alias="QGroundControl/Controls/FlightModesComponentIcon.png">src/AutoPilotPlugins/PX4/FlightModesComponentIcon.png</file>
<file alias="QGroundControl/Controls/AirframeComponentIcon.png">src/AutoPilotPlugins/PX4/AirframeComponentIcon.png</file>
<file alias="QGroundControl/Controls/FirmwareUpgradeIcon.png">src/VehicleSetup/FirmwareUpgradeIcon.png</file>
<file alias="QGroundControl/Controls/VehicleSummaryIcon.png">src/VehicleSetup/VehicleSummaryIcon.png</file>
</qresource>
</qresource>
...
...
src/AutoPilotPlugins/PX4/AirframeComponent.cc
View file @
fc01014c
...
@@ -133,9 +133,9 @@ QString AirframeComponent::description(void) const
...
@@ -133,9 +133,9 @@ QString AirframeComponent::description(void) const
"This will in turn set up the various tuning values for flight paramters."
);
"This will in turn set up the various tuning values for flight paramters."
);
}
}
QString
AirframeComponent
::
icon
(
void
)
const
QString
AirframeComponent
::
icon
Resource
(
void
)
const
{
{
return
"
:/files/images/px4/menu/plane
.png"
;
return
"
AirframeComponentIcon
.png"
;
}
}
bool
AirframeComponent
::
requiresSetup
(
void
)
const
bool
AirframeComponent
::
requiresSetup
(
void
)
const
...
...
src/AutoPilotPlugins/PX4/AirframeComponent.h
View file @
fc01014c
...
@@ -43,7 +43,7 @@ public:
...
@@ -43,7 +43,7 @@ public:
// Virtuals from VehicleComponent
// Virtuals from VehicleComponent
virtual
QString
name
(
void
)
const
;
virtual
QString
name
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
icon
(
void
)
const
;
virtual
QString
icon
Resource
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
QString
setupStateDescription
(
void
)
const
;
virtual
QString
setupStateDescription
(
void
)
const
;
...
...
src/AutoPilotPlugins/PX4/AirframeComponentIcon.png
0 → 100644
View file @
fc01014c
503 Bytes
src/AutoPilotPlugins/PX4/AirframeComponentSummary.qml
View file @
fc01014c
import
QtQuick
2.2
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Fact
Controls
1.0
import
QGroundControl
.
Controls
1.0
Column
{
Column
{
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -11,8 +12,8 @@ Column {
...
@@ -11,8 +12,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
systemId
;
text
:
"
System ID:
"
}
QGCLabel
{
id
:
systemId
;
text
:
"
System ID:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
systemId
.
contentWidth
width
:
parent
.
width
-
systemId
.
contentWidth
text
:
autopilot
.
parameters
[
"
MAV_SYS_ID
"
].
value
text
:
autopilot
.
parameters
[
"
MAV_SYS_ID
"
].
value
...
@@ -22,8 +23,8 @@ Column {
...
@@ -22,8 +23,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
airframe
;
text
:
"
Airframe:
"
}
QGCLabel
{
id
:
airframe
;
text
:
"
Airframe:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
airframe
.
contentWidth
width
:
parent
.
width
-
airframe
.
contentWidth
text
:
autopilot
.
parameters
[
"
SYS_AUTOSTART
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
SYS_AUTOSTART
"
].
value
text
:
autopilot
.
parameters
[
"
SYS_AUTOSTART
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
SYS_AUTOSTART
"
].
value
...
...
src/AutoPilotPlugins/PX4/FlightModesComponent.cc
View file @
fc01014c
...
@@ -63,9 +63,9 @@ QString FlightModesComponent::description(void) const
...
@@ -63,9 +63,9 @@ QString FlightModesComponent::description(void) const
"At a minimum the Main Mode Switch must be assigned prior to flight."
);
"At a minimum the Main Mode Switch must be assigned prior to flight."
);
}
}
QString
FlightModesComponent
::
icon
(
void
)
const
QString
FlightModesComponent
::
icon
Resource
(
void
)
const
{
{
return
"
:/files/images/px4/menu/toggle_switch
.png"
;
return
"
FlightModesComponentIcon
.png"
;
}
}
bool
FlightModesComponent
::
requiresSetup
(
void
)
const
bool
FlightModesComponent
::
requiresSetup
(
void
)
const
...
...
src/AutoPilotPlugins/PX4/FlightModesComponent.h
View file @
fc01014c
...
@@ -43,7 +43,7 @@ public:
...
@@ -43,7 +43,7 @@ public:
// Virtuals from VehicleComponent
// Virtuals from VehicleComponent
virtual
QString
name
(
void
)
const
;
virtual
QString
name
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
icon
(
void
)
const
;
virtual
QString
icon
Resource
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
QString
setupStateDescription
(
void
)
const
;
virtual
QString
setupStateDescription
(
void
)
const
;
...
...
src/AutoPilotPlugins/PX4/FlightModesComponentIcon.png
0 → 100644
View file @
fc01014c
460 Bytes
src/AutoPilotPlugins/PX4/FlightModesComponentSummary.qml
View file @
fc01014c
import
QtQuick
2.2
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Fact
Controls
1.0
import
QGroundControl
.
Controls
1.0
Column
{
Column
{
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -11,8 +12,8 @@ Column {
...
@@ -11,8 +12,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
mode
;
text
:
"
Mode switch:
"
}
QGCLabel
{
id
:
mode
;
text
:
"
Mode switch:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
mode
.
contentWidth
width
:
parent
.
width
-
mode
.
contentWidth
text
:
autopilot
.
parameters
[
"
RC_MAP_MODE_SW
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_MODE_SW
"
].
value
text
:
autopilot
.
parameters
[
"
RC_MAP_MODE_SW
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_MODE_SW
"
].
value
...
@@ -22,8 +23,8 @@ Column {
...
@@ -22,8 +23,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
posctl
;
text
:
"
Position Ctl switch:
"
}
QGCLabel
{
id
:
posctl
;
text
:
"
Position Ctl switch:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
posctl
.
contentWidth
width
:
parent
.
width
-
posctl
.
contentWidth
text
:
autopilot
.
parameters
[
"
RC_MAP_POSCTL_SW
"
].
value
==
0
?
"
Not mapped
"
:
autopilot
.
parameters
[
"
RC_MAP_POSCTL_SW
"
].
value
text
:
autopilot
.
parameters
[
"
RC_MAP_POSCTL_SW
"
].
value
==
0
?
"
Not mapped
"
:
autopilot
.
parameters
[
"
RC_MAP_POSCTL_SW
"
].
value
...
@@ -33,8 +34,8 @@ Column {
...
@@ -33,8 +34,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
loiter
;
text
:
"
Loiter switch:
"
}
QGCLabel
{
id
:
loiter
;
text
:
"
Loiter switch:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
loiter
.
contentWidth
width
:
parent
.
width
-
loiter
.
contentWidth
text
:
autopilot
.
parameters
[
"
RC_MAP_LOITER_SW
"
].
value
==
0
?
"
Not mapped
"
:
autopilot
.
parameters
[
"
RC_MAP_LOITER_SW
"
].
value
text
:
autopilot
.
parameters
[
"
RC_MAP_LOITER_SW
"
].
value
==
0
?
"
Not mapped
"
:
autopilot
.
parameters
[
"
RC_MAP_LOITER_SW
"
].
value
...
@@ -44,8 +45,8 @@ Column {
...
@@ -44,8 +45,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
rtl
;
text
:
"
Return switch:
"
}
QGCLabel
{
id
:
rtl
;
text
:
"
Return switch:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
rtl
.
contentWidth
width
:
parent
.
width
-
rtl
.
contentWidth
text
:
autopilot
.
parameters
[
"
RC_MAP_RETURN_SW
"
].
value
==
0
?
"
Not mapped
"
:
autopilot
.
parameters
[
"
RC_MAP_RETURN_SW
"
].
value
text
:
autopilot
.
parameters
[
"
RC_MAP_RETURN_SW
"
].
value
==
0
?
"
Not mapped
"
:
autopilot
.
parameters
[
"
RC_MAP_RETURN_SW
"
].
value
...
...
src/AutoPilotPlugins/PX4/RadioComponent.cc
View file @
fc01014c
...
@@ -49,9 +49,9 @@ QString RadioComponent::description(void) const
...
@@ -49,9 +49,9 @@ QString RadioComponent::description(void) const
"Prior to flight you must also calibrate the extents for all of your channels."
);
"Prior to flight you must also calibrate the extents for all of your channels."
);
}
}
QString
RadioComponent
::
icon
(
void
)
const
QString
RadioComponent
::
icon
Resource
(
void
)
const
{
{
return
"
:/files/images/px4/menu/remote
.png"
;
return
"
RadioComponentIcon
.png"
;
}
}
bool
RadioComponent
::
requiresSetup
(
void
)
const
bool
RadioComponent
::
requiresSetup
(
void
)
const
...
...
src/AutoPilotPlugins/PX4/RadioComponent.h
View file @
fc01014c
...
@@ -44,7 +44,7 @@ public:
...
@@ -44,7 +44,7 @@ public:
// Virtuals from VehicleComponent
// Virtuals from VehicleComponent
virtual
QString
name
(
void
)
const
;
virtual
QString
name
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
icon
(
void
)
const
;
virtual
QString
icon
Resource
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
QString
setupStateDescription
(
void
)
const
;
virtual
QString
setupStateDescription
(
void
)
const
;
...
...
src/AutoPilotPlugins/PX4/RadioComponentIcon.png
0 → 100644
View file @
fc01014c
728 Bytes
src/AutoPilotPlugins/PX4/RadioComponentSummary.qml
View file @
fc01014c
import
QtQuick
2.2
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Fact
Controls
1.0
import
QGroundControl
.
Controls
1.0
Column
{
Column
{
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -11,8 +12,8 @@ Column {
...
@@ -11,8 +12,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
roll
;
text
:
"
Roll:
"
}
QGCLabel
{
id
:
roll
;
text
:
"
Roll:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
roll
.
contentWidth
width
:
parent
.
width
-
roll
.
contentWidth
text
:
autopilot
.
parameters
[
"
RC_MAP_ROLL
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_ROLL
"
].
value
text
:
autopilot
.
parameters
[
"
RC_MAP_ROLL
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_ROLL
"
].
value
...
@@ -22,8 +23,8 @@ Column {
...
@@ -22,8 +23,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
pitch
;
text
:
"
Pitch:
"
}
QGCLabel
{
id
:
pitch
;
text
:
"
Pitch:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
pitch
.
contentWidth
width
:
parent
.
width
-
pitch
.
contentWidth
text
:
autopilot
.
parameters
[
"
RC_MAP_PITCH
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_PITCH
"
].
value
text
:
autopilot
.
parameters
[
"
RC_MAP_PITCH
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_PITCH
"
].
value
...
@@ -33,8 +34,8 @@ Column {
...
@@ -33,8 +34,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
yaw
;
text
:
"
Yaw:
"
}
QGCLabel
{
id
:
yaw
;
text
:
"
Yaw:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
yaw
.
contentWidth
width
:
parent
.
width
-
yaw
.
contentWidth
text
:
autopilot
.
parameters
[
"
RC_MAP_YAW
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_YAW
"
].
value
text
:
autopilot
.
parameters
[
"
RC_MAP_YAW
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_YAW
"
].
value
...
@@ -44,8 +45,8 @@ Column {
...
@@ -44,8 +45,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
throttle
;
text
:
"
Throttle:
"
}
QGCLabel
{
id
:
throttle
;
text
:
"
Throttle:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
throttle
.
contentWidth
width
:
parent
.
width
-
throttle
.
contentWidth
text
:
autopilot
.
parameters
[
"
RC_MAP_THROTTLE
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_THROTTLE
"
].
value
text
:
autopilot
.
parameters
[
"
RC_MAP_THROTTLE
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_THROTTLE
"
].
value
...
@@ -55,8 +56,8 @@ Column {
...
@@ -55,8 +56,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
mode
;
text
:
"
Mode switch:
"
}
QGCLabel
{
id
:
mode
;
text
:
"
Mode switch:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
width
:
parent
.
width
-
mode
.
contentWidth
width
:
parent
.
width
-
mode
.
contentWidth
text
:
autopilot
.
parameters
[
"
RC_MAP_MODE_SW
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_MODE_SW
"
].
value
text
:
autopilot
.
parameters
[
"
RC_MAP_MODE_SW
"
].
value
==
0
?
"
Setup required
"
:
autopilot
.
parameters
[
"
RC_MAP_MODE_SW
"
].
value
...
...
src/AutoPilotPlugins/PX4/SafetyComponent.cc
View file @
fc01014c
...
@@ -48,9 +48,10 @@ QString SafetyComponent::description(void) const
...
@@ -48,9 +48,10 @@ QString SafetyComponent::description(void) const
return
tr
(
"The Safety Component is used to setup triggers for Return to Land as well as the settings for Return to Land itself."
);
return
tr
(
"The Safety Component is used to setup triggers for Return to Land as well as the settings for Return to Land itself."
);
}
}
QString
SafetyComponent
::
icon
(
void
)
const
QString
SafetyComponent
::
icon
Resource
(
void
)
const
{
{
return
":/files/images/px4/menu/remote.png"
;
// FIXME: Need real icon
return
"setupButtonImage.png"
;
}
}
bool
SafetyComponent
::
requiresSetup
(
void
)
const
bool
SafetyComponent
::
requiresSetup
(
void
)
const
...
...
src/AutoPilotPlugins/PX4/SafetyComponent.h
View file @
fc01014c
...
@@ -44,7 +44,7 @@ public:
...
@@ -44,7 +44,7 @@ public:
// Virtuals from VehicleComponent
// Virtuals from VehicleComponent
virtual
QString
name
(
void
)
const
;
virtual
QString
name
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
icon
(
void
)
const
;
virtual
QString
icon
Resource
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
QString
setupStateDescription
(
void
)
const
;
virtual
QString
setupStateDescription
(
void
)
const
;
...
...
src/AutoPilotPlugins/PX4/SafetyComponentSummary.qml
View file @
fc01014c
import
QtQuick
2.2
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Fact
Controls
1.0
import
QGroundControl
.
Controls
1.0
Column
{
Column
{
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -11,8 +12,8 @@ Column {
...
@@ -11,8 +12,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
rtlMinAlt
;
text
:
"
RTL min alt:
"
}
QGCLabel
{
id
:
rtlMinAlt
;
text
:
"
RTL min alt:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
rtlMinAlt
.
contentWidth
;
width
:
parent
.
width
-
rtlMinAlt
.
contentWidth
;
text
:
autopilot
.
parameters
[
"
RTL_RETURN_ALT
"
].
valueString
text
:
autopilot
.
parameters
[
"
RTL_RETURN_ALT
"
].
valueString
...
@@ -22,8 +23,8 @@ Column {
...
@@ -22,8 +23,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
rtlHomeAlt
;
text
:
"
RTL home alt:
"
}
QGCLabel
{
id
:
rtlHomeAlt
;
text
:
"
RTL home alt:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
rtlHomeAlt
.
contentWidth
;
width
:
parent
.
width
-
rtlHomeAlt
.
contentWidth
;
text
:
autopilot
.
parameters
[
"
RTL_DESCEND_ALT
"
].
valueString
text
:
autopilot
.
parameters
[
"
RTL_DESCEND_ALT
"
].
valueString
...
@@ -33,8 +34,8 @@ Column {
...
@@ -33,8 +34,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
rtlLoiter
;
text
:
"
RTL loiter delay:
"
}
QGCLabel
{
id
:
rtlLoiter
;
text
:
"
RTL loiter delay:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
rtlLoiter
.
contentWidth
;
width
:
parent
.
width
-
rtlLoiter
.
contentWidth
;
text
:
autopilot
.
parameters
[
"
RTL_LAND_DELAY
"
].
value
<
0
?
"
Disabled
"
:
autopilot
.
parameters
[
"
RTL_LAND_DELAY
"
].
valueString
text
:
autopilot
.
parameters
[
"
RTL_LAND_DELAY
"
].
value
<
0
?
"
Disabled
"
:
autopilot
.
parameters
[
"
RTL_LAND_DELAY
"
].
valueString
...
@@ -44,19 +45,19 @@ Column {
...
@@ -44,19 +45,19 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
commLoss
;
text
:
"
Telemetry loss RTL:
"
}
QGCLabel
{
id
:
commLoss
;
text
:
"
Telemetry loss RTL:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
commLoss
.
contentWidth
;
width
:
parent
.
width
-
commLoss
.
contentWidth
;
text
:
autopilot
.
parameters
[
"
COM_DL_LOSS_EN
"
].
value
!=
1
?
"
Disabled
"
:
autopilot
.
parameters
[
"
NAV_DLL_N
"
].
valueString
text
:
autopilot
.
parameters
[
"
COM_DL_LOSS_EN
"
].
value
!=
1
?
"
Disabled
"
:
autopilot
.
parameters
[
"
COM_DL_LOSS_T
"
].
valueString
}
}
}
}
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
rcLoss
;
text
:
"
RC loss RTL (seconds):
"
}
QGCLabel
{
id
:
rcLoss
;
text
:
"
RC loss RTL (seconds):
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
rcLoss
.
contentWidth
;
width
:
parent
.
width
-
rcLoss
.
contentWidth
;
text
:
autopilot
.
parameters
[
"
COM_RC_LOSS_T
"
].
valueString
text
:
autopilot
.
parameters
[
"
COM_RC_LOSS_T
"
].
valueString
...
...
src/AutoPilotPlugins/PX4/SensorsComponent.cc
View file @
fc01014c
...
@@ -55,9 +55,9 @@ QString SensorsComponent::description(void) const
...
@@ -55,9 +55,9 @@ QString SensorsComponent::description(void) const
"Prior to flight you must calibrate the Magnetometer, Gyroscope and Accelerometer."
);
"Prior to flight you must calibrate the Magnetometer, Gyroscope and Accelerometer."
);
}
}
QString
SensorsComponent
::
icon
(
void
)
const
QString
SensorsComponent
::
icon
Resource
(
void
)
const
{
{
return
"
:/files/images/px4/menu/sensors
.png"
;
return
"
SensorsComponentIcon
.png"
;
}
}
bool
SensorsComponent
::
requiresSetup
(
void
)
const
bool
SensorsComponent
::
requiresSetup
(
void
)
const
...
...
src/AutoPilotPlugins/PX4/SensorsComponent.h
View file @
fc01014c
...
@@ -43,7 +43,7 @@ public:
...
@@ -43,7 +43,7 @@ public:
// Virtuals from VehicleComponent
// Virtuals from VehicleComponent
virtual
QString
name
(
void
)
const
;
virtual
QString
name
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
description
(
void
)
const
;
virtual
QString
icon
(
void
)
const
;
virtual
QString
icon
Resource
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
requiresSetup
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
bool
setupComplete
(
void
)
const
;
virtual
QString
setupStateDescription
(
void
)
const
;
virtual
QString
setupStateDescription
(
void
)
const
;
...
...
src/AutoPilotPlugins/PX4/SensorsComponentIcon.png
0 → 100644
View file @
fc01014c
726 Bytes
src/AutoPilotPlugins/PX4/SensorsComponentSummary.qml
View file @
fc01014c
import
QtQuick
2.2
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Fact
Controls
1.0
import
QGroundControl
.
Controls
1.0
Column
{
Column
{
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -11,8 +12,8 @@ Column {
...
@@ -11,8 +12,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
compass
;
text
:
"
Compass:
"
}
QGCLabel
{
id
:
compass
;
text
:
"
Compass:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
compass
.
contentWidth
;
width
:
parent
.
width
-
compass
.
contentWidth
;
property
bool
setupRequiredValue
:
autopilot
.
parameters
[
"
SENS_MAG_XOFF
"
]
?
autopilot
.
parameters
[
"
SENS_MAG_XOFF
"
].
value
:
autopilot
.
parameters
[
"
CAL_MAG0_ID
"
].
value
property
bool
setupRequiredValue
:
autopilot
.
parameters
[
"
SENS_MAG_XOFF
"
]
?
autopilot
.
parameters
[
"
SENS_MAG_XOFF
"
].
value
:
autopilot
.
parameters
[
"
CAL_MAG0_ID
"
].
value
...
@@ -23,8 +24,8 @@ Column {
...
@@ -23,8 +24,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
gyro
;
text
:
"
Gyro:
"
}
QGCLabel
{
id
:
gyro
;
text
:
"
Gyro:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
gyro
.
contentWidth
;
width
:
parent
.
width
-
gyro
.
contentWidth
;
property
bool
setupRequiredValue
:
autopilot
.
parameters
[
"
SENS_GYRO_XOFF
"
]
?
autopilot
.
parameters
[
"
SENS_GYRO_XOFF
"
].
value
:
autopilot
.
parameters
[
"
CAL_GYRO0_ID
"
].
value
property
bool
setupRequiredValue
:
autopilot
.
parameters
[
"
SENS_GYRO_XOFF
"
]
?
autopilot
.
parameters
[
"
SENS_GYRO_XOFF
"
].
value
:
autopilot
.
parameters
[
"
CAL_GYRO0_ID
"
].
value
...
@@ -35,8 +36,8 @@ Column {
...
@@ -35,8 +36,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
accel
;
text
:
"
Accelerometer:
"
}
QGCLabel
{
id
:
accel
;
text
:
"
Accelerometer:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
accel
.
contentWidth
;
width
:
parent
.
width
-
accel
.
contentWidth
;
property
bool
setupRequiredValue
:
autopilot
.
parameters
[
"
SENS_ACC_XOFF
"
]
?
autopilot
.
parameters
[
"
SENS_ACC_XOFF
"
].
value
:
autopilot
.
parameters
[
"
CAL_ACC0_ID
"
].
value
property
bool
setupRequiredValue
:
autopilot
.
parameters
[
"
SENS_ACC_XOFF
"
]
?
autopilot
.
parameters
[
"
SENS_ACC_XOFF
"
].
value
:
autopilot
.
parameters
[
"
CAL_ACC0_ID
"
].
value
...
@@ -47,8 +48,8 @@ Column {
...
@@ -47,8 +48,8 @@ Column {
Row
{
Row
{
width
:
parent
.
width
width
:
parent
.
width
Text
{
id
:
airspeed
;
text
:
"
Airspeed:
"
}
QGCLabel
{
id
:
airspeed
;
text
:
"
Airspeed:
"
}
Text
{
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
airspeed
.
contentWidth
;
width
:
parent
.
width
-
airspeed
.
contentWidth
;
text
:
autopilot
.
parameters
[
"
SENS_DPRES_OFF
"
].
value
==
0.0
?
"
Setup required
"
:
"
Ready
"
text
:
autopilot
.
parameters
[
"
SENS_DPRES_OFF
"
].
value
==
0.0
?
"
Setup required
"
:
"
Ready
"
...
...
src/QGCPalette.cc
View file @
fc01014c
...
@@ -63,14 +63,24 @@ QColor QGCPalette::_window[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = {
...
@@ -63,14 +63,24 @@ QColor QGCPalette::_window[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = {
{
QColor
(
0x22
,
0x22
,
0x22
),
QColor
(
0x22
,
0x22
,
0x22
),
QColor
(
0x22
,
0x22
,
0x22
)
}
{
QColor
(
0x22
,
0x22
,
0x22
),
QColor
(
0x22
,
0x22
,
0x22
),
QColor
(
0x22
,
0x22
,
0x22
)
}
};
};
QColor
QGCPalette
::
_windowShade
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
255
,
235
,
211
),
QColor
(
255
,
235
,
211
),
QColor
(
255
,
235
,
211
)
},
{
QColor
(
51
,
51
,
51
),
QColor
(
51
,
51
,
51
),
QColor
(
51
,
51
,
51
)
}
};
QColor
QGCPalette
::
_windowShadeDark
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
216
,
216
,
216
),
QColor
(
216
,
216
,
216
),
QColor
(
216
,
216
,
216
)
},
{
QColor
(
40
,
40
,
40
),
QColor
(
40
,
40
,
40
),
QColor
(
40
,
40
,
40
)
}
};
QColor
QGCPalette
::
_windowText
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_windowText
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0
,
0
,
0
),
QColor
(
0
,
0
,
0
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0
,
0
,
0
),
QColor
(
0
,
0
,
0
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0xFF
,
0xFF
,
0xFF
),
QColor
(
0xFF
,
0xFF
,
0xFF
)
}
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0xFF
,
0xFF
,
0xFF
),
QColor
(
0xFF
,
0xFF
,
0xFF
)
}
};
};
QColor
QGCPalette
::
_buttonHighlight
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_buttonHighlight
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0xee
,
0xe3
,
0x33
),
QColor
(
0xee
,
0xe3
,
0x33
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
238
,
227
,
51
),
QColor
(
238
,
227
,
51
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0xee
,
0xe3
,
0x33
),
QColor
(
0xee
,
0xe3
,
0x33
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
238
,
227
,
51
),
QColor
(
238
,
227
,
51
)
},
};
};
QGCPalette
::
QGCPalette
(
QObject
*
parent
)
:
QGCPalette
::
QGCPalette
(
QObject
*
parent
)
:
...
...
src/QGCPalette.h
View file @
fc01014c
...
@@ -54,6 +54,14 @@ class QGCPalette : public QObject
...
@@ -54,6 +54,14 @@ class QGCPalette : public QObject
/// The buttonHighlight color identifies the button background color when hovered or selected.
/// The buttonHighlight color identifies the button background color when hovered or selected.
Q_PROPERTY
(
QColor
buttonHighlight
READ
buttonHighlight
NOTIFY
paletteChanged
)
Q_PROPERTY
(
QColor
buttonHighlight
READ
buttonHighlight
NOTIFY
paletteChanged
)
/// The windowShade color should be a color somewhere between window and button. It is used to shade window
/// areas.
Q_PROPERTY
(
QColor
windowShade
READ
windowShade
NOTIFY
paletteChanged
)
/// The windowShadeDark color should be a color somewhere between window and windowShade. It is used to shade window
/// darker areas.
Q_PROPERTY
(
QColor
windowShadeDark
READ
windowShadeDark
NOTIFY
paletteChanged
)
public:
public:
enum
ColorGroup
{
enum
ColorGroup
{
Disabled
=
0
,
Disabled
=
0
,
...
@@ -78,6 +86,8 @@ public:
...
@@ -78,6 +86,8 @@ public:
QColor
buttonText
(
void
)
const
{
return
_buttonText
[
_theme
][
_colorGroup
];
}
QColor
buttonText
(
void
)
const
{
return
_buttonText
[
_theme
][
_colorGroup
];
}
QColor
text
(
void
)
const
{
return
_text
[
_theme
][
_colorGroup
];
}
QColor
text
(
void
)
const
{
return
_text
[
_theme
][
_colorGroup
];
}
QColor
window
(
void
)
const
{
return
_window
[
_theme
][
_colorGroup
];
}
QColor
window
(
void
)
const
{
return
_window
[
_theme
][
_colorGroup
];
}
QColor
windowShade
(
void
)
const
{
return
_windowShade
[
_theme
][
_colorGroup
];
}
QColor
windowShadeDark
(
void
)
const
{
return
_windowShadeDark
[
_theme
][
_colorGroup
];
}
QColor
windowText
(
void
)
const
{
return
_windowText
[
_theme
][
_colorGroup
];
}
QColor
windowText
(
void
)
const
{
return
_windowText
[
_theme
][
_colorGroup
];
}
QColor
buttonHighlight
(
void
)
const
{
return
_buttonHighlight
[
_theme
][
_colorGroup
];
}
QColor
buttonHighlight
(
void
)
const
{
return
_buttonHighlight
[
_theme
][
_colorGroup
];
}
...
@@ -100,6 +110,8 @@ private:
...
@@ -100,6 +110,8 @@ private:
static
QColor
_buttonText
[
_cThemes
][
_cColorGroups
];
static
QColor
_buttonText
[
_cThemes
][
_cColorGroups
];
static
QColor
_text
[
_cThemes
][
_cColorGroups
];
static
QColor
_text
[
_cThemes
][
_cColorGroups
];
static
QColor
_window
[
_cThemes
][
_cColorGroups
];
static
QColor
_window
[
_cThemes
][
_cColorGroups
];
static
QColor
_windowShade
[
_cThemes
][
_cColorGroups
];
static
QColor
_windowShadeDark
[
_cThemes
][
_cColorGroups
];
static
QColor
_windowText
[
_cThemes
][
_cColorGroups
];
static
QColor
_windowText
[
_cThemes
][
_cColorGroups
];
static
QColor
_buttonHighlight
[
_cThemes
][
_cColorGroups
];
static
QColor
_buttonHighlight
[
_cThemes
][
_cColorGroups
];
...
...
src/QmlControls/QGCButton.qml
View file @
fc01014c
...
@@ -11,7 +11,7 @@ Button {
...
@@ -11,7 +11,7 @@ Button {
background
:
Rectangle
{
background
:
Rectangle
{
implicitWidth
:
100
implicitWidth
:
100
implicitHeight
:
25
implicitHeight
:
25
color
:
control
.
hover
ed
?
control
.
__qgcPal
.
buttonHighlight
:
control
.
__qgcPal
.
button
color
:
control
.
press
ed
?
control
.
__qgcPal
.
buttonHighlight
:
control
.
__qgcPal
.
button
}
}
label
:
Text
{
label
:
Text
{
...
...
src/QmlControls/QmlTest.qml
View file @
fc01014c
...
@@ -210,6 +210,46 @@ Rectangle {
...
@@ -210,6 +210,46 @@ Rectangle {
sourceComponent
:
colorSquare
sourceComponent
:
colorSquare
}
}
Loader
{
sourceComponent
:
rowHeader
property
var
text
:
"
windowShade
"
}
Loader
{
property
var
palette
:
QGCPalette
{
colorGroup
:
QGCPalette
.
Disabled
}
property
var
color
:
palette
.
windowShade
sourceComponent
:
colorSquare
}
Loader
{
property
var
palette
:
QGCPalette
{
colorGroup
:
QGCPalette
.
Active
}
property
var
color
:
palette
.
windowShade
sourceComponent
:
colorSquare
}
Loader
{
property
var
palette
:
QGCPalette
{
colorGroup
:
QGCPalette
.
Inactive
}
property
var
color
:
palette
.
windowShade
sourceComponent
:
colorSquare
}
Loader
{
sourceComponent
:
rowHeader
property
var
text
:
"
windowShadeDark
"
}
Loader
{
property
var
palette
:
QGCPalette
{
colorGroup
:
QGCPalette
.
Disabled
}
property
var
color
:
palette
.
windowShadeDark
sourceComponent
:
colorSquare
}
Loader
{
property
var
palette
:
QGCPalette
{
colorGroup
:
QGCPalette
.
Active
}
property
var
color
:
palette
.
windowShadeDark
sourceComponent
:
colorSquare
}
Loader
{
property
var
palette
:
QGCPalette
{
colorGroup
:
QGCPalette
.
Inactive
}
property
var
color
:
palette
.
windowShadeDark
sourceComponent
:
colorSquare
}
Loader
{
Loader
{
sourceComponent
:
rowHeader
sourceComponent
:
rowHeader
property
var
text
:
"
windowText
"
property
var
text
:
"
windowText
"
...
...
src/QmlControls/SetupButton.qml
View file @
fc01014c
...
@@ -12,11 +12,12 @@ Button {
...
@@ -12,11 +12,12 @@ Button {
text
:
"
Button
"
text
:
"
Button
"
property
bool
setupComplete
:
true
property
bool
setupComplete
:
true
property
bool
setupIndicator
:
true
property
bool
setupIndicator
:
true
property
string
imageResource
:
"
setupButtonImage.png
"
style
:
ButtonStyle
{
style
:
ButtonStyle
{
id
:
buttonStyle
id
:
buttonStyle
property
var
__qgc
p
al
:
QGCPalette
{
property
var
__qgc
P
al
:
QGCPalette
{
colorGroup
:
control
.
enabled
?
QGCPalette
.
Active
:
QGCPalette
.
Disabled
colorGroup
:
control
.
enabled
?
QGCPalette
.
Active
:
QGCPalette
.
Disabled
}
}
...
@@ -24,10 +25,7 @@ Button {
...
@@ -24,10 +25,7 @@ Button {
id
:
innerRect
id
:
innerRect
readonly
property
real
titleHeight
:
20
readonly
property
real
titleHeight
:
20
border.color
:
control
.
checked
?
"
#eee333
"
:
"
#676767
"
color
:
control
.
pressed
?
__qgcPal
.
buttonHighlight
:
(
control
.
checked
?
__qgcPal
.
buttonHighlight
:
__qgcPal
.
button
)
radius
:
10
color
:
control
.
checked
?
"
#eee333
"
:
"
#343434
"
Text
{
Text
{
id
:
titleBar
id
:
titleBar
...
@@ -40,7 +38,7 @@ Button {
...
@@ -40,7 +38,7 @@ Button {
text
:
control
.
text
text
:
control
.
text
font.pixelSize
:
12
font.pixelSize
:
12
color
:
control
.
checked
?
"
black
"
:
"
white
"
color
:
__qgcPal
.
buttonText
Rectangle
{
Rectangle
{
id
:
setupIndicator
id
:
setupIndicator
...
@@ -53,7 +51,7 @@ Button {
...
@@ -53,7 +51,7 @@ Button {
height
:
indicatorRadius
*
2
height
:
indicatorRadius
*
2
radius
:
indicatorRadius
radius
:
indicatorRadius
color
:
control
.
setupIndicator
?
(
control
.
setupComplete
?
"
green
"
:
"
red
"
)
:
innerRect
.
color
color
:
control
.
setupIndicator
?
(
control
.
setupComplete
?
"
#00d932
"
:
"
red
"
)
:
innerRect
.
color
}
}
}
}
...
@@ -63,12 +61,11 @@ Button {
...
@@ -63,12 +61,11 @@ Button {
y
:
parent
.
titleHeight
y
:
parent
.
titleHeight
color
:
__qgcpal
.
window
color
:
__qgcPal
.
windowShade
border.color
:
control
.
checked
?
"
#eee333
"
:
"
#676767
"
Image
{
Image
{
id
:
buttonImage
id
:
buttonImage
source
:
"
setupButtonImage.png
"
source
:
control
.
imageResource
sourceSize
:
Qt
.
size
(
parent
.
width
-
20
,
parent
.
height
-
20
)
sourceSize
:
Qt
.
size
(
parent
.
width
-
20
,
parent
.
height
-
20
)
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
...
@@ -79,7 +76,7 @@ Button {
...
@@ -79,7 +76,7 @@ Button {
ColorOverlay
{
ColorOverlay
{
anchors.fill
:
buttonImage
anchors.fill
:
buttonImage
source
:
buttonImage
source
:
buttonImage
color
:
control
.
checked
?
"
#eee333
"
:
"
#58585a
"
color
:
control
.
pressed
?
__qgcPal
.
buttonHighlight
:
(
control
.
checked
?
__qgcPal
.
buttonHighlight
:
__qgcPal
.
button
)
}
}
}
}
}
}
...
...
src/VehicleSetup/FirmwareUpgrade.qml
View file @
fc01014c
...
@@ -95,9 +95,10 @@ Rectangle {
...
@@ -95,9 +95,10 @@ Rectangle {
width
:
parent
.
width
width
:
parent
.
width
height
:
300
height
:
300
readOnly
:
true
readOnly
:
true
frameVisible
:
false
style
:
TextAreaStyle
{
style
:
TextAreaStyle
{
textColor
:
qgcPal
.
windowText
textColor
:
qgcPal
.
windowText
backgroundColor
:
qgcPal
.
window
backgroundColor
:
qgcPal
.
window
Shade
}
}
}
}
}
}
...
...
src/VehicleSetup/FirmwareUpgradeIcon.png
0 → 100644
View file @
fc01014c
418 Bytes
src/VehicleSetup/SetupView.ui
View file @
fc01014c
...
@@ -14,6 +14,18 @@
...
@@ -14,6 +14,18 @@
<string>
Form
</string>
<string>
Form
</string>
</property>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<item>
<widget
class=
"QGCQuickWidget"
name=
"buttonHolder"
>
<widget
class=
"QGCQuickWidget"
name=
"buttonHolder"
>
<property
name=
"sizePolicy"
>
<property
name=
"sizePolicy"
>
...
...
src/VehicleSetup/SetupViewButtons.qml
View file @
fc01014c
...
@@ -21,12 +21,11 @@ Rectangle {
...
@@ -21,12 +21,11 @@ Rectangle {
Column
{
Column
{
anchors.fill
:
parent
anchors.fill
:
parent
spacing
:
10
SetupButton
{
SetupButton
{
id
:
firmwareButton
;
objectName
:
"
firmwareButton
"
id
:
firmwareButton
;
objectName
:
"
firmwareButton
"
width
:
parent
.
width
width
:
parent
.
width
text
:
"
FIRMWARE
"
text
:
"
FIRMWARE
"
imageResource
:
"
FirmwareUpgradeIcon.png
"
setupIndicator
:
false
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
firmwareButtonClicked
()
onClicked
:
controller
.
firmwareButtonClicked
()
...
@@ -40,12 +39,11 @@ Rectangle {
...
@@ -40,12 +39,11 @@ Rectangle {
Column
{
Column
{
anchors.fill
:
parent
anchors.fill
:
parent
spacing
:
10
SetupButton
{
SetupButton
{
id
:
summaryButton
;
objectName
:
"
summaryButton
"
id
:
summaryButton
;
objectName
:
"
summaryButton
"
width
:
parent
.
width
width
:
parent
.
width
text
:
"
SUMMARY
"
text
:
"
SUMMARY
"
imageResource
:
"
VehicleSummaryIcon.png
"
setupIndicator
:
false
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
summaryButtonClicked
()
onClicked
:
controller
.
summaryButtonClicked
()
...
@@ -55,6 +53,7 @@ Rectangle {
...
@@ -55,6 +53,7 @@ Rectangle {
id
:
firmwareButton
;
objectName
:
"
firmwareButton
"
id
:
firmwareButton
;
objectName
:
"
firmwareButton
"
width
:
parent
.
width
width
:
parent
.
width
text
:
"
FIRMWARE
"
text
:
"
FIRMWARE
"
imageResource
:
"
FirmwareUpgradeIcon.png
"
setupIndicator
:
false
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
firmwareButtonClicked
()
onClicked
:
controller
.
firmwareButtonClicked
()
...
@@ -66,6 +65,7 @@ Rectangle {
...
@@ -66,6 +65,7 @@ Rectangle {
SetupButton
{
SetupButton
{
width
:
parent
.
width
width
:
parent
.
width
text
:
modelData
.
name
.
toUpperCase
()
text
:
modelData
.
name
.
toUpperCase
()
imageResource
:
modelData
.
iconResource
setupComplete
:
modelData
.
setupComplete
setupComplete
:
modelData
.
setupComplete
exclusiveGroup
:
setupButtonGroup
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
setupButtonClicked
(
modelData
)
onClicked
:
controller
.
setupButtonClicked
(
modelData
)
...
...
src/VehicleSetup/VehicleComponent.h
View file @
fc01014c
...
@@ -47,7 +47,7 @@ class VehicleComponent : public QObject
...
@@ -47,7 +47,7 @@ class VehicleComponent : public QObject
Q_PROPERTY
(
bool
requiresSetup
READ
requiresSetup
CONSTANT
)
Q_PROPERTY
(
bool
requiresSetup
READ
requiresSetup
CONSTANT
)
Q_PROPERTY
(
bool
setupComplete
READ
setupComplete
STORED
false
NOTIFY
setupCompleteChanged
)
Q_PROPERTY
(
bool
setupComplete
READ
setupComplete
STORED
false
NOTIFY
setupCompleteChanged
)
Q_PROPERTY
(
QString
setupStateDescription
READ
setupStateDescription
STORED
false
)
Q_PROPERTY
(
QString
setupStateDescription
READ
setupStateDescription
STORED
false
)
Q_PROPERTY
(
QString
icon
READ
icon
CONSTANT
)
Q_PROPERTY
(
QString
icon
Resource
READ
iconResource
CONSTANT
)
Q_PROPERTY
(
QWidget
*
setupWidget
READ
setupWidget
STORED
false
)
Q_PROPERTY
(
QWidget
*
setupWidget
READ
setupWidget
STORED
false
)
Q_PROPERTY
(
QUrl
summaryQmlSource
READ
summaryQmlSource
CONSTANT
);
Q_PROPERTY
(
QUrl
summaryQmlSource
READ
summaryQmlSource
CONSTANT
);
Q_PROPERTY
(
QString
prerequisiteSetup
READ
prerequisiteSetup
)
Q_PROPERTY
(
QString
prerequisiteSetup
READ
prerequisiteSetup
)
...
@@ -58,7 +58,7 @@ public:
...
@@ -58,7 +58,7 @@ public:
virtual
QString
name
(
void
)
const
=
0
;
virtual
QString
name
(
void
)
const
=
0
;
virtual
QString
description
(
void
)
const
=
0
;
virtual
QString
description
(
void
)
const
=
0
;
virtual
QString
icon
(
void
)
const
=
0
;
virtual
QString
icon
Resource
(
void
)
const
=
0
;
virtual
bool
requiresSetup
(
void
)
const
=
0
;
virtual
bool
requiresSetup
(
void
)
const
=
0
;
virtual
bool
setupComplete
(
void
)
const
=
0
;
virtual
bool
setupComplete
(
void
)
const
=
0
;
virtual
QString
setupStateDescription
(
void
)
const
=
0
;
virtual
QString
setupStateDescription
(
void
)
const
=
0
;
...
...
src/VehicleSetup/VehicleSummary.qml
View file @
fc01014c
...
@@ -9,101 +9,81 @@ Rectangle {
...
@@ -9,101 +9,81 @@ Rectangle {
width
:
600
width
:
600
height
:
400
height
:
400
QGCPalette
{
id
:
palette
;
colorGroup
:
QGCPalette
.
Active
}
property
var
qgcPal
:
QGCPalette
{
id
:
palette
;
colorGroup
:
QGCPalette
.
Active
}
id
:
topLevel
id
:
topLevel
objectName
:
"
topLevel
"
objectName
:
"
topLevel
"
color
:
palette
.
window
color
:
qgcPal
.
window
Image
{
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
source
:
autopilot
.
setupBackgroundImage
;
}
Column
{
anchors.margins
:
20
anchors.fill
:
parent
spacing
:
5
Flow
{
Flow
{
width
:
parent
.
width
;
anchors.fill
:
parent
height
:
parent
.
height
spacing
:
10
spacing
:
5
Repeater
{
model
:
autopilot
.
components
Button
{
Repeater
{
width
:
250
model
:
autopilot
.
components
height
:
200
property
var
summaryQmlSource
:
modelData
.
summaryQmlSource
Button
{
text
:
modelData
.
name
width
:
250
property
bool
setupComplete
:
modelData
.
setupComplete
height
:
200
style
:
ButtonStyle
{
property
var
summaryQmlSource
:
modelData
.
summaryQmlSource
id
:
buttonStyle
text
:
modelData
.
name
background
:
Rectangle
{
property
bool
setupComplete
:
modelData
.
setupComplete
id
:
innerRect
readonly
property
real
titleHeight
:
30
border.color
:
"
#888
"
style
:
ButtonStyle
{
radius
:
10
id
:
buttonStyle
background
:
Rectangle
{
id
:
innerRect
readonly
property
real
titleHeight
:
30
color
:
"
white
"
color
:
qgcPal
.
windowShadeDark
opacity
:
0.8
Text
{
Text
{
id
:
titleBar
id
:
titleBar
width
:
parent
.
width
width
:
parent
.
width
height
:
parent
.
titleHeight
height
:
parent
.
titleHeight
verticalAlignment
:
TextEdit
.
AlignVCenter
verticalAlignment
:
TextEdit
.
AlignVCenter
horizontalAlignment
:
TextEdit
.
AlignHCenter
horizontalAlignment
:
TextEdit
.
AlignHCenter
text
:
control
.
text
text
:
control
.
text
.
toUpperCase
()
font.pixelSize
:
12
color
:
qgcPal
.
buttonText
font.pixelSize
:
12
Rectangle
{
Rectangle
{
id
:
setupIndicator
id
:
setupIndicator
property
bool
setupComplete
:
true
property
bool
setupComplete
:
true
readonly
property
real
indicatorRadius
:
6
readonly
property
real
indicatorRadius
:
6
x
:
parent
.
width
-
(
indicatorRadius
*
2
)
-
5
x
:
parent
.
width
-
(
indicatorRadius
*
2
)
-
5
y
:
(
parent
.
height
-
(
indicatorRadius
*
2
))
/
2
y
:
(
parent
.
height
-
(
indicatorRadius
*
2
))
/
2
width
:
indicatorRadius
*
2
width
:
indicatorRadius
*
2
height
:
indicatorRadius
*
2
height
:
indicatorRadius
*
2
radius
:
indicatorRadius
radius
:
indicatorRadius
color
:
control
.
setupComplete
?
"
green
"
:
"
red
"
color
:
control
.
setupComplete
?
"
#00d932
"
:
"
red
"
}
}
}
}
Rectangle
{
Rectangle
{
width
:
parent
.
width
width
:
parent
.
width
height
:
parent
.
height
-
parent
.
titleHeight
height
:
parent
.
height
-
parent
.
titleHeight
y
:
parent
.
titleHeight
border.color
:
"
#888
"
y
:
parent
.
titleHeight
gradient
:
Gradient
{
color
:
qgcPal
.
windowShade
GradientStop
{
position
:
0
;
color
:
"
#ffffff
"
}
GradientStop
{
position
:
1
;
color
:
"
#000000
"
}
}
Loader
{
Loader
{
anchors.fill
:
parent
anchors.fill
:
parent
source
:
summaryQmlSource
source
:
summaryQmlSource
}
}
}
}
}
label
:
Item
{}
}
}
label
:
Item
{}
}
}
}
}
}
}
...
...
src/VehicleSetup/VehicleSummaryIcon.png
0 → 100644
View file @
fc01014c
502 Bytes
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