2017-03-27 15:38:25 +02:00
|
|
|
import QtQuick 2.6
|
|
|
|
import QtQuick.Window 2.2
|
|
|
|
import QtQuick.Controls 2.1
|
|
|
|
import QtQuick.Layouts 1.3
|
2017-10-24 20:38:17 +02:00
|
|
|
import QtGraphicalEffects 1.0
|
2017-10-26 14:26:27 +02:00
|
|
|
import Qt.labs.platform 1.0
|
2017-03-27 15:38:25 +02:00
|
|
|
import "Components"
|
|
|
|
|
2017-06-06 12:51:53 +02:00
|
|
|
ApplicationWindow {
|
2017-04-04 17:40:21 +02:00
|
|
|
id: window
|
2017-03-27 15:38:25 +02:00
|
|
|
color: "#eeeeee"
|
|
|
|
visible: true
|
2017-10-26 14:26:27 +02:00
|
|
|
width: 1383
|
2017-04-23 11:31:05 +02:00
|
|
|
minimumHeight: 768
|
|
|
|
minimumWidth: 1050
|
2017-04-03 18:48:34 +02:00
|
|
|
|
2017-10-26 14:26:27 +02:00
|
|
|
SystemTrayIcon {
|
|
|
|
visible: true
|
|
|
|
iconSource: "qrc:/assets/icons/favicon.ico"
|
|
|
|
|
|
|
|
menu: Menu {
|
2017-10-29 12:33:37 +01:00
|
|
|
MenuItem {
|
|
|
|
text: qsTr("Open ScreenPlay")
|
2017-10-26 14:26:27 +02:00
|
|
|
onTriggered: {
|
|
|
|
window.show()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
MenuItem {
|
|
|
|
text: qsTr("Quit")
|
|
|
|
onTriggered: Qt.quit()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-01 16:46:13 +02:00
|
|
|
Component.onCompleted: {
|
2017-10-29 12:33:37 +01:00
|
|
|
setX(Screen.width / 2 - width / 2)
|
|
|
|
setY(Screen.height / 2 - height / 2)
|
2017-05-01 16:46:13 +02:00
|
|
|
}
|
2017-06-06 12:51:53 +02:00
|
|
|
|
2017-10-24 20:38:17 +02:00
|
|
|
|
2017-04-03 18:48:34 +02:00
|
|
|
Loader {
|
2017-07-13 10:49:12 +02:00
|
|
|
id: pageLoader
|
2017-10-24 19:57:39 +02:00
|
|
|
asynchronous: true
|
2017-10-29 12:33:37 +01:00
|
|
|
source: "qrc:/qml/Components/Installed.qml"
|
2017-03-27 15:38:25 +02:00
|
|
|
anchors {
|
2017-04-03 18:48:34 +02:00
|
|
|
top: nav.bottom
|
2017-03-27 15:38:25 +02:00
|
|
|
right: parent.right
|
2017-04-03 18:48:34 +02:00
|
|
|
bottom: parent.bottom
|
2017-03-27 15:38:25 +02:00
|
|
|
left: parent.left
|
|
|
|
}
|
2017-06-06 12:51:53 +02:00
|
|
|
onStateChanged: {
|
2017-10-29 12:33:37 +01:00
|
|
|
if (pageLoader.state === Loader.Loading) {
|
2017-06-06 12:51:53 +02:00
|
|
|
loaderText.visible = true
|
2017-10-29 12:33:37 +01:00
|
|
|
} else if (pageLoader.state === Loader.Ready) {
|
2017-06-06 12:51:53 +02:00
|
|
|
loaderText.visible = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
id: loaderText
|
|
|
|
visible: true
|
|
|
|
text: qsTr("Loading...")
|
|
|
|
anchors.centerIn: parent
|
|
|
|
font.pixelSize: 32
|
|
|
|
|
|
|
|
font.family: font_LibreBaskerville_Italic.name
|
|
|
|
font.pointSize: 32
|
|
|
|
font.italic: true
|
|
|
|
color: "#818181"
|
2017-10-29 12:33:37 +01:00
|
|
|
FontLoader {
|
2017-06-06 12:51:53 +02:00
|
|
|
id: font_LibreBaskerville_Italic
|
|
|
|
source: "qrc:/assets/fonts/LibreBaskerville-Italic.ttf"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-29 12:33:37 +01:00
|
|
|
Connections {
|
2017-07-13 10:49:12 +02:00
|
|
|
target: pageLoader.item
|
2017-04-03 19:58:47 +02:00
|
|
|
ignoreUnknownSignals: true
|
2017-04-04 17:40:21 +02:00
|
|
|
onSetSidebaractiveItem: {
|
2017-10-29 12:33:37 +01:00
|
|
|
if (sidebar.activeScreen == screenId
|
|
|
|
&& sidebar.state == "active") {
|
|
|
|
sidebar.state = "inactive"
|
2017-04-10 16:03:49 +02:00
|
|
|
} else {
|
2017-10-29 12:33:37 +01:00
|
|
|
sidebar.state = "active"
|
2017-04-10 16:03:49 +02:00
|
|
|
}
|
|
|
|
|
2017-04-04 17:40:21 +02:00
|
|
|
sidebar.activeScreen = screenId
|
2017-10-29 12:33:37 +01:00
|
|
|
}
|
|
|
|
onSetNavigationItem: {
|
|
|
|
if(pos === 0){
|
|
|
|
nav.onPageChanged("Create")
|
|
|
|
} else {
|
|
|
|
nav.onPageChanged("Workshop")
|
|
|
|
}
|
2017-04-03 19:58:47 +02:00
|
|
|
}
|
|
|
|
}
|
2017-03-27 15:38:25 +02:00
|
|
|
}
|
|
|
|
|
2017-04-03 18:48:34 +02:00
|
|
|
Sidebar {
|
|
|
|
id: sidebar
|
2017-10-29 12:33:37 +01:00
|
|
|
width: 400
|
2017-03-27 15:38:25 +02:00
|
|
|
anchors {
|
2017-10-29 12:33:37 +01:00
|
|
|
top: nav.bottom
|
|
|
|
right: parent.right
|
|
|
|
bottom: parent.bottom
|
2017-04-03 18:48:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Navigation {
|
|
|
|
id: nav
|
|
|
|
anchors {
|
|
|
|
top: parent.top
|
2017-03-27 15:38:25 +02:00
|
|
|
right: parent.right
|
|
|
|
left: parent.left
|
|
|
|
}
|
2017-07-13 10:49:12 +02:00
|
|
|
onChangePage: {
|
2017-10-29 12:33:37 +01:00
|
|
|
pageLoader.setSource("qrc:/qml/Components/" + name + ".qml")
|
2017-04-05 13:52:38 +02:00
|
|
|
sidebar.state = "inactive"
|
|
|
|
}
|
2017-04-13 08:24:11 +02:00
|
|
|
|
|
|
|
onToggleMonitors: {
|
|
|
|
monitors.state = monitors.state == "active" ? "inactive" : "active"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Monitors {
|
|
|
|
id: monitors
|
|
|
|
state: "inactive"
|
2017-07-13 10:49:12 +02:00
|
|
|
anchors.fill: pageLoader
|
2017-10-29 12:33:37 +01:00
|
|
|
z: 98
|
2017-03-27 15:38:25 +02:00
|
|
|
}
|
|
|
|
}
|