Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/ConfigFilter.qml
Show All 29 Lines | 28 | Item { | |||
---|---|---|---|---|---|
30 | 30 | | |||
31 | width: childrenRect.width | 31 | width: childrenRect.width | ||
32 | height: childrenRect.height | 32 | height: childrenRect.height | ||
33 | 33 | | |||
34 | property alias cfg_filterMode: filterMode.currentIndex | 34 | property alias cfg_filterMode: filterMode.currentIndex | ||
35 | property alias cfg_filterPattern: filterPattern.text | 35 | property alias cfg_filterPattern: filterPattern.text | ||
36 | property alias cfg_filterMimeTypes: mimeTypesModel.checkedTypes | 36 | property alias cfg_filterMimeTypes: mimeTypesModel.checkedTypes | ||
37 | 37 | | |||
38 | Folder.FilterableMimeTypesModel { | 38 | PlasmaCore.SortFilterModel { | ||
39 | id: filderedMimeTypesModel | ||||
40 | | ||||
41 | sourceModel: Folder.MimeTypesModel { | ||||
39 | id: mimeTypesModel | 42 | id: mimeTypesModel | ||
43 | } | ||||
40 | 44 | | |||
41 | filter: mimeFilter.text | 45 | // SortFilterModel doesn't have a case-sensitivity option | ||
46 | // but filterRegExp always causes case-insensitive sorting. | ||||
47 | filterRegExp: mimeFilter.text | ||||
48 | filterRole: "display" | ||||
42 | } | 49 | } | ||
43 | 50 | | |||
44 | ColumnLayout { | 51 | ColumnLayout { | ||
45 | width: parent.width | 52 | width: parent.width | ||
46 | height: parent.height | 53 | height: parent.height | ||
47 | 54 | | |||
48 | ComboBox { | 55 | ComboBox { | ||
49 | id: filterMode | 56 | id: filterMode | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 97 | ScrollView { | |||
91 | Layout.fillWidth: true | 98 | Layout.fillWidth: true | ||
92 | Layout.fillHeight: true | 99 | Layout.fillHeight: true | ||
93 | 100 | | |||
94 | frameVisible: true | 101 | frameVisible: true | ||
95 | 102 | | |||
96 | enabled: (filterMode.currentIndex > 0) | 103 | enabled: (filterMode.currentIndex > 0) | ||
97 | 104 | | |||
98 | ListView { | 105 | ListView { | ||
99 | model: mimeTypesModel | 106 | model: filderedMimeTypesModel | ||
100 | 107 | | |||
101 | delegate: RowLayout { | 108 | delegate: RowLayout { | ||
102 | CheckBox { | 109 | CheckBox { | ||
103 | Layout.maximumWidth: 18 // FIXME HACK: Use actual radio button width. | 110 | Layout.maximumWidth: 18 // FIXME HACK: Use actual radio button width. | ||
104 | 111 | | |||
105 | checked: model.checked | 112 | checked: model.checked | ||
106 | onCheckedChanged: model.checked = checked | 113 | onCheckedChanged: model.checked = checked | ||
107 | } | 114 | } | ||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |