Commit 5dffd405 authored by Rustom Jehangir's avatar Rustom Jehangir

Update Sub's safetyComponent to use new SetupPage structure.

parent 1386aaa0
...@@ -18,14 +18,21 @@ import QGroundControl.Palette 1.0 ...@@ -18,14 +18,21 @@ import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0 import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
QGCView { SetupPage {
id: _safetyView id: safetyPage
viewPanel: panel pageComponent: safetyPageComponent
anchors.fill: parent
FactPanelController { id: controller; factPanel: panel } Component {
id: safetyPageComponent
QGCPalette { id: ggcPal; colorGroupEnabled: enabled } Flow {
id: flowLayout
width: availableWidth
spacing: _margins
FactPanelController { id: controller; factPanel: safetyPage.viewPanel }
QGCPalette { id: ggcPal; colorGroupEnabled: true }
property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE") property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE")
property Fact _failsafeLeakEnable: controller.getParameterFact(-1, "FS_LEAK_ENABLE") property Fact _failsafeLeakEnable: controller.getParameterFact(-1, "FS_LEAK_ENABLE")
...@@ -50,21 +57,6 @@ QGCView { ...@@ -50,21 +57,6 @@ QGCView {
ExclusiveGroup { id: fenceActionRadioGroup } ExclusiveGroup { id: fenceActionRadioGroup }
QGCViewPanel {
id: panel
anchors.fill: parent
QGCFlickable {
clip: true
anchors.fill: parent
contentHeight: flowLayout.height
contentWidth: flowLayout.width
Flow {
id: flowLayout
width: panel.width // parent.width doesn't work for some reason
spacing: _margins
Column { Column {
spacing: _margins / 2 spacing: _margins / 2
...@@ -270,6 +262,5 @@ QGCView { ...@@ -270,6 +262,5 @@ QGCView {
} // Rectangle - Arming checks } // Rectangle - Arming checks
} // Column - Arming Checks } // Column - Arming Checks
} // Flow } // Flow
} // QGCFlickable } // Component - safetyPageComponent
} // QGCViewPanel } // SetupView
} // QGCView
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