diff --git a/Gui/CustomersTable.qml b/Gui/CustomersTable.qml index 65ae550..d2c55bd 100644 --- a/Gui/CustomersTable.qml +++ b/Gui/CustomersTable.qml @@ -22,12 +22,6 @@ ColumnLayout { SearchBar { - Rectangle - { - anchors.fill: parent - color: "green" - z: 10 - } } QuickFilter { diff --git a/Gui/ObjectsTable.qml b/Gui/ObjectsTable.qml index da2037c..fcd01d9 100644 --- a/Gui/ObjectsTable.qml +++ b/Gui/ObjectsTable.qml @@ -3,23 +3,26 @@ import QtQuick.Layouts import QtQuick.Controls import Qt.labs.qmlmodels -Item +ColumnLayout { + anchors.fill: parent - SearchBar + RowLayout { - id:searchBar - } + SearchBar + { - Button - { - id: addObjectBtn - icon.source: "qrc:/images/PlusCircle.svg" - text: qsTr("Objekt Hinzufügen") - anchors.right: parent.right - onClicked: appLoader.source = "AddObject.qml" - } + } + Button + { + id: addObjectBtn + icon.source: "qrc:/images/PlusCircle.svg" + text: qsTr("Objekt Hinzufügen") + anchors.right: parent.right + onClicked: appLoader.source = "AddObject.qml" + } + } ColumnLayout { diff --git a/Gui/SearchBar.qml b/Gui/SearchBar.qml index 28eaec2..72918b5 100644 --- a/Gui/SearchBar.qml +++ b/Gui/SearchBar.qml @@ -3,78 +3,12 @@ import QtQuick.Controls import QtQuick.Layouts -RowLayout -{ - id: searchBar +TextField { + Layout.preferredWidth: 300 + placeholderText: qsTr("Suche") - TextField - { - id: searchField - placeholderText: qsTr("Suche") - leftPadding: 3 - rightPadding: 3 - Layout.preferredWidth: 300 - - Button - { - icon.source: "qrc:/images/MagnifyingGlass.svg" - icon.color: Colors.foreground - x: parent.x + parent.width - width - height: parent.height - flat: true - } - - - Button - { - id: filterBtn - icon.source: "qrc:/images/Funnel.svg" - icon.color: Colors.foreground - x: parent.x + parent.width - height: searchField.height - flat: true - onClicked: filterPopup.open() - } - } - - Popup - { - id: filterPopup - x: filterBtn.x + filterBtn.width - y: filterBtn.y - width: 100 - height: 150 - modal: true - focus: true - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent - contentItem: Item - { - ColumnLayout - { - anchors.fill: parent - //id: filterContent - - Repeater - { - model: availableFilters - - CheckBox - { - text: model.modelData - onClicked: - { - setFilter(text, checkState) - } - } - - } - } - } - } - - function setFilter(filter,activated) - { - console.log(filter) - console.log(activated) + Button { + icon.source: "qrc:/images/MagnifyingGlass.svg" + isFieldButton: true } }