to switch branch
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user