00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef QGSCOMPOSERTEXTTABLE_H
00019 #define QGSCOMPOSERTEXTTABLE_H
00020
00021 #include "qgscomposertable.h"
00022
00024 class CORE_EXPORT QgsComposerTextTable: public QgsComposerTable
00025 {
00026 public:
00027 QgsComposerTextTable( QgsComposition* c );
00028 ~QgsComposerTextTable();
00029
00030 void setHeaderLabels( const QStringList& l ) { mHeaderLabels = l; }
00031 void addRow( const QStringList& row ) { mRowText.append( row ); }
00032
00033 bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
00034 bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
00035
00036 protected:
00037 bool getFeatureAttributes( QList<QgsAttributeMap>& attributes );
00038 QMap<int, QString> getHeaderLabels() const;
00039
00040 private:
00042 QStringList mHeaderLabels;
00044 QList< QStringList > mRowText;
00045 };
00046
00047 #endif // QGSCOMPOSERTEXTTABLE_H