21 #ifndef QABSTRACTFILTERMODEL_H
22 #define QABSTRACTFILTERMODEL_H
24 #include <QAbstractItemModel>
29 #include <qaivlib_global.h>
35 class QAbstractFilterModelPrivate;
55 ValueFilterTypeRole = Qt::UserRole + 42
56 ,DefaultFilterTypeRole
57 ,ColumnFilterTypesRole
71 int columnCount(
const QModelIndex & parent = QModelIndex())
const;
75 virtual QAbstractFilter* createFilter(
const QModelIndex & index,
const QVariantMap & properties)
const = 0;
82 QVariant data(
const QModelIndex & index,
int role = Qt::DisplayRole )
const;
86 QFilterGroup* filterGroup(
const QModelIndex & index)
const;
95 QIcon filterDisabledIcon()
const;
96 QIcon filterEnabledIcon()
const;
97 QList<QAbstractFilter*> filtersAtRow(
int row)
const;
101 Qt::ItemFlags flags(
const QModelIndex & index)
const;
103 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const;
105 QModelIndex index(
int row,
int column,
const QModelIndex & parent = QModelIndex())
const;
107 bool insertRows(
int row,
int count,
const QModelIndex & parent = QModelIndex());
115 QModelIndex parent(
const QModelIndex & index)
const;
119 QList<FilterTypeEntry> registeredFilterTypes()
const;
121 bool removeRows(
int row,
int count,
const QModelIndex & parent = QModelIndex());
123 int rowCount(
const QModelIndex & parent = QModelIndex() )
const;
125 bool setData(
const QModelIndex & index,
const QVariant & value,
int role = Qt::EditRole );
129 void setDefaultFilterType(
int column,
int type);
130 void setFilterDisabledIcon(
const QIcon & icon);
131 void setFilterEnabledIcon(
const QIcon & icon);
132 bool setHeaderData (
int section, Qt::Orientation orientation,
const QVariant & value,
int role = Qt::EditRole);
141 void setSourceModel(QAbstractItemModel* model);
145 QAbstractItemModel* sourceModel()
const;
153 bool registerFilter(
int type,
const QString & text,
const QString & toolTip = QString());
157 bool registerFilter(
int type,
const QIcon & icon,
const QString & text,
const QString & toolTip = QString());
159 void sourceModelLayoutChanged();
161 QAbstractFilterModelPrivate* d;
164 #endif // QABSTRACTFILTERMODEL_H
The QAbstractFilterProxyModel provides an abstract base class for filter models.
Definition: qabstractfilterproxymodel.h:32
Definition: qabstractfiltermodel.h:45
The QAbstractFilterModel class provides the abstract interface for filter model classes.
Definition: qabstractfiltermodel.h:41
The QFilterGroup class groups filter definitions.
Definition: qfiltergroup.h:31
The QAbstractFilter class provides a base class for filter definitions used with a QAdvancedTableView...
Definition: qabstractfilter.h:41
FilterProxyMode
This enum describes the modes of a filter proxy.
Definition: qaiv.h:79
FilterMatchMode
This enumj describes the filter match mode.
Definition: qaiv.h:84
ItemDataRole
Definition: qabstractfiltermodel.h:54