21 #ifndef QCHECKSTATEPROXYMODEL_H
22 #define QCHECKSTATEPROXYMODEL_H
24 #include <QIdentityProxyModel>
26 #include <qaivlib_global.h>
28 class QCheckStateProxyModelPrivate;
49 int checkableColumnsCount()
const;
53 QModelIndexList checkedIndexes()
const;
57 virtual QVariant data(
const QModelIndex & index,
int role = Qt::DisplayRole )
const;
61 virtual Qt::ItemFlags flags(
const QModelIndex & index )
const;
65 bool isChecked(
const QModelIndex & index)
const;
70 bool isColumnCheckable(
int column)
const;
74 void setColumnCheckable(
int column,
bool checkable =
true);
78 void setCheckedIndexes(
const QModelIndexList & indexes);
82 void setCheckedValues(
int column,
const QVariantList & values);
86 virtual bool setData(
const QModelIndex & index,
const QVariant & value,
int role );
90 virtual void setSourceModel(QAbstractItemModel *sourceModel);
95 void setAllChecked(
bool checked =
true);
99 void setChecked(
const QModelIndex & index,
bool checked);
101 void sourceModelRowsAboutToBeRemoved(
const QModelIndex & parent,
int start,
int end);
102 void sourceModelAboutToBeReset();
104 QCheckStateProxyModelPrivate* d;
107 #endif // QCHECKSTATEPROXYMODEL_H
The QCheckStateProxyModel class adds check boxes to a model.
Definition: qcheckstateproxymodel.h:34