QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgslayoutitemtexttable.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayoutitemtexttable.h
3 ----------------------
4 begin : November 2017
5 copyright : (C) 2017 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSLAYOUTTEXTTABLE_H
19#define QGSLAYOUTTEXTTABLE_H
20
21#include "qgis_core.h"
22#include "qgis_sip.h"
23#include "qgslayouttable.h"
24
29class CORE_EXPORT QgsLayoutItemTextTable : public QgsLayoutTable
30{
31
32 Q_OBJECT
33
34 public:
35
42
43 int type() const override;
44 QString displayName() const override;
45
50
59 void addRow( const QStringList &row );
60
66 void setContents( const QVector< QStringList > &contents );
67
69
70 private:
72 QVector< QStringList > mRowText;
73};
74
75#endif // QGSLAYOUTTEXTTABLE_H
static QgsLayoutItemTextTable * create(QgsLayout *layout)
Returns a new QgsLayoutItemTextTable for the specified parent layout.
QgsLayoutItemTextTable(QgsLayout *layout)
Constructor for QgsLayoutItemTextTable, for the specified layout.
void addRow(const QStringList &row)
Adds a row to the table.
void setContents(const QVector< QStringList > &contents)
Sets the contents of the text table.
virtual int type() const =0
Returns unique multiframe type id.
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 bool getTableContents(QgsLayoutTableContents &contents)=0
Fetches the contents used for the cells in the table.
QgsLayoutTableContents & contents()
Returns the current contents of the table.
QVector< QgsLayoutTableRow > QgsLayoutTableContents
List of QgsLayoutTableRows, representing rows and column cell contents for a QgsLayoutTable.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_FACTORY
Definition qgis_sip.h:84