APMPowerComponentSummary.qml 1.3 KB
Newer Older
1 2 3 4 5 6 7 8
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
Don Gagne's avatar
Don Gagne committed
9 10 11 12 13 14 15 16 17 18 19


import QtQuick          2.5
import QtQuick.Controls 1.2

import QGroundControl.FactSystem    1.0
import QGroundControl.FactControls  1.0
import QGroundControl.Controls      1.0
import QGroundControl.Palette       1.0

FactPanel {
20 21 22
    id:             panel
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
Don Gagne's avatar
Don Gagne committed
23 24 25 26 27 28 29

    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
    FactPanelController { id: controller; factPanel: panel }

    property Fact battCapacity: controller.getParameterFact(-1, "BATT_CAPACITY")
    property Fact battMonitor:  controller.getParameterFact(-1, "BATT_MONITOR")

30 31
    Column {
        anchors.fill:       parent
Don Gagne's avatar
Don Gagne committed
32

33
        VehicleSummaryRow {
34
            labelText: qsTr("Battery monitor:")
35 36
            valueText: battMonitor.enumStringValue
        }
Don Gagne's avatar
Don Gagne committed
37

38
        VehicleSummaryRow {
39
            labelText: qsTr("Battery capacity:")
Don Gagne's avatar
Don Gagne committed
40
            valueText: battCapacity.valueString + " " + battCapacity.units
41
        }
Don Gagne's avatar
Don Gagne committed
42 43
    }
}