2019-01-19 23:03:50 +01:00
|
|
|
/*
|
|
|
|
Fannyapp - Application to view the cover plan of the Fanny-Leicht-Gymnasium ins Stuttgart Vaihingen, Germany
|
|
|
|
Copyright (C) 2019 Itsblue Development <development@itsblue.de>
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2018-12-30 20:58:52 +01:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Controls 2.4
|
|
|
|
|
|
|
|
import "../Components"
|
|
|
|
|
|
|
|
Page {
|
|
|
|
id: root
|
|
|
|
|
2019-02-16 22:38:13 +01:00
|
|
|
property bool locked: false
|
|
|
|
|
2018-12-30 20:58:52 +01:00
|
|
|
signal opened()
|
|
|
|
|
2019-01-19 22:44:48 +01:00
|
|
|
onOpened: {}
|
2018-12-30 20:58:52 +01:00
|
|
|
|
|
|
|
Column {
|
|
|
|
id: mainMenu
|
|
|
|
spacing: buttonWidth * 0.1
|
|
|
|
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
FancyButton {
|
|
|
|
id: todayButton
|
|
|
|
|
2019-01-19 22:44:48 +01:00
|
|
|
image: "qrc:/graphics/icons/sheute.png"
|
2018-12-30 20:58:52 +01:00
|
|
|
|
|
|
|
width: mainMenu.buttonWidth
|
|
|
|
height: mainMenu.buttonHeight
|
|
|
|
|
|
|
|
onClicked: {
|
2019-02-16 17:59:42 +01:00
|
|
|
formStack.eventDay = 0
|
|
|
|
formStack.push(eventForm)
|
2018-12-30 20:58:52 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
FancyButton {
|
|
|
|
id: tomorrowButton
|
|
|
|
|
2019-01-19 22:44:48 +01:00
|
|
|
image: "qrc:/graphics/icons/smorgen.png"
|
2018-12-30 20:58:52 +01:00
|
|
|
|
|
|
|
width: mainMenu.buttonWidth
|
|
|
|
height: mainMenu.buttonHeight
|
|
|
|
|
|
|
|
onClicked: {
|
2019-02-16 17:59:42 +01:00
|
|
|
formStack.eventDay = 0
|
2018-12-30 20:58:52 +01:00
|
|
|
formStack.push(eventForm)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Grid {
|
|
|
|
id: smallMenu
|
|
|
|
columns: app.landscape() ? 4:2
|
|
|
|
spacing: mainMenu.buttonWidth * 0.1
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
width: smallMenu.buttonWidth
|
|
|
|
height: smallMenu.buttonHeight
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
formStack.push(foodPlanForm)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
FancyButton {
|
|
|
|
id: settingsButton
|
|
|
|
|
|
|
|
image: "qrc:/graphics/icons/settingsBlack.png"
|
|
|
|
imageScale: 0.8
|
|
|
|
|
|
|
|
width: smallMenu.buttonWidth
|
|
|
|
height: smallMenu.buttonHeight
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
formStack.push(settingsForm)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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: {
|
|
|
|
serverConn.logout()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|