266 lines
7.2 KiB
QML
266 lines
7.2 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
|
|
ColumnLayout
|
|
{
|
|
id: topBar
|
|
spacing: 0
|
|
height: parent.height
|
|
anchors
|
|
{
|
|
top: parent.top
|
|
left: parent.left
|
|
|
|
|
|
}
|
|
|
|
BarButton
|
|
{
|
|
id: dashBoard
|
|
flat: true
|
|
text: qsTr("Dashboard")
|
|
implicitWidth: 90
|
|
implicitHeight: 90
|
|
Layout.margins: 3
|
|
Layout.topMargin: Dimensions.s
|
|
icon.source: "qrc:/images/dash.svg"
|
|
|
|
// background: Rectangle
|
|
// {
|
|
// id: dashiBackie
|
|
// border.width: dashBoard.activeFocus ? 2 : 1
|
|
// border.color: "#888"
|
|
// radius: 4
|
|
// gradient: Gradient
|
|
// {
|
|
// GradientStop { position: 0 ; color: dashBoard.pressed ? "#000" : "#001" }
|
|
// GradientStop { position: 1 ; color: dashBoard.pressed ? "#100" : "#000" }
|
|
// }
|
|
// }
|
|
onClicked:
|
|
{
|
|
appLoader.source = "Dashboard.qml"
|
|
|
|
// dashiBackie.border.width = 2
|
|
// kundiBackie.border.width = 1
|
|
// mitoBackie.border.width = 1
|
|
// invoBackie.border.width = 1
|
|
// objBackie.border.width = 1
|
|
}
|
|
}
|
|
|
|
BarButton
|
|
{
|
|
id: kunden
|
|
flat: true
|
|
text: qsTr("Kunden")
|
|
implicitWidth: 90
|
|
implicitHeight: 90
|
|
Layout.margins: 3
|
|
icon.source: "qrc:/images/customer.svg"
|
|
|
|
// background: Rectangle
|
|
// {
|
|
// id: kundiBackie
|
|
// border.width: kunden.activeFocus ? 2 : 1
|
|
// border.color: "#888"
|
|
// radius: 4
|
|
// gradient: Gradient
|
|
// {
|
|
// GradientStop { position: 0 ; color: kunden.pressed ? "#000" : "#001" }
|
|
// GradientStop { position: 1 ; color: kunden.pressed ? "#100" : "#000" }
|
|
// }
|
|
// }
|
|
onClicked:
|
|
{
|
|
// TODO: here we should call the model
|
|
appLoader.source = "CustomerTable.qml"
|
|
// kundiBackie.border.width = 2
|
|
// dashiBackie.border.width = 1
|
|
// mitoBackie.border.width = 1
|
|
// invoBackie.border.width = 1
|
|
// objBackie.border.width = 1
|
|
}
|
|
}
|
|
|
|
BarButton
|
|
{
|
|
id: objekt
|
|
flat: true
|
|
text: qsTr("Objekt")
|
|
implicitWidth: 90
|
|
implicitHeight: 90
|
|
Layout.margins: 3
|
|
icon.source: "qrc:/images/object.svg"
|
|
|
|
// background: Rectangle
|
|
// {
|
|
// id: objBackie
|
|
// border.width: objekt.activeFocus ? 2 : 1
|
|
// border.color: "#888"
|
|
// radius: 4
|
|
// gradient: Gradient
|
|
// {
|
|
// GradientStop { position: 0 ; color: objekt.pressed ? "#000" : "#001" }
|
|
// GradientStop { position: 1 ; color: objekt.pressed ? "#100" : "#000" }
|
|
// }
|
|
// }
|
|
onClicked:
|
|
{
|
|
appLoader.source = "ObjectTable.qml"
|
|
// objBackie.border.width = 2
|
|
// dashiBackie.border.width = 1
|
|
// kundiBackie.border.width = 1
|
|
// mitoBackie.border.width = 1
|
|
// invoBackie.border.width = 1
|
|
}
|
|
|
|
}
|
|
|
|
BarButton
|
|
{
|
|
id: mitarbeiter
|
|
flat: true
|
|
text: qsTr("Mitarbeiter")
|
|
implicitWidth: 90
|
|
implicitHeight: 90
|
|
Layout.margins: 3
|
|
icon.source: "qrc:/images/employee.svg"
|
|
|
|
|
|
// background: Rectangle
|
|
// {
|
|
// id: mitoBackie
|
|
// border.width: mitarbeiter.activeFocus ? 2 : 1
|
|
// border.color: "#888"
|
|
// radius: 4
|
|
// gradient: Gradient
|
|
// {
|
|
// GradientStop { position: 0 ; color: mitarbeiter.pressed ? "#000" : "#001" }
|
|
// GradientStop { position: 1 ; color: mitarbeiter.pressed ? "#100" : "#000" }
|
|
// }
|
|
// }
|
|
onClicked:
|
|
{
|
|
appLoader.source = "EmployeeTable.qml"
|
|
// mitoBackie.border.width = 2
|
|
// dashiBackie.border.width = 1
|
|
// kundiBackie.border.width = 1
|
|
// invoBackie.border.width = 1
|
|
// objBackie.border.width = 1
|
|
}
|
|
}
|
|
|
|
BarButton
|
|
{
|
|
id: offers
|
|
flat: true
|
|
text: qsTr("Angebote")
|
|
implicitWidth: 90
|
|
implicitHeight: 90
|
|
Layout.margins: 3
|
|
icon.source: "qrc:/images/offer.svg"
|
|
|
|
// background: Rectangle
|
|
// {
|
|
// id: offersBackie
|
|
// border.width: offers.activeFocus ? 2 : 1
|
|
// border.color: "#888"
|
|
// radius: 4
|
|
// gradient: Gradient
|
|
// {
|
|
// GradientStop { position: 0 ; color: offers.pressed ? "#000" : "#001" }
|
|
// GradientStop { position: 1 ; color: offers.pressed ? "#100" : "#000" }
|
|
// }
|
|
// }
|
|
onClicked:
|
|
{
|
|
appLoader.source = "OfferTable.qml"
|
|
// mitoBackie.border.width = 2
|
|
// dashiBackie.border.width = 1
|
|
// kundiBackie.border.width = 1
|
|
// invoBackie.border.width = 1
|
|
// objBackie.border.width = 1
|
|
// offersBackie.border.width = 1
|
|
}
|
|
}
|
|
|
|
BarButton
|
|
{
|
|
id: abrechnung
|
|
flat: true
|
|
text: qsTr("Abrechnung")
|
|
implicitWidth: 90
|
|
implicitHeight: 90
|
|
Layout.margins: 3
|
|
icon.source: "qrc:/images/invoice.svg"
|
|
|
|
// background: Rectangle
|
|
// {
|
|
// id: invoBackie
|
|
// border.width: abrechnung.activeFocus ? 2 : 1
|
|
// border.color: "#888"
|
|
// radius: 4
|
|
// gradient: Gradient
|
|
// {
|
|
// GradientStop { position: 0 ; color: abrechnung.pressed ? "#000" : "#001" }
|
|
// GradientStop { position: 1 ; color: abrechnung.pressed ? "#100" : "#000" }
|
|
// }
|
|
// }
|
|
}
|
|
|
|
Item
|
|
{
|
|
id: hspacer
|
|
Layout.fillHeight: true
|
|
}
|
|
|
|
BarButton
|
|
{
|
|
id: atajos
|
|
icon.source: "qrc:/images/menu.svg"
|
|
|
|
implicitWidth: 90
|
|
implicitHeight: 90
|
|
|
|
|
|
flat: true
|
|
Layout.bottomMargin: Dimensions.s
|
|
onClicked: mainMenu.open()
|
|
|
|
Menu {
|
|
id: mainMenu
|
|
MenuItem
|
|
{
|
|
//text: qsTr("Benutzer-Verwaltung")
|
|
//onTriggered: appLoader.source = "UsersPage.qml"
|
|
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()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|