Commit 1386aaa0 authored by Rustom Jehangir's avatar Rustom Jehangir

Update lightsComponent to new SetupPage structure.

parent 66adea1a
......@@ -30,7 +30,7 @@ QString APMLightsComponent::name(void) const
QString APMLightsComponent::description(void) const
{
return tr("The Lights Component is used to setup lights settings.");
return tr("Lights setup is used to adjust light output channels.");
}
QString APMLightsComponent::iconResource(void) const
......
......@@ -17,14 +17,20 @@ import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
QGCView {
id: _lightsView
viewPanel: panel
anchors.fill: parent
SetupPage {
id: lightsPage
pageComponent: lightsPageComponent
FactPanelController { id: controller; factPanel: panel }
Component {
id: lightsPageComponent
Column {
spacing: _margins
width: availableWidth
QGCPalette { id: palette; colorGroupEnabled: enabled }
FactPanelController { id: controller; factPanel: lightsPage.viewPanel }
QGCPalette { id: palette; colorGroupEnabled: true }
property Fact _rc5Function: controller.getParameterFact(-1, "RC5_FUNCTION")
property Fact _rc6Function: controller.getParameterFact(-1, "RC6_FUNCTION")
......@@ -170,28 +176,15 @@ QGCView {
} // Item
} // Component - lightSettings
QGCViewPanel {
id: panel
anchors.fill: parent
QGCFlickable {
clip: true
anchors.fill: parent
contentWidth: lightsLoader.x + lightsLoader.width
contentHeight: lightsLoader.y + lightsLoader.height
Loader {
id: lightsLoader
sourceComponent: lightSettings
anchors.margins: _margins
anchors.top: parent.top
property int lights1OutIndex: 0
property int lights2OutIndex: 0
property int lights1Function: _rcFunctionRCIN9
property int lights2Function: _rcFunctionRCIN10
}
} // Flickable
} // QGCViewPanel
} // QGCView
} // Column
} // Component
} // SetupPage
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