QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
Stores properties of a column for a QgsLayoutTable. More...
#include <qgslayouttablecolumn.h>
Public Member Functions | |
QgsLayoutTableColumn (const QString &heading=QString()) | |
Constructor for QgsLayoutTableColumn. | |
QString | attribute () const |
Returns the attribute name or expression used for the column's values. | |
Q_DECL_DEPRECATED QgsLayoutTableColumn * | clone () |
Creates a duplicate column which is a deep copy of this column. | |
Qt::AlignmentFlag | hAlignment () const |
Returns the horizontal alignment for a column, which controls the alignment used for drawing column values within cells. | |
QString | heading () const |
Returns the heading for a column, which is the value displayed in the column's header cell. | |
bool | operator== (const QgsLayoutTableColumn &other) const |
bool | readXml (const QDomElement &columnElem) |
Reads the column's properties from xml. | |
void | setAttribute (const QString &attribute) |
Sets the attribute name or expression used for the column's values. | |
void | setHAlignment (Qt::AlignmentFlag alignment) |
Sets the horizontal alignment for a column, which controls the alignment used for drawing column values within cells. | |
void | setHeading (const QString &heading) |
Sets the heading for a column, which is the value displayed in the column's header cell. | |
Q_DECL_DEPRECATED void | setSortByRank (int rank) |
Sets the sort rank for the column. | |
void | setSortOrder (Qt::SortOrder order) |
Sets the sort order for the column. | |
void | setVAlignment (Qt::AlignmentFlag alignment) |
Sets the vertical alignment for a column, which controls the alignment used for drawing column values within cells. | |
void | setWidth (const double width) |
Sets the width for a column in mm. | |
Q_DECL_DEPRECATED int | sortByRank () const |
Returns the sort rank for the column. | |
Qt::SortOrder | sortOrder () const |
Returns the sort order for the column. | |
Qt::AlignmentFlag | vAlignment () const |
Returns the vertical alignment for a column, which controls the alignment used for drawing column values within cells. | |
double | width () const |
Returns the width for the column in mm, or 0 if column width is automatically calculated. | |
bool | writeXml (QDomElement &columnElem, QDomDocument &doc) const |
Writes the column's properties to xml for storage. | |
Friends | |
class | QgsCompositionConverter |
Stores properties of a column for a QgsLayoutTable.
Some properties of a QgsLayoutTableColumn 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 37 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 127 of file qgslayouttablecolumn.h.
|
inline |
Creates a duplicate column which is a deep copy of this column.
Definition at line 191 of file qgslayouttablecolumn.h.
|
inline |
Returns the horizontal alignment for a column, which controls the alignment used for drawing column values within cells.
Definition at line 95 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 80 of file qgslayouttablecolumn.h.
|
inline |
Definition at line 193 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 135 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 103 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 87 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 QgsLayoutItemAttributeTable. If the sort rank is <= 0 then the column is not being sorted.
Definition at line 184 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 153 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 119 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 73 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 144 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 111 of file qgslayouttablecolumn.h.
|
inline |
Returns the width for the column in mm, or 0 if column width is automatically calculated.
Definition at line 67 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 228 of file qgslayouttablecolumn.h.