QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCGroupBoxTab.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4/// A tab page within a QGCGroupBox. The group box shows a header button for each visible tab and only shows the
5/// content of the current tab.
6ColumnLayout {
7 id: tab
8 Layout.fillWidth: true
9 Layout.maximumWidth: Number.POSITIVE_INFINITY
10 Layout.minimumWidth: 0
11 // Child layouts fill height by default, which would take height from content shared between tabs
12 Layout.fillHeight: false
13 spacing: tab.parent ? tab.parent.spacing : 0
14 visible: tabVisible && isCurrentTab
15
16 property string title
17 property string iconSource
18 property bool tabVisible: true ///< false hides both the tab's header button and its content
19 property Item badge: null ///< Shown in the header button after the title
20 property string buttonObjectName ///< objectName for the header button
21
22 readonly property bool isCurrentTab: _groupBox !== null && _groupBox._currentTab === tab
23 readonly property bool _isQGCGroupBoxTab: true
24 property var _groupBox: null
25
26 onTabVisibleChanged: {
27 if (_groupBox) {
28 _groupBox._validateCurrentIndex()
29 }
30 }
31}