Enable category filtering in widgetexplorer
This commit is contained in:
parent
b1a42929a5
commit
c965edb741
@ -49,22 +49,20 @@ Item {
|
|||||||
Repeater {
|
Repeater {
|
||||||
parent: categoriesDialog
|
parent: categoriesDialog
|
||||||
model: widgetExplorer.filterModel
|
model: widgetExplorer.filterModel
|
||||||
// delegate: PlasmaComponents.MenuItem {
|
delegate: PlasmaComponents.MenuItem {
|
||||||
// text: display
|
text: display
|
||||||
// separator: model["separator"]
|
separator: model["separator"]
|
||||||
// onClicked: {
|
onClicked: {
|
||||||
// list.contentX = 0
|
list.contentX = 0
|
||||||
// list.contentY = 0
|
list.contentY = 0
|
||||||
// var item = widgetExplorer.filterModel.get(index)
|
main.categoryButton.text = display
|
||||||
//
|
widgetExplorer.widgetsModel.filterQuery = model["filterData"]
|
||||||
// widgetExplorer.widgetsModel.filterType = item.filterType
|
widgetExplorer.widgetsModel.filterType = model["filterType"]
|
||||||
// widgetExplorer.widgetsModel.filterQuery = item.filterData
|
}
|
||||||
// main.categoryButton.text = item.display
|
Component.onCompleted: {
|
||||||
// }
|
parent = categoriesDialog
|
||||||
// Component.onCompleted: {
|
}
|
||||||
// parent = categoriesDialog
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PlasmaComponents.ContextMenu {
|
PlasmaComponents.ContextMenu {
|
||||||
@ -185,7 +183,7 @@ Item {
|
|||||||
PlasmaComponents.Button {
|
PlasmaComponents.Button {
|
||||||
id: categoryButton
|
id: categoryButton
|
||||||
text: i18n("Categories")
|
text: i18n("Categories")
|
||||||
onClicked: categoriesDialog.open()
|
onClicked: categoriesDialog.open(0, categoryButton.height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Row {
|
Row {
|
||||||
@ -255,7 +253,7 @@ Item {
|
|||||||
}
|
}
|
||||||
id: categoryButton
|
id: categoryButton
|
||||||
text: i18n("Categories")
|
text: i18n("Categories")
|
||||||
onClicked: categoriesDialog.open()
|
onClicked: categoriesDialog.open(0, categoryButton.height)
|
||||||
}
|
}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
main.categoryButton = categoryButton
|
main.categoryButton = categoryButton
|
||||||
@ -291,7 +289,7 @@ Item {
|
|||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
orientation: widgetExplorer.orientation == Qt.Horizontal ? ListView.Horizontal : ListView.vertical
|
orientation: widgetExplorer.orientation == Qt.Horizontal ? ListView.Horizontal : ListView.Vertical
|
||||||
snapMode: ListView.SnapToItem
|
snapMode: ListView.SnapToItem
|
||||||
model: widgetExplorer.widgetsModel
|
model: widgetExplorer.widgetsModel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user