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 Types | Public Member Functions | List of all members
QSpecialFilter Class Reference

The QTextFilter class implements a conditonal filter. More...

#include <qspecialfilter.h>

Inheritance diagram for QSpecialFilter:

Public Types

enum  { Type = 7 }
enum  MatchFlag {
  MatchFlagInvalid = -1, Contains = 1, ContainsNot, EndsWith,
  EndsNotWith, IsBetween, IsEmpty, IsEqual,
  IsGreator, IsGreatorOrEqual, IsLessOrEqual, IsLess,
  IsNotBetween, IsNotEmpty, IsNotEqual, StartsWith,
- Public Types inherited from QAbstractFilter
enum  { Type = -1 }

Public Member Functions

 QSpecialFilter (int row, int column)
QWidget * createEditor (QFilterViewItemDelegate *delegate, QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
void addContextMenuActions (QMenu *menu, QWidget *receiver)
QVariant data (int role=Qt::DisplayRole) const
bool matches (const QVariant &value, int type) const
QSpecialFilter::MatchFlag matchFlag () const
void setEditorData (QWidget *editor, const QModelIndex &index)
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index)
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index)
- Public Member Functions inherited from QAbstractFilter
 QAbstractFilter ()
 QAbstractFilter (const QMap< QString, QVariant > &properties)
 ~QAbstractFilter ()
int column () const
QColor highlightColor () const
bool isEnabled () const
bool isValid () const
QVariant property (const QString &key, const QVariant &defaultValue=QVariant()) const
QMap< QString, QVariant > properties () const
int row () const
void setHighlightColor (const QColor &color)
void setEnabled (bool on)
void setProperty (const QString &name, const QVariant &value)
int type () const

Additional Inherited Members

- Static Public Attributes inherited from QAbstractFilter
static const int UserType = 65536
- Protected Member Functions inherited from QAbstractFilter
 QAbstractFilter (int type, int row, int column)

Detailed Description

The QTextFilter class implements a conditonal filter.

Constructor & Destructor Documentation

QSpecialFilter::QSpecialFilter ( int  row,
int  column 

Constructs a text filter for the given column.

Member Function Documentation

void QSpecialFilter::addContextMenuActions ( QMenu *  menu,
QWidget *  receiver 

Adds the context menu actions of this filter to given menu. The actions are connected to the specified receiver.

The default implementation does nothing.

Reimplemented from QAbstractFilter.

QWidget * QSpecialFilter::createEditor ( QFilterViewItemDelegate delegate,
QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

Implements QAbstractFilter.

QVariant QSpecialFilter::data ( int  role = Qt::DisplayRole) const

Returns the data stored under the given role for this filter.

See also
Returns an invalid QVariant if the no data exists for the given role.

Implements QAbstractFilter.

bool QSpecialFilter::matches ( const QVariant &  value,
int  type 
) const

Returns true if the given value with the conditions defined by this filter. Otherwise false.

Implements QAbstractFilter.

void QSpecialFilter::setEditorData ( QWidget *  editor,
const QModelIndex &  index 

Sets the contents of the given editor to the data for the filter at the given index. Note that the index contains information about the model being used.

Implements QAbstractFilter.

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