| 1 |
import QtQuick 2.4 |
| 2 |
import FlightGear 1.0 |
| 3 |
|
| 4 |
Item { |
| 5 |
id: root |
| 6 |
|
| 7 |
property bool showAddButton: false |
| 8 |
|
| 9 |
property alias title: header.title |
| 10 |
property alias description: description.text |
| 11 |
signal add(); |
| 12 |
|
| 13 |
implicitWidth: parent.width |
| 14 |
implicitHeight: header.height + Style.margin + description.height |
| 15 |
|
| 16 |
HeaderBox { |
| 17 |
id: header |
| 18 |
width: parent.width |
| 19 |
|
| 20 |
AddButton { |
| 21 |
id: addButton |
| 22 |
visible: root.showAddButton |
| 23 |
anchors.right: parent.right |
| 24 |
anchors.rightMargin: Style.margin |
| 25 |
anchors.verticalCenter: parent.verticalCenter |
| 26 |
onClicked: root.add() |
| 27 |
} |
| 28 |
} |
| 29 |
|
| 30 |
StyledText { |
| 31 |
id: description |
| 32 |
width: parent.width |
| 33 |
anchors.top: header.bottom |
| 34 |
anchors.topMargin: Style.margin |
| 35 |
wrapMode: Text.WordWrap |
| 36 |
} |
| 37 |
} |