Stores properties of a column for a QgsLayoutTable.
More...
#include <qgslayouttablecolumn.h>
|
| 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...
|
|
Q_DECL_DEPRECATED 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 | operator== (const QgsLayoutTableColumn &other) const |
|
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...
|
|
Q_DECL_DEPRECATED 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...
|
|
Q_DECL_DEPRECATED 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...
|
|
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.
- Since
- QGIS 3.0
Definition at line 37 of file qgslayouttablecolumn.h.
◆ QgsLayoutTableColumn()
QgsLayoutTableColumn::QgsLayoutTableColumn |
( |
const QString & |
heading = QString() | ) |
|
◆ attribute()
QString QgsLayoutTableColumn::attribute |
( |
| ) |
const |
|
inline |
◆ clone()
◆ hAlignment()
Qt::AlignmentFlag QgsLayoutTableColumn::hAlignment |
( |
| ) |
const |
|
inline |
◆ heading()
QString QgsLayoutTableColumn::heading |
( |
| ) |
const |
|
inline |
◆ operator==()
◆ readXml()
bool QgsLayoutTableColumn::readXml |
( |
const QDomElement & |
columnElem | ) |
|
Reads the column's properties from xml.
- Parameters
-
columnElem | a QDomElement holding the column's desired properties. |
- See also
- writeXml()
Definition at line 50 of file qgslayouttablecolumn.cpp.
◆ setAttribute()
void QgsLayoutTableColumn::setAttribute |
( |
const QString & |
attribute | ) |
|
|
inline |
◆ setHAlignment()
void QgsLayoutTableColumn::setHAlignment |
( |
Qt::AlignmentFlag |
alignment | ) |
|
|
inline |
◆ setHeading()
void QgsLayoutTableColumn::setHeading |
( |
const QString & |
heading | ) |
|
|
inline |
◆ setSortByRank()
Q_DECL_DEPRECATED void QgsLayoutTableColumn::setSortByRank |
( |
int |
rank | ) |
|
|
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.
- Note
- only applicable when used in a QgsLayoutItemAttributeTable
- See also
- sortByRank()
-
setSortOrder()
- Deprecated:
- since QGIS 3.14 the order is now hold in a dedicated model
Definition at line 184 of file qgslayouttablecolumn.h.
◆ setSortOrder()
void QgsLayoutTableColumn::setSortOrder |
( |
Qt::SortOrder |
order | ) |
|
|
inline |
◆ setVAlignment()
void QgsLayoutTableColumn::setVAlignment |
( |
Qt::AlignmentFlag |
alignment | ) |
|
|
inline |
◆ setWidth()
void QgsLayoutTableColumn::setWidth |
( |
const double |
width | ) |
|
|
inline |
Sets the width for a column in mm.
Set the width to 0 if the column width is to be automatically calculated.
- See also
- width()
Definition at line 73 of file qgslayouttablecolumn.h.
◆ sortByRank()
Q_DECL_DEPRECATED int QgsLayoutTableColumn::sortByRank |
( |
| ) |
const |
|
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.
- Note
- only applicable when used in a QgsLayoutItemAttributeTable
- See also
- setSortByRank()
-
sortOrder()
- Deprecated:
- since QGIS 3.14 the order is now hold in a dedicated model
Definition at line 169 of file qgslayouttablecolumn.h.
◆ sortOrder()
Qt::SortOrder QgsLayoutTableColumn::sortOrder |
( |
| ) |
const |
|
inline |
◆ vAlignment()
Qt::AlignmentFlag QgsLayoutTableColumn::vAlignment |
( |
| ) |
const |
|
inline |
◆ width()
double QgsLayoutTableColumn::width |
( |
| ) |
const |
|
inline |
◆ writeXml()
bool QgsLayoutTableColumn::writeXml |
( |
QDomElement & |
columnElem, |
|
|
QDomDocument & |
doc |
|
) |
| const |
Writes the column's properties to xml for storage.
- Parameters
-
columnElem | an existing QDomElement in which to store the column's properties. |
doc | QDomDocument for the destination xml. |
- See also
- readXml()
Definition at line 26 of file qgslayouttablecolumn.cpp.
◆ QgsCompositionConverter
The documentation for this class was generated from the following files: