QGIS API Documentation
3.6.0-Noosa (5873452)
|
Stores properties of a column for a QgsLayoutTable. More...
#include <qgslayouttablecolumn.h>
Public Member Functions | |
QgsLayoutTableColumn (const QString &heading=QString()) | |
Constructor for QgsLayoutTableColumn. More... | |
QString | attribute () const |
Returns the attribute name or expression used for the column's values. More... | |
QgsLayoutTableColumn * | clone () |
Creates a duplicate column which is a deep copy of this column. More... | |
Qt::AlignmentFlag | hAlignment () const |
Returns the horizontal alignment for a column, which controls the alignment used for drawing column values within cells. More... | |
QString | heading () const |
Returns the heading for a column, which is the value displayed in the column's header cell. More... | |
bool | readXml (const QDomElement &columnElem) |
Reads the column's properties from xml. More... | |
void | setAttribute (const QString &attribute) |
Sets the attribute name or expression used for the column's values. 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... | |
void | setHeading (const QString &heading) |
Sets the heading for a column, which is the value displayed in the column's header cell. More... | |
void | setSortByRank (int rank) |
Sets the sort rank for the column. More... | |
void | setSortOrder (Qt::SortOrder order) |
Sets the sort order for the column. More... | |
void | setVAlignment (Qt::AlignmentFlag alignment) |
Sets the vertical alignment for a column, which controls the alignment used for drawing column values within cells. More... | |
void | setWidth (const double width) |
Sets the width for a column in mm. More... | |
int | sortByRank () const |
Returns the sort rank for the column. More... | |
Qt::SortOrder | sortOrder () const |
Returns the sort order for the column. More... | |
Qt::AlignmentFlag | vAlignment () const |
Returns the vertical alignment for a column, which controls the alignment used for drawing column values within cells. More... | |
double | width () const |
Returns the width for the column in mm, or 0 if column width is automatically calculated. More... | |
bool | writeXml (QDomElement &columnElem, QDomDocument &doc) const |
Writes the column's properties to xml for storage. More... | |
Friends | |
class | QgsCompositionConverter |
Stores properties of a column for a QgsLayoutTable.
Some properties of aQgsLayoutTableColumn are applicable only in certain contexts. For instance, the attribute and setAttribute methods only have an effect for QgsLayoutItemAttributeTables, and have no effect for QgsLayoutItemTextTables.
Definition at line 36 of file qgslayouttablecolumn.h.
QgsLayoutTableColumn::QgsLayoutTableColumn | ( | const QString & | heading = QString() | ) |
Constructor for QgsLayoutTableColumn.
heading | column heading |
Definition at line 22 of file qgslayouttablecolumn.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 QgsLayoutItemAttributeTable.
Definition at line 128 of file qgslayouttablecolumn.h.
QgsLayoutTableColumn * QgsLayoutTableColumn::clone | ( | ) |
Creates a duplicate column which is a deep copy of this column.
Definition at line 79 of file qgslayouttablecolumn.cpp.
|
inline |
Returns the horizontal alignment for a column, which controls the alignment used for drawing column values within cells.
Definition at line 96 of file qgslayouttablecolumn.h.
|
inline |
Returns the heading for a column, which is the value displayed in the column's header cell.
Definition at line 81 of file qgslayouttablecolumn.h.
bool QgsLayoutTableColumn::readXml | ( | const QDomElement & | columnElem | ) |
Reads the column's properties from xml.
columnElem | a QDomElement holding the column's desired properties. |
Definition at line 50 of file qgslayouttablecolumn.cpp.
|
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 QgsLayoutItemAttributeTable.
Definition at line 136 of file qgslayouttablecolumn.h.
|
inline |
Sets the horizontal alignment for a column, which controls the alignment used for drawing column values within cells.
Definition at line 104 of file qgslayouttablecolumn.h.
|
inline |
Sets the heading for a column, which is the value displayed in the column's header cell.
Definition at line 88 of file qgslayouttablecolumn.h.
|
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. If the sort rank is <= 0 then the column is not being sorted.
Definition at line 183 of file qgslayouttablecolumn.h.
|
inline |
Sets the sort order for the column.
This property is only used when the column is part of a QgsLayoutItemAttributeTable and when sortByRank() is > 0.
Definition at line 154 of file qgslayouttablecolumn.h.
|
inline |
Sets the vertical alignment for a column, which controls the alignment used for drawing column values within cells.
Definition at line 120 of file qgslayouttablecolumn.h.
|
inline |
Sets the width for a column in mm.
Set the width to 0 if the column width is to be automatically calculated.
Definition at line 74 of file qgslayouttablecolumn.h.
|
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 QgsLayoutItemAttributeTable.
If sort rank is <= 0 then the column is not being sorted.
Definition at line 169 of file qgslayouttablecolumn.h.
|
inline |
Returns the sort order for the column.
This property is only used when the column is part of a QgsLayoutItemAttributeTable and when sortByRank is > 0.
Definition at line 145 of file qgslayouttablecolumn.h.
|
inline |
Returns the vertical alignment for a column, which controls the alignment used for drawing column values within cells.
Definition at line 112 of file qgslayouttablecolumn.h.
|
inline |
Returns the width for the column in mm, or 0 if column width is automatically calculated.
Definition at line 68 of file qgslayouttablecolumn.h.
bool QgsLayoutTableColumn::writeXml | ( | QDomElement & | columnElem, |
QDomDocument & | doc | ||
) | const |
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 26 of file qgslayouttablecolumn.cpp.
|
friend |
Definition at line 202 of file qgslayouttablecolumn.h.