QGIS API Documentation
2.4.0-Chugiak
|
Stores properties of a column in a QgsComposerTable. More...
#include <qgscomposertablecolumn.h>
Public Member Functions | |
QgsComposerTableColumn () | |
virtual | ~QgsComposerTableColumn () |
virtual bool | writeXML (QDomElement &columnElem, QDomDocument &doc) const |
Writes the column's properties to xml for storage. More... | |
virtual bool | readXML (const QDomElement &columnElem) |
Reads the column's properties from xml. More... | |
QString | heading () const |
Returns the heading for a column, which is the value displayed in the columns header cell. More... | |
void | setHeading (QString heading) |
Sets the heading for a column, which is the value displayed in the columns header cell. More... | |
Qt::AlignmentFlag | hAlignment () const |
Returns the horizontal alignment for a column, which controls the alignment used for drawing column values within cells. More... | |
void | setHAlignment (Qt::AlignmentFlag alignment) |
Sets the horizontal alignment for a column, which controls the alignment used for drawing column values within cells. More... | |
QString | attribute () const |
Returns the attribute name or expression used for the column's values. More... | |
void | setAttribute (QString attribute) |
Sets the attribute name or expression used for the column's values. More... | |
Qt::SortOrder | sortOrder () const |
Returns the sort order for the column. More... | |
void | setSortOrder (Qt::SortOrder sortOrder) |
Sets the sort order for the column. More... | |
int | sortByRank () const |
Returns the sort rank for the column. More... | |
void | setSortByRank (int sortByRank) |
Sets the sort rank for the column. More... | |
QgsComposerTableColumn * | clone () |
Creates a duplicate column which is a deep copy of this column. More... | |
Private Attributes | |
QColor | mBackgroundColor |
Qt::AlignmentFlag | mHAlignment |
QString | mHeading |
QString | mAttribute |
int | mSortByRank |
Qt::SortOrder | mSortOrder |
Stores properties of a column in a QgsComposerTable.
Some properties of a QgsComposerTableColumn are applicable only in certain contexts. For instance, the attribute and setAttribute methods only have an effect for QgsComposerAttributeTables, and have no effect for QgsComposerTextTables.
Definition at line 27 of file qgscomposertablecolumn.h.
QgsComposerTableColumn::QgsComposerTableColumn | ( | ) |
Definition at line 20 of file qgscomposertablecolumn.cpp.
Referenced by clone().
|
virtual |
Definition at line 29 of file qgscomposertablecolumn.cpp.
|
inline |
Returns the attribute name or expression used for the column's values.
This property is only used when the column is part of a QgsComposerAttributeTable.
Definition at line 90 of file qgscomposertablecolumn.h.
Referenced by QgsComposerAttributeTableColumnModel::data(), QgsComposerTableSortColumnsProxyModel::data(), and QgsComposerAttributeTableColumnModel::setData().
QgsComposerTableColumn * QgsComposerTableColumn::clone | ( | ) |
Creates a duplicate column which is a deep copy of this column.
Definition at line 82 of file qgscomposertablecolumn.cpp.
References mAttribute, mHAlignment, mHeading, mSortByRank, mSortOrder, QgsComposerTableColumn(), setAttribute(), setHAlignment(), setHeading(), setSortByRank(), and setSortOrder().
|
inline |
Returns the horizontal alignment for a column, which controls the alignment used for drawing column values within cells.
Definition at line 73 of file qgscomposertablecolumn.h.
Referenced by QgsComposerAttributeTableColumnModel::data().
|
inline |
Returns the heading for a column, which is the value displayed in the columns header cell.
Definition at line 57 of file qgscomposertablecolumn.h.
Referenced by QgsComposerAttributeTableColumnModel::data(), and QgsComposerAttributeTableColumnModel::setData().
|
virtual |
Reads the column's properties from xml.
columnElem | a QDomElement holding the column's desired properties. |
Definition at line 55 of file qgscomposertablecolumn.cpp.
References mAttribute, mBackgroundColor, mHAlignment, mHeading, mSortByRank, and mSortOrder.
Referenced by QgsComposerTable::tableReadXML().
|
inline |
Sets the attribute name or expression used for the column's values.
This property is only used when the column is part of a QgsComposerAttributeTable.
attribute | attribute name or expression text for column |
Definition at line 99 of file qgscomposertablecolumn.h.
Referenced by clone(), QgsComposerAttributeTable::resetColumns(), QgsComposerAttributeTableColumnModel::setData(), and QgsComposerAttributeTable::setDisplayAttributes().
|
inline |
Sets the horizontal alignment for a column, which controls the alignment used for drawing column values within cells.
alignment | horizontal alignment for cell. |
Definition at line 81 of file qgscomposertablecolumn.h.
Referenced by clone(), and QgsComposerAttributeTableColumnModel::setData().
|
inline |
Sets the heading for a column, which is the value displayed in the columns header cell.
heading | Heading for column. |
Definition at line 65 of file qgscomposertablecolumn.h.
Referenced by clone(), QgsComposerAttributeTable::resetColumns(), QgsComposerAttributeTableColumnModel::setData(), QgsComposerAttributeTable::setDisplayAttributes(), and QgsComposerTextTable::setHeaderLabels().
|
inline |
Sets the sort rank for the column.
If the sort rank is > 0 then the column will be sorted in the table. The sort rank specifies the priority given to the column when the table is sorted by multiple columns, with lower sort ranks having higher priority. This property is only used when the column is part of a QgsComposerAttributeTable.
sortByRank | sort rank for column. If sort rank is <= 0 then the column is not being sorted. |
Definition at line 147 of file qgscomposertablecolumn.h.
Referenced by clone(), QgsComposerAttributeTableColumnModel::moveColumnInSortRank(), QgsComposerAttributeTableColumnModel::setColumnAsSorted(), and QgsComposerAttributeTableColumnModel::setColumnAsUnsorted().
|
inline |
Sets the sort order for the column.
This property is only used when the column is part of a QgsComposerAttributeTable and when sortByRank is > 0.
sortOrder | sort order for column |
Definition at line 119 of file qgscomposertablecolumn.h.
Referenced by clone(), QgsComposerAttributeTableColumnModel::setColumnAsSorted(), and QgsComposerTableSortColumnsProxyModel::setData().
|
inline |
Returns the sort rank for the column.
If the sort rank is > 0 then the column will be sorted in the table. The sort rank specifies the priority given to the column when the table is sorted by multiple columns, with lower sort ranks having higher priority. This property is only used when the column is part of a QgsComposerAttributeTable.
Definition at line 133 of file qgscomposertablecolumn.h.
Referenced by columnsBySortRank(), QgsComposerTableSortColumnsProxyModel::filterAcceptsRow(), QgsComposerTableSortColumnsProxyModel::lessThan(), and QgsComposerAttributeTableColumnModel::moveColumnInSortRank().
|
inline |
Returns the sort order for the column.
This property is only used when the column is part of a QgsComposerAttributeTable and when sortByRank is > 0.
Definition at line 109 of file qgscomposertablecolumn.h.
Referenced by QgsComposerTableSortColumnsProxyModel::data().
|
virtual |
Writes the column's properties to xml for storage.
columnElem | an existing QDomElement in which to store the column's properties. |
doc | QDomDocument for the destination xml. |
Definition at line 34 of file qgscomposertablecolumn.cpp.
References mAttribute, mBackgroundColor, mHAlignment, mHeading, mSortByRank, and mSortOrder.
|
private |
Definition at line 160 of file qgscomposertablecolumn.h.
Referenced by clone(), readXML(), and writeXML().
|
private |
Definition at line 157 of file qgscomposertablecolumn.h.
Referenced by readXML(), and writeXML().
|
private |
Definition at line 158 of file qgscomposertablecolumn.h.
Referenced by clone(), readXML(), and writeXML().
|
private |
Definition at line 159 of file qgscomposertablecolumn.h.
Referenced by clone(), readXML(), and writeXML().
|
private |
Definition at line 161 of file qgscomposertablecolumn.h.
Referenced by clone(), readXML(), and writeXML().
|
private |
Definition at line 162 of file qgscomposertablecolumn.h.
Referenced by clone(), readXML(), and writeXML().