18 #ifndef QGSCOMPOSERTABLEV2_H
19 #define QGSCOMPOSERTABLEV2_H
92 void setCellMargin(
const double margin );
104 void setEmptyTableBehaviour(
const EmptyTableMode mode );
120 void setEmptyTableMessage(
const QString message );
135 void setShowEmptyRows(
const bool showEmpty );
148 void setHeaderFont(
const QFont& font );
163 void setHeaderFontColor(
const QColor& color );
177 void setHeaderHAlignment(
const HeaderHAlignment alignment );
190 void setHeaderMode(
const HeaderMode mode );
204 void setContentFont(
const QFont& font );
219 void setContentFontColor(
const QColor& color );
235 void setShowGrid(
const bool showGrid );
251 void setGridStrokeWidth(
const double width );
267 void setGridColor(
const QColor& color );
282 void setBackgroundColor(
const QColor& color );
308 virtual QMap<int, QString> headerLabels()
const;
326 virtual QSizeF
minFrameSize(
const int frameIndex = -1 )
const;
328 virtual bool writeXML( QDomElement& elem, QDomDocument & doc,
bool ignoreFrames =
false )
const;
329 virtual bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc,
bool ignoreFrames =
false );
331 virtual void render( QPainter* p,
const QRectF& renderExtent,
const int frameIndex );
340 virtual void refreshAttributes();
400 virtual bool calculateMaxColumnWidths();
413 double totalHeight()
const;
419 int rowsVisible(
const int frameIndex )
const;
427 int rowsVisible(
const double frameHeight,
const bool includeHeader )
const;
435 QPair<int, int> rowRange(
const QRectF extent,
const int frameIndex )
const;
443 void drawHorizontalGridLines( QPainter* painter,
const int rows,
const bool drawHeaderLines )
const;
457 void drawVerticalGridLines( QPainter* painter,
const QMap<int, double>& maxWidthMap,
const int numberRows,
const bool hasHeader,
const bool mergeCells =
false )
const;
461 void recalculateTableSize();
470 friend class TestQgsComposerTableV2;
473 #endif // QGSCOMPOSERTABLEV2_H