Browse Source

Clicking on the summary titles enter edit mode

Clicking on the sumarry titles enters the edit mode
On the tests with users, they always clicked on the
title (because it resembled a button or something) and
nothing happened. it was a bit confusing to have the
same information in two places and only one of them
being clickable.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
QGC4.4
Tomaz Canabrava 9 years ago
parent
commit
af054687ea
  1. 8
      src/VehicleSetup/SetupView.qml
  2. 14
      src/VehicleSetup/VehicleSummary.qml

8
src/VehicleSetup/SetupView.qml

@ -38,6 +38,7 @@ import QGroundControl.MultiVehicleManager 1.0
Rectangle { Rectangle {
color: qgcPal.window color: qgcPal.window
z: QGroundControl.zOrderTopMost z: QGroundControl.zOrderTopMost
id: setupView
QGCPalette { id: qgcPal; colorGroupEnabled: true } QGCPalette { id: qgcPal; colorGroupEnabled: true }
@ -110,6 +111,13 @@ Rectangle {
panelLoader.sourceComponent = messagePanelComponent panelLoader.sourceComponent = messagePanelComponent
} else { } else {
panelLoader.source = vehicleComponent.setupSource panelLoader.source = vehicleComponent.setupSource
for(var i = 0; i < componentRepeater.count; i++) {
var obj = componentRepeater.itemAt(i);
if (obj.text === vehicleComponent.name) {
obj.checked = true;
break;
}
}
} }
} }
} }

14
src/VehicleSetup/VehicleSummary.qml

@ -117,19 +117,11 @@ Rectangle {
readonly property real titleHeight: ScreenTools.defaultFontPixelHeight * 2 readonly property real titleHeight: ScreenTools.defaultFontPixelHeight * 2
// Title bar // Title bar
Rectangle { QGCButton {
id: titleBar id: titleBar
width: parent.width width: parent.width
height: titleHeight height: titleHeight
color: qgcPal.windowShade
// Title text
QGCLabel {
anchors.fill: parent
verticalAlignment: TextEdit.AlignVCenter
horizontalAlignment: TextEdit.AlignHCenter
text: capitalizeWords(modelData.name) text: capitalizeWords(modelData.name)
}
// Setup indicator // Setup indicator
Rectangle { Rectangle {
@ -142,6 +134,10 @@ Rectangle {
color: modelData.setupComplete ? "#00d932" : "red" color: modelData.setupComplete ? "#00d932" : "red"
visible: modelData.requiresSetup visible: modelData.requiresSetup
} }
onClicked : {
setupView.showVehicleComponentPanel(modelData)
}
} }
// Summary Qml // Summary Qml

Loading…
Cancel
Save