QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
36 return tr(
"<Text table frame>" );
46 mRowText.append( row );
60 for (
const QStringList &row : std::as_const( mRowText ) )
64 for (
int i = 0; i <
mColumns.count(); ++i )
66 if ( i < row.count() )
68 currentRow << row.at( i );
72 currentRow << QString();
void addRow(const QStringList &row)
Adds a row to the table.
const QgsLayout * layout() const
Returns the layout the object is attached to.
void setContents(const QVector< QStringList > &contents)
Sets the contents of the text table.
QString displayName() const override
Returns the multiframe display name.
QVector< QgsLayoutTableRow > QgsLayoutTableContents
List of QgsLayoutTableRows, representing rows and column cell contents for a QgsLayoutTable.
bool getTableContents(QgsLayoutTableContents &contents) override
Fetches the contents used for the cells in the table.
QgsLayoutTableContents & contents()
Returns the current contents of the table.
static QgsLayoutItemTextTable * create(QgsLayout *layout)
Returns a new QgsLayoutItemTextTable for the specified parent layout.
int type() const override
Returns unique multiframe type id.
A class to display a table in the print layout, and allow the table to span over multiple frames.
virtual void refreshAttributes()
Refreshes the contents shown in the table by querying for new data.
void recalculateTableSize()
Recalculates and updates the size of the table and all table frames.
QgsLayoutItemTextTable(QgsLayout *layout)
Constructor for QgsLayoutItemTextTable, for the specified layout.
A text table item that reads text from string lists.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
@ LayoutTextTable
Preset text table.
QVector< QVariant > QgsLayoutTableRow
List of QVariants, representing a the contents of a single row in a QgsLayoutTable.
QgsLayoutTableColumns mColumns
Columns to show in table.