StarSkyPresenter/resources/main_window.qml
2025-11-29 23:16:51 +01:00

115 lines
3.7 KiB
QML

import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
ApplicationWindow {
id: mainWindow
visible: true
width: 800
height: 600
title: "StarSky Presenter"
flags: Qt.FramelessWindowHint
Button {
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width * 0.9
y: parent.height * 0.85
height: parent.height * 0.1
text: "Close"
onClicked: controller_backend.close_application()
}
Text {
x: parent.width * 0.1 / 9 / 2
y: parent.height * 0.1 / 5 / 2
width: parent.width * 0.9
height: parent.height * 0.1
text: "Scene 1"
font.pixelSize: 60
color: "white"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
Button {
x: (parent.width * 0.1 / 9) * (0 + 0.5) + (parent.width * 0.9 / 9) * 0
y: (parent.height * 0.1 / 5) * (0 + 0.5) + (parent.height * 0.9 / 5) * 1
width: parent.width * 0.1
height: parent.height * 0.1
text: "Scene 1"
onClicked: controller_backend.select_scene(1)
}
Button {
x: (parent.width * 0.1 / 9) * (1 + 0.5) + (parent.width * 0.9 / 9) * 1
y: (parent.height * 0.1 / 5) * (0 + 0.5) + (parent.height * 0.9 / 5) * 1
width: parent.width * 0.1
height: parent.height * 0.1
text: "Scene 2"
onClicked: controller_backend.select_scene(2)
}
Button {
x: (parent.width * 0.1 / 9) * (2 + 0.5) + (parent.width * 0.9 / 9) * 2
y: (parent.height * 0.1 / 5) * (0 + 0.5) + (parent.height * 0.9 / 5) * 1
width: parent.width * 0.1
height: parent.height * 0.1
text: "Scene 3"
onClicked: controller_backend.select_scene(3)
}
Button {
x: (parent.width * 0.1 / 9) * (3 + 0.5) + (parent.width * 0.9 / 9) * 3
y: (parent.height * 0.1 / 5) * (0 + 0.5) + (parent.height * 0.9 / 5) * 1
width: parent.width * 0.1
height: parent.height * 0.1
text: "Scene 4"
onClicked: controller_backend.select_scene(4)
}
Button {
x: (parent.width * 0.1 / 9) * (4 + 0.5) + (parent.width * 0.9 / 9) * 4
y: (parent.height * 0.1 / 5) * (0 + 0.5) + (parent.height * 0.9 / 5) * 1
width: parent.width * 0.1
height: parent.height * 0.1
text: "Scene 5"
onClicked: controller_backend.select_scene(5)
}
Button {
x: (parent.width * 0.1 / 9) * (5 + 0.5) + (parent.width * 0.9 / 9) * 5
y: (parent.height * 0.1 / 5) * (0 + 0.5) + (parent.height * 0.9 / 5) * 1
width: parent.width * 0.1
height: parent.height * 0.1
text: "Scene 6"
onClicked: controller_backend.select_scene(6)
}
Button {
x: (parent.width * 0.1 / 9) * (6 + 0.5) + (parent.width * 0.9 / 9) * 6
y: (parent.height * 0.1 / 5) * (0 + 0.5) + (parent.height * 0.9 / 5) * 1
width: parent.width * 0.1
height: parent.height * 0.1
text: "Scene 7"
onClicked: controller_backend.select_scene(7)
}
Button {
x: (parent.width * 0.1 / 9) * (7 + 0.5) + (parent.width * 0.9 / 9) * 7
y: (parent.height * 0.1 / 5) * (0 + 0.5) + (parent.height * 0.9 / 5) * 1
width: parent.width * 0.1
height: parent.height * 0.1
text: "Scene 8"
onClicked: controller_backend.select_scene(8)
}
Button {
x: (parent.width * 0.1 / 9) * (8 + 0.5) + (parent.width * 0.9 / 9) * 8
y: (parent.height * 0.1 / 5) * (0 + 0.5) + (parent.height * 0.9 / 5) * 1
width: parent.width * 0.1
height: parent.height * 0.1
text: "Scene 9"
onClicked: controller_backend.select_scene(9)
}
}