QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
IndicatorButton.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3
4import QGroundControl
5import QGroundControl.Controls
6
7/// Works just like a regular button but it can have a red indicator on the right side displayed
8QGCButton {
9 property bool indicatorGreen: false ///< true: no indicator shown, false: red indicator shown
10
11 Rectangle {
12 anchors.rightMargin: ScreenTools.defaultFontPixelWidth / 3
13 anchors.right: parent.right
14 anchors.verticalCenter: parent.verticalCenter
15 width: radius * 2
16 height: width
17 radius: (ScreenTools.defaultFontPixelHeight * .75) / 2
18 color: "red"
19 visible: enabled && !indicatorGreen
20 }
21}