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
QSelectionListFilter Class Reference

The QSelectionListFilter class implements the filter with a fixed selection list. More...

#include <qselectionlistfilter.h>

Inheritance diagram for QSelectionListFilter:
QAbstractFilter

Public Types

enum  { Type = 6 }
 
enum  DataSource { Model, Filter }
 
- Public Types inherited from QAbstractFilter
enum  { Type = -1 }
 

Public Member Functions

 QSelectionListFilter (int row, int column)
 
QWidget * createEditor (QFilterViewItemDelegate *delegate, QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
QVariant data (int role=Qt::DisplayRole) const
 
QSelectionListFilter::DataSource dataSource () const
 
bool matches (const QVariant &value, int type) const
 
void setDataSource (QSelectionListFilter::DataSource source)
 
void setEditorData (QWidget *editor, const QModelIndex &index)
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index)
 
void setValues (const QVariantList &values)
 
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
 
virtual void addContextMenuActions (QMenu *menu, QWidget *receiver)
 
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 QSelectionListFilter class implements the filter with a fixed selection list.

QSelectionListFilter provides a filter based on predefined values.

Member Function Documentation

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

Returns the editor to be used for editing the filter data. The editor's parent widget is specified by parent, and the item options by option.

Implements QAbstractFilter.

QVariant QSelectionListFilter::data ( int  role = Qt::DisplayRole) const
virtual

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

See also
setData()
Remarks
Returns an invalid QVariant if the no data exists for the given role.

Implements QAbstractFilter.

QSelectionListFilter::DataSource QSelectionListFilter::dataSource ( ) const

Returns the data source used to populate the selection list.

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

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

Implements QAbstractFilter.

void QSelectionListFilter::setDataSource ( QSelectionListFilter::DataSource  source)

Sets the database source for the selection list.

void QSelectionListFilter::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
)
virtual

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 filter model being used.

Implements QAbstractFilter.

void QSelectionListFilter::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
)
virtual

Sets the data for the filter at the given index in the filter model to the contents of the given editor.

Implements QAbstractFilter.

void QSelectionListFilter::updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
)
virtual

Updates the filter's editor geometry specified by index according to the style option given.

Implements QAbstractFilter.


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