diff --git a/Gui/CustomerTable.qml b/Gui/CustomerTable.qml index 9c380c5..c0e8485 100644 --- a/Gui/CustomerTable.qml +++ b/Gui/CustomerTable.qml @@ -13,7 +13,6 @@ Item { id: customersStack anchors.fill: parent initialItem: "CustomersTable.qml" - anchors.topMargin: Dimensions.m } } diff --git a/Gui/CustomersTable.qml b/Gui/CustomersTable.qml index 53f2400..930801c 100644 --- a/Gui/CustomersTable.qml +++ b/Gui/CustomersTable.qml @@ -19,15 +19,13 @@ ColumnLayout { RowLayout { - // Layout.fillWidth: true - // Layout.horizontalStretchFactor: 1 - // spacing: Dimensions.l + Layout.fillWidth: true + spacing: Dimensions.l SearchBar { } - QuickFilter { onSelectedChanged: (name) => { business_model.viewCriterion(name) @@ -74,6 +72,9 @@ ColumnLayout { } ColumnLayout { + Layout.fillWidth: true + Layout.fillHeight: true + Layout.verticalStretchFactor: 1 clip: true HorizontalHeaderView @@ -167,9 +168,9 @@ ColumnLayout { model: customerTable.model } } - Item { - Layout.fillWidth: true - } - } + } + Item { + Layout.fillHeight: true + } } diff --git a/Gui/EmployeeTable.qml b/Gui/EmployeeTable.qml index e5f123a..efd43e5 100644 --- a/Gui/EmployeeTable.qml +++ b/Gui/EmployeeTable.qml @@ -11,7 +11,6 @@ Item { anchors.fill: parent initialItem: "EmployeesTable.qml" - anchors.topMargin: Dimensions.m } } diff --git a/Gui/EmployeesTable.qml b/Gui/EmployeesTable.qml index 167b92b..5dae07a 100644 --- a/Gui/EmployeesTable.qml +++ b/Gui/EmployeesTable.qml @@ -13,11 +13,14 @@ ColumnLayout } anchors.fill: parent + spacing: Dimensions.l Component.onCompleted: employeesStack.pop() // property var availableFilters: ["Name", "Adresse", "PLZ", "Ort", "Status"] RowLayout { + Layout.fillWidth: true + spacing: Dimensions.l SearchBar { id:searchBar @@ -71,98 +74,6 @@ ColumnLayout } - - - - // ButtonGroup - // { - // id: criterion - // // buttons: criterion.children - // onClicked: - // { - // viewEmployees(criterion.checkedButton.text) - // } - // } - - // ColumnLayout - // { - // id: tableParent - // clip: true - // anchors - // { - - // top: searchBar.bottom - // bottom: parent.bottom - // left: parent.left - // right: parent.right - // } - - // RowLayout - // { - // id: viewCriterion - - // RadioButton - // { - // //id: showAll - // checked: true - // text: qsTr("Alle") - // ButtonGroup.group: criterion - // //onClicked: viewEmployees(showAll) - // } - // RadioButton - // { - // //id: showApplicant - // text: qsTr("Bewerber") - // ButtonGroup.group: criterion - // //onClicked: viewEmployees(showApplicant) - // } - // RadioButton - // { - // //id: showEmployee - // text: qsTr("Mitarbeiter") - // ButtonGroup.group: criterion - // //onClicked: viewEmployees(showEmployee) - // } - - // CheckBox - // { - // id: showEveryone - // text: qsTr("Alle Stati") - // checked: true - // onClicked: viewEmployees(criterion.checkedButton.text) - // onCheckedChanged: - // { - // showFired.checked = false - // showProcessed.checked = false - // } - // } - // CheckBox - // { - // id: showProcessed - // text: qsTr("Erledigt") - // enabled: !showEveryone.checked - // checked: false - // onClicked: - // { - // showFired.checked = false - // viewEmployees(criterion.checkedButton.text) - // } - // } - // CheckBox - // { - // id: showFired - // text: qsTr("Ausgeschieden") - // enabled: !showEveryone.checked - // checked: false - // onClicked: - // { - // showProcessed.checked = false - // viewEmployees(criterion.checkedButton.text) - // } - // } - - // } - HorizontalHeaderView { id: employeeTableHeader @@ -203,7 +114,7 @@ ColumnLayout resizableColumns: true model: employee_model selectionBehavior: TableView.SelectRows - + z: 1 ScrollBar.vertical: ScrollBar { policy: appliEmpTable.contentHeight > appliEmpTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff diff --git a/Gui/ObjectTable.qml.orig b/Gui/ObjectTable.qml.orig new file mode 100644 index 0000000..9e0c078 --- /dev/null +++ b/Gui/ObjectTable.qml.orig @@ -0,0 +1,26 @@ +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" +<<<<<<< HEAD + anchors.topMargin: Dimensions.m +======= +>>>>>>> 7f5675c06d72728a2249b66dc18d56221ad5a0c97791edbc86afeb57dcb3392d + } +} + + + + + + diff --git a/Gui/ObjectTable_BACKUP_93344.qml b/Gui/ObjectTable_BACKUP_93344.qml new file mode 100644 index 0000000..9e0c078 --- /dev/null +++ b/Gui/ObjectTable_BACKUP_93344.qml @@ -0,0 +1,26 @@ +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" +<<<<<<< HEAD + anchors.topMargin: Dimensions.m +======= +>>>>>>> 7f5675c06d72728a2249b66dc18d56221ad5a0c97791edbc86afeb57dcb3392d + } +} + + + + + + diff --git a/Gui/ObjectTable_BASE_93344.qml b/Gui/ObjectTable_BASE_93344.qml new file mode 100644 index 0000000..8fc8d48 --- /dev/null +++ b/Gui/ObjectTable_BASE_93344.qml @@ -0,0 +1,22 @@ +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import Qt.labs.qmlmodels + +Item { + property var availableFilters: [""] + + StackView + { + id: objectsStack + anchors.fill: parent + initialItem: "ObjectsTable.qml" + anchors.margins: 9 + } +} + + + + + + diff --git a/Gui/ObjectTable_LOCAL_93344.qml b/Gui/ObjectTable_LOCAL_93344.qml new file mode 100644 index 0000000..e72e3a8 --- /dev/null +++ b/Gui/ObjectTable_LOCAL_93344.qml @@ -0,0 +1,22 @@ +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import Qt.labs.qmlmodels + +Item { + property var availableFilters: [""] + + StackView + { + id: objectsStack + anchors.fill: parent + initialItem: "ObjectsTable.qml" + anchors.topMargin: Dimensions.m + } +} + + + + + + diff --git a/Gui/ObjectTable_REMOTE_93344.qml b/Gui/ObjectTable_REMOTE_93344.qml new file mode 100644 index 0000000..19c9865 --- /dev/null +++ b/Gui/ObjectTable_REMOTE_93344.qml @@ -0,0 +1,22 @@ +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" + } +} + + + + + + diff --git a/Gui/ObjectsTable.qml b/Gui/ObjectsTable.qml index 6687559..8013121 100644 --- a/Gui/ObjectsTable.qml +++ b/Gui/ObjectsTable.qml @@ -25,7 +25,7 @@ ColumnLayout } RowLayout { - Layout.fillWidth: true + Layout.fillWidth: true spacing: Dimensions.l SearchBar { @@ -121,8 +121,9 @@ ColumnLayout { property real newWidth: 0 id: objectTable - z: 0 - height: tableColumn.height - horizontalHeaderview.height + z: 1 + // height: tableColumn.height - horizontalHeaderview.height + Layout.fillHeight: true Layout.fillWidth: true columnSpacing: 1 rowSpacing: 2 @@ -180,8 +181,9 @@ ColumnLayout } } } - Item { - Layout.fillWidth: true - } + + } + Item { + Layout.fillHeight: true } } diff --git a/Gui/ObjectsTable.qml.orig b/Gui/ObjectsTable.qml.orig new file mode 100644 index 0000000..46d3b1d --- /dev/null +++ b/Gui/ObjectsTable.qml.orig @@ -0,0 +1,257 @@ +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import Qt.labs.qmlmodels + +<<<<<<< HEAD +ColumnLayout +{ + function viewCriterion(criterion) + { + business_model.viewCriterion(criterion.text); + } + function onObjectContactAdded(added) + { + console.log(added) + if (added) object_model.viewCriterion("") + } + + anchors.fill: parent + + Component.onCompleted: + { + contact_model.objectContactAdded.connect(onObjectContactAdded) + objectsStack.pop() + } + RowLayout + { + SearchBar + { + + } + QuickFilter { + onSelectedChanged: (name) => { + business_model.viewCriterion(name) + } + + model: ListModel { + ListElement { + + name: "Alle" + text: qsTr("Alle") + selected: true + } + ListElement { + name: "Interessent" + text: qsTr("Interessent") + selected: false + } + ListElement { + name: "Kunde" + text: qsTr("Kunde") + selected: false + } + ListElement { + name: "Lieferant" + text: qsTr("Lieferant") + selected: false + } + ListElement { + name: "Erledigt" + text: qsTr("Erledigt") + selected: false + } + } + } + Button + { + id: addObjectBtn + icon.source: "qrc:/images/PlusCircle.svg" + text: qsTr("Objekt Hinzufügen") + Layout.alignment: Qt.AlignRight + onClicked: appLoader.source = "AddObject.qml" + } +======= +ColumnLayout { + spacing: Dimensions.l + function onObjectContactAdded(added) { + console.log(added); + if (added) + object_model.viewCriterion(""); + } + + Component.onCompleted: { + contact_model.objectContactAdded.connect(onObjectContactAdded); + objectsStack.pop(); +>>>>>>> 7f5675c06d72728a2249b66dc18d56221ad5a0c97791edbc86afeb57dcb3392d + } + + RowLayout { + Layout.fillWidth: true + spacing: Dimensions.l + +<<<<<<< HEAD + ColumnLayout + { + id: tableColumn + clip: true + // anchors + // { + // top: searchBar.bottom + // bottom: parent.bottom + // left: parent.left + // right: parent.right + // topMargin: 15 + // } + HorizontalHeaderView + { +======= + SearchBar { + } + + Button { + id: addObjectBtn + Layout.alignment: Qt.AlignRight + + icon.source: "qrc:/images/PlusCircle.svg" + text: qsTr("Objekt Hinzufügen") + + onClicked: appLoader.source = "AddObject.qml" + } + } + ColumnLayout { + id: tableColumn + Layout.fillWidth: true + Layout.fillHeight: true + Layout.verticalStretchFactor: 1 + + clip: true + + HorizontalHeaderView { +>>>>>>> 7f5675c06d72728a2249b66dc18d56221ad5a0c97791edbc86afeb57dcb3392d + id: horizontalHeaderview + + Layout.fillWidth: true + implicitHeight: 40 + movableColumns: true //@disable-check M16 + syncView: objectTable + + delegate: Rectangle { + Layout.fillWidth: true + border.color: addObjectBtn.palette.base + color: addObjectBtn.palette.alternateBase + implicitHeight: 40 + implicitWidth: 1 + + Text { + color: addObjectBtn.palette.text + elide: Text.ElideRight + height: parent.height + horizontalAlignment: Text.AlignHCenter + text: model.display + verticalAlignment: Text.AlignVCenter + width: parent.width + } + } + } + TableView { + id: objectTable + + property real newWidth: 0 + + Layout.fillWidth: true + Layout.fillHeight: true + alternatingRows: true + columnSpacing: 1 + height: parent.height - horizontalHeaderview.height + model: object_model + resizableColumns: true // @disable-check M16 + rowSpacing: 2 + selectionBehavior: TableView.SelectRows + z: 0 + + ScrollBar.vertical: ScrollBar { + policy: objectTable.contentHeight > objectTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff + } + delegate: Rectangle { + required property bool current + required property bool selected + + color: selected ? addObjectBtn.palette.highlight + : (objectTable.alternatingRows && row % 2 !== 0 ? addObjectBtn.palette.base + : addObjectBtn.palette.alternateBase) + + implicitHeight: 25 + implicitWidth: objectTable.width / objectTable.columns + + Text { + color: addObjectBtn.palette.text + elide: Text.ElideRight + height: parent.height + leftPadding: 9 //@disable-check M16 + text: (model.display === null || model.display === undefined) ? "" : model.display + verticalAlignment: Text.AlignVCenter + width: parent.width + } + MouseArea { + id: mouseArea + + property bool hovered: false + + 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); + } + } + } + + selectionModel: ItemSelectionModel { + id: obmodel + + model: objectTable.model + } + } +<<<<<<< HEAD + + + } + Item + { + + Layout.fillHeight: true + } + // function onObjectContactAdded(added) + // { + // console.log(added) + // if (added) object_model.viewCriterion("") + // } + // function viewCriterion(criterion) + // { + // object_model.viewCriterion(criterion.text) + // } + + // Component.onCompleted: + // { + // contact_model.objectContactAdded.connect(onObjectContactAdded) + // objectsStack.pop() + // } + + // function onObjectContactAdded(added) + // { + // console.log(added) + // if (added) object_model.viewCriterion("") + // } +======= + Item { + Layout.fillWidth: true + } + } +>>>>>>> 7f5675c06d72728a2249b66dc18d56221ad5a0c97791edbc86afeb57dcb3392d +} diff --git a/Gui/OfferTable.qml b/Gui/OfferTable.qml index 519ceed..247a50b 100644 --- a/Gui/OfferTable.qml +++ b/Gui/OfferTable.qml @@ -10,7 +10,6 @@ Item StackView { id: offersStack - anchors.fill: parent initialItem: "OffersTable.qml" } diff --git a/Gui/OfferTable.qml.orig b/Gui/OfferTable.qml.orig new file mode 100644 index 0000000..10d6b8e --- /dev/null +++ b/Gui/OfferTable.qml.orig @@ -0,0 +1,22 @@ +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" +<<<<<<< HEAD + anchors.topMargin: Dimensions.m +======= +>>>>>>> 7f5675c06d72728a2249b66dc18d56221ad5a0c97791edbc86afeb57dcb3392d + } +} + diff --git a/Gui/OffersTable.qml b/Gui/OffersTable.qml index 1d4210e..aebc30e 100644 --- a/Gui/OffersTable.qml +++ b/Gui/OffersTable.qml @@ -6,6 +6,7 @@ import Qt.labs.qmlmodels ColumnLayout { anchors.fill: parent + spacing: Dimensions.l function viewOffers(criterion) { //offer_model.viewCriterion(criterion) @@ -13,9 +14,11 @@ ColumnLayout RowLayout { + Layout.fillWidth: true + spacing: Dimensions.l SearchBar { - id:searchBar + id: searchBar } QuickFilter { diff --git a/Gui/OffersTable.qml.orig b/Gui/OffersTable.qml.orig new file mode 100644 index 0000000..64dd9ec --- /dev/null +++ b/Gui/OffersTable.qml.orig @@ -0,0 +1,90 @@ +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import Qt.labs.qmlmodels + +<<<<<<< HEAD +ColumnLayout +{ + anchors.fill: parent + function viewOffers(criterion) + { + //offer_model.viewCriterion(criterion) +======= +ColumnLayout { + property var availableFilters: [] + + Layout.fillWidth: true + anchors.fill: parent + + RowLayout { + spacing: Dimensions.l + SearchBar { + } + } + Item { + Layout.fillHeight: true +>>>>>>> 7f5675c06d72728a2249b66dc18d56221ad5a0c97791edbc86afeb57dcb3392d + } + + RowLayout + { + SearchBar + { + id:searchBar + } + QuickFilter + { + onSelectedChanged: (name) => + { + business_model.viewCriterion(name) + } + + model: ListModel + { + ListElement + { + + name: "Alle" + text: qsTr("Alle") + selected: true + } + ListElement + { + name: "Offen" + text: qsTr("Offen") + selected: false + } + ListElement + { + name: "Abgeschlossen" + text: qsTr("Abgeschlossen") + selected: false + } + + ListElement + { + name: "Erledigt" + text: qsTr("Erledigt") + selected: false + } + } + } + Button + { + id: addOfferBtn + text: qsTr("Angebote Hinzufügen") + icon.source: "qrc:/images/PlusCircle.svg" + Layout.alignment: Qt.AlignRight + flat: true + //onClicked: appLoader.source = "AddOffer.qml" + } + } + Item { + id: spacer + Layout.fillHeight: true + + } + + +}