import QtQuick 2.9
import QtQuick.Controls 2.2
Page {
id: root
anchors.fill: parent
header: AppToolBar {
contentHeight: toolButton.implicitHeight
ToolButton {
id: toolButton
text: stackView.depth > 1 ? "\u25C0" : "\u4E09"
font.pixelSize: Qt.application.font.pixelSize * 1.6
onClicked: {
console.log(toolButton.font.styleName)
if (stackView.depth > 1) {
stackView.pop()
} else {
drawer.open()
}
Label {
text: stackView.currentItem.title
anchors.centerIn: parent
Drawer {
id: drawer
width: window.width * 0.66
height: window.height
Column {
ItemDelegate {
text: qsTr("Fanny Webseite")
width: parent.width
stackView.push("WebsitePage.qml")
drawer.close()
text: qsTr("abmelden")
confirmationDialog.open()
Dialog {
id: confirmationDialog
x: (window.width - width) / 2
y: (window.height - height) / 2
parent: ApplicationWindow.overlay
modal: true
standardButtons: Dialog.Cancel | Dialog.Ok
spacing: 20
text: "Möchtest du dich wirklich abmelden?"
onAccepted: {
_cppServerConn.logout()
root.StackView.view.push("LoginPage.qml")
StackView {
id: stackView
initialItem: "HomeForm.qml"