5import QGroundControl.Controls
7/// Inspector header: back and step buttons when drilled in, delete, and the title of the inspected element
11 property string namePrefix ///< Prefix of the objectNames of the header controls
13 property string subtitle
14 property bool drillIn: false ///< true: show the back and previous/next buttons
15 property bool canStepPrevious: false
16 property bool canStepNext: false
17 property bool deletable: true
20 signal previousRequested
22 signal deleteRequested
24 spacing: ScreenTools.defaultFontPixelHeight * 0.4
26 QGCPalette { id: qgcPal }
29 Layout.fillWidth: true
30 spacing: ScreenTools.defaultFontPixelWidth / 2
33 objectName: root.namePrefix + "_back"
34 accessibleName: qsTr("Back")
35 iconSource: "/InstrumentValueIcons/cheveron-right.svg"
38 onClicked: root.backRequested()
42 Layout.fillWidth: true
44 color: qgcPal.textSecondary
48 objectName: root.namePrefix + "_previous"
49 accessibleName: qsTr("Previous")
50 iconSource: "/InstrumentValueIcons/cheveron-right.svg"
53 enabled: root.canStepPrevious
54 onClicked: root.previousRequested()
58 objectName: root.namePrefix + "_next"
59 accessibleName: qsTr("Next")
60 iconSource: "/InstrumentValueIcons/cheveron-right.svg"
63 enabled: root.canStepNext
64 onClicked: root.nextRequested()
68 objectName: root.namePrefix + "_delete"
69 accessibleName: qsTr("Delete")
70 iconSource: "/res/TrashDelete.svg"
72 visible: root.deletable
73 onClicked: root.deleteRequested()
78 objectName: root.namePrefix + "_title"
79 Layout.fillWidth: true
82 font.capitalization: Font.AllUppercase
83 font.letterSpacing: ScreenTools.defaultFontPixelWidth * 0.1
84 elide: Text.ElideRight