From fc197246a68a7fbc8150c79ac237fb50ebcfa97a5d71c11235ed983702055c39 Mon Sep 17 00:00:00 2001 From: linuxero Date: Mon, 20 Jan 2025 08:31:25 +0100 Subject: [PATCH] Some GUI modification and DB documentation template --- Gui/CustomerDetails.qml | 27 +++++ Gui/CustomerTable.qml | 203 +----------------------------------- Gui/CustomersTable.qml | 219 +++++++++++++++++++++++++++++++++++++++ Gui/Dashboard.qml | 119 ++++++++++++++++++++- Gui/EmployeeDetails.qml | 27 +++++ Gui/EmployeeTable.qml | 130 ++--------------------- Gui/EmployeesTable.qml | 132 +++++++++++++++++++++++ Gui/ObjectDetails.qml | 27 +++++ Gui/ObjectTable.qml | 152 +-------------------------- Gui/ObjectsTable.qml | 160 ++++++++++++++++++++++++++++ Gui/main.qml | 2 +- doc/PYQCRM_DATENBANK.odt | Bin 0 -> 12559 bytes qml.qrc | 6 ++ 13 files changed, 731 insertions(+), 473 deletions(-) create mode 100644 Gui/CustomerDetails.qml create mode 100644 Gui/CustomersTable.qml create mode 100644 Gui/EmployeeDetails.qml create mode 100644 Gui/EmployeesTable.qml create mode 100644 Gui/ObjectDetails.qml create mode 100644 Gui/ObjectsTable.qml create mode 100644 doc/PYQCRM_DATENBANK.odt diff --git a/Gui/CustomerDetails.qml b/Gui/CustomerDetails.qml new file mode 100644 index 0000000..9860d47 --- /dev/null +++ b/Gui/CustomerDetails.qml @@ -0,0 +1,27 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts + +Item +{ + property int selectedClient: -1 + id: clDet + ColumnLayout + { + Label + { + text: qsTr("Ausgewählter Kunde " + selectedClient) + } + + Button + { + text: qsTr("Kunden zeigen") + onClicked: customersStack.pop() + } + } + + Component.onCompleted: + { + business_model.onRowClicked(selectedClient) + } +} diff --git a/Gui/CustomerTable.qml b/Gui/CustomerTable.qml index 292d5ce..c00a91c 100644 --- a/Gui/CustomerTable.qml +++ b/Gui/CustomerTable.qml @@ -9,206 +9,11 @@ Item { property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"] id: test - SearchBar + StackView { - id:searchBar - anchors.margins: 9 - } - - Button - { - id: addBusinessBtn - icon.source: "qrc:/images/addbusiness.svg" - icon.color: "olive" - anchors.right: parent.right - flat: true - onClicked: appLoader.source = "AddCustomer.qml" - } - - - ColumnLayout - { - id: tableColumn - anchors - { - top: searchBar.bottom - bottom: parent.bottom - left: parent.left - right: parent.right - } - - RowLayout - { - RadioButton - { - id: showAll - checked: true - text: qsTr("Alle") - onClicked: viewCriterion(showAll) - } - RadioButton - { - id: showInterested - text: qsTr("Interessent") - onClicked: viewCriterion(showInterested) - } - RadioButton - { - id: showClientele - text: qsTr("Kunden") - onClicked: viewCriterion(showClientele) - } - RadioButton - { - id: showProvider - text: qsTr("Lieferant") - onClicked: viewCriterion(showProvider) - } - RadioButton - { - id: showFinished - text: qsTr("Erledigt") - onClicked: viewCriterion(showFinished) - } - - } - - HorizontalHeaderView - { - id: horizontalHeader - Layout.fillWidth: true - implicitHeight: 40 - movableColumns: true //@disable-check M16 - syncView: customerTable - - delegate: Rectangle { - color: addBusinessBtn.palette.alternateBase - border.color: addBusinessBtn.palette.base - implicitHeight: 40 - Layout.fillWidth: true - implicitWidth: 1 - Text - { - text: model.display - elide: Text.ElideRight - width: parent.width - height: parent.height - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - color: addBusinessBtn.palette.text - } - } - } - - TableView - { - //property var customWidths: [0.2, 0.5, 0.3, 05, 0.2, 0.2] - property real newWidth: 0 - id: customerTable - Layout.fillHeight: true - Layout.fillWidth: true - ScrollBar.vertical: ScrollBar - { - policy: customerTable.contentHeight > customerTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff - } - columnSpacing: 1 - rowSpacing: 2 - model: business_model - alternatingRows: true - resizableColumns: true // @disable-check M16 - selectionBehavior: TableView.SelectRows - selectionModel: ItemSelectionModel - { - id: selModel - model: customerTable.model - } - - // columnWidthProvider: function(column) - // { - // switch (column) - // { - // case 0: return width * 0.2; - // case 1: return width * 0.5; - // case 2: return width * 0.3; - // default: return width / model.columnCount(); - // } - //return customWidths[column] * width; - //return tableColumn.content.implicitWidth // model.columnCount() - // newWidth = columnWidth(column) - // return newWidth - // } - - Timer - { - id: redrawTable - running: true - interval: 1 - repeat: false - onTriggered: - { - customerTable.forceLayout(); - } - } - - - - delegate:Rectangle - { - required property bool selected - required property bool current - implicitWidth: customerTable.width / customerTable.columns - implicitHeight: 25 - color: selected - ? addBusinessBtn.palette.highlight //palette.highlight - : (customerTable.alternatingRows && row % 2 !== 0 - ? addBusinessBtn.palette.base // palette.base - : addBusinessBtn.palette.alternateBase) //palette.alternateBase) - - Text - { - text: model.display == null? "": model.display - elide: Text.ElideRight - width: parent.width - height: parent.height - verticalAlignment: Text.AlignVCenter - leftPadding: 9 //@d isable-check M16 - color: addBusinessBtn.palette.text - } - - MouseArea - { - property bool hovered: false - id: mouseArea - anchors.fill: parent - hoverEnabled: true - onClicked: - { - business_model.onRowClicked(row) - } - onEntered: - { - customerTable.selectionModel.select(customerTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows) - } - } - } - - onContentWidthChanged: - { - //console.log("Model changed!!") - redrawTable.start() - } - } - - Item - { - //Layout.fillHeight: true - Layout.fillWidth: true - } - } - - function viewCriterion(criterion) - { - business_model.viewCriterion(criterion.text) + id: customersStack + anchors.fill: parent + initialItem: "CustomersTable.qml" } } diff --git a/Gui/CustomersTable.qml b/Gui/CustomersTable.qml new file mode 100644 index 0000000..7f16047 --- /dev/null +++ b/Gui/CustomersTable.qml @@ -0,0 +1,219 @@ +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import Qt.labs.qmlmodels +import QtQuick.Controls.Fusion + +Item +{ + SearchBar + { + id:searchBar + anchors.margins: 9 + } + + Button + { + id: addBusinessBtn + icon.source: "qrc:/images/addbusiness.svg" + icon.color: "olive" + anchors.right: parent.right + flat: true + onClicked: appLoader.source = "AddCustomer.qml" + } + + + ColumnLayout + { + id: tableColumn + anchors + { + top: searchBar.bottom + bottom: parent.bottom + left: parent.left + right: parent.right + } + + RowLayout + { + RadioButton + { + id: showAll + checked: true + text: qsTr("Alle") + onClicked: viewCriterion(showAll) + } + RadioButton + { + id: showInterested + text: qsTr("Interessent") + onClicked: viewCriterion(showInterested) + } + RadioButton + { + id: showClientele + text: qsTr("Kunden") + onClicked: viewCriterion(showClientele) + } + RadioButton + { + id: showProvider + text: qsTr("Lieferant") + onClicked: viewCriterion(showProvider) + } + RadioButton + { + id: showFinished + text: qsTr("Erledigt") + onClicked: viewCriterion(showFinished) + } + + } + + HorizontalHeaderView + { + id: horizontalHeader + Layout.fillWidth: true + implicitHeight: 40 + movableColumns: true //@disable-check M16 + syncView: customerTable + + delegate: Rectangle { + color: addBusinessBtn.palette.alternateBase + border.color: addBusinessBtn.palette.base + implicitHeight: 40 + Layout.fillWidth: true + implicitWidth: 1 + Text + { + text: model.display + elide: Text.ElideRight + width: parent.width + height: parent.height + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + color: addBusinessBtn.palette.text + } + } + } + + TableView + { + //property var customWidths: [0.2, 0.5, 0.3, 05, 0.2, 0.2] + property real newWidth: 0 + id: customerTable + Layout.fillHeight: true + Layout.fillWidth: true + ScrollBar.vertical: ScrollBar + { + policy: customerTable.contentHeight > customerTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff + } + columnSpacing: 1 + rowSpacing: 2 + model: business_model + alternatingRows: true + resizableColumns: true // @disable-check M16 + selectionBehavior: TableView.SelectRows + selectionModel: ItemSelectionModel + { + id: selModel + model: customerTable.model + } + + // columnWidthProvider: function(column) + // { + // switch (column) + // { + // case 0: return width * 0.2; + // case 1: return width * 0.5; + // case 2: return width * 0.3; + // default: return width / model.columnCount(); + // } + //return customWidths[column] * width; + //return tableColumn.content.implicitWidth // model.columnCount() + // newWidth = columnWidth(column) + // return newWidth + // } + + Timer + { + id: redrawTable + running: true + interval: 1 + repeat: false + onTriggered: + { + customerTable.forceLayout(); + } + } + + + + delegate:Rectangle + { + required property bool selected + required property bool current + implicitWidth: customerTable.width / customerTable.columns + implicitHeight: 25 + color: selected + ? addBusinessBtn.palette.highlight //palette.highlight + : (customerTable.alternatingRows && row % 2 !== 0 + ? addBusinessBtn.palette.base // palette.base + : addBusinessBtn.palette.alternateBase) //palette.alternateBase) + + Text + { + text: model.display == null? "": model.display + elide: Text.ElideRight + width: parent.width + height: parent.height + verticalAlignment: Text.AlignVCenter + leftPadding: 9 //@d isable-check M16 + color: addBusinessBtn.palette.text + } + + MouseArea + { + property bool hovered: false + id: mouseArea + anchors.fill: parent + hoverEnabled: true + + // onClicked: + // { + // business_model.onRowClicked(row) + // } + + onDoubleClicked: + { + customersStack.push("CustomerDetails.qml", {selectedClient: row}); + } + + onEntered: + { + customerTable.selectionModel.select(customerTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows) + } + } + } + + onContentWidthChanged: + { + //console.log("Model changed!!") + redrawTable.start() + } + } + + Item + { + //Layout.fillHeight: true + Layout.fillWidth: true + } + } + + function viewCriterion(criterion) + { + business_model.viewCriterion(criterion.text) + } + + Component.onCompleted: customersStack.pop() +} diff --git a/Gui/Dashboard.qml b/Gui/Dashboard.qml index f633c1e..22bf6c2 100644 --- a/Gui/Dashboard.qml +++ b/Gui/Dashboard.qml @@ -8,9 +8,124 @@ ColumnLayout Rectangle { - color: "blue" + color: "dimgrey" Layout.fillHeight: true Layout.fillWidth: true - Layout.bottomMargin: 9 + Layout.bottomMargin: 3 + radius: 45 + + RowLayout + { + anchors.fill: parent + + Rectangle + { + id: contractButton + width: 300 + height: 145 + color: "darkslategray" + radius: 45 + Layout.alignment: Qt.AlignHCenter + border.color: "steelblue" + border.width: 1 + Text + { + text: qsTr("Aufträge") + anchors.centerIn: parent + font.pixelSize: 45 + font.bold: true + color: "lightgoldenrodyellow" + } + + MouseArea + { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + hoverEnabled: true + onPressed: + { + contractButton.color = "darkolivegreen" + contractButton.border.width = 3 + contractButton.border.color = "skyblue" + console.log("Aufträge...") + } + + onReleased: + { + contractButton.color = "darkslategray" + contractButton.border.width = 1 + contractButton.border.color = "steelblue" + } + + onHoveredChanged: + { + var w = contractButton.border.width === 3? 1: 3 + contractButton.border.width = w + } + + onExited: + { + + contractButton.color = "darkslategray" + contractButton.border.color = "steelblue" + contractButton.border.width = 1 + } + } + } + + Rectangle + { + id: offerButton + width: 300 + height: 145 + color: "darkslategray" + radius: 45 + Layout.alignment: Qt.AlignHCenter + border.color: "steelblue" + border.width: 1 + Text + { + text: qsTr("Angebote") + anchors.centerIn: parent + font.pixelSize: 45 + font.bold: true + color: "lightgoldenrodyellow" + } + MouseArea + { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + hoverEnabled: true + + onPressed: + { + offerButton.color = "darkolivegreen" + offerButton.border.width = 3 + offerButton.border.color = "skyblue" + console.log("Angebote...") + } + onReleased: + { + offerButton.color = "darkslategray" + offerButton.border.width = 1 + offerButton.border.color = "steelblue" + } + + onHoveredChanged: + { + var w = offerButton.border.width === 3? 1: 3 + offerButton.border.width = w + } + + onExited: + { + + offerButton.color = "darkslategray" + offerButton.border.color = "steelblue" + offerButton.border.width = 1 + } + } + } + } } } diff --git a/Gui/EmployeeDetails.qml b/Gui/EmployeeDetails.qml new file mode 100644 index 0000000..fe1b8ba --- /dev/null +++ b/Gui/EmployeeDetails.qml @@ -0,0 +1,27 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts + +Item +{ + property int selectedEmployee: -1 + id: emDet + ColumnLayout + { + Label + { + text: qsTr("Ausgewählter Mitarbeiter " + selectedEmployee) + } + + Button + { + text: qsTr("Mitarbeiter zeigen") + onClicked: employeesStack.pop() + } + } + + Component.onCompleted: + { + business_model.onRowClicked(selectedEmployee) + } +} diff --git a/Gui/EmployeeTable.qml b/Gui/EmployeeTable.qml index 068b4ca..f10f85a 100644 --- a/Gui/EmployeeTable.qml +++ b/Gui/EmployeeTable.qml @@ -4,131 +4,13 @@ import QtQuick.Controls import Qt.labs.qmlmodels -Item { - property var availableFilters: ["Name", "Adresse", "PLZ", "Ort", "Status"] - - SearchBar +Item +{ + StackView { - id:searchBar - anchors.margins: 9 - } - - Button - { - id: addEmployeeBtn - icon.source: "qrc:/images/addbusiness.svg" - icon.color: "olive" - anchors.right: parent.right - flat: true - onClicked: appLoader.source = "AddApplicant.qml" - } - - ColumnLayout - { - anchors - { - - top: searchBar.bottom - bottom: parent.bottom - left: parent.left - right: parent.right - - } - - RowLayout - { - - RadioButton - { - - checked: true - text: qsTr("Alle") - } - RadioButton - { - - text: qsTr("Bewerber") - } - RadioButton - { - - text: qsTr("Mitarbeiter") - } - RadioButton - { - - text: qsTr("Erledigt") - } - RadioButton - { - - text: qsTr("Ausgeschieden") - } - - } - - HorizontalHeaderView - { - id: horizontalHeader - Layout.fillWidth: true - syncView: testTable - - } - - TableView - { - id: testTable - Layout.fillHeight: true - Layout.fillWidth: true - columnSpacing: 1 - rowSpacing: 2 - model: business_model - selectionBehavior: TableView.SelectRows - selectionModel: ItemSelectionModel - - - { - id: selModel - model: testTable.model - } - - - delegate:Rectangle - { - required property bool selected - required property bool current - implicitWidth: 200 - implicitHeight: 25 - color: selected? "lightblue": palette.base - - Text - { - Layout.fillWidth: true - text: model.display? model.display: "" - - } - - MouseArea - { - id: mouseArea - property bool hovered:false - - anchors.fill: parent - hoverEnabled: true - - - onClicked: - { - business_model.onRowClicked(row) - testTable.selectionModel.select(testTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows) - - - } - - } - } - } - + id: employeesStack + anchors.fill: parent + initialItem: "EmployeesTable.qml" } } diff --git a/Gui/EmployeesTable.qml b/Gui/EmployeesTable.qml new file mode 100644 index 0000000..5cb3cac --- /dev/null +++ b/Gui/EmployeesTable.qml @@ -0,0 +1,132 @@ +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import Qt.labs.qmlmodels + +Item +{ + property var availableFilters: ["Name", "Adresse", "PLZ", "Ort", "Status"] + + SearchBar + { + id:searchBar + anchors.margins: 9 + } + + Button + { + id: addEmployeeBtn + icon.source: "qrc:/images/addbusiness.svg" + icon.color: "olive" + anchors.right: parent.right + flat: true + onClicked: appLoader.source = "AddApplicant.qml" + } + + ColumnLayout + { + anchors + { + + top: searchBar.bottom + bottom: parent.bottom + left: parent.left + right: parent.right + + } + + RowLayout + { + + RadioButton + { + + checked: true + text: qsTr("Alle") + } + RadioButton + { + + text: qsTr("Bewerber") + } + RadioButton + { + + text: qsTr("Mitarbeiter") + } + RadioButton + { + + text: qsTr("Erledigt") + } + RadioButton + { + + text: qsTr("Ausgeschieden") + } + + } + + HorizontalHeaderView + { + id: horizontalHeader + Layout.fillWidth: true + syncView: testTable + + } + + TableView + { + id: testTable + Layout.fillHeight: true + Layout.fillWidth: true + columnSpacing: 1 + rowSpacing: 2 + model: business_model + selectionBehavior: TableView.SelectRows + selectionModel: ItemSelectionModel + + + { + id: selModel + model: testTable.model + } + + + delegate:Rectangle + { + required property bool selected + required property bool current + implicitWidth: 200 + implicitHeight: 25 + color: selected? "lightblue": palette.base + + Text + { + Layout.fillWidth: true + text: model.display? model.display: "" + + } + + MouseArea + { + id: mouseArea + property bool hovered:false + + anchors.fill: parent + hoverEnabled: true + + + onDoubleClicked: + { + employeesStack.push("EmployeeDetails.qml", {selectedEmployee: row}); + } + + } + } + } + + } + + Component.onCompleted: employeesStack.pop() +} diff --git a/Gui/ObjectDetails.qml b/Gui/ObjectDetails.qml new file mode 100644 index 0000000..7f19e8e --- /dev/null +++ b/Gui/ObjectDetails.qml @@ -0,0 +1,27 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts + +Item +{ + property int selectedObject: -1 + id: obDet + ColumnLayout + { + Label + { + text: qsTr("Ausgewählter Objekt " + selectedObject) + } + + Button + { + text: qsTr("Objekts zeigen") + onClicked: customersStack.pop() + } + } + + Component.onCompleted: + { + business_model.onRowClicked(selectedObject) + } +} diff --git a/Gui/ObjectTable.qml b/Gui/ObjectTable.qml index 4e1dd17..5ee6ed7 100644 --- a/Gui/ObjectTable.qml +++ b/Gui/ObjectTable.qml @@ -6,155 +6,13 @@ import QtQuick.Controls.Fusion Item { property var availableFilters: [""] - SearchBar + + StackView { - id:searchBar - anchors.margins: 9 + id: objectsStack + anchors.fill: parent + initialItem: "ObjectsTable.qml" } - - Button - { - id: addObjectBtn - icon.source: "qrc:/images/addbusiness.svg" - icon.color: "olive" - anchors.right: parent.right - flat: true - onClicked: appLoader.source = "AddObject.qml" - } - - - ColumnLayout - { - id: tableColumn - anchors - { - top: searchBar.bottom - bottom: parent.bottom - left: parent.left - right: parent.right - } - - HorizontalHeaderView - { - id: horizontalHeaderview - Layout.fillWidth: true - implicitHeight: 40 - visible: false - movableColumns: true //@disable-check M16 - syncView: objectTable - - delegate: Rectangle { - color: addObjectBtn.palette.alternateBase - border.color: addObjectBtn.palette.base - implicitHeight: 40 - Layout.fillWidth: true - implicitWidth: 1 - Text - { - text: model.display - elide: Text.ElideRight - width: parent.width - height: parent.height - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - color: addObjectBtn.palette.text - } - } - } - - TableView - { - property real newWidth: 0 - id: objectTable - Layout.fillHeight: true - Layout.fillWidth: true - ScrollBar.vertical: ScrollBar - { - policy: objectTable.contentHeight > objectTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff - } - columnSpacing: 1 - rowSpacing: 2 - //model: object_model - alternatingRows: true - resizableColumns: true // @disable-check M16 - selectionBehavior: TableView.SelectRows - selectionModel: ItemSelectionModel - { - id: obmodel - model: objectTable.model - } - - // Timer - // { - // id: redrawTable - // running: true - // interval: 1 - // repeat: false - // onTriggered: - // { - // objectTable.forceLayout(); - // } - // } - - - - delegate:Rectangle - { - required property bool selected - required property bool current - implicitWidth: objectTable.width / objectTable.columns - implicitHeight: 25 - color: selected - ? addObjectBtn.palette.highlight //palette.highlight - : (objectTable.alternatingRows && row % 2 !== 0 - ? addObjectBtn.palette.base // palette.base - : addObjectBtn.palette.alternateBase) //palette.alternateBase) - - Text - { - text: model.display == null? "": model.display - elide: Text.ElideRight - width: parent.width - height: parent.height - verticalAlignment: Text.AlignVCenter - leftPadding: 9 //@d isable-check M16 - color: addObjectBtn.palette.text - } - - MouseArea - { - property bool hovered: false - id: mouseArea - anchors.fill: parent - hoverEnabled: true - onClicked: - { - object_model.onRowClicked(row) - } - onEntered: - { - objectTable.selectionModel.select(objectTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows) - } - } - } - - // onContentWidthChanged: - // { - - // redrawTable.start() - // } - } - - Item - { - - Layout.fillWidth: true - } - } - // function viewCriterion(criterion) - // { - // object_model.viewCriterion(criterion.text) - // } } diff --git a/Gui/ObjectsTable.qml b/Gui/ObjectsTable.qml new file mode 100644 index 0000000..c29f779 --- /dev/null +++ b/Gui/ObjectsTable.qml @@ -0,0 +1,160 @@ +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import Qt.labs.qmlmodels +import QtQuick.Controls.Fusion + +Item +{ + SearchBar + { + id:searchBar + anchors.margins: 9 + } + + Button + { + id: addObjectBtn + icon.source: "qrc:/images/addbusiness.svg" + icon.color: "olive" + anchors.right: parent.right + flat: true + onClicked: appLoader.source = "AddObject.qml" + } + + + ColumnLayout + { + id: tableColumn + anchors + { + top: searchBar.bottom + bottom: parent.bottom + left: parent.left + right: parent.right + } + + HorizontalHeaderView + { + id: horizontalHeaderview + Layout.fillWidth: true + implicitHeight: 40 + visible: false + movableColumns: true //@disable-check M16 + syncView: objectTable + + delegate: Rectangle { + color: addObjectBtn.palette.alternateBase + border.color: addObjectBtn.palette.base + implicitHeight: 40 + Layout.fillWidth: true + implicitWidth: 1 + Text + { + text: model.display + elide: Text.ElideRight + width: parent.width + height: parent.height + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + color: addObjectBtn.palette.text + } + } + } + + TableView + { + property real newWidth: 0 + id: objectTable + Layout.fillHeight: true + Layout.fillWidth: true + ScrollBar.vertical: ScrollBar + { + policy: objectTable.contentHeight > objectTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff + } + columnSpacing: 1 + rowSpacing: 2 + //model: object_model + alternatingRows: true + resizableColumns: true // @disable-check M16 + selectionBehavior: TableView.SelectRows + selectionModel: ItemSelectionModel + { + id: obmodel + model: objectTable.model + } + + // Timer + // { + // id: redrawTable + // running: true + // interval: 1 + // repeat: false + // onTriggered: + // { + // objectTable.forceLayout(); + // } + // } + + + + delegate:Rectangle + { + required property bool selected + required property bool current + implicitWidth: objectTable.width / objectTable.columns + implicitHeight: 25 + color: selected + ? addObjectBtn.palette.highlight //palette.highlight + : (objectTable.alternatingRows && row % 2 !== 0 + ? addObjectBtn.palette.base // palette.base + : addObjectBtn.palette.alternateBase) //palette.alternateBase) + + Text + { + text: model.display == null? "": model.display + elide: Text.ElideRight + width: parent.width + height: parent.height + verticalAlignment: Text.AlignVCenter + leftPadding: 9 //@d isable-check M16 + color: addObjectBtn.palette.text + } + + MouseArea + { + property bool hovered: false + id: mouseArea + anchors.fill: parent + hoverEnabled: true + onDoubleClicked: + { + objectsStack.push("ObjectDetails.qml", {selectedObject: row}); + } + onEntered: + { + objectTable.selectionModel.select(objectTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows) + } + } + } + + // onContentWidthChanged: + // { + + // redrawTable.start() + // } + } + + Item + { + + Layout.fillWidth: true + } + } + // function viewCriterion(criterion) + // { + // object_model.viewCriterion(criterion.text) + // } + + Component.onCompleted: objectsStack.pop() +} diff --git a/Gui/main.qml b/Gui/main.qml index 593cf2b..1ae8060 100644 --- a/Gui/main.qml +++ b/Gui/main.qml @@ -41,7 +41,7 @@ ApplicationWindow top: topBar.bottom bottom: parent.bottom topMargin: 0 - bottomMargin: 9 + bottomMargin: 5 rightMargin: 9 leftMargin: 9 } diff --git a/doc/PYQCRM_DATENBANK.odt b/doc/PYQCRM_DATENBANK.odt new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..9f4297b31e2db3a2d728d0914f3bb2cd902243023bac78fc0d34035e83f2c980 GIT binary patch literal 12559 zcmcI~1yo#1vo0Fkf;%CQpo0Z>2m}evpuvI#C%6;bB@7Z=1_%rUg3BPmA-KB-cNs{~ z2j|}N=bZDBbKhI*y<*MU-R!QfYijp&*RJ}MF+S!^}m^(ZC0prNYW@Kz^YHfPgwR2$my(aZ9G%ak5%uOBHBrKe4jO-o% zMVagu%1(B6*7ioWrq=(WNAe3jGiy5|C)0m3^;fewIvF`RJH9shH@#oYc5mgsYyHZl z_6~OD4yKO(!+gK8)85YB+5YZ9I{#mK|QGqyF^`2rJxric(QE+4`b+yX`y>uW{y!-j7^ zq92L31746436dUY`8o2=rVloba&SIoT%Fdk=-BBslc7RcuS63?RJlF*0b1oHC9&#X z@2%(}De7Z{Z(GiB#7|j-^>yla5ImF7#;qt8i`%uB-Q3C<$A9|pglRbbn?VTvrvhLO zzkptv>N6a|mgAOX$O~1Cb>-e6 zO&*``Wna=59_Hv+PYx}0Db!4E)~ok5RTf{@F|p_-Y6~>Ai`lA7KaaiW<*vr!24%LC zRTHq$#2vh8P3mzwGF|CCme4&M+{;rKE)aj7v)=`KtNz;P<$Tx;DxveCi5iX z%JZ5N{8xwxTMUZ?tEd}%y~;NaH+<@zPJ1Vxe^*xnw6C+!4d}nV%}AgK_K|)<4Z4g8 zSl%j+?pa{KY0I9eS~aWKFpFCvNEow)PdD4y_5-iTtQ4+RH3uM&p*hML_7>znr876+ zprJP%8Wm-+n_zb0N@s`bA<&_j1rrXhgr>pob!8YMK{;fI z!i+eceZa&(Hpw6qm!QF|8{sIWRGZ~r^XPm?qfFK94gM~ZVTe4rjk-KIuF%r|MH>$y z5b_jQR;2B`u7i##{uQ`g^;TCsE@`SinDImv*bWWOlpI2KF4*$-LiDI)$fW`^h{kWi zNuo_4ag9K4`59UTV$u+FpA9iM0b`v?kz z!`kpfZbqsKs+kEytBJ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