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
Signals | Public Member Functions | Properties | List of all members
QUniqueValuesProxyModel Class Reference

The QUniqueValuesProxyModel provides a filter model remove duplicate values from a source model. More...

#include <quniquevaluesproxymodel.h>

Inheritance diagram for QUniqueValuesProxyModel:


void progressChanged (int progress)

Public Member Functions

 QUniqueValuesProxyModel (QObject *parent=0)
 ~QUniqueValuesProxyModel ()
QVariant data (const QModelIndex &index, int role) const
bool emptyItemsAllowed () const
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const
virtual bool insertRows (int row, int count, const QModelIndex &parent=QModelIndex())
int modelColumn () const
void setEmptyItemsAllowed (bool on)
void setModelColumn (int colum)
void setSourceModel (QAbstractItemModel *sourceModel)


bool emptyItemsAllowed
int modelColumn

Detailed Description

The QUniqueValuesProxyModel provides a filter model remove duplicate values from a source model.

Constructor & Destructor Documentation

QUniqueValuesProxyModel::QUniqueValuesProxyModel ( QObject *  parent = 0)

Contructs a unqiue values model with the given parent.

QUniqueValuesProxyModel::~QUniqueValuesProxyModel ( )

Destroys the unique values model.

Member Function Documentation

QVariant QUniqueValuesProxyModel::data ( const QModelIndex &  index,
int  role 
) const


bool QUniqueValuesProxyModel::filterAcceptsRow ( int  source_row,
const QModelIndex &  source_parent 
) const

Returns true if the item in the row indicated by the given source_row and source_parent contains a unique value in the model; otherwise returns false.

By default, the Qt::DisplayRole is used to determine if the row should be accepted or not.
int QUniqueValuesProxyModel::modelColumn ( ) const

Returns model column used to determine unique value.

See also
void QUniqueValuesProxyModel::setModelColumn ( int  colum)

Sets model column used to determine unique value to column.

See also
void QUniqueValuesProxyModel::setSourceModel ( QAbstractItemModel *  sourceModel)


Property Documentation

int QUniqueValuesProxyModel::modelColumn

This property holds the column in the model that is use for filtering.

See also
int modelColumn() const
void setModelColumn(int)

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