32 Q_PROPERTY(
bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged FINAL)
33 Q_PROPERTY(
bool inverted READ isInverted WRITE setInverted NOTIFY invertedChanged FINAL)
34 Q_PROPERTY(
int column READ column WRITE setColumn NOTIFY columnChanged FINAL)
35 QML_NAMED_ELEMENT(FilterBase)
37 QML_ADDED_IN_VERSION(6, 10)
40 explicit QQmlFilterBase(QQmlFilterBasePrivate *privObj, QObject *parent =
nullptr);
41 virtual ~QQmlFilterBase() =
default;
44 void setEnabled(
const bool bEnable);
46 bool isInverted()
const;
47 void setInverted(
const bool bInvert);
50 void setColumn(
const int column);
52 virtual bool filterAcceptsRowInternal(
int,
const QModelIndex&,
const QQmlSortFilterProxyModel *)
const {
return true; }
53 virtual bool filterAcceptsColumnInternal(
int,
const QModelIndex&,
const QQmlSortFilterProxyModel *)
const {
return true; }
54 virtual void update(
const QQmlSortFilterProxyModel *) { };
57 void invalidateModel();
58 void invalidateCache(QQmlFilterBase *filter);
59 void enabledChanged();
60 void invertedChanged();
64 void invalidate(
bool updateCache =
false);
67 Q_DECLARE_PRIVATE(QQmlFilterBase)