24#include <QSortFilterProxyModel>
38 QML_FOREIGN(QSortFilterProxyModel)
111 [[nodiscard]] QString
filter()
const {
return m_filter; }
178 [[nodiscard]]
bool filterAcceptsRow(
int sourceRow,
const QModelIndex& sourceParent)
const override;
193 QString m_filterRoleName {QStringLiteral(
"name")};
196 int m_filterRole {-1};
198 bool m_filterRoleIsSimplified {
false};
201 QStringList m_filterWords;
QString filterRoleName() const
Getter function for the property with the same name.
void setFilter(const QString &newFilter)
Setter function for the property with the same name.
QString filter
Filter string.
void filterChanged()
Notification signal for property with the same name.
QString filterRoleName
Name of the source model role that the filter is matched against.
void setFilterRoleName(const QString &newFilterRoleName)
Setter function for the property with the same name.
void setSourceModel(QAbstractItemModel *newSourceModel) override
Re-implemented from QAbstractProxyModel.
void filterRoleNameChanged()
Notification signal for property with the same name.
bool filterRoleIsSimplified
Whether the filter role holds text already simplified with Librarian::simplify().
bool filterRoleIsSimplified() const
Getter function for the property with the same name.
void filterRoleIsSimplifiedChanged()
Notifier signal.
int roleForName(const QString &roleName) const
Looks up a role by name in the source model.
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
Re-implemented from QSortFilterProxyModel.
void setFilterRoleIsSimplified(bool newValue)
Setter function for the property with the same name.
NameFilterProxyModel(QObject *parent=nullptr)
Standard constructor.
Makes QSortFilterProxyModel known to the QML type system.