to switch branch
This commit is contained in:
@@ -22,12 +22,6 @@ ColumnLayout {
|
|||||||
|
|
||||||
SearchBar
|
SearchBar
|
||||||
{
|
{
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
anchors.fill: parent
|
|
||||||
color: "green"
|
|
||||||
z: 10
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QuickFilter {
|
QuickFilter {
|
||||||
|
|||||||
@@ -3,12 +3,15 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Qt.labs.qmlmodels
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
Item
|
ColumnLayout
|
||||||
{
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
RowLayout
|
||||||
|
{
|
||||||
SearchBar
|
SearchBar
|
||||||
{
|
{
|
||||||
id:searchBar
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
Button
|
||||||
@@ -19,7 +22,7 @@ Item
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
onClicked: appLoader.source = "AddObject.qml"
|
onClicked: appLoader.source = "AddObject.qml"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout
|
ColumnLayout
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,78 +3,12 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
|
||||||
RowLayout
|
TextField {
|
||||||
{
|
|
||||||
id: searchBar
|
|
||||||
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
id: searchField
|
|
||||||
placeholderText: qsTr("Suche")
|
|
||||||
leftPadding: 3
|
|
||||||
rightPadding: 3
|
|
||||||
Layout.preferredWidth: 300
|
Layout.preferredWidth: 300
|
||||||
|
placeholderText: qsTr("Suche")
|
||||||
|
|
||||||
Button
|
Button {
|
||||||
{
|
|
||||||
icon.source: "qrc:/images/MagnifyingGlass.svg"
|
icon.source: "qrc:/images/MagnifyingGlass.svg"
|
||||||
icon.color: Colors.foreground
|
isFieldButton: true
|
||||||
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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user