24 #include <qaivlib_global.h>
26 #include <QAbstractProxyModel>
90 AutoFilterRole = Qt::UserRole + 42101,
92 DefaultFilterTypeRole,
93 ColumnFilterTypesRole,
94 ConditionalDecorationRole,
95 SelectionListFilterDataRole,
103 QAIVLIBSHARED_EXPORT QModelIndex qSourceIndex(
const QModelIndex & index);
104 QAIVLIBSHARED_EXPORT
const QAbstractItemModel* qSourceModel(
const QModelIndex & index);
105 QAIVLIBSHARED_EXPORT QAbstractItemModel* qSourceModel(QAbstractItemModel* model);
114 QModelIndex i(index);
115 T s = qobject_cast<T>(i.model());
119 QAbstractProxyModel* p;
120 while((p = qobject_cast<QAbstractProxyModel*>((QAbstractProxyModel*)i.model()))){
121 T s = qobject_cast<T>(p);
125 i = p->mapToSource(i);
136 QAbstractItemModel* m = model;
137 T s = qobject_cast<T>(m);
141 QAbstractProxyModel* p;
142 while((p = qobject_cast<QAbstractProxyModel*>(m))){
143 T s = qobject_cast<T>(p->sourceModel());
147 m = p->sourceModel();
159 const QAbstractItemModel* m = model;
160 T s = qobject_cast<T>(m);
164 QAbstractProxyModel* p;
165 while((p = qobject_cast<QAbstractProxyModel*>(m))){
166 T s = qobject_cast<T>(p->sourceModel());
170 m = p->sourceModel();
175 #endif // QADVANCEDITEMVIEWS_H
ItemDataRole
This enum decribes additional item data roles.
Definition: qaiv.h:89
T qsourcemodel_cast(const QModelIndex &index)
Definition: qaiv.h:112
FilterProxyMode
This enum describes the modes of a filter proxy.
Definition: qaiv.h:79
QAdvancedItemViews.
Definition: qaiv.h:74
FilterMatchMode
This enumj describes the filter match mode.
Definition: qaiv.h:84