Quantum GIS API Documentation
1.8
|
00001 /*************************************************************************** 00002 qgscomposertexttable.h 00003 ---------------------- 00004 begin : April 2010 00005 copyright : (C) 2010 by Marco Hugentobler 00006 email : marco at hugis dot net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 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 00031 virtual int type() const { return ComposerTextTable; } 00032 00033 void setHeaderLabels( const QStringList& l ) { mHeaderLabels = l; } 00034 void addRow( const QStringList& row ) { mRowText.append( row ); } 00035 00036 bool writeXML( QDomElement& elem, QDomDocument & doc ) const; 00037 bool readXML( const QDomElement& itemElem, const QDomDocument& doc ); 00038 00039 protected: 00040 bool getFeatureAttributes( QList<QgsAttributeMap>& attributes ); 00041 QMap<int, QString> getHeaderLabels() const; 00042 00043 private: 00045 QStringList mHeaderLabels; 00047 QList< QStringList > mRowText; 00048 }; 00049 00050 #endif // QGSCOMPOSERTEXTTABLE_H