18 #ifndef QGSCOMPOSERTABLE_H
19 #define QGSCOMPOSERTABLE_H
53 virtual void paint( QPainter* painter,
const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget )
override;
55 virtual bool writeXML( QDomElement& elem, QDomDocument & doc )
const override = 0;
56 virtual bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc )
override = 0;
62 void setLineTextDistance(
double d );
75 void setHeaderFont(
const QFont& f );
91 void setHeaderFontColor(
const QColor& color );
107 void setHeaderHAlignment(
const HeaderHAlignment alignment );
121 void setContentFont(
const QFont& f );
137 void setContentFontColor(
const QColor& color );
154 void setShowGrid(
bool show );
170 void setGridStrokeWidth(
double w );
202 virtual QMap<int, QString> headerLabels()
const;
212 virtual bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps ) { Q_UNUSED( attributeMaps );
return false; }
219 QList<QgsComposerTableColumn*>*
columns() {
return &mColumns; }
226 void setColumns( QList<QgsComposerTableColumn*> columns );
236 virtual void refreshAttributes();
245 virtual void adjustFrameToSize();
274 virtual bool calculateMaxColumnWidths( QMap<int, double>& maxWidthMap,
const QList<QgsAttributeMap>& attributeMaps )
const;
283 void adaptItemFrame(
const QMap<int, double>& maxWidthMap,
const QList<QgsAttributeMap>& attributeMaps );
290 void drawHorizontalGridLines( QPainter* p,
int nAttributes );
300 void drawVerticalGridLines( QPainter* p,
const QMap<int, double>& maxWidthMap );
308 bool tableWriteXML( QDomElement& itemElem, QDomDocument& doc )
const;
316 bool tableReadXML(
const QDomElement& itemElem,
const QDomDocument& doc );
319 #endif // QGSCOMPOSERTABLE_H