17#ifndef QSORTFILTERPROXYMODELQML_H
18#define QSORTFILTERPROXYMODELQML_H
20#include <QSortFilterProxyModel>
22class QSortFilterProxyModelQML :
public QSortFilterProxyModel
26 Q_PROPERTY(QAbstractItemModel* model READ sourceModel WRITE setModel NOTIFY modelChanged)
27 Q_PROPERTY(
int totalCount READ totalCount NOTIFY totalCountChanged)
28 Q_PROPERTY(
int count READ count NOTIFY countChanged)
29 Q_PROPERTY(
bool invertMatch READ invertMatch WRITE setInvertMatch NOTIFY invertMatchChanged)
32 explicit QSortFilterProxyModelQML(QObject *parent = 0);
34 Q_INVOKABLE QVariantMap get(
int row);
35 Q_INVOKABLE QVariant data(
int row,
int role);
36 Q_INVOKABLE
int count();
37 Q_INVOKABLE
int findFirst(
int role,
const QVariant& value)
const;
38 Q_INVOKABLE
int mapRowToSource(
int row);
39 virtual bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const;
42 int totalCount()
const;
43 bool invertMatch()
const;
44 QHash<int, QByteArray> roleNames()
const;
47 void setModel(QAbstractItemModel *model);
48 void setInvertMatch(
bool invertMatch);
50 Q_INVOKABLE
int mapFromSource(
int row);
51 Q_INVOKABLE
int mapToSource(
int row);
54 void totalCountChanged();
56 void invertMatchChanged(
bool);