2017-11-02 17:20:42 +00:00
|
|
|
import QtQuick 2.0
|
|
|
|
import FlightGear 1.0 as FG
|
|
|
|
|
|
|
|
Rectangle {
|
2017-11-04 10:47:14 +00:00
|
|
|
property bool uiVisible: true
|
2017-11-02 17:20:42 +00:00
|
|
|
width: 1024
|
|
|
|
height: 768
|
|
|
|
color: "black"
|
|
|
|
|
2017-11-04 10:47:14 +00:00
|
|
|
property double __uiOpacity: uiVisible ? 1.0 : 0.0
|
|
|
|
property bool __uiVisible: true
|
|
|
|
|
|
|
|
Behavior on __uiOpacity {
|
|
|
|
SequentialAnimation {
|
|
|
|
ScriptAction { script: if (uiVisible) __uiVisible = true; }
|
|
|
|
NumberAnimation { duration: 250 }
|
|
|
|
ScriptAction { script: if (!uiVisible) __uiVisible = false; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-27 17:45:25 +00:00
|
|
|
Component.onCompleted: idleTimer.start();
|
|
|
|
|
2017-11-02 17:20:42 +00:00
|
|
|
Image {
|
2017-11-04 10:47:14 +00:00
|
|
|
opacity: __uiOpacity * 0.5
|
2017-11-02 17:20:42 +00:00
|
|
|
source: "qrc:///images/checkerboard"
|
|
|
|
fillMode: Image.Tile
|
|
|
|
anchors.fill: parent
|
|
|
|
visible: __uiVisible
|
|
|
|
}
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
2017-11-04 10:47:14 +00:00
|
|
|
uiVisible = !uiVisible;
|
2017-11-02 17:20:42 +00:00
|
|
|
}
|
2018-06-26 22:23:49 +00:00
|
|
|
|
|
|
|
hoverEnabled: uiVisible
|
|
|
|
onMouseXChanged: idleTimer.restart()
|
|
|
|
onMouseYChanged: idleTimer.restart()
|
|
|
|
}
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
id: idleTimer
|
|
|
|
interval: 1000 * 10
|
|
|
|
onTriggered: { uiVisible = false; }
|
2017-11-02 17:20:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: _application.activeCanvases
|
|
|
|
delegate: CanvasFrame {
|
|
|
|
id: display
|
|
|
|
canvas: modelData
|
2017-11-04 10:47:14 +00:00
|
|
|
showUi: __uiVisible
|
2017-11-02 17:20:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-08 13:36:07 +00:00
|
|
|
VerticalTabPanel {
|
|
|
|
anchors.fill: parent
|
|
|
|
tabs: [browsePanel, configPanel, snapshotsPanel]
|
|
|
|
titles: ["Connect", "Load / Save", "Snapshots"]
|
2018-06-24 20:33:07 +00:00
|
|
|
visible: __uiVisible
|
|
|
|
opacity: __uiOpacity
|
2017-11-02 17:20:42 +00:00
|
|
|
}
|
|
|
|
|
2017-11-08 13:36:07 +00:00
|
|
|
Component {
|
|
|
|
id: browsePanel
|
|
|
|
BrowsePanel { }
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: configPanel
|
|
|
|
LoadSavePanel { }
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: snapshotsPanel
|
|
|
|
SnapshotsPanel { }
|
2017-11-02 17:20:42 +00:00
|
|
|
}
|
2017-11-08 13:36:07 +00:00
|
|
|
|
2018-06-26 22:23:49 +00:00
|
|
|
|
|
|
|
|
2017-11-02 17:20:42 +00:00
|
|
|
}
|