Fix up Menu
This commit is contained in:
132
Gui/Navigation.qml
Normal file
132
Gui/Navigation.qml
Normal file
@@ -0,0 +1,132 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
ColumnLayout {
|
||||
height: parent.height
|
||||
spacing: 0
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
}
|
||||
ButtonGroup {
|
||||
id: buttonBar
|
||||
}
|
||||
BarButton {
|
||||
id: dashBoard
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/dash.svg"
|
||||
text: qsTr("Dashboard")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "Dashboard.qml";
|
||||
}
|
||||
}
|
||||
BarButton {
|
||||
id: kunden
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/customer.svg"
|
||||
text: qsTr("Kunden")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "CustomerTable.qml";
|
||||
}
|
||||
}
|
||||
BarButton {
|
||||
id: objekt
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/object.svg"
|
||||
text: qsTr("Objekt")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "ObjectTable.qml";
|
||||
}
|
||||
}
|
||||
BarButton {
|
||||
id: mitarbeiter
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/employee.svg"
|
||||
text: qsTr("Mitarbeiter")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "EmployeeTable.qml";
|
||||
}
|
||||
}
|
||||
BarButton {
|
||||
id: offers
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/offer.svg"
|
||||
text: qsTr("Angebote")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "OfferTable.qml";
|
||||
}
|
||||
}
|
||||
BarButton {
|
||||
id: abrechnung
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/invoice.svg"
|
||||
text: qsTr("Abrechnung")
|
||||
}
|
||||
Item {
|
||||
id: hspacer
|
||||
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
BarButton {
|
||||
id: atajos
|
||||
|
||||
Layout.bottomMargin: Dimensions.s
|
||||
checkable: false
|
||||
flat: true
|
||||
icon.source: "qrc:/images/Bars3.svg"
|
||||
implicitHeight: 90
|
||||
implicitWidth: 90
|
||||
|
||||
onClicked: mainMenu.open()
|
||||
|
||||
Menu {
|
||||
id: mainMenu
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("Einstellungen")
|
||||
|
||||
onTriggered: {
|
||||
// TODO: Check if logged-in user is admin first!!
|
||||
|
||||
appLoader.source = "PyqcrmConf.qml";
|
||||
}
|
||||
}
|
||||
MenuSeparator {
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Als PDF exportieren")
|
||||
}
|
||||
MenuSeparator {
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Drucken")
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Erweiterter Druck")
|
||||
|
||||
onTriggered: printerDialog.show()
|
||||
}
|
||||
MenuSeparator {
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Über PYQCRM")
|
||||
|
||||
onTriggered: readMeWin.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user