Clean up leftover files and commented code
This commit is contained in:
322
Gui/TopBar.qml
322
Gui/TopBar.qml
@@ -2,269 +2,159 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
ColumnLayout {
|
||||
id: topBar
|
||||
spacing: 0
|
||||
|
||||
height: parent.height
|
||||
anchors
|
||||
{
|
||||
top: parent.top
|
||||
spacing: 0
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
|
||||
|
||||
top: parent.top
|
||||
}
|
||||
ButtonGroup
|
||||
{
|
||||
ButtonGroup {
|
||||
id: buttonBar
|
||||
}
|
||||
|
||||
BarButton
|
||||
{
|
||||
}
|
||||
BarButton {
|
||||
id: dashBoard
|
||||
flat: true
|
||||
text: qsTr("Dashboard")
|
||||
implicitWidth: 90
|
||||
implicitHeight: 90
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
Layout.margins: 3
|
||||
Layout.topMargin: Dimensions.s
|
||||
flat: true
|
||||
icon.source: "qrc:/images/dash.svg"
|
||||
ButtonGroup.group: buttonBar
|
||||
// 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"
|
||||
implicitHeight: 90
|
||||
implicitWidth: 90
|
||||
text: qsTr("Dashboard")
|
||||
|
||||
|
||||
// dashiBackie.border.width = 2
|
||||
// kundiBackie.border.width = 1
|
||||
// mitoBackie.border.width = 1
|
||||
// invoBackie.border.width = 1
|
||||
// objBackie.border.width = 1
|
||||
onClicked: {
|
||||
appLoader.source = "Dashboard.qml";
|
||||
}
|
||||
}
|
||||
|
||||
BarButton
|
||||
{
|
||||
BarButton {
|
||||
id: kunden
|
||||
flat: true
|
||||
text: qsTr("Kunden")
|
||||
implicitWidth: 90
|
||||
implicitHeight: 90
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
Layout.margins: 3
|
||||
flat: true
|
||||
icon.source: "qrc:/images/customer.svg"
|
||||
ButtonGroup.group: buttonBar
|
||||
// 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
|
||||
implicitHeight: 90
|
||||
implicitWidth: 90
|
||||
text: qsTr("Kunden")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "CustomerTable.qml";
|
||||
}
|
||||
}
|
||||
|
||||
BarButton
|
||||
{
|
||||
BarButton {
|
||||
id: objekt
|
||||
flat: true
|
||||
text: qsTr("Objekt")
|
||||
implicitWidth: 90
|
||||
implicitHeight: 90
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
Layout.margins: 3
|
||||
flat: true
|
||||
icon.source: "qrc:/images/object.svg"
|
||||
ButtonGroup.group: buttonBar
|
||||
// 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
|
||||
implicitHeight: 90
|
||||
implicitWidth: 90
|
||||
text: qsTr("Objekt")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "ObjectTable.qml";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BarButton
|
||||
{
|
||||
BarButton {
|
||||
id: mitarbeiter
|
||||
flat: true
|
||||
text: qsTr("Mitarbeiter")
|
||||
implicitWidth: 90
|
||||
implicitHeight: 90
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
Layout.margins: 3
|
||||
flat: true
|
||||
icon.source: "qrc:/images/employee.svg"
|
||||
implicitHeight: 90
|
||||
implicitWidth: 90
|
||||
text: qsTr("Mitarbeiter")
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
// 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
|
||||
onClicked: {
|
||||
appLoader.source = "EmployeeTable.qml";
|
||||
}
|
||||
}
|
||||
|
||||
BarButton
|
||||
{
|
||||
BarButton {
|
||||
id: offers
|
||||
flat: true
|
||||
text: qsTr("Angebote")
|
||||
implicitWidth: 90
|
||||
implicitHeight: 90
|
||||
Layout.margins: 3
|
||||
icon.source: "qrc:/images/offer.svg"
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
// 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
|
||||
Layout.margins: 3
|
||||
flat: true
|
||||
icon.source: "qrc:/images/offer.svg"
|
||||
implicitHeight: 90
|
||||
implicitWidth: 90
|
||||
text: qsTr("Angebote")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "OfferTable.qml";
|
||||
}
|
||||
}
|
||||
|
||||
BarButton
|
||||
{
|
||||
BarButton {
|
||||
id: abrechnung
|
||||
flat: true
|
||||
text: qsTr("Abrechnung")
|
||||
implicitWidth: 90
|
||||
implicitHeight: 90
|
||||
Layout.margins: 3
|
||||
icon.source: "qrc:/images/invoice.svg"
|
||||
ButtonGroup.group: buttonBar
|
||||
// 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
|
||||
{
|
||||
ButtonGroup.group: buttonBar
|
||||
Layout.margins: 3
|
||||
flat: true
|
||||
icon.source: "qrc:/images/invoice.svg"
|
||||
implicitHeight: 90
|
||||
implicitWidth: 90
|
||||
text: qsTr("Abrechnung")
|
||||
}
|
||||
Item {
|
||||
id: hspacer
|
||||
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
BarButton
|
||||
{
|
||||
BarButton {
|
||||
id: atajos
|
||||
implicitWidth: 90
|
||||
implicitHeight: 90
|
||||
checkable: false
|
||||
icon.source: "qrc:/images/Bars3.svg"
|
||||
|
||||
flat: true
|
||||
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("Benutzer-Verwaltung")
|
||||
//onTriggered: appLoader.source = "UsersPage.qml"
|
||||
text: qsTr("Einstellungen")
|
||||
onTriggered:
|
||||
{
|
||||
// TODO: Check if logged-in user is admin first!!
|
||||
id: mainMenu
|
||||
|
||||
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()
|
||||
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