18#ifndef QGSLAYOUTITEMMANUALTABLE_H
19#define QGSLAYOUTITEMMANUALTABLE_H
46 int type()
const override;
47 QIcon
icon()
const override;
79 QList< double >
rowHeights()
const {
return mRowHeights; }
89 void setRowHeights(
const QList< double > &heights );
109 void setColumnWidths(
const QList< double > &widths );
116 bool includeTableHeader()
const;
123 void setIncludeTableHeader(
bool included );
146 int rowSpan(
int row,
int column )
const override;
147 int columnSpan(
int row,
int column )
const override;
154 QList< double > mRowHeights;
155 QList< double > mColumnWidths;
156 bool mIncludeHeader =
false;
158 void refreshColumns();
Conditional styling for a rule.
static QgsLayoutItemManualTable * create(QgsLayout *layout)
Returns a new QgsLayoutItemManualTable for the specified parent layout.
void setTableContents(const QgsTableContents &contents)
Sets the contents of the table.
QList< double > rowHeights() const
Returns the list of row heights (in millimeters) to use when rendering the table.
QList< double > columnWidths() const
Returns the list of column widths (in millimeters) to use when rendering the table.
QgsLayoutItemManualTable(QgsLayout *layout)
Constructor for QgsLayoutItemManualTable, attached to the specified layout.
QgsTableContents tableContents() const
Returns the contents of the table.
virtual int type() const =0
Returns unique multiframe type id.
virtual QIcon icon() const
Returns the item's icon.
virtual QString displayName() const
Returns the multiframe display name.
const QgsLayout * layout() const
Returns the layout the object is attached to.
QgsLayoutTable(QgsLayout *layout)
Constructor for QgsLayoutTable, belonging to the specified layout.
virtual Qt::Alignment horizontalAlignmentForCell(int row, int column) const
Returns the horizontal alignment to use for the cell at the specified row and column.
virtual QgsConditionalStyle conditionalCellStyle(int row, int column) const
Returns the conditional style to use for the cell at row, column.
virtual int rowSpan(int row, int column) const
Returns the row span for the cell a row, column.
virtual QgsTextFormat textFormatForHeader(int column) const
Returns the text format to use for the header cell at the specified column.
virtual bool getTableContents(QgsLayoutTableContents &contents)=0
Fetches the contents used for the cells in the table.
virtual Qt::Alignment verticalAlignmentForCell(int row, int column) const
Returns the vertical alignment to use for the cell at the specified row and column.
bool writePropertiesToElement(QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context) const override
Stores multiframe state within an XML DOM element.
virtual int columnSpan(int row, int column) const
Returns the column span for the cell a row, column.
virtual QgsTextFormat textFormatForCell(int row, int column) const
Returns the text format to use for the cell at the specified row and column.
bool readPropertiesFromElement(const QDomElement &itemElem, const QDomDocument &doc, const QgsReadWriteContext &context) override
Sets multiframe state from a DOM element.
QgsLayoutTableContents & contents()
Returns the current contents of the table.
virtual bool calculateMaxRowHeights()
Calculates the maximum height of text shown in rows.
A container for the context for various read/write operations on objects.
Container for all settings relating to text rendering.
QVector< QgsLayoutTableColumn > QgsLayoutTableColumns
List of column definitions for a QgsLayoutTable.
QVector< QgsLayoutTableRow > QgsLayoutTableContents
List of QgsLayoutTableRows, representing rows and column cell contents for a QgsLayoutTable.
QVector< QgsTableRow > QgsTableContents
A set of table rows.