chore: remove StatusAppNavBarFilterModel

This commit is contained in:
Patryk Osmaczko 2022-11-28 12:36:21 +01:00 committed by osmaczko
parent 5d305a5221
commit 316372b469
3 changed files with 0 additions and 48 deletions

View File

@ -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"
}

View File

@ -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

View File

@ -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>