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 );
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;
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
QColor mContentFontColor
Table contents font color.
QFont mContentFont
Table contents font.
virtual void recalculateFrameSizes()
Recalculates the portion of the multiframe item which is shown in each of it's component frames...
QColor backgroundColor() const
Returns the color used for the background of the table.
bool showEmptyRows() const
Returns whether empty rows are drawn in the table.
bool mShowGrid
True if grid should be shown.
QColor gridColor() const
Returns the color used for grid lines in the table.
double mGridStrokeWidth
Width of grid lines.
QFont headerFont() const
Returns the font used to draw header text in the table.
QFont mHeaderFont
Header font.
virtual QSizeF totalSize() const =0
Returns the total size of the multiframe's content.
EmptyTableMode mEmptyTableMode
Behaviour for empty tables.
QColor mHeaderFontColor
Header font color.
double mCellMargin
Margin between cell borders and cell text.
HeaderMode mHeaderMode
Header display mode.
QList< QgsComposerTableRow > QgsComposerTableContents
List of QgsComposerTableRows, representing rows and column cell contents for a QgsComposerTable.
bool mShowEmptyRows
True if empty rows should be shown in the table.
double gridStrokeWidth() const
Returns the width of grid lines in the table.
double cellMargin() const
Returns the margin distance between cell borders and their contents.
Abstract base class for composer items with the ability to distribute the content to several frames (...
HeaderHAlignment mHeaderHAlignment
Alignment for table headers.
A class to display a table in the print composer, and allow the table to span over multiple frames...
QMap< int, double > mMaxColumnWidthMap
Map of maximum width for each column.
QColor contentFontColor() const
Returns the color used to draw text in table body cells.
Stores properties of a column in a QgsComposerTable.
QString emptyTableMessage() const
Returns the message for empty tables with no content rows.
Graphics scene for map printing.
virtual QSizeF minFrameSize(const int frameIndex=-1) const
Returns the minimum size for a frames, if desired.
QColor mGridColor
Color for grid lines.
QFont contentFont() const
Returns the font used to draw text in table body cells.
QgsComposerTableContents mTableContents
Contents to show in table.
QString mEmptyTableMessage
String to show in empty tables.
QgsComposerTableColumns mColumns
Columns to show in table.
virtual bool writeXML(QDomElement &elem, QDomDocument &doc, bool ignoreFrames=false) const =0
Stores state information about multiframe in DOM element.
virtual Q_DECL_DEPRECATED void render(QPainter *p, const QRectF &renderExtent)
Renders a portion of the multiframe's content into a painter.
QList< QgsComposerTableColumn * > QgsComposerTableColumns
List of column definitions for a QgsComposerTable.
virtual QSizeF fixedFrameSize(const int frameIndex=-1) const
Returns the fixed size for a frame, if desired.
QgsComposerTableColumns * columns()
Returns a pointer to the list of QgsComposerTableColumns shown in the table.
bool showGrid() const
Returns whether grid lines are drawn in the table.
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames=false)=0
Reads multiframe state information from a DOM element.
HeaderMode headerMode() const
Returns the display mode for headers in the table.
QList< QVariant > QgsComposerTableRow
List of QVariants, representing a the contents of a single row in a QgsComposerTable.
QColor mBackgroundColor
Color for table background.
QgsComposerTableContents * contents()
Returns the current contents of the table.
HeaderHAlignment headerHAlignment() const
Returns the horizontal alignment for table headers.
QColor headerFontColor() const
Returns the color used to draw header text in the table.
EmptyTableMode emptyTableBehaviour() const
Returns the behaviour mode for empty tables.