Commit f6425893 authored by Don Gagne's avatar Don Gagne

Merge pull request #1279 from DonLakeFlyer/SafetyConfig

Safety config ui design
parents a5dc8468 a78fef59
......@@ -254,6 +254,7 @@
<file alias="QGroundControl/Controls/QGCLabel.qml">src/QmlControls/QGCLabel.qml</file>
<file alias="QGroundControl/Controls/QGCTextField.qml">src/QmlControls/QGCTextField.qml</file>
<file alias="QGroundControl/Controls/QGCComboBox.qml">src/QmlControls/QGCComboBox.qml</file>
<file alias="QGroundControl/Controls/QGCColoredImage.qml">src/QmlControls/QGCColoredImage.qml</file>
<file alias="QGroundControl/Controls/arrow-down.png">src/QmlControls/arrow-down.png</file>
......@@ -273,11 +274,17 @@
<file alias="FlightModesComponentSummary.qml">src/AutoPilotPlugins/PX4/FlightModesComponentSummary.qml</file>
<file alias="AirframeComponentSummary.qml">src/AutoPilotPlugins/PX4/AirframeComponentSummary.qml</file>
<file alias="SafetyComponentTree.png">src/AutoPilotPlugins/PX4/SafetyComponentTree.png</file>
<file alias="SafetyComponentHome.png">src/AutoPilotPlugins/PX4/SafetyComponentHome.png</file>
<file alias="SafetyComponentArrowDown.png">src/AutoPilotPlugins/PX4/SafetyComponentArrowDown.png</file>
<file alias="SafetyComponentPlane.png">src/AutoPilotPlugins/PX4/SafetyComponentPlane.png</file>
<file alias="QGroundControl/Controls/subMenuButtonImage.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/SafetyComponentIcon.png">src/AutoPilotPlugins/PX4/SafetyComponentIcon.png</file>
<file alias="QGroundControl/Controls/FirmwareUpgradeIcon.png">src/VehicleSetup/FirmwareUpgradeIcon.png</file>
<file alias="QGroundControl/Controls/VehicleSummaryIcon.png">src/VehicleSetup/VehicleSummaryIcon.png</file>
......
......@@ -50,8 +50,7 @@ QString SafetyComponent::description(void) const
QString SafetyComponent::iconResource(void) const
{
// FIXME: Need real icon
return "subMenuButtonImage.png";
return "SafetyComponentIcon.png";
}
bool SafetyComponent::requiresSetup(void) const
......
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtGraphicalEffects 1.0
import QGroundControl.Palette 1.0
Item {
property color color: "white" // Image color
property alias asynchronous: image.asynchronous
property alias cache: image.cache
property alias fillMode: image.fillMode
property alias horizontalAlignment: image.horizontalAlignment
property alias mirror: image.mirror
property alias paintedHeight: image.paintedHeight
property alias paintedWidth: image.paintedWidth
property alias progress: image.progress
property alias smooth: image.smooth
property alias source: image.source
property alias sourceSize: image.sourceSize
property alias status: image.status
property alias verticalAlignment: image.verticalAlignment
width: image.width
height: image.height
Image {
id: image
smooth: true
visible: false
anchors.fill: parent
}
ColorOverlay {
anchors.fill: image
source: image
color: parent.color
}
}
\ No newline at end of file
......@@ -8,7 +8,7 @@ TextField {
property bool showUnits: false
property string unitsLabel: ""
property var __qgcPal: QGCPalette { colorGroupEnabled: true }
property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }
textColor: __qgcPal.textFieldText
......
......@@ -65,19 +65,14 @@ Button {
color: __qgcPal.windowShade
Image {
id: buttonImage
QGCColoredImage {
source: control.imageResource
sourceSize: Qt.size(parent.width - 20, parent.height - 20)
fillMode: Image.PreserveAspectFit
width: parent.width - 20
height: parent.height - 20
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
smooth: true
visible: false
}
ColorOverlay {
anchors.fill: buttonImage
source: buttonImage
color: __showHighlight ? __qgcPal.buttonHighlight : __qgcPal.button
}
}
......
......@@ -6,3 +6,4 @@ QGCRadioButton 1.0 QGCRadioButton.qml
QGCCheckBox 1.0 QGCCheckBox.qml
QGCTextField 1.0 QGCTextField.qml
QGCComboBox 1.0 QGCComboBox.qml
QGCColoredImage 1.0 QGCColoredImage.qml
......@@ -24,9 +24,8 @@ Rectangle {
Column {
anchors.fill:parent
Text {
QGCLabel {
text: "FIRMWARE UPDATE"
color: qgcPal.text
font.pointSize: 20
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment