34 QStringList::const_iterator labelIt = labels.constBegin();
36 for ( ; labelIt != labels.constEnd(); ++labelIt )
55 QDomElement composerTableElem = doc.createElement(
"ComposerTextTable" );
57 bool ok =
_writeXML( composerTableElem , doc );
58 elem.appendChild( composerTableElem );
70 attributeMaps.clear();
72 QList< QStringList >::const_iterator rowIt =
mRowText.constBegin();
73 QStringList currentStringList;
74 for ( ; rowIt !=
mRowText.constEnd(); ++rowIt )
76 currentStringList = *rowIt;
79 for (
int i = 0; i < currentStringList.size(); ++i )
81 attributeMaps.last().insert( i, QVariant( currentStringList.at( i ) ) );
QList< QStringList > mRowText
One stringlist per row.
bool readXML(const QDomElement &itemElem, const QDomDocument &doc)
Reads the properties specific to a text table from xml.
QMap< int, QVariant > QgsAttributeMap
bool writeXML(QDomElement &elem, QDomDocument &doc) const
Writes properties specific to text tables.
void setHeaderLabels(const QStringList &labels)
Sets the text to use for the header row for the table.
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.
QgsComposerTextTable(QgsComposition *c)
Stores properties of a column in a QgsComposerTable.
Graphics scene for map printing.
QList< QgsComposerTableColumn * > mColumns
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.
bool getFeatureAttributes(QList< QgsAttributeMap > &attributeMaps)
Queries the text table for text to show in the cells.