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.
|
The QUniqueValuesProxyModel provides a filter model remove duplicate values from a source model. More...
#include <quniquevaluesproxymodel.h>
Signals | |
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) |
Properties | |
bool | emptyItemsAllowed |
int | modelColumn |
The QUniqueValuesProxyModel provides a filter model remove duplicate values from a source model.
QUniqueValuesProxyModel::QUniqueValuesProxyModel | ( | QObject * | parent = 0 | ) |
Contructs a unqiue values model with the given parent
.
QUniqueValuesProxyModel::~QUniqueValuesProxyModel | ( | ) |
Destroys the unique values model.
QVariant QUniqueValuesProxyModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
QSortFilterProxyModel::data()
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.
int QUniqueValuesProxyModel::modelColumn | ( | ) | const |
Returns model column used to determine unique value.
void QUniqueValuesProxyModel::setModelColumn | ( | int | colum | ) |
Sets model column used to determine unique value to column
.
void QUniqueValuesProxyModel::setSourceModel | ( | QAbstractItemModel * | sourceModel | ) |
QSortFilterProxyModel::setSourceModel()
|
readwrite |
This property holds the column in the model that is use for filtering.