AddCustomer GUI created
This commit is contained in:
@@ -3,10 +3,10 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
|
||||
Item
|
||||
RowLayout
|
||||
{
|
||||
id: searchBar
|
||||
height: 30
|
||||
|
||||
|
||||
TextField
|
||||
{
|
||||
@@ -14,70 +14,69 @@ Item
|
||||
placeholderText: qsTr("Suche")
|
||||
leftPadding: 3
|
||||
rightPadding: 3
|
||||
width: 300
|
||||
Layout.preferredWidth: 300
|
||||
|
||||
Button
|
||||
{
|
||||
icon.source: "../images/search.svg"
|
||||
icon.color: "olive"
|
||||
anchors.right: parent.right
|
||||
x: parent.x + parent.width - width
|
||||
height: parent.height
|
||||
flat: true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Button
|
||||
{
|
||||
id: filterBtn
|
||||
icon.source: "../images/filter.svg"
|
||||
icon.color: "olive"
|
||||
anchors.left: searchField.right
|
||||
x: parent.x + parent.width
|
||||
height: searchField.height
|
||||
flat: true
|
||||
onClicked: filterPopup.open()
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Popup
|
||||
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
|
||||
{
|
||||
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
|
||||
{
|
||||
ColumnLayout
|
||||
anchors.fill: parent
|
||||
//id: filterContent
|
||||
|
||||
Repeater
|
||||
{
|
||||
anchors.fill: parent
|
||||
//id: filterContent
|
||||
model: availableFilters
|
||||
|
||||
Repeater
|
||||
CheckBox
|
||||
{
|
||||
model: availableFilters
|
||||
|
||||
CheckBox
|
||||
text: model.modelData
|
||||
onClicked:
|
||||
{
|
||||
text: model.modelData
|
||||
onClicked:
|
||||
{
|
||||
setFilter(text, checkState)
|
||||
}
|
||||
setFilter(text, checkState)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setFilter(filter,activated)
|
||||
{
|
||||
console.log(filter)
|
||||
console.log(activated)
|
||||
function setFilter(filter,activated)
|
||||
{
|
||||
console.log(filter)
|
||||
console.log(activated)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user