Browse Source

Update lightsComponent to new SetupPage structure.

QGC4.4
Rustom Jehangir 9 years ago
parent
commit
1386aaa0f8
  1. 2
      src/AutoPilotPlugins/APM/APMLightsComponent.cc
  2. 37
      src/AutoPilotPlugins/APM/APMLightsComponent.qml

2
src/AutoPilotPlugins/APM/APMLightsComponent.cc

@ -30,7 +30,7 @@ QString APMLightsComponent::name(void) const @@ -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

37
src/AutoPilotPlugins/APM/APMLightsComponent.qml

@ -17,14 +17,20 @@ import QGroundControl.Palette 1.0 @@ -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 { @@ -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

Loading…
Cancel
Save