2019-03-26 03:19:55 -04:00
|
|
|
import QtQuick 2.7
|
2019-04-28 15:45:42 -04:00
|
|
|
import QtQuick.Layouts 1.3
|
2019-07-02 13:59:52 -04:00
|
|
|
import SortFilterProxyModel 0.2
|
2019-04-28 15:18:36 -04:00
|
|
|
import "../Base"
|
2019-07-07 05:49:02 -04:00
|
|
|
import "../utils.js" as Utils
|
2019-03-26 03:19:55 -04:00
|
|
|
|
2019-05-13 13:15:03 -04:00
|
|
|
HListView {
|
2019-05-02 14:20:21 -04:00
|
|
|
property string userId: ""
|
|
|
|
property string category: ""
|
2019-04-21 16:53:16 -04:00
|
|
|
|
2019-04-20 17:45:51 -04:00
|
|
|
id: roomList
|
2019-07-05 16:55:25 -04:00
|
|
|
spacing: sidePane.collapsed ? 0 : sidePane.normalSpacing
|
2019-07-02 13:59:52 -04:00
|
|
|
|
|
|
|
model: SortFilterProxyModel {
|
2019-07-04 16:01:44 -04:00
|
|
|
sourceModel: rooms
|
2019-07-02 13:59:52 -04:00
|
|
|
filters: AllOf {
|
|
|
|
ValueFilter {
|
|
|
|
roleName: "category"
|
|
|
|
value: category
|
|
|
|
}
|
|
|
|
|
|
|
|
ValueFilter {
|
|
|
|
roleName: "userId"
|
|
|
|
value: userId
|
|
|
|
}
|
|
|
|
|
|
|
|
ExpressionFilter {
|
2019-07-07 05:49:02 -04:00
|
|
|
// Utils... won't work directly in expression?
|
|
|
|
function filterIt(filter, text) {
|
|
|
|
return Utils.filterMatches(filter, text)
|
2019-07-02 13:59:52 -04:00
|
|
|
}
|
2019-07-07 05:49:02 -04:00
|
|
|
expression: filterIt(paneToolBar.roomFilter, displayName)
|
2019-07-02 13:59:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-26 03:19:55 -04:00
|
|
|
delegate: RoomDelegate {}
|
|
|
|
}
|