Class: QgsLayoutTableColumn¶
-
class
qgis.core.
QgsLayoutTableColumn
(heading: str = '')¶ Bases:
PyQt5.QtCore.QObject
Constructor for QgsLayoutTableColumn.
- Parameters
heading – column heading
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.
New in version 3.0: Enums
Methods
Returns the attribute name or expression used for the column’s values.
Creates a duplicate column which is a deep copy of this column.
Returns the horizontal alignment for a column, which controls the alignment used for drawing column values within cells.
Returns the heading for a column, which is the value displayed in the column’s header cell.
Reads the column’s properties from xml.
Sets the
attribute
name or expression used for the column’s values.Sets the horizontal
alignment
for a column, which controls the alignment used for drawing column values within cells.Sets the
heading
for a column, which is the value displayed in the column’s header cell.Sets the sort
rank
for the column.Sets the sort
order
for the column.Sets the vertical
alignment
for a column, which controls the alignment used for drawing column values within cells.Sets the width for a column in mm.
Returns the sort rank for the column.
Returns the sort order for the column.
Returns the vertical alignment for a column, which controls the alignment used for drawing column values within cells.
Returns the width for the column in mm, or 0 if column width is automatically calculated.
Writes the column’s properties to xml for storage.
Signals
Attributes
-
attribute
(self) → str¶ 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
.Note
only applicable when used in a
QgsLayoutItemAttributeTable
See also
-
childEvent
()¶
-
clone
(self) → QgsLayoutTableColumn¶ Creates a duplicate column which is a deep copy of this column.
- Returns
a new QgsLayoutTableColumn with same properties as this column.
-
connectNotify
()¶
-
customEvent
()¶
-
disconnectNotify
()¶
-
hAlignment
(self) → Qt.AlignmentFlag¶ Returns the horizontal alignment for a column, which controls the alignment used for drawing column values within cells.
See also
See also
-
heading
(self) → str¶ Returns the heading for a column, which is the value displayed in the column’s header cell.
See also
-
isSignalConnected
()¶
-
readXml
(self, columnElem: QDomElement) → bool¶ Reads the column’s properties from xml.
- Parameters
columnElem – a QDomElement holding the column’s desired properties.
See also
-
receivers
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setAttribute
(self, attribute: str)¶ Sets the
attribute
name or expression used for the column’s values. This property is only used when the column is part of aQgsLayoutItemAttributeTable
.Note
only applicable when used in a
QgsLayoutItemAttributeTable
See also
-
setHAlignment
(self, alignment: Qt.AlignmentFlag)¶ Sets the horizontal
alignment
for a column, which controls the alignment used for drawing column values within cells.See also
See also
-
setHeading
(self, heading: str)¶ Sets the
heading
for a column, which is the value displayed in the column’s header cell.See also
-
setSortByRank
(self, rank: int)¶ 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 aQgsComposerAttributeTable
. If the sortrank
is <= 0 then the column is not being sorted.Note
only applicable when used in a
QgsLayoutItemAttributeTable
See also
See also
-
setSortOrder
(self, order: Qt.SortOrder)¶ 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.Note
only applicable when used in a
QgsLayoutItemAttributeTable
See also
See also
-
setVAlignment
(self, alignment: Qt.AlignmentFlag)¶ Sets the vertical
alignment
for a column, which controls the alignment used for drawing column values within cells.See also
See also
-
setWidth
(self, width: float)¶ Sets the width for a column in mm. Set the
width
to 0 if the column width is to be automatically calculated.See also
-
sortByRank
(self) → int¶ 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
See also
-
sortOrder
(self) → Qt.SortOrder¶ 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.
Note
only applicable when used in a
QgsLayoutItemAttributeTable
See also
See also
-
timerEvent
()¶
-
vAlignment
(self) → Qt.AlignmentFlag¶ Returns the vertical alignment for a column, which controls the alignment used for drawing column values within cells.
See also
See also
-
width
(self) → float¶ Returns the width for the column in mm, or 0 if column width is automatically calculated.
See also