chore: remove StatusAppNavBarFilterModel
This commit is contained in:
parent
5d305a5221
commit
316372b469
|
@ -1,46 +0,0 @@
|
|||
import QtQuick 2.13
|
||||
import QtQml.Models 2.13
|
||||
|
||||
DelegateModel {
|
||||
id: delegateModel
|
||||
|
||||
property var filterAcceptsItem: function(item) { return true; }
|
||||
|
||||
signal aboutToUpdateFilteredModel()
|
||||
|
||||
function update() {
|
||||
delegateModel.aboutToUpdateFilteredModel()
|
||||
|
||||
if (items.count > 0) {
|
||||
items.setGroups(0, items.count, "items");
|
||||
}
|
||||
|
||||
var visible = [];
|
||||
for (var i = 0; i < items.count; ++i) {
|
||||
var item = items.get(i);
|
||||
if (filterAcceptsItem(item.model)) {
|
||||
visible.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < visible.length; ++i) {
|
||||
item = visible[i];
|
||||
item.inVisible = true;
|
||||
if (item.visibleIndex !== i) {
|
||||
visibleItems.move(item.visibleIndex, i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
items.onChanged: update()
|
||||
onFilterAcceptsItemChanged: update()
|
||||
|
||||
groups: DelegateModelGroup {
|
||||
id: visibleItems
|
||||
|
||||
name: "visible"
|
||||
includeByDefault: false
|
||||
}
|
||||
|
||||
filterOnGroup: "visible"
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
module StatusQ.Core
|
||||
|
||||
StatusAnimatedStack 0.1 StatusAnimatedStack.qml
|
||||
StatusAppNavBarFilterModel 0.1 StatusAppNavBarFilterModel.qml
|
||||
StatusAssetSettings 0.1 StatusAssetSettings.qml
|
||||
StatusBaseText 0.1 StatusBaseText.qml
|
||||
StatusCenteredFlow 0.1 StatusCenteredFlow.qml
|
||||
|
|
|
@ -132,7 +132,6 @@
|
|||
<file>StatusQ/Core/Utils/Utils.qml</file>
|
||||
<file>StatusQ/Core/qmldir</file>
|
||||
<file>StatusQ/Core/StatusAnimatedStack.qml</file>
|
||||
<file>StatusQ/Core/StatusAppNavBarFilterModel.qml</file>
|
||||
<file>StatusQ/Core/StatusBaseText.qml</file>
|
||||
<file>StatusQ/Core/StatusFontSettings.qml</file>
|
||||
<file>StatusQ/Core/StatusIcon.qml</file>
|
||||
|
|
Loading…
Reference in New Issue