QAdvanced Item View  0.4
The QAIV (Qt Advanced Item Views) library provides GUI and utility classes extending the capabilities of the Qt item views.
 All Classes Functions Variables Enumerations Enumerator Properties Groups Pages
Public Slots | Public Member Functions | List of all members
QCheckStateProxyModel Class Reference

The QCheckStateProxyModel class adds check boxes to a model. More...

#include <qcheckstateproxymodel.h>

Inheritance diagram for QCheckStateProxyModel:

Public Slots

void setAllChecked (bool checked=true)
void setChecked (const QModelIndex &index, bool checked)

Public Member Functions

 QCheckStateProxyModel (QObject *parent=0)
 ~QCheckStateProxyModel ()
int checkableColumnsCount () const
QModelIndexList checkedIndexes () const
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
virtual Qt::ItemFlags flags (const QModelIndex &index) const
bool isChecked (const QModelIndex &index) const
bool isColumnCheckable (int column) const
void setColumnCheckable (int column, bool checkable=true)
void setCheckedIndexes (const QModelIndexList &indexes)
void setCheckedValues (int column, const QVariantList &values)
virtual bool setData (const QModelIndex &index, const QVariant &value, int role)
virtual void setSourceModel (QAbstractItemModel *sourceModel)

Detailed Description

The QCheckStateProxyModel class adds check boxes to a model.

Constructor & Destructor Documentation

QCheckStateProxyModel::QCheckStateProxyModel ( QObject *  parent = 0)

Constructs a QCheckStateProxyModel with the given parent.

QCheckStateProxyModel::~QCheckStateProxyModel ( )

Destroys the QCheckStateProxyModel object.

Member Function Documentation

int QCheckStateProxyModel::checkableColumnsCount ( ) const

Returns the number of columns checkable.

QModelIndexList QCheckStateProxyModel::checkedIndexes ( ) const

Returns a list with the checked indexes.

QVariant QCheckStateProxyModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
Qt::ItemFlags QCheckStateProxyModel::flags ( const QModelIndex &  index) const
bool QCheckStateProxyModel::isChecked ( const QModelIndex &  index) const

Returns true if the given model item index is checked.

bool QCheckStateProxyModel::isColumnCheckable ( int  column) const

Returns true if the column column is checkable. Otherwise false.

See also
void QCheckStateProxyModel::setAllChecked ( bool  checked = true)

If checked is true, all checkable items are checked.

void QCheckStateProxyModel::setChecked ( const QModelIndex &  index,
bool  checked 

If checked is true, the item specified by the given index is checked.

void QCheckStateProxyModel::setCheckedIndexes ( const QModelIndexList &  indexes)

Checks the item specified by the list of indexes.

void QCheckStateProxyModel::setCheckedValues ( int  column,
const QVariantList &  values 

Checks all items in the specifed column matching the list of values.

void QCheckStateProxyModel::setColumnCheckable ( int  column,
bool  checkable = true 

If checkable is true the items in the specified column are checkable.

bool QCheckStateProxyModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
void QCheckStateProxyModel::setSourceModel ( QAbstractItemModel *  sourceModel)

The documentation for this class was generated from the following files: