Use common StackView
This commit is contained in:
@@ -59,7 +59,7 @@ ColumnLayout
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: qsTr("Abbrechen")
|
text: qsTr("Abbrechen")
|
||||||
onClicked: appLoader.source = "CustomerTable.qml"
|
onClicked: contentStack.pop()
|
||||||
}
|
}
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
@@ -72,7 +72,7 @@ ColumnLayout
|
|||||||
{
|
{
|
||||||
new_business = JsLib.parseForm(customerView)
|
new_business = JsLib.parseForm(customerView)
|
||||||
business_model.addBusiness(new_business, 0)
|
business_model.addBusiness(new_business, 0)
|
||||||
appLoader.source = "CustomerTable.qml"
|
contentStack.pop()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -99,7 +99,7 @@ ColumnLayout
|
|||||||
{
|
{
|
||||||
var con_id = arguments[0]
|
var con_id = arguments[0]
|
||||||
business_model.addBusiness(new_business, con_id)
|
business_model.addBusiness(new_business, con_id)
|
||||||
appLoader.source = "CustomerTable.qml"
|
contentStack.pop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ ColumnLayout
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: qsTr("Abbrechen")
|
text: qsTr("Abbrechen")
|
||||||
onClicked: appLoader.source = "ObjectTable.qml"
|
onClicked: contentStack.pop()
|
||||||
}
|
}
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
@@ -105,7 +105,7 @@ ColumnLayout
|
|||||||
object_model.viewCriterion("Alle")
|
object_model.viewCriterion("Alle")
|
||||||
}
|
}
|
||||||
|
|
||||||
appLoader.source = "ObjectTable.qml"
|
contentStack.pop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ ColumnLayout
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: qsTr("Abbrechen")
|
text: qsTr("Abbrechen")
|
||||||
onClicked: appLoader.source = "OfferTable.qml"
|
onClicked: contentStack.pop()
|
||||||
}
|
}
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ ColumnLayout
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: qsTr("Zurück")
|
text: qsTr("Zurück")
|
||||||
//Layout.columnSpan: 2
|
onClicked: contentStack.pop()
|
||||||
onClicked: customersStack.pop()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SplitView
|
SplitView
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick.Controls
|
|
||||||
import Qt.labs.qmlmodels
|
|
||||||
|
|
||||||
|
|
||||||
Item {
|
|
||||||
anchors.fill: parent
|
|
||||||
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
|
||||||
|
|
||||||
StackView
|
|
||||||
{
|
|
||||||
id: customersStack
|
|
||||||
anchors.fill: parent
|
|
||||||
initialItem: "CustomersTable.qml"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -4,6 +4,7 @@ import QtQuick.Controls
|
|||||||
import Qt.labs.qmlmodels
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
||||||
|
|
||||||
function viewCriterion(criterion)
|
function viewCriterion(criterion)
|
||||||
{
|
{
|
||||||
@@ -15,7 +16,7 @@ ColumnLayout {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Dimensions.l
|
spacing: Dimensions.l
|
||||||
|
|
||||||
Component.onCompleted: customersStack.pop()
|
Component.onCompleted: contentStack.pop()
|
||||||
|
|
||||||
RowLayout
|
RowLayout
|
||||||
{
|
{
|
||||||
@@ -67,7 +68,7 @@ ColumnLayout {
|
|||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
icon.source: "qrc:/images/PlusCircle.svg"
|
icon.source: "qrc:/images/PlusCircle.svg"
|
||||||
text: qsTr("Kunde Hinzufügen")
|
text: qsTr("Kunde Hinzufügen")
|
||||||
onClicked: appLoader.source = "AddCustomer.qml"
|
onClicked: contentStack.push("AddCustomer.qml")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout
|
ColumnLayout
|
||||||
@@ -153,7 +154,7 @@ ColumnLayout {
|
|||||||
|
|
||||||
onDoubleClicked: {
|
onDoubleClicked: {
|
||||||
business_model.onRowClicked(row);
|
business_model.onRowClicked(row);
|
||||||
customersStack.push("CustomerDetails.qml", {
|
contentStack.push("CustomerDetails.qml", {
|
||||||
selectedClient: row
|
selectedClient: row
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ ColumnLayout
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: qsTr("Abbrechen")
|
text: qsTr("Abbrechen")
|
||||||
onClicked: appLoader.source = "Employees/EmployeesView.qml"
|
onClicked: contentStack.pop()
|
||||||
}
|
}
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
@@ -156,7 +156,7 @@ ColumnLayout
|
|||||||
console.log('addedsuccesfully')
|
console.log('addedsuccesfully')
|
||||||
else
|
else
|
||||||
console.log('failedtoadd')
|
console.log('failedtoadd')
|
||||||
appLoader.source = 'Employees/EmployeesView.qml'
|
contentStack.pop()
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkFields()
|
function checkFields()
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Item
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: qsTr("Mitarbeiter zeigen")
|
text: qsTr("Mitarbeiter zeigen")
|
||||||
onClicked: employeesStack.pop()
|
onClicked: contentStack.pop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ ColumnLayout {
|
|||||||
icon.source: "qrc:/images/PlusCircle.svg"
|
icon.source: "qrc:/images/PlusCircle.svg"
|
||||||
text: qsTr("Mitarbeiter Hinzufügen")
|
text: qsTr("Mitarbeiter Hinzufügen")
|
||||||
|
|
||||||
onClicked: appLoader.source = "Employees/AddApplicant.qml"
|
onClicked: contentStack.push("AddApplicant.qml")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HorizontalHeaderView {
|
HorizontalHeaderView {
|
||||||
@@ -114,7 +114,7 @@ ColumnLayout {
|
|||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
onDoubleClicked: {
|
onDoubleClicked: {
|
||||||
employeesStack.push("EmployeeDetails.qml", {
|
contentStack.push("EmployeeDetails.qml", {
|
||||||
selectedEmployee: row
|
selectedEmployee: row
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick.Controls
|
|
||||||
import Qt.labs.qmlmodels
|
|
||||||
|
|
||||||
Item {
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
StackView {
|
|
||||||
id: employeesStack
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
initialItem: "EmployeesTable.qml"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ Item
|
|||||||
title: qsTr("Wiederherstellen")
|
title: qsTr("Wiederherstellen")
|
||||||
buttons: MessageDialog.Yes | MessageDialog.No
|
buttons: MessageDialog.Yes | MessageDialog.No
|
||||||
onAccepted: recoveryPaswordDialog.open()
|
onAccepted: recoveryPaswordDialog.open()
|
||||||
onRejected: gotoLogin()
|
onRejected: contentStack.replace("LoginSreen.qml")
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog
|
MessageDialog
|
||||||
@@ -147,7 +147,7 @@ Item
|
|||||||
if (!adminAvailable) config.saveRecoveryKey(saveRecoveryDialog.currentFile, recpass)
|
if (!adminAvailable) config.saveRecoveryKey(saveRecoveryDialog.currentFile, recpass)
|
||||||
else config.getRecoveryKey(saveRecoveryDialog.currentFile, recpass)
|
else config.getRecoveryKey(saveRecoveryDialog.currentFile, recpass)
|
||||||
|
|
||||||
gotoLogin()
|
contentStack.replace("LoginSreen.qml")
|
||||||
}
|
}
|
||||||
|
|
||||||
onRejected:
|
onRejected:
|
||||||
|
|||||||
@@ -4,20 +4,19 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Dialogs
|
import QtQuick.Dialogs
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
property string recpass: ""
|
property string recpass: ""
|
||||||
|
|
||||||
function dbConnectionFailed(msg) {
|
function dbConnectionFailed(msg) {
|
||||||
oschkar.notificationBox.informativeText = msg;
|
notifications.notificationDialog.informativeText = msg;
|
||||||
oschkar.notificationBox.text = "Verbindung zum Datenbankserver verloren";
|
notifications.notificationDialog.text = "Verbindung zum Datenbankserver verloren";
|
||||||
oschkar.notificationBox.open();
|
notifications.notificationDialog.open();
|
||||||
}
|
}
|
||||||
function getEncryptionKey() {
|
function getEncryptionKey() {
|
||||||
recoveryPaswordDialog.open();
|
recoveryPaswordDialog.open();
|
||||||
}
|
}
|
||||||
function loggedin() {
|
function loggedin() {
|
||||||
appLoader.source = "Dashboard.qml";
|
contentStack.replace("Dashboard.qml");
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -79,8 +78,8 @@ Item {
|
|||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
Layout.topMargin: Dimensions.m
|
Layout.topMargin: Dimensions.m
|
||||||
implicitWidth: parent.width
|
|
||||||
icon.source: "qrc:/images/ArrowRightEndOnRectangle.svg"
|
icon.source: "qrc:/images/ArrowRightEndOnRectangle.svg"
|
||||||
|
implicitWidth: parent.width
|
||||||
text: qsTr("Login")
|
text: qsTr("Login")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@@ -132,8 +131,7 @@ Item {
|
|||||||
onRejected: quit()
|
onRejected: quit()
|
||||||
}
|
}
|
||||||
Notifications {
|
Notifications {
|
||||||
id: oschkar
|
id: notifications
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,10 +19,7 @@ ColumnLayout {
|
|||||||
ButtonGroup.group: buttonBar
|
ButtonGroup.group: buttonBar
|
||||||
icon.source: "qrc:/images/dash.svg"
|
icon.source: "qrc:/images/dash.svg"
|
||||||
text: qsTr("Dashboard")
|
text: qsTr("Dashboard")
|
||||||
|
target: "/Gui/Dashboard.qml"
|
||||||
onClicked: {
|
|
||||||
appLoader.source = "Dashboard.qml";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
BarButton {
|
BarButton {
|
||||||
id: kunden
|
id: kunden
|
||||||
@@ -30,10 +27,7 @@ ColumnLayout {
|
|||||||
ButtonGroup.group: buttonBar
|
ButtonGroup.group: buttonBar
|
||||||
icon.source: "qrc:/images/customer.svg"
|
icon.source: "qrc:/images/customer.svg"
|
||||||
text: qsTr("Kunden")
|
text: qsTr("Kunden")
|
||||||
|
target: "/Gui/CustomersTable.qml"
|
||||||
onClicked: {
|
|
||||||
appLoader.source = "CustomerTable.qml";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
BarButton {
|
BarButton {
|
||||||
id: objekt
|
id: objekt
|
||||||
@@ -41,10 +35,7 @@ ColumnLayout {
|
|||||||
ButtonGroup.group: buttonBar
|
ButtonGroup.group: buttonBar
|
||||||
icon.source: "qrc:/images/object.svg"
|
icon.source: "qrc:/images/object.svg"
|
||||||
text: qsTr("Objekt")
|
text: qsTr("Objekt")
|
||||||
|
target: "/Gui/ObjectsTable.qml"
|
||||||
onClicked: {
|
|
||||||
appLoader.source = "ObjectTable.qml";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
BarButton {
|
BarButton {
|
||||||
id: mitarbeiter
|
id: mitarbeiter
|
||||||
@@ -52,10 +43,7 @@ ColumnLayout {
|
|||||||
ButtonGroup.group: buttonBar
|
ButtonGroup.group: buttonBar
|
||||||
icon.source: "qrc:/images/employee.svg"
|
icon.source: "qrc:/images/employee.svg"
|
||||||
text: qsTr("Mitarbeiter")
|
text: qsTr("Mitarbeiter")
|
||||||
|
target: "/Gui/Employees/EmployeesTable.qml"
|
||||||
onClicked: {
|
|
||||||
appLoader.source = "Employees/EmployeesView.qml";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
BarButton {
|
BarButton {
|
||||||
id: offers
|
id: offers
|
||||||
@@ -63,10 +51,7 @@ ColumnLayout {
|
|||||||
ButtonGroup.group: buttonBar
|
ButtonGroup.group: buttonBar
|
||||||
icon.source: "qrc:/images/offer.svg"
|
icon.source: "qrc:/images/offer.svg"
|
||||||
text: qsTr("Angebote")
|
text: qsTr("Angebote")
|
||||||
|
target: "/Gui/OffersTable.qml"
|
||||||
onClicked: {
|
|
||||||
appLoader.source = "OfferTable.qml";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
BarButton {
|
BarButton {
|
||||||
id: abrechnung
|
id: abrechnung
|
||||||
@@ -101,7 +86,7 @@ ColumnLayout {
|
|||||||
onTriggered: {
|
onTriggered: {
|
||||||
// TODO: Check if logged-in user is admin first!!
|
// TODO: Check if logged-in user is admin first!!
|
||||||
|
|
||||||
appLoader.source = "PyqcrmConf.qml";
|
contentStack.push("PyqcrmConf.qml");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuSeparator {
|
MenuSeparator {
|
||||||
|
|||||||
@@ -1,74 +1,27 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
Rectangle
|
ColumnLayout {
|
||||||
{
|
anchors.centerIn: parent
|
||||||
anchors.fill: parent
|
spacing: Dimensions.s
|
||||||
color: "slateblue"
|
height: implicitHeight
|
||||||
|
|
||||||
Rectangle
|
H1 {
|
||||||
{
|
Layout.alignment: Qt.AlignCenter
|
||||||
id: info
|
text: qsTr("Keine Verbindung zur Datenbank!")
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
color: Colors.foreground
|
||||||
color: "slateblue"
|
|
||||||
implicitHeight: 55
|
|
||||||
implicitWidth: parent.width / 4
|
|
||||||
y: parent.height / 4
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("Keine Verbindung zur Datenbank!")
|
|
||||||
color: "moccasin"
|
|
||||||
font.bold: true
|
|
||||||
font.pixelSize: 45
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
H2 {
|
||||||
Rectangle
|
Layout.alignment: Qt.AlignCenter
|
||||||
{
|
text: qsTr("Programm kann nicht starten…")
|
||||||
id: nostart
|
color: Colors.foreground
|
||||||
anchors.top: info.bottom
|
|
||||||
color: "slateblue"
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
implicitHeight: 55
|
|
||||||
implicitWidth: parent.width / 4
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: qsTr("Programm kann nicht starten..")
|
|
||||||
color: "moccasin"
|
|
||||||
anchors.centerIn: parent
|
|
||||||
font.bold: true
|
|
||||||
font.pixelSize: 45
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Button {
|
||||||
|
Layout.topMargin: Dimensions.l
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
text: qsTr("Beenden")
|
||||||
|
|
||||||
Rectangle
|
onClicked: Qt.quit()
|
||||||
{
|
|
||||||
anchors.top: nostart.bottom
|
|
||||||
anchors.topMargin: 25
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
color: "slateblue"
|
|
||||||
implicitHeight: 55
|
|
||||||
implicitWidth: parent.width / 4
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
width: parent.width
|
|
||||||
height: 75
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: qsTr("Beenden")
|
|
||||||
color: "moccasin"
|
|
||||||
anchors.centerIn: parent
|
|
||||||
font.bold: true
|
|
||||||
font.pixelSize: 45
|
|
||||||
}
|
|
||||||
anchors.centerIn: parent
|
|
||||||
background: Rectangle
|
|
||||||
{
|
|
||||||
color: "dodgerblue"
|
|
||||||
radius: 50
|
|
||||||
}
|
|
||||||
onClicked: Qt.quit()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import QtQuick.Dialogs
|
|||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: oschkar
|
|
||||||
property alias notificationBox: notificationDialog
|
|
||||||
MessageDialog
|
MessageDialog
|
||||||
{
|
{
|
||||||
id: notificationDialog
|
id: notificationDialog
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Item
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: qsTr("Zurück zu den Objekten")
|
text: qsTr("Zurück zu den Objekten")
|
||||||
onClicked: objectsStack.pop()
|
onClicked: contentStack.pop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick.Controls
|
|
||||||
import Qt.labs.qmlmodels
|
|
||||||
|
|
||||||
Item {
|
|
||||||
property var availableFilters: [""]
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
StackView
|
|
||||||
{
|
|
||||||
id: objectsStack
|
|
||||||
anchors.fill: parent
|
|
||||||
initialItem: "ObjectsTable.qml"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5,9 +5,11 @@ import Qt.labs.qmlmodels
|
|||||||
|
|
||||||
ColumnLayout
|
ColumnLayout
|
||||||
{
|
{
|
||||||
|
property var availableFilters: [""]
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Dimensions.l
|
spacing: Dimensions.l
|
||||||
|
|
||||||
function viewCriterion(criterion)
|
function viewCriterion(criterion)
|
||||||
{
|
{
|
||||||
business_model.viewCriterion(criterion.text);
|
business_model.viewCriterion(criterion.text);
|
||||||
@@ -21,7 +23,7 @@ ColumnLayout
|
|||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
{
|
{
|
||||||
contact_model.objectContactAdded.connect(onObjectContactAdded)
|
contact_model.objectContactAdded.connect(onObjectContactAdded)
|
||||||
objectsStack.pop()
|
contentStack.pop()
|
||||||
}
|
}
|
||||||
RowLayout
|
RowLayout
|
||||||
{
|
{
|
||||||
@@ -70,7 +72,7 @@ ColumnLayout
|
|||||||
icon.source: "qrc:/images/PlusCircle.svg"
|
icon.source: "qrc:/images/PlusCircle.svg"
|
||||||
text: qsTr("Objekt Hinzufügen")
|
text: qsTr("Objekt Hinzufügen")
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
onClicked: appLoader.source = "AddObject.qml"
|
onClicked: contentStack.push("AddObject.qml")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,7 +174,7 @@ ColumnLayout
|
|||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onDoubleClicked:
|
onDoubleClicked:
|
||||||
{
|
{
|
||||||
objectsStack.push("ObjectDetails.qml", {selectedObject: row});
|
contentStack.push("ObjectDetails.qml", {selectedObject: row});
|
||||||
}
|
}
|
||||||
onEntered:
|
onEntered:
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick.Controls
|
|
||||||
import Qt.labs.qmlmodels
|
|
||||||
|
|
||||||
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
anchors.fill: parent
|
|
||||||
StackView
|
|
||||||
{
|
|
||||||
id: offersStack
|
|
||||||
anchors.fill: parent
|
|
||||||
initialItem: "OffersTable.qml"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -3,75 +3,64 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Qt.labs.qmlmodels
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
ColumnLayout
|
ColumnLayout {
|
||||||
{
|
function viewOffers(criterion) {
|
||||||
anchors.fill: parent
|
//offer_model.viewCriterion(criterion)
|
||||||
spacing: Dimensions.l
|
|
||||||
function viewOffers(criterion)
|
|
||||||
{
|
|
||||||
//offer_model.viewCriterion(criterion)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout
|
anchors.fill: parent
|
||||||
{
|
spacing: Dimensions.l
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: Dimensions.l
|
spacing: Dimensions.l
|
||||||
SearchBar
|
|
||||||
{
|
SearchBar {
|
||||||
id: searchBar
|
id: searchBar
|
||||||
|
|
||||||
}
|
}
|
||||||
QuickFilter
|
QuickFilter {
|
||||||
{
|
model: ListModel {
|
||||||
onSelectedChanged: (name) =>
|
ListElement {
|
||||||
{
|
|
||||||
business_model.viewCriterion(name)
|
|
||||||
}
|
|
||||||
|
|
||||||
model: ListModel
|
|
||||||
{
|
|
||||||
ListElement
|
|
||||||
{
|
|
||||||
|
|
||||||
name: "Alle"
|
name: "Alle"
|
||||||
text: qsTr("Alle")
|
|
||||||
selected: true
|
selected: true
|
||||||
|
text: qsTr("Alle")
|
||||||
}
|
}
|
||||||
ListElement
|
ListElement {
|
||||||
{
|
|
||||||
name: "Offen"
|
name: "Offen"
|
||||||
|
selected: false
|
||||||
text: qsTr("Offen")
|
text: qsTr("Offen")
|
||||||
selected: false
|
|
||||||
}
|
}
|
||||||
ListElement
|
ListElement {
|
||||||
{
|
|
||||||
name: "Abgeschlossen"
|
name: "Abgeschlossen"
|
||||||
|
selected: false
|
||||||
text: qsTr("Abgeschlossen")
|
text: qsTr("Abgeschlossen")
|
||||||
selected: false
|
|
||||||
}
|
}
|
||||||
|
ListElement {
|
||||||
ListElement
|
|
||||||
{
|
|
||||||
name: "Erledigt"
|
name: "Erledigt"
|
||||||
text: qsTr("Erledigt")
|
|
||||||
selected: false
|
selected: false
|
||||||
|
text: qsTr("Erledigt")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onSelectedChanged: name => {
|
||||||
|
business_model.viewCriterion(name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Button
|
Button {
|
||||||
{
|
|
||||||
id: addOfferBtn
|
id: addOfferBtn
|
||||||
text: qsTr("Angebote Hinzufügen")
|
|
||||||
icon.source: "qrc:/images/PlusCircle.svg"
|
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
flat: true
|
flat: true
|
||||||
onClicked: appLoader.source = "AddOffer.qml"
|
icon.source: "qrc:/images/PlusCircle.svg"
|
||||||
|
text: qsTr("Angebote Hinzufügen")
|
||||||
|
|
||||||
|
onClicked: contentStack.push("AddOffer.qml")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
id: spacer
|
id: spacer
|
||||||
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ Item
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: qsTr("Ablehnen")
|
text: qsTr("Ablehnen")
|
||||||
onClicked: appLoader.source = "Dashboard.qml"
|
onClicked: contentStack.pop()
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
Button
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ Item
|
|||||||
title: qsTr("Wiederherstellen")
|
title: qsTr("Wiederherstellen")
|
||||||
buttons: MessageDialog.Yes | MessageDialog.No
|
buttons: MessageDialog.Yes | MessageDialog.No
|
||||||
onAccepted: recoveryPasswordDialog.open()
|
onAccepted: recoveryPasswordDialog.open()
|
||||||
onRejected: gotoLogin()
|
onRejected: contentStack.replace("LoginSreen.qml")
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog
|
MessageDialog
|
||||||
|
|||||||
21
Gui/main.qml
21
Gui/main.qml
@@ -10,10 +10,6 @@ ApplicationWindow {
|
|||||||
property string confile: ""
|
property string confile: ""
|
||||||
property alias settingsFileDialog: settingsFiledialog
|
property alias settingsFileDialog: settingsFiledialog
|
||||||
|
|
||||||
function goToLogin() {
|
|
||||||
appLoader.source = "LoginScreen.qml";
|
|
||||||
navigation.visible = true;
|
|
||||||
}
|
|
||||||
function showWindow(why) {
|
function showWindow(why) {
|
||||||
if (why === 3) {
|
if (why === 3) {
|
||||||
systray.setVisible(false);
|
systray.setVisible(false);
|
||||||
@@ -30,16 +26,15 @@ ApplicationWindow {
|
|||||||
width: Screen.width * .75
|
width: Screen.width * .75
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
config.configurationReady.connect(goToLogin);
|
|
||||||
systray.activated.connect(showWindow);
|
systray.activated.connect(showWindow);
|
||||||
|
|
||||||
if (bad_config) {
|
if (bad_config) {
|
||||||
importDialog.open();
|
importDialog.open();
|
||||||
} else {
|
} else {
|
||||||
if (db_con)
|
if (db_con)
|
||||||
appLoader.source = "LoginScreen.qml";
|
contentStack.replace("LoginScreen.qml")
|
||||||
else
|
else
|
||||||
appLoader.source = "NoDbConnection.qml";
|
contentStack.replace("NoDbConnection.qml");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClosing: close => {
|
onClosing: close => {
|
||||||
@@ -63,7 +58,7 @@ ApplicationWindow {
|
|||||||
Navigation {
|
Navigation {
|
||||||
id: navigation
|
id: navigation
|
||||||
|
|
||||||
visible: bad_config || !db_con ? false : true
|
visible: !(bad_config || !db_con)
|
||||||
}
|
}
|
||||||
PrinterDialog {
|
PrinterDialog {
|
||||||
id: printerDialog
|
id: printerDialog
|
||||||
@@ -82,17 +77,15 @@ ApplicationWindow {
|
|||||||
id: contentBackground
|
id: contentBackground
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
left: navigation.right
|
left: navigation.visible ? navigation.right : parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
top: parent.top
|
top: parent.top
|
||||||
}
|
}
|
||||||
color: Colors.background
|
color: Colors.background
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
StackView {
|
||||||
id: appLoader
|
id: contentStack
|
||||||
|
|
||||||
property alias window: appWindow
|
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
fill: contentBackground
|
fill: contentBackground
|
||||||
@@ -109,7 +102,7 @@ ApplicationWindow {
|
|||||||
title: qsTr("Einstellungen importieren")
|
title: qsTr("Einstellungen importieren")
|
||||||
|
|
||||||
onAccepted: settingsFiledialog.open()
|
onAccepted: settingsFiledialog.open()
|
||||||
onRejected: appLoader.source = "Firststart.qml"
|
onRejected: contentStack.replace("Firststart.qml")
|
||||||
}
|
}
|
||||||
FileDialog {
|
FileDialog {
|
||||||
id: settingsFiledialog
|
id: settingsFiledialog
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import QtQuick.Templates as T
|
|||||||
T.ToolButton {
|
T.ToolButton {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
|
property string target
|
||||||
|
|
||||||
checkable: true
|
checkable: true
|
||||||
icon.color: Colors.foreground
|
icon.color: Colors.foreground
|
||||||
icon.height: 36
|
icon.height: 36
|
||||||
@@ -18,16 +20,16 @@ T.ToolButton {
|
|||||||
readonly property color color: control.checked ? Colors.primaryShade : control.hovered ? Colors.primary : Colors.foreground
|
readonly property color color: control.checked ? Colors.primaryShade : control.hovered ? Colors.primary : Colors.foreground
|
||||||
|
|
||||||
IconLabel {
|
IconLabel {
|
||||||
icon.color: parent.color
|
|
||||||
icon.source: control.icon.source
|
|
||||||
icon.height: control.icon.height
|
|
||||||
icon.width: control.icon.width
|
|
||||||
color: parent.color
|
color: parent.color
|
||||||
|
icon.color: parent.color
|
||||||
|
icon.height: control.icon.height
|
||||||
|
icon.source: control.icon.source
|
||||||
|
icon.width: control.icon.width
|
||||||
x: parent.width * .5 - width * .5
|
x: parent.width * .5 - width * .5
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
font: Typography.small
|
|
||||||
color: parent.color
|
color: parent.color
|
||||||
|
font: Typography.small
|
||||||
text: control.text
|
text: control.text
|
||||||
x: parent.width * .5 - width * .5
|
x: parent.width * .5 - width * .5
|
||||||
}
|
}
|
||||||
@@ -49,4 +51,12 @@ T.ToolButton {
|
|||||||
|
|
||||||
onPressed: mouse => mouse.accepted = false
|
onPressed: mouse => mouse.accepted = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
if(!target) {
|
||||||
|
console.warn(`BarButton with text ${this.text} has no target.`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
contentStack.replace(target)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
5
TeroStyle/H1.qml
Normal file
5
TeroStyle/H1.qml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import QtQuick
|
||||||
|
|
||||||
|
Text {
|
||||||
|
font: Typography.h1
|
||||||
|
}
|
||||||
5
TeroStyle/H2.qml
Normal file
5
TeroStyle/H2.qml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import QtQuick
|
||||||
|
|
||||||
|
Text {
|
||||||
|
font: Typography.h2
|
||||||
|
}
|
||||||
@@ -2,14 +2,13 @@ module TeroStyle
|
|||||||
singleton Colors Colors.qml
|
singleton Colors Colors.qml
|
||||||
singleton Dimensions Dimensions.qml
|
singleton Dimensions Dimensions.qml
|
||||||
singleton Typography Typography.qml
|
singleton Typography Typography.qml
|
||||||
|
BarButton BarButton.qml
|
||||||
Button Button.qml
|
Button Button.qml
|
||||||
ComboBox ComboBox.qml
|
ComboBox ComboBox.qml
|
||||||
Field Field.qml
|
Field Field.qml
|
||||||
TextField TextField.qml
|
H1 H1.qml
|
||||||
BarButton BarButton.qml
|
H2 H2.qml
|
||||||
Label Label.qml
|
Label Label.qml
|
||||||
QuickFilter QuickFilter.qml
|
QuickFilter QuickFilter.qml
|
||||||
SearchBar SearchBar.qml
|
SearchBar SearchBar.qml
|
||||||
|
TextField TextField.qml
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
# pyqcrm
|
|
||||||
|
|
||||||
CRM - Tero
|
|
||||||
Python + QML
|
|
||||||
@@ -1 +1 @@
|
|||||||
Lj30yFOP7hJmY5Cub1Go8fJz0UE+Zyo9cEqNxfY23Sc=
|
Lj30yFOP7hJmY5Cub1Go8fJz0UE+Zyo9cEqNxfY23Sc=
|
||||||
@@ -12,7 +12,6 @@ class EmployeeModel(QAbstractTableModel):
|
|||||||
__visible_index = None
|
__visible_index = None
|
||||||
__visible_columns = None
|
__visible_columns = None
|
||||||
__col_name = ""
|
__col_name = ""
|
||||||
__employee_dao = None
|
|
||||||
__col_skip = 2
|
__col_skip = 2
|
||||||
__everyone = True
|
__everyone = True
|
||||||
|
|
||||||
|
|||||||
14
qml.qrc
14
qml.qrc
@@ -7,24 +7,22 @@
|
|||||||
<file>Gui/LoginScreen.qml</file>
|
<file>Gui/LoginScreen.qml</file>
|
||||||
<file>Gui/AddContact.qml</file>
|
<file>Gui/AddContact.qml</file>
|
||||||
<file>Gui/AddCustomer.qml</file>
|
<file>Gui/AddCustomer.qml</file>
|
||||||
<file>Gui/CustomerTable.qml</file>
|
|
||||||
<file>Gui/Dashboard.qml</file>
|
<file>Gui/Dashboard.qml</file>
|
||||||
<file>Gui/main.qml</file>
|
<file>Gui/main.qml</file>
|
||||||
<file>js/qmldict.js</file>
|
<file>js/qmldict.js</file>
|
||||||
<file>Gui/CustomerView.qml</file>
|
<file>Gui/CustomerView.qml</file>
|
||||||
<file>Gui/NoDbConnection.qml</file>
|
<file>Gui/NoDbConnection.qml</file>
|
||||||
<file>Gui/Notifications.qml</file>
|
<file>Gui/Notifications.qml</file>
|
||||||
<file>Gui/ObjectTable.qml</file>
|
|
||||||
<file>Gui/AddObject.qml</file>
|
<file>Gui/AddObject.qml</file>
|
||||||
<file>Gui/ObjectView.qml</file>
|
<file>Gui/ObjectView.qml</file>
|
||||||
<file>Gui/ObjectAddOns.qml</file>
|
<file>Gui/ObjectAddOns.qml</file>
|
||||||
<file>Gui/ObjectAddOnContactPerson.qml</file>
|
<file>Gui/ObjectAddOnContactPerson.qml</file>
|
||||||
<file>Gui/ObjectAddOnEmployee.qml</file>
|
<file>Gui/ObjectAddOnEmployee.qml</file>
|
||||||
<file>Gui/AddObjectEmployee.qml</file>
|
<file>Gui/AddObjectEmployee.qml</file>
|
||||||
<file>Gui/ApplicantPersonalData.qml</file>
|
<file>Gui/Employees/ApplicantPersonalData.qml</file>
|
||||||
<file>Gui/ApplicantBankData.qml</file>
|
<file>Gui/Employees/ApplicantBankData.qml</file>
|
||||||
<file>Gui/ApplicantNationalInsurance.qml</file>
|
<file>Gui/Employees/ApplicantNationalInsurance.qml</file>
|
||||||
<file>Gui/ApplicantVarious.qml</file>
|
<file>Gui/Employees/ApplicantVarious.qml</file>
|
||||||
<file>Gui/CustomersTable.qml</file>
|
<file>Gui/CustomersTable.qml</file>
|
||||||
<file>Gui/CustomerDetails.qml</file>
|
<file>Gui/CustomerDetails.qml</file>
|
||||||
<file>Gui/ObjectsTable.qml</file>
|
<file>Gui/ObjectsTable.qml</file>
|
||||||
@@ -43,11 +41,9 @@
|
|||||||
<file>Gui/MiscConf.qml</file>
|
<file>Gui/MiscConf.qml</file>
|
||||||
<file>Gui/UtilityDialogs.qml</file>
|
<file>Gui/UtilityDialogs.qml</file>
|
||||||
<file>Gui/OffersTable.qml</file>
|
<file>Gui/OffersTable.qml</file>
|
||||||
<file>Gui/OfferTable.qml</file>
|
|
||||||
<file>Gui/Employees/AddApplicant.qml</file>
|
<file>Gui/Employees/AddApplicant.qml</file>
|
||||||
<file>Gui/Employees/EmployeeDetails.qml</file>
|
<file>Gui/Employees/EmployeeDetails.qml</file>
|
||||||
<file>Gui/Employees/EmployeesTable.qml</file>
|
<file>Gui/Employees/EmployeesTable.qml</file>
|
||||||
<file>Gui/Employees/EmployeesView.qml</file>
|
|
||||||
<file>Gui/Employees/qmldir</file>
|
<file>Gui/Employees/qmldir</file>
|
||||||
<file>TeroStyle/BarButton.qml</file>
|
<file>TeroStyle/BarButton.qml</file>
|
||||||
<file>TeroStyle/Button.qml</file>
|
<file>TeroStyle/Button.qml</file>
|
||||||
@@ -55,6 +51,8 @@
|
|||||||
<file>TeroStyle/ComboBox.qml</file>
|
<file>TeroStyle/ComboBox.qml</file>
|
||||||
<file>TeroStyle/Dimensions.qml</file>
|
<file>TeroStyle/Dimensions.qml</file>
|
||||||
<file>TeroStyle/Field.qml</file>
|
<file>TeroStyle/Field.qml</file>
|
||||||
|
<file>TeroStyle/H1.qml</file>
|
||||||
|
<file>TeroStyle/H2.qml</file>
|
||||||
<file>TeroStyle/Label.qml</file>
|
<file>TeroStyle/Label.qml</file>
|
||||||
<file>TeroStyle/qmldir</file>
|
<file>TeroStyle/qmldir</file>
|
||||||
<file>TeroStyle/QuickFilter.qml</file>
|
<file>TeroStyle/QuickFilter.qml</file>
|
||||||
|
|||||||
Reference in New Issue
Block a user