2018-06-21 08:47:09 +02:00
|
|
|
import QtQuick 2.9
|
2018-12-23 00:06:05 +01:00
|
|
|
import QtQuick.Controls 2.4
|
2018-06-21 08:47:09 +02:00
|
|
|
|
2018-12-21 12:23:12 +01:00
|
|
|
import "../Components"
|
|
|
|
|
2018-06-21 08:47:09 +02:00
|
|
|
Page {
|
2018-12-23 00:06:05 +01:00
|
|
|
id: root
|
|
|
|
|
|
|
|
signal opened()
|
|
|
|
|
|
|
|
onOpened: {
|
|
|
|
console.log("Home Form opened")
|
2018-06-21 16:41:02 +02:00
|
|
|
}
|
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
Column {
|
|
|
|
id: mainMenu
|
|
|
|
spacing: buttonWidth * 0.1
|
|
|
|
|
2018-06-21 16:41:02 +02:00
|
|
|
anchors {
|
2018-12-23 00:06:05 +01:00
|
|
|
horizontalCenter: parent.horizontalCenter
|
2018-06-21 16:41:02 +02:00
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
// width: childrenRect.width
|
|
|
|
// height: childrenRect.height
|
|
|
|
|
|
|
|
property int buttonHeight: app.landscape() ? root.height * (0.5*0.8):buttonWidth
|
|
|
|
property int buttonWidth: app.landscape() ? buttonHeight:root.width * (0.5*0.8)
|
|
|
|
|
|
|
|
Row {
|
|
|
|
id: bigMenu
|
|
|
|
spacing: mainMenu.buttonWidth * 0.1
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2018-06-27 20:26:02 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
FancyButton {
|
|
|
|
id: todayButton
|
2018-06-27 20:26:02 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
image: "qrc:/graphics/sheute.png"
|
2018-06-27 20:26:02 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
width: mainMenu.buttonWidth
|
|
|
|
height: mainMenu.buttonHeight
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
eventConfirmationDialog.openDay("sheute")
|
2018-06-27 20:26:02 +02:00
|
|
|
}
|
|
|
|
}
|
2018-06-21 16:41:02 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
FancyButton {
|
|
|
|
id: tomorrowButton
|
2018-06-21 16:41:02 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
image: "qrc:/graphics/smorgen.png"
|
2018-06-27 20:26:02 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
width: mainMenu.buttonWidth
|
|
|
|
height: mainMenu.buttonHeight
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
eventConfirmationDialog.openDay("smorgen")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Dialog {
|
|
|
|
property string day
|
|
|
|
id: eventConfirmationDialog
|
|
|
|
|
|
|
|
modal: true
|
|
|
|
focus: true
|
|
|
|
|
|
|
|
title: "Bedingung"
|
|
|
|
|
|
|
|
x: (app.width - eventConfirmationDialog.width) / 2
|
|
|
|
y: (app.height - eventConfirmationDialog.height) / 2
|
|
|
|
parent: Overlay.overlay
|
|
|
|
width: Math.min(root.width, root.height) / 3 * 2
|
|
|
|
contentHeight: aboutColumn.height
|
|
|
|
standardButtons: Dialog.Ok | Dialog.Cancel
|
|
|
|
|
|
|
|
onAccepted: {
|
|
|
|
formStack.eventDay = day
|
|
|
|
formStack.push(eventForm)
|
|
|
|
}
|
2018-06-27 20:26:02 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
Column {
|
|
|
|
id: aboutColumn
|
|
|
|
spacing: 20
|
|
|
|
Label {
|
|
|
|
id: text
|
|
|
|
visible: true
|
|
|
|
width: eventConfirmationDialog.availableWidth
|
|
|
|
wrapMode: Label.Wrap
|
|
|
|
text: "Vertretungsplan, vertraulich, nur zum persönlichen Gebrauch, keine Speicherung!"
|
|
|
|
}
|
|
|
|
}
|
2018-06-27 20:26:02 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
function openDay(day){
|
|
|
|
eventConfirmationDialog.day = day
|
|
|
|
eventConfirmationDialog.open()
|
2018-06-27 20:26:02 +02:00
|
|
|
}
|
|
|
|
}
|
2018-12-23 00:06:05 +01:00
|
|
|
|
2018-06-21 16:41:02 +02:00
|
|
|
}
|
2018-06-27 20:26:02 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
Grid {
|
|
|
|
id: smallMenu
|
|
|
|
columns: app.landscape() ? 4:2
|
|
|
|
spacing: mainMenu.buttonWidth * 0.1
|
2018-06-21 08:47:09 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
|
|
property int buttonHeight: mainMenu.buttonHeight * 0.7
|
|
|
|
property int buttonWidth: mainMenu.buttonWidth * 0.7
|
|
|
|
|
|
|
|
FancyButton {
|
|
|
|
id: foodplanButton
|
|
|
|
|
|
|
|
image: "qrc:/graphics/images/TreffpunktFannyLogoDark.png"
|
2018-06-25 00:15:18 +02:00
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
width: smallMenu.buttonWidth
|
|
|
|
height: smallMenu.buttonHeight
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
formStack.push(foodPlanForm)
|
|
|
|
}
|
2018-06-21 16:41:02 +02:00
|
|
|
}
|
2018-12-23 00:06:05 +01:00
|
|
|
|
|
|
|
FancyButton {
|
|
|
|
id: fannyButton
|
|
|
|
|
|
|
|
image: "qrc:/graphics/images/FannyLogoDark.jpg"
|
|
|
|
imageScale: 1.2
|
|
|
|
|
|
|
|
width: smallMenu.buttonWidth
|
|
|
|
height: smallMenu.buttonHeight
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
Qt.openUrlExternally("http://www.fanny-leicht.de")
|
|
|
|
}
|
2018-06-21 16:41:02 +02:00
|
|
|
}
|
2018-12-23 00:06:05 +01:00
|
|
|
|
|
|
|
FancyButton {
|
|
|
|
id: settingsButton
|
|
|
|
|
|
|
|
image: "qrc:/graphics/icons/settingsBlack.png"
|
|
|
|
imageScale: 0.8
|
|
|
|
|
|
|
|
width: smallMenu.buttonWidth
|
|
|
|
height: smallMenu.buttonHeight
|
2018-06-21 16:41:02 +02:00
|
|
|
}
|
|
|
|
|
2018-12-23 00:06:05 +01:00
|
|
|
FancyButton {
|
|
|
|
id: logoutButton
|
|
|
|
|
|
|
|
image: "qrc:/graphics/icons/logoutRed.png"
|
|
|
|
imageScale: 0.8
|
|
|
|
|
|
|
|
width: smallMenu.buttonWidth
|
|
|
|
height: smallMenu.buttonHeight
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
logoutConfirmationDialog.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
Dialog {
|
|
|
|
id: logoutConfirmationDialog
|
|
|
|
|
|
|
|
x: (app.width - width) / 2
|
|
|
|
y: (app.height - height) / 2
|
|
|
|
parent: Overlay.overlay
|
|
|
|
|
|
|
|
modal: true
|
|
|
|
standardButtons: Dialog.Cancel | Dialog.Ok
|
|
|
|
Column {
|
|
|
|
spacing: 20
|
|
|
|
anchors.fill: parent
|
|
|
|
Label {
|
|
|
|
text: "Möchtest du dich wirklich abmelden?"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onAccepted: {
|
|
|
|
_cppServerConn.logout()
|
|
|
|
app.state = "notLoggedInu"
|
|
|
|
}
|
|
|
|
}
|
2018-06-21 16:41:02 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-21 08:47:09 +02:00
|
|
|
}
|