QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
QgsComposerAttributeTableCompare Class Reference

Helper class for sorting tables, takes into account sorting column and ascending / descending. More...

#include <qgscomposerattributetable.h>

Public Member Functions

 QgsComposerAttributeTableCompare ()
 
bool operator() (const QgsAttributeMap &m1, const QgsAttributeMap &m2)
 
void setSortColumn (int col)
 Sets column number to sort by. More...
 
void setAscending (bool asc)
 Sets sort order for column sorting. More...
 

Private Attributes

int mCurrentSortColumn
 
bool mAscending
 

Detailed Description

Helper class for sorting tables, takes into account sorting column and ascending / descending.

Definition at line 27 of file qgscomposerattributetable.h.

Constructor & Destructor Documentation

QgsComposerAttributeTableCompare::QgsComposerAttributeTableCompare ( )

Definition at line 26 of file qgscomposerattributetable.cpp.

Member Function Documentation

bool QgsComposerAttributeTableCompare::operator() ( const QgsAttributeMap m1,
const QgsAttributeMap m2 
)

Definition at line 32 of file qgscomposerattributetable.cpp.

References mAscending, and mCurrentSortColumn.

void QgsComposerAttributeTableCompare::setAscending ( bool  asc)
inline

Sets sort order for column sorting.

Parameters
ascset to true to sort in ascending order, false to sort in descending order

Definition at line 41 of file qgscomposerattributetable.h.

Referenced by QgsComposerAttributeTable::getFeatureAttributes().

void QgsComposerAttributeTableCompare::setSortColumn ( int  col)
inline

Sets column number to sort by.

Parameters
colcolumn number for sorting

Definition at line 36 of file qgscomposerattributetable.h.

Referenced by QgsComposerAttributeTable::getFeatureAttributes().

Member Data Documentation

bool QgsComposerAttributeTableCompare::mAscending
private

Definition at line 45 of file qgscomposerattributetable.h.

Referenced by operator()().

int QgsComposerAttributeTableCompare::mCurrentSortColumn
private

Definition at line 44 of file qgscomposerattributetable.h.

Referenced by operator()().


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