37 for ( ; labelIt != labels.
constEnd(); ++labelIt )
58 bool ok =
_writeXML( composerTableElem, doc );
71 attributeMaps.
clear();
75 for ( ; rowIt != mRowText.
constEnd(); ++rowIt )
77 currentStringList = *rowIt;
80 for (
int i = 0; i < currentStringList.
size(); ++i )
82 attributeMaps.
last().insert( i,
QVariant( currentStringList.
at( i ) ) );
118 for ( ; rowIt != mRowText.
constEnd(); ++rowIt )
124 if ( i < ( *rowIt ).count() )
126 currentRow << ( *rowIt ).
at( i );
133 contents << currentRow;
152 if ( recalcFrameSizes )
bool getTableContents(QgsComposerTableContents &contents) override
Fetches the contents used for the cells in the table.
QMap< int, QVariant > QgsAttributeMap
QDomNode appendChild(const QDomNode &newChild)
void push_back(const T &value)
void setContents(const QList< QStringList > &contents)
Sets the contents of the text table.
const T & at(int i) const
void addRow(const QStringList &row)
Adds a row to the table.
void setHeaderLabels(const QStringList &labels)
Sets the text to use for the header row for the table.
void recalculateTableSize()
Recalculates and updates the size of the table and all table frames.
void setHeading(QString heading)
Sets the heading for a column, which is the value displayed in the columns header cell...
A class to display feature attributes in the print composer.
int count(const T &value) const
void append(const T &value)
QList< QgsComposerFrame * > mFrameItems
QgsComposerTextTable(QgsComposition *c)
virtual void addFrame(QgsComposerFrame *frame, bool recalcFrameSizes=true) override
Adds a frame to the multiframe.
A class to display a table in the print composer, and allow the table to span over multiple frames...
void recalculateFrameSizes() override
bool writeXML(QDomElement &elem, QDomDocument &doc) const override
Writes properties specific to text tables.
Stores properties of a column in a QgsComposerTable.
bool getFeatureAttributes(QList< QgsAttributeMap > &attributeMaps) override
Queries the text table for text to show in the cells.
Graphics scene for map printing.
Frame item for a composer multiframe item.
QList< QgsComposerTableColumn * > mColumns
QgsComposition * mComposition
QgsComposerTableColumns mColumns
Columns to show in table.
bool _writeXML(QDomElement &itemElem, QDomDocument &doc) const
Writes parameter that are not subclass specific in document.
bool tableReadXML(const QDomElement &itemElem, const QDomDocument &doc)
Reads the table's common properties from xml.
virtual void refreshAttributes()
Refreshes the contents shown in the table by querying for new data.
~QgsComposerTextTableV2()
QgsComposerTextTableV2(QgsComposition *c, bool createUndoCommands)
const_iterator constEnd() const
QDomElement createElement(const QString &tagName)
const_iterator constBegin() const
void addItem(QGraphicsItem *item)
bool readXML(const QDomElement &itemElem, const QDomDocument &doc) override
Reads the properties specific to a text table from xml.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QgsComposerTableContents * contents()
Returns the current contents of the table.