FlightDisplayWimaMenu.qml 2.86 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import QtQuick                  2.3
import QtQuick.Controls         1.2
import QtQuick.Controls.Styles  1.4
import QtQuick.Dialogs          1.2
import QtLocation               5.3
import QtPositioning            5.3
import QtQuick.Layouts          1.2

import QGroundControl               1.0
import QGroundControl.ScreenTools   1.0
import QGroundControl.Controls      1.0
import QGroundControl.Palette       1.0
import QGroundControl.Vehicle       1.0
import QGroundControl.FlightMap     1.0
import QGroundControl.Airspace      1.0
import QGroundControl.Airmap        1.0

Item {
    id: _root

21 22 23
    property var wimaController // must be provided by the user

    // box containing all items
24
    Rectangle {
25 26 27 28 29
        anchors.left:   parent.left
        anchors.bottom: parent.bottom
        height:         enableWima.checked ? parent.height : enableWima.height
        width:          enableWima.checked ? parent.width : enableWima.width
        color:      "black"
30

31
        // checkbox to enable/ disable wima
32 33
        QGCCheckBox {
            id: enableWima
34 35 36
            checked: true
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.top: parent.top
37 38
            text: qsTr("WiMA")
        }
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

        // horizonal line
        Rectangle {
            id: horizontalLine
            anchors.left:           parent.left
            anchors.right:          parent.right
            anchors.top:            enableWima.bottom
            anchors.leftMargin:     ScreenTools.defaultFontPixelHeight * 0.5
            anchors.rightMargin:    ScreenTools.defaultFontPixelHeight * 0.5
            anchors.topMargin:      ScreenTools.defaultFontPixelHeight * 0.25
            height:                 1

            color: "white"
        }

        ColumnLayout {
            id : mainColumn
            anchors.left:           parent.left
            anchors.right:          parent.right
            anchors.top:            horizontalLine.bottom
            anchors.bottom:         parent.bottom
            anchors.topMargin:      ScreenTools.defaultFontPixelHeight * 0.5
            anchors.bottomMargin:   ScreenTools.defaultFontPixelHeight * 0.5
            anchors.rightMargin:    ScreenTools.defaultFontPixelHeight * 0.5
            anchors.leftMargin:     ScreenTools.defaultFontPixelHeight * 0.5
            spacing:                ScreenTools.defaultFontPixelHeight * 0.5

            QGCButton {
                id: buttonNextMissionPhase
                text: "Next Phase"
                onClicked: wimaController.nextPhase();
            }

            QGCButton {
                id: buttonResetPhase
                text: "Reset Phase"
                onClicked: wimaController.resetPhase();
            }

            QGCButton {
                id: buttonUpload
                text: "Upload"
                onClicked: wimaController.uploadToVehicle();
            }
        }


86 87
    }
}