AltitudeFactTextField.qml 1.1 KB
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8 9 10 11 12
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
import QtQuick          2.3
import QtQuick.Dialogs  1.2
import QtQuick.Layouts  1.2

13 14
import QGroundControl               1.0
import QGroundControl.FactSystem    1.0
15 16
import QGroundControl.Controls      1.0
import QGroundControl.ScreenTools   1.0
17 18

FactTextField {
19 20 21 22
    unitsLabel:                 fact ? fact.units : ""
    extraUnitsLabel:            fact ? _altitudeModeExtraUnits : ""
    showUnits:                  true
    showHelp:                   true
23

24
    property int altitudeMode: QGroundControl.AltitudeModeNone
25

26
    property string _altitudeModeExtraUnits
Don Gagne's avatar
Don Gagne committed
27 28

    onAltitudeModeChanged: updateAltitudeModeExtraUnits()
29 30

    function updateAltitudeModeExtraUnits() {
31
        _altitudeModeExtraUnits = QGroundControl.altitudeModeExtraUnits(altitudeMode);
32 33
    }
}