import QtQuick          2.3
import QtQuick.Controls 1.2
import QtQuick.Layouts  1.2

import QGroundControl               1.0
import QGroundControl.ScreenTools   1.0
import QGroundControl.Controls      1.0
import QGroundControl.FactControls  1.0

GridLayout {
    id:                 editorColumn
    columns: 2
    columnSpacing: _margin
    rowSpacing: _margin
    width:      availableWidth

    property var geoArea: undefined
    property int availableWidth

    property real _margin: ScreenTools.defaultFontPixelWidth / 2

    Component.onCompleted: {
        console.assert(geoArea !== undefined, "please set the areaItem property")
    }

    SectionHeader {
        id:     statsHeader
        text:   qsTr("Statistics")
        Layout.fillWidth: true
        Layout.columnSpan: 2
    }

    GridLayout {
        columns: 2
        columnSpacing: _margin
        rowSpacing: _margin
        visible:        statsHeader.checked
        Layout.fillWidth: true
        Layout.columnSpan: 2

        QGCLabel { text: qsTr("Area") }
        //QGCLabel { text: QGroundControl.squareMetersToAppSettingsAreaUnits(geoArea.area).toFixed(2) + " " + QGroundControl.appSettingsAreaUnitsString }
    }
}
