QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | List of all members
QgsComposerTableSortColumnsProxyModel Class Reference

Allows for filtering QgsComposerAttributeTable columns by columns which are sorted or unsorted. More...

#include <qgscomposerattributetablemodel.h>

Inheritance diagram for QgsComposerTableSortColumnsProxyModel:
Inheritance graph
[legend]

Public Types

enum  ColumnFilterType { ShowSortedColumns, ShowUnsortedColumns }
 

Public Member Functions

 QgsComposerTableSortColumnsProxyModel (QgsComposerAttributeTable *composerTable, ColumnFilterType filterType, QObject *parent=0)
 Constructor for QgsComposerTableSortColumnsProxyModel. More...
 
virtual ~QgsComposerTableSortColumnsProxyModel ()
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 
QgsComposerTableColumncolumnFromIndex (const QModelIndex &index) const
 Returns the QgsComposerTableColumn corresponding to an index in the proxy model. More...
 
QgsComposerTableColumncolumnFromRow (int row)
 Returns the QgsComposerTableColumn corresponding to a row in the proxy model. More...
 
QgsComposerTableColumncolumnFromSourceIndex (const QModelIndex &sourceIndex) const
 Returns the QgsComposerTableColumn corresponding to an index from the source QgsComposerAttributeTableColumnModel model. More...
 
virtual QVariant data (const QModelIndex &index, int role) const
 
Qt::ItemFlags flags (const QModelIndex &index) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
bool lessThan (const QModelIndex &left, const QModelIndex &right) const
 
void resetFilter ()
 Invalidates the current filter used by the proxy model. More...
 
virtual bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 

Protected Member Functions

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

Detailed Description

Allows for filtering QgsComposerAttributeTable columns by columns which are sorted or unsorted.

Definition at line 128 of file qgscomposerattributetablemodel.h.

Member Enumeration Documentation

Controls whether the proxy model shows sorted or unsorted columns

Enumerator
ShowSortedColumns 

show only sorted columns

ShowUnsortedColumns 

show only unsorted columns

Definition at line 136 of file qgscomposerattributetablemodel.h.

Constructor & Destructor Documentation

QgsComposerTableSortColumnsProxyModel::QgsComposerTableSortColumnsProxyModel ( QgsComposerAttributeTable composerTable,
ColumnFilterType  filterType,
QObject *  parent = 0 
)

Constructor for QgsComposerTableSortColumnsProxyModel.

Parameters
composerTableQgsComposerAttributeTable the model is attached to
filterTypefilter for columns, controls whether sorted or unsorted columns are shown
parentoptional parent

Definition at line 404 of file qgscomposerattributetablemodel.cpp.

QgsComposerTableSortColumnsProxyModel::~QgsComposerTableSortColumnsProxyModel ( )
virtual

Definition at line 412 of file qgscomposerattributetablemodel.cpp.

Member Function Documentation

int QgsComposerTableSortColumnsProxyModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

Definition at line 470 of file qgscomposerattributetablemodel.cpp.

QgsComposerTableColumn * QgsComposerTableSortColumnsProxyModel::columnFromIndex ( const QModelIndex &  index) const

Returns the QgsComposerTableColumn corresponding to an index in the proxy model.

Returns
QgsComposerTableColumn for specified index
Parameters
indexa QModelIndex
Note
added in 2.3
See also
columnFromRow
columnFromSourceIndex

Definition at line 440 of file qgscomposerattributetablemodel.cpp.

QgsComposerTableColumn * QgsComposerTableSortColumnsProxyModel::columnFromRow ( int  row)

Returns the QgsComposerTableColumn corresponding to a row in the proxy model.

Returns
QgsComposerTableColumn for specified row
Parameters
rowa row number
Note
added in 2.3
See also
columnFromIndex

Definition at line 589 of file qgscomposerattributetablemodel.cpp.

QgsComposerTableColumn * QgsComposerTableSortColumnsProxyModel::columnFromSourceIndex ( const QModelIndex &  sourceIndex) const

Returns the QgsComposerTableColumn corresponding to an index from the source QgsComposerAttributeTableColumnModel model.

Returns
QgsComposerTableColumn for specified index from QgsComposerAttributeTableColumnModel
Parameters
sourceIndexa QModelIndex
Note
added in 2.3
See also
columnFromRow
columnFromIndex

Definition at line 447 of file qgscomposerattributetablemodel.cpp.

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

Definition at line 476 of file qgscomposerattributetablemodel.cpp.

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

Definition at line 417 of file qgscomposerattributetablemodel.cpp.

Qt::ItemFlags QgsComposerTableSortColumnsProxyModel::flags ( const QModelIndex &  index) const

Definition at line 550 of file qgscomposerattributetablemodel.cpp.

QVariant QgsComposerTableSortColumnsProxyModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

Definition at line 516 of file qgscomposerattributetablemodel.cpp.

bool QgsComposerTableSortColumnsProxyModel::lessThan ( const QModelIndex &  left,
const QModelIndex &  right 
) const

Definition at line 455 of file qgscomposerattributetablemodel.cpp.

void QgsComposerTableSortColumnsProxyModel::resetFilter ( )

Invalidates the current filter used by the proxy model.

Note
added in 2.3

Definition at line 595 of file qgscomposerattributetablemodel.cpp.

bool QgsComposerTableSortColumnsProxyModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
virtual

Definition at line 563 of file qgscomposerattributetablemodel.cpp.


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