1
0
Fork 0
flightgear/utils/fgqcanvas/qml/mainMenu.qml

63 lines
1.3 KiB
QML
Raw Normal View History

import QtQuick 2.0
import FlightGear 1.0 as FG
Rectangle {
width: 1024
height: 768
color: "black"
2018-11-06 17:58:44 +00:00
property double __uiOpacity: _application.showUI ? 1.0 : 0.0
2017-11-04 10:47:14 +00:00
property bool __uiVisible: true
Behavior on __uiOpacity {
SequentialAnimation {
2018-11-06 17:58:44 +00:00
ScriptAction { script: if (_application.showUI) __uiVisible = true; }
NumberAnimation { duration: 400 }
ScriptAction { script: if (!_application.showUI) __uiVisible = false; }
2017-11-04 10:47:14 +00:00
}
}
Image {
2017-11-04 10:47:14 +00:00
opacity: __uiOpacity * 0.5
source: "qrc:///images/checkerboard"
fillMode: Image.Tile
anchors.fill: parent
visible: __uiVisible
}
Repeater {
model: _application.activeCanvases
delegate: CanvasFrame {
id: display
canvas: modelData
2017-11-04 10:47:14 +00:00
showUi: __uiVisible
}
}
2017-11-08 13:36:07 +00:00
VerticalTabPanel {
anchors.fill: parent
tabs: [browsePanel, configPanel, snapshotsPanel]
titles: ["Connect", "Load / Save", "Snapshots"]
visible: __uiVisible
opacity: __uiOpacity
}
2017-11-08 13:36:07 +00:00
Component {
id: browsePanel
BrowsePanel { }
}
Component {
id: configPanel
LoadSavePanel { }
}
Component {
id: snapshotsPanel
SnapshotsPanel { }
}
2017-11-08 13:36:07 +00:00
}