Skip to content
Snippets Groups Projects
Select Git revision
  • 168bc8ecfbc96a5287ec7069cf29d41c2607c380
  • master default protected
  • dev1
  • merge_branch_alt
  • original
  • rc1
  • phil
7 results

StructureScanMapVisual.qml

Blame
  • LinkSettings.qml 19.03 KiB
    /****************************************************************************
     *
     * (c) 2009-2020 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.
     *
     ****************************************************************************/
    
    
    import QtQuick          2.3
    import QtQuick.Controls 1.2
    import QtQuick.Dialogs  1.2
    
    import QGroundControl                       1.0
    import QGroundControl.Controls              1.0
    import QGroundControl.ScreenTools           1.0
    import QGroundControl.Palette               1.0
    
    Rectangle {
        id:                 _linkRoot
        color:              qgcPal.window
        anchors.fill:       parent
        anchors.margins:    ScreenTools.defaultFontPixelWidth
    
        property var _currentSelection: null
        property int _firstColumn:      ScreenTools.defaultFontPixelWidth * 12
        property int _secondColumn:     ScreenTools.defaultFontPixelWidth * 30
    
        ExclusiveGroup { id: linkGroup }
    
        QGCPalette {
            id:                 qgcPal
            colorGroupEnabled:  enabled
        }
    
        function openCommSettings(lconf) {
            settingLoader.linkConfig = lconf
            settingLoader.sourceComponent = commSettings
            settingLoader.visible = true
        }
    
        function closeCommSettings() {
            settingLoader.visible = false
            settingLoader.sourceComponent = null
        }
    
        QGCFlickable {
            clip:               true
            anchors.top:        parent.top
            width:              parent.width
            height:             parent.height - buttonRow.height
            contentHeight:      settingsColumn.height
            contentWidth:       _linkRoot.width
            flickableDirection: Flickable.VerticalFlick
    
            Column {
                id:                 settingsColumn
                width:              _linkRoot.width
                anchors.margins:    ScreenTools.defaultFontPixelWidth
                spacing:            ScreenTools.defaultFontPixelHeight / 2
                Repeater {
                    model: QGroundControl.linkManager.linkConfigurations
                    delegate: QGCButton {
                        anchors.horizontalCenter:   settingsColumn.horizontalCenter
                        width:                      _linkRoot.width * 0.5
                        text:                       object.name
                        exclusiveGroup:             linkGroup
                        visible:                    !object.dynamic
                        onClicked: {