2017-10-13 15:48:24 +00:00
|
|
|
import QtQuick 2.2
|
|
|
|
import FlightGear.Launcher 1.0 as FG
|
|
|
|
|
2018-05-08 05:52:07 +00:00
|
|
|
Item {
|
2017-10-13 15:48:24 +00:00
|
|
|
id: root
|
|
|
|
|
2018-05-08 05:52:07 +00:00
|
|
|
height: frameRect.height + (Style.margin * 2);
|
2017-10-13 15:48:24 +00:00
|
|
|
z: 100
|
|
|
|
|
2018-05-08 05:52:07 +00:00
|
|
|
Rectangle {
|
|
|
|
id: frameRect
|
2017-12-05 20:53:47 +00:00
|
|
|
y: Style.margin
|
2018-05-08 05:52:07 +00:00
|
|
|
height: noDefaultCatalogRow.childrenRect.height + (Style.margin * 2);
|
|
|
|
width: parent.width
|
|
|
|
color: "white"
|
|
|
|
border.width: 1
|
|
|
|
border.color: Style.minorFrameColor
|
|
|
|
|
|
|
|
Row {
|
|
|
|
y: Style.margin
|
2018-06-28 10:43:40 +00:00
|
|
|
x: Style.margin
|
|
|
|
|
2018-05-08 05:52:07 +00:00
|
|
|
id: noDefaultCatalogRow
|
|
|
|
spacing: Style.margin
|
|
|
|
|
2018-06-28 10:43:40 +00:00
|
|
|
StyledText {
|
2018-05-08 05:52:07 +00:00
|
|
|
text: qsTr("The official FlightGear aircraft hangar is not added, so many standard "
|
|
|
|
+ "aircraft will not be available. You can add the hangar now, or hide "
|
|
|
|
+ "this message. The offical hangar can always be restored from the 'Add-Ons' page.")
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
width: root.width - (addDefaultButton.width + hideButton.width + Style.margin * 3)
|
2017-10-13 15:48:24 +00:00
|
|
|
}
|
|
|
|
|
2018-05-08 05:52:07 +00:00
|
|
|
Button {
|
|
|
|
id: addDefaultButton
|
|
|
|
text: _addOns.catalogs.isAddingCatalog ? qsTr("Adding hangar")
|
|
|
|
: qsTr("Add default hangar")
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
onClicked: _addOns.officialCatalogAction("add-official");
|
|
|
|
enabled: !_addOns.catalogs.isAddingCatalog
|
|
|
|
}
|
2017-10-13 15:48:24 +00:00
|
|
|
|
2018-05-08 05:52:07 +00:00
|
|
|
Button {
|
|
|
|
id: hideButton
|
|
|
|
text: qsTr("Hide")
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
onClicked: _addOns.officialCatalogAction("hide");
|
2017-10-13 15:48:24 +00:00
|
|
|
}
|
2018-05-08 05:52:07 +00:00
|
|
|
} // content row
|
|
|
|
} // visible frame
|
|
|
|
} // root item
|