|
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 QConditionalDecoration provides a conditional decorarion for model items. More...
#include <qconditionaldecoration.h>
Public Types | |
| enum | MatchFlag { MatchFlagInvalid = -1, Contains = 1, ContainsNot, EndsWith, EndsNotWith, IsBetween, IsEmpty, IsEqual, IsGreater, IsGreaterOrEqual, IsLessOrEqual, IsLess, IsNotBetween, IsNotEmpty, IsNotEqual, StartsWith, StartsNotWith } |
Public Member Functions | |
| QConditionalDecoration () | |
| QConditionalDecoration (int column) | |
| void | addCondition (QConditionalDecoration::MatchFlag matchFlag, const QVariant &value, const QString &set, const QString &name) |
| QConditionalDecoration::MatchFlag | matchFlag (int index) const |
| int | count () const |
| QVariant | decorate (const QModelIndex &index, int role=Qt::DecorationRole) const |
| QString | iconName (int index) const |
| bool | matches (const QModelIndex &index, const QVariantMap &properties) const |
| QVariantMap | properties (int index) const |
| void | setHighlightRole (int role) |
| void | setDefaultDecoration (const QString &set, const QString &name) |
| QVariant | value (int index) const |
Public Member Functions inherited from QAbstractItemModelDecoration | |
| QAbstractItemModelDecoration () | |
| ~QAbstractItemModelDecoration () | |
| QIcon | defaultIcon () const |
| QVariant | property (const QString &key, const QVariant &defaultValue=QVariant()) const |
| QMap< QString, QVariant > | properties () const |
| bool | restoreState (const QByteArray &state) |
| QByteArray | saveState () const |
| void | setProperty (const QString &name, const QVariant &value) |
| void | setProperties (const QVariantMap &properties) |
The QConditionalDecoration provides a conditional decorarion for model items.
This enum describes the type of matches that can be used when decorating an item.
| QConditionalDecoration::QConditionalDecoration | ( | ) |
Constructs an invalid QConditionalDecoration.
| QConditionalDecoration::QConditionalDecoration | ( | int | column | ) |
Constructs a QConditionalDecoration with the specified column.
| void QConditionalDecoration::addCondition | ( | QConditionalDecoration::MatchFlag | matchFlag, |
| const QVariant & | value, | ||
| const QString & | set, | ||
| const QString & | name | ||
| ) |
Adds a condition with the given matchFlag and value.
| int QConditionalDecoration::count | ( | ) | const |
Returns the number of conditions.
|
virtual |
Returns the decoration for the given index.
Implements QAbstractItemModelDecoration.
| QString QConditionalDecoration::iconName | ( | int | index | ) | const |
Returns the icon name of the condition at the given index or QString::null if index does not exists.
| QConditionalDecoration::MatchFlag QConditionalDecoration::matchFlag | ( | int | index | ) | const |
Returns the match flag for the given index or QModelItemDecoration::MatchFlagInvalid if index does not exists.
| QVariantMap QConditionalDecoration::properties | ( | int | index | ) | const |
Returns the properties of the condition at the given index.
| void QConditionalDecoration::setHighlightRole | ( | int | role | ) |
Sets the item role that is used to query the source model's data when highlighting items.
| QVariant QConditionalDecoration::value | ( | int | index | ) | const |
Returns the value at the given index.
1.8.7