QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
QgsComposerTableV2 Class Reference

A class to display a table in the print composer, and allow the table to span over multiple frames. More...

#include <qgscomposertablev2.h>

Inheritance diagram for QgsComposerTableV2:
Inheritance graph
[legend]

Public Types

enum  HeaderHAlignment { FollowColumn, HeaderLeft, HeaderCenter, HeaderRight }
enum  HeaderMode { FirstFrame = 0, AllFrames, NoHeaders }
enum  EmptyTableMode { HeadersOnly = 0, HideTable, ShowMessage }
- Public Types inherited from QgsComposerMultiFrame
enum  ResizeMode { UseExistingFrames = 0, ExtendToNextPage, RepeatOnEveryPage, RepeatUntilFinished }
- Public Types inherited from QgsComposerObject
enum  DataDefinedProperty {
  NoProperty = 0, AllProperties, TestProperty, PresetPaperSize,
  PaperWidth, PaperHeight, NumPages, PaperOrientation,
  PageNumber, PositionX, PositionY, ItemWidth,
  ItemHeight, ItemRotation, Transparency, BlendMode,
  ExcludeFromExports, MapRotation, MapScale, MapXMin,
  MapYMin, MapXMax, MapYMax, MapAtlasMargin,
  PictureSource, SourceUrl
}
 Data defined properties for different item types. More...
enum  PropertyValueType { EvaluatedValue = 0, OriginalValue }
 Specifies whether the value returned by a function should be the original, user set value, or the current evaluated value for the property. More...

Public Slots

virtual void refreshAttributes ()
 Refreshes the contents shown in the table by querying for new data.
void recalculateFrameSizes ()
- Public Slots inherited from QgsComposerMultiFrame
void update ()
 Forces a redraw of all child frames.
virtual void recalculateFrameSizes ()
 Recalculates the portion of the multiframe item which is shown in each of it's component frames.
void recalculateFrameRects ()
 Forces a recalculation of all the associated frame's scene rectangles.
- Public Slots inherited from QgsComposerObject
virtual void repaint ()
 Triggers a redraw for the item.
virtual void refreshDataDefinedProperty (const DataDefinedProperty property=AllProperties)
 Refreshes a data defined property for the item by reevaluating the property's value and redrawing the item with this new value.

Public Member Functions

 QgsComposerTableV2 (QgsComposition *composition, bool createUndoCommands)
 QgsComposerTableV2 ()
virtual ~QgsComposerTableV2 ()
void setCellMargin (const double margin)
 Sets the margin distance between cell borders and their contents.
double cellMargin () const
 Returns the margin distance between cell borders and their contents.
void setEmptyTableBehaviour (const EmptyTableMode mode)
 Sets the behaviour for empty tables with no content rows.
EmptyTableMode emptyTableBehaviour () const
 Returns the behaviour mode for empty tables.
void setEmptyTableMessage (const QString message)
 Sets the message for empty tables with no content rows.
QString emptyTableMessage () const
 Returns the message for empty tables with no content rows.
void setShowEmptyRows (const bool showEmpty)
 Sets whether empty rows should be drawn.
bool showEmptyRows () const
 Returns whether empty rows are drawn in the table.
void setHeaderFont (const QFont &font)
 Sets the font used to draw header text in the table.
QFont headerFont () const
 Returns the font used to draw header text in the table.
void setHeaderFontColor (const QColor &color)
 Sets the color used to draw header text in the table.
QColor headerFontColor () const
 Returns the color used to draw header text in the table.
void setHeaderHAlignment (const HeaderHAlignment alignment)
 Sets the horizontal alignment for table headers.
HeaderHAlignment headerHAlignment () const
 Returns the horizontal alignment for table headers.
void setHeaderMode (const HeaderMode mode)
 Sets the display mode for headers in the table.
HeaderMode headerMode () const
 Returns the display mode for headers in the table.
void setContentFont (const QFont &font)
 Sets the font used to draw text in table body cells.
QFont contentFont () const
 Returns the font used to draw text in table body cells.
void setContentFontColor (const QColor &color)
 Sets the color used to draw text in table body cells.
QColor contentFontColor () const
 Returns the color used to draw text in table body cells.
void setShowGrid (const bool showGrid)
 Sets whether grid lines should be drawn in the table.
bool showGrid () const
 Returns whether grid lines are drawn in the table.
void setGridStrokeWidth (const double width)
 Sets the width for grid lines in the table.
double gridStrokeWidth () const
 Returns the width of grid lines in the table.
void setGridColor (const QColor &color)
 Sets color used for grid lines in the table.
QColor gridColor () const
 Returns the color used for grid lines in the table.
void setBackgroundColor (const QColor &color)
 Sets color used for background of table.
QColor backgroundColor () const
 Returns the color used for the background of the table.
QgsComposerTableColumnscolumns ()
 Returns a pointer to the list of QgsComposerTableColumns shown in the table.
void setColumns (QgsComposerTableColumns columns)
 Replaces the columns in the table with a specified list of QgsComposerTableColumns.
virtual QMap< int, QString > headerLabels () const
 Returns the text used in the column headers for the table.
virtual bool getTableContents (QgsComposerTableContents &contents)=0
 Fetches the contents used for the cells in the table.
QgsComposerTableContentscontents ()
 Returns the current contents of the table.
virtual QSizeF fixedFrameSize (const int frameIndex=-1) const
 Returns the fixed size for a frame, if desired.
virtual QSizeF minFrameSize (const int frameIndex=-1) const
 Returns the minimum size for a frames, if desired.
virtual bool writeXML (QDomElement &elem, QDomDocument &doc, bool ignoreFrames=false) const
 Stores state information about multiframe in DOM element.
virtual bool readXML (const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames=false)
 Reads multiframe state information from a DOM element.
virtual QSizeF totalSize () const
 Returns the total size of the multiframe's content.
virtual void render (QPainter *p, const QRectF &renderExtent, const int frameIndex)
 Renders a portion of the multiframe's content into a painter.
- Public Member Functions inherited from QgsComposerMultiFrame
 QgsComposerMultiFrame (QgsComposition *c, bool createUndoCommands)
 Construct a new multiframe item.
virtual ~QgsComposerMultiFrame ()
virtual Q_DECL_DEPRECATED void render (QPainter *p, const QRectF &renderExtent)
 Renders a portion of the multiframe's content into a painter.
virtual void addFrame (QgsComposerFrame *frame, bool recalcFrameSizes=true)=0
 Adds a frame to the multiframe.
virtual double findNearbyPageBreak (double yPos)
 Finds the optimal position to break a frame at.
void removeFrame (int i, const bool removeEmptyPages=false)
 Removes a frame from the multiframe.
void deleteFrames ()
 Removes and deletes all child frames.
void setResizeMode (ResizeMode mode)
 Sets the resize mode for the multiframe, and recalculates frame sizes to match.
ResizeMode resizeMode () const
 Returns the resize mode for the multiframe.
bool _writeXML (QDomElement &elem, QDomDocument &doc, bool ignoreFrames=false) const
 Stores state information about base multiframe object in DOM element.
bool _readXML (const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames=false)
 Restores state information about base multiframe object from a DOM element.
QgsCompositioncomposition ()
 Returns the parent composition for the multiframe.
bool createUndoCommands () const
 Returns whether undo commands should be created for interactions with the multiframe.
void setCreateUndoCommands (bool enabled)
 Sets whether undo commands should be created for interactions with the multiframe.
int frameCount () const
 Returns the number of frames associated with this multiframe.
QgsComposerFrameframe (int i) const
 Returns a child frame from the multiframe.
int frameIndex (QgsComposerFrame *frame) const
 Returns the index of a frame within the multiframe.
QgsComposerFramecreateNewFrame (QgsComposerFrame *currentFrame, QPointF pos, QSizeF size)
 Creates a new frame and adds it to the multi frame and composition.
virtual QString displayName () const
 Get multiframe display name.
- Public Member Functions inherited from QgsComposerObject
 QgsComposerObject (QgsComposition *composition)
 Constructor.
virtual ~QgsComposerObject ()
const QgsCompositioncomposition () const
 Returns the composition the item is attached to.
virtual bool writeXML (QDomElement &elem, QDomDocument &doc) const
 Stores item state in DOM element.
virtual bool readXML (const QDomElement &itemElem, const QDomDocument &doc)
 Sets item state from DOM element.
QgsDataDefineddataDefinedProperty (const DataDefinedProperty property) const
 Returns a reference to the data defined settings for one of the item's data defined properties.
void setDataDefinedProperty (const DataDefinedProperty property, const bool active, const bool useExpression, const QString &expression, const QString &field)
 Sets parameters for a data defined property for the item.

Protected Member Functions

virtual bool calculateMaxColumnWidths ()
 Calculates the maximum width of text shown in columns.
double totalWidth ()
 Returns total width of table contents.
double totalHeight () const
 Returns total height of table contents.
int rowsVisible (const int frameIndex) const
 Calculates how many content rows are visible within a given frame.
int rowsVisible (const double frameHeight, const bool includeHeader) const
 Calculates how many content rows would be visible within a specified height.
QPair< int, int > rowRange (const QRectF extent, const int frameIndex) const
 Calculates a range of rows which should be visible in a given frame extent.
void drawHorizontalGridLines (QPainter *painter, const int rows, const bool drawHeaderLines) const
 Draws the horizontal grid lines for the table.
void drawVerticalGridLines (QPainter *painter, const QMap< int, double > &maxWidthMap, const int numberRows, const bool hasHeader, const bool mergeCells=false) const
 Draws the vertical grid lines for the table.
void recalculateTableSize ()
 Recalculates and updates the size of the table and all table frames.
bool contentsContainsRow (const QgsComposerTableContents &contents, const QgsComposerTableRow &row) const
 Checks whether a table contents contains a given row.

Protected Attributes

double mCellMargin
 Margin between cell borders and cell text.
EmptyTableMode mEmptyTableMode
 Behaviour for empty tables.
QString mEmptyTableMessage
 String to show in empty tables.
bool mShowEmptyRows
 True if empty rows should be shown in the table.
QFont mHeaderFont
 Header font.
QColor mHeaderFontColor
 Header font color.
HeaderHAlignment mHeaderHAlignment
 Alignment for table headers.
HeaderMode mHeaderMode
 Header display mode.
QFont mContentFont
 Table contents font.
QColor mContentFontColor
 Table contents font color.
bool mShowGrid
 True if grid should be shown.
double mGridStrokeWidth
 Width of grid lines.
QColor mGridColor
 Color for grid lines.
QColor mBackgroundColor
 Color for table background.
QgsComposerTableColumns mColumns
 Columns to show in table.
QgsComposerTableContents mTableContents
 Contents to show in table.
QMap< int, double > mMaxColumnWidthMap
 Map of maximum width for each column.
QSizeF mTableSize
- Protected Attributes inherited from QgsComposerMultiFrame
QList< QgsComposerFrame * > mFrameItems
ResizeMode mResizeMode
bool mCreateUndoCommands
 True: creates QgsMultiFrameCommands on internal changes (e.g.
- Protected Attributes inherited from QgsComposerObject
QgsCompositionmComposition
QMap
< QgsComposerObject::DataDefinedProperty,
QString > 
mDataDefinedNames
 Map of data defined properties for the item to string name to use when exporting item to xml.

Friends

class TestQgsComposerTableV2

Additional Inherited Members

- Signals inherited from QgsComposerMultiFrame
void changed ()
 Emitted when the properties of a multi frame have changed, and the GUI item widget must be updated.
void contentsChanged ()
 Emitted when the contents of the multi frame have changed and the frames must be redrawn.
- Protected Slots inherited from QgsComposerMultiFrame
void handleFrameRemoval (QgsComposerItem *item)
 Called before a frame is going to be removed.
void handlePageChange ()
 Adapts to changed number of composition pages if resize type is RepeatOnEveryPage.

Detailed Description

A class to display a table in the print composer, and allow the table to span over multiple frames.

Note
added in QGIS 2.5

Member Enumeration Documentation

Controls how empty tables are displayed

Enumerator:
HeadersOnly 

show header rows only

HideTable 

hides entire table if empty

ShowMessage 

shows preset message instead of table contents

Controls how headers are horizontally aligned in a table

Enumerator:
FollowColumn 

header uses the same alignment as the column

HeaderLeft 

align headers left

HeaderCenter 

align headers to center

HeaderRight 

align headers right

Controls where headers are shown in the table

Enumerator:
FirstFrame 

header shown on first frame only

AllFrames 

headers shown on all frames

NoHeaders 

no headers shown for table

Constructor & Destructor Documentation

QgsComposerTableV2::QgsComposerTableV2 ( QgsComposition composition,
bool  createUndoCommands 
)
QgsComposerTableV2::QgsComposerTableV2 ( )
QgsComposerTableV2::~QgsComposerTableV2 ( )
virtual

Member Function Documentation

QColor QgsComposerTableV2::backgroundColor ( ) const
inline

Returns the color used for the background of the table.

Returns
table background color
See Also
setBackgroundColor
gridColor
bool QgsComposerTableV2::calculateMaxColumnWidths ( )
protectedvirtual

Calculates the maximum width of text shown in columns.

double QgsComposerTableV2::cellMargin ( ) const
inline

Returns the margin distance between cell borders and their contents.

Returns
margin for cell contents
See Also
setCellMargin
QgsComposerTableColumns* QgsComposerTableV2::columns ( )
inline

Returns a pointer to the list of QgsComposerTableColumns shown in the table.

Returns
pointer to list of columns in table
See Also
setColumns
QFont QgsComposerTableV2::contentFont ( ) const
inline

Returns the font used to draw text in table body cells.

Returns
font for table cells
See Also
setContentFont
headerFont
QColor QgsComposerTableV2::contentFontColor ( ) const
inline

Returns the color used to draw text in table body cells.

Returns
text color for table cells
See Also
setContentFontColor
contentFont
headerFontColor
QgsComposerTableContents* QgsComposerTableV2::contents ( )
inline

Returns the current contents of the table.

Excludes header cells.

Returns
table contents
bool QgsComposerTableV2::contentsContainsRow ( const QgsComposerTableContents contents,
const QgsComposerTableRow row 
) const
protected

Checks whether a table contents contains a given row.

Parameters
contentstable contents to check
rowrow to check for
Returns
true if contents contains rows
void QgsComposerTableV2::drawHorizontalGridLines ( QPainter *  painter,
const int  rows,
const bool  drawHeaderLines 
) const
protected

Draws the horizontal grid lines for the table.

Parameters
painterdestination painter for grid lines
rowsnumber of rows shown in table
drawHeaderLinesset to true to include for the table header
See Also
drawVerticalGridLines
void QgsComposerTableV2::drawVerticalGridLines ( QPainter *  painter,
const QMap< int, double > &  maxWidthMap,
const int  numberRows,
const bool  hasHeader,
const bool  mergeCells = false 
) const
protected

Draws the vertical grid lines for the table.

Parameters
painterdestination painter for grid lines
maxWidthMapQMap of int to double, where the int contains the column number and the double is the maximum width of text present in the column.
numberRowsnumber of rows of content in table frame
hasHeaderset to true if table frame includes header cells
mergeCellsset to true to merge table content cells
Note
not available in python bindings
See Also
drawVerticalGridLines
calculateMaxColumnWidths
Note
not available in python bindings
EmptyTableMode QgsComposerTableV2::emptyTableBehaviour ( ) const
inline

Returns the behaviour mode for empty tables.

This property controls how the table is drawn if it contains no content rows.

Returns
behaviour mode for empty tables
See Also
setEmptyTableBehaviour
QString QgsComposerTableV2::emptyTableMessage ( ) const
inline

Returns the message for empty tables with no content rows.

This message is displayed in the table body if the empty table behaviour is set to ShowMessage

Returns
message to show for empty tables
See Also
setEmptyTableMessage
emptyTableBehaviour
QSizeF QgsComposerTableV2::fixedFrameSize ( const int  frameIndex = -1) const
virtual

Returns the fixed size for a frame, if desired.

If the fixed frame size changes, the sizes of all frames can be recalculated by calling recalculateFrameRects().

Parameters
frameIndexframe number
Returns
fixed size for frame. If the size has a width or height of 0, then the frame size is not fixed in that direction and frames can have variable width or height accordingly.
Note
added in version 2.5
See Also
minFrameSize
recalculateFrameRects

Reimplemented from QgsComposerMultiFrame.

virtual bool QgsComposerTableV2::getTableContents ( QgsComposerTableContents contents)
pure virtual

Fetches the contents used for the cells in the table.

Returns
true if table contents were successfully retrieved.
Parameters
contentsQgsComposerTableContents to store retrieved row data in
Note
not available in python bindings

Implemented in QgsComposerAttributeTableV2.

QColor QgsComposerTableV2::gridColor ( ) const
inline

Returns the color used for grid lines in the table.

Returns
grid line color
See Also
setGridColor
showGrid
gridStrokeWidth
double QgsComposerTableV2::gridStrokeWidth ( ) const
inline

Returns the width of grid lines in the table.

Returns
grid line width
See Also
setGridStrokeWidth
showGrid
gridColor
QFont QgsComposerTableV2::headerFont ( ) const
inline

Returns the font used to draw header text in the table.

Returns
font for header cells
See Also
setHeaderFont
contentFont
QColor QgsComposerTableV2::headerFontColor ( ) const
inline

Returns the color used to draw header text in the table.

Returns
color for header text
See Also
setHeaderFontColor
headerFont
contentFontColor
HeaderHAlignment QgsComposerTableV2::headerHAlignment ( ) const
inline

Returns the horizontal alignment for table headers.

Returns
Horizontal alignment for table header cells
See Also
setHeaderHAlignment
QMap< int, QString > QgsComposerTableV2::headerLabels ( ) const
virtual

Returns the text used in the column headers for the table.

Returns
QMap of int to QString, where the int is the column index (starting at 0), and the string is the text to use for the column's header
Note
not available in python bindings
HeaderMode QgsComposerTableV2::headerMode ( ) const
inline

Returns the display mode for headers in the table.

This property controls if and where headers are shown in the table.

Returns
display mode for headers
See Also
setHeaderMode
QSizeF QgsComposerTableV2::minFrameSize ( const int  frameIndex = -1) const
virtual

Returns the minimum size for a frames, if desired.

If the minimum size changes, the sizes of all frames can be recalculated by calling recalculateFrameRects().

Parameters
frameIndexframe number
Returns
minimum size for frame. If the size has a width or height of 0, then the frame size has no minimum in that direction.
Note
added in version 2.5
See Also
fixedFrameSize
recalculateFrameRects

Reimplemented from QgsComposerMultiFrame.

bool QgsComposerTableV2::readXML ( const QDomElement &  itemElem,
const QDomDocument &  doc,
bool  ignoreFrames = false 
)
virtual

Reads multiframe state information from a DOM element.

Implementations of readXML should also call the _readXML method to restore general multiframe properties.

Parameters
itemElemis DOM element
docis the DOM document
ignoreFramesset to false to avoid read state information about child frames from DOM
See Also
_readXML

Implements QgsComposerMultiFrame.

Reimplemented in QgsComposerAttributeTableV2.

void QgsComposerTableV2::recalculateFrameSizes ( )
slot
void QgsComposerTableV2::recalculateTableSize ( )
protected

Recalculates and updates the size of the table and all table frames.

void QgsComposerTableV2::refreshAttributes ( )
virtualslot

Refreshes the contents shown in the table by querying for new data.

This also causes the column widths and size of the table to change to accommodate the new data.

See Also
adjustFrameToSize
void QgsComposerTableV2::render ( QPainter *  painter,
const QRectF &  renderExtent,
const int  frameIndex 
)
virtual

Renders a portion of the multiframe's content into a painter.

Parameters
painterdestination painter
renderExtentvisible extent of content to render into the painter.
frameIndexframe number for content
Note
added in version 2.5

Reimplemented from QgsComposerMultiFrame.

QPair< int, int > QgsComposerTableV2::rowRange ( const QRectF  extent,
const int  frameIndex 
) const
protected

Calculates a range of rows which should be visible in a given frame extent.

Parameters
extentvisible extent
frameIndexindex number for frame
Returns
row range
int QgsComposerTableV2::rowsVisible ( const int  frameIndex) const
protected

Calculates how many content rows are visible within a given frame.

Parameters
frameIndexindex number for frame
Returns
number of visible content rows (excludes header rows)
int QgsComposerTableV2::rowsVisible ( const double  frameHeight,
const bool  includeHeader 
) const
protected

Calculates how many content rows would be visible within a specified height.

Parameters
frameHeightheight of frame
includeHeaderset to true if frame would include a header row
Returns
number of visible content rows (excluding header row)
void QgsComposerTableV2::setBackgroundColor ( const QColor &  color)

Sets color used for background of table.

Parameters
colortable background color
See Also
backgroundColor
setGridColor
void QgsComposerTableV2::setCellMargin ( const double  margin)

Sets the margin distance between cell borders and their contents.

Parameters
marginmargin for cell contents
See Also
cellMargin
void QgsComposerTableV2::setColumns ( QgsComposerTableColumns  columns)

Replaces the columns in the table with a specified list of QgsComposerTableColumns.

Parameters
columnslist of QgsComposerTableColumns to show in table
See Also
columns
void QgsComposerTableV2::setContentFont ( const QFont &  font)

Sets the font used to draw text in table body cells.

Parameters
fontfont for table cells
See Also
contentFont
setHeaderFont
void QgsComposerTableV2::setContentFontColor ( const QColor &  color)

Sets the color used to draw text in table body cells.

Parameters
colortable cell text color
See Also
contentFontColor
setContentFont
setHeaderFontColor
void QgsComposerTableV2::setEmptyTableBehaviour ( const EmptyTableMode  mode)

Sets the behaviour for empty tables with no content rows.

Parameters
modebehaviour mode for empty tables
See Also
emptyTableBehaviour
void QgsComposerTableV2::setEmptyTableMessage ( const QString  message)

Sets the message for empty tables with no content rows.

This message is displayed in the table body if the empty table behaviour is set to ShowMessage

Parameters
messagemessage to show for empty tables
See Also
emptyTableMessage
setEmptyTableBehaviour
void QgsComposerTableV2::setGridColor ( const QColor &  color)

Sets color used for grid lines in the table.

Parameters
colorgrid line color
See Also
gridColor
setShowGrid
setGridStrokeWidth
void QgsComposerTableV2::setGridStrokeWidth ( const double  width)

Sets the width for grid lines in the table.

Parameters
widthgrid line width
See Also
gridStrokeWidth
setShowGrid
setGridColor
void QgsComposerTableV2::setHeaderFont ( const QFont &  font)

Sets the font used to draw header text in the table.

Parameters
fontfont for header cells
See Also
headerFont
setContentFont
void QgsComposerTableV2::setHeaderFontColor ( const QColor &  color)

Sets the color used to draw header text in the table.

Parameters
colorheader text color
See Also
headerFontColor
setHeaderFont
setContentFontColor
void QgsComposerTableV2::setHeaderHAlignment ( const HeaderHAlignment  alignment)

Sets the horizontal alignment for table headers.

Parameters
alignmentHorizontal alignment for table header cells
See Also
headerHAlignment
void QgsComposerTableV2::setHeaderMode ( const HeaderMode  mode)

Sets the display mode for headers in the table.

This property controls if and where headers are shown in the table.

Parameters
modedisplay mode for headers
See Also
headerMode
void QgsComposerTableV2::setShowEmptyRows ( const bool  showEmpty)

Sets whether empty rows should be drawn.

Tables default to hiding empty rows.

Parameters
showEmptyset to true to show empty rows in the table
See Also
showEmptyRows
void QgsComposerTableV2::setShowGrid ( const bool  showGrid)

Sets whether grid lines should be drawn in the table.

Parameters
showGridset to true to show grid lines
See Also
showGrid
setGridStrokeWidth
setGridColor
bool QgsComposerTableV2::showEmptyRows ( ) const
inline

Returns whether empty rows are drawn in the table.

Returns
true if empty rows are drawn
See Also
setShowEmptyRows
bool QgsComposerTableV2::showGrid ( ) const
inline

Returns whether grid lines are drawn in the table.

Returns
true if grid lines are shown
See Also
setShowGrid
gridStrokeWidth
gridColor
double QgsComposerTableV2::totalHeight ( ) const
protected

Returns total height of table contents.

Returns
total height
See Also
totalWidth
QSizeF QgsComposerTableV2::totalSize ( ) const
virtual

Returns the total size of the multiframe's content.

Returns
total size required for content

Implements QgsComposerMultiFrame.

double QgsComposerTableV2::totalWidth ( )
protected

Returns total width of table contents.

Returns
table width
See Also
totalHeight
bool QgsComposerTableV2::writeXML ( QDomElement &  elem,
QDomDocument &  doc,
bool  ignoreFrames = false 
) const
virtual

Stores state information about multiframe in DOM element.

Implementations of writeXML should also call the _writeXML method to save general multiframe properties.

Parameters
elemis DOM element
docis the DOM document
ignoreFramesset to false to avoid writing state information about child frames into DOM
See Also
_writeXML

Implements QgsComposerMultiFrame.

Reimplemented in QgsComposerAttributeTableV2.

Friends And Related Function Documentation

friend class TestQgsComposerTableV2
friend

Member Data Documentation

QColor QgsComposerTableV2::mBackgroundColor
protected

Color for table background.

double QgsComposerTableV2::mCellMargin
protected

Margin between cell borders and cell text.

QgsComposerTableColumns QgsComposerTableV2::mColumns
protected

Columns to show in table.

QFont QgsComposerTableV2::mContentFont
protected

Table contents font.

QColor QgsComposerTableV2::mContentFontColor
protected

Table contents font color.

QString QgsComposerTableV2::mEmptyTableMessage
protected

String to show in empty tables.

EmptyTableMode QgsComposerTableV2::mEmptyTableMode
protected

Behaviour for empty tables.

QColor QgsComposerTableV2::mGridColor
protected

Color for grid lines.

double QgsComposerTableV2::mGridStrokeWidth
protected

Width of grid lines.

QFont QgsComposerTableV2::mHeaderFont
protected

Header font.

QColor QgsComposerTableV2::mHeaderFontColor
protected

Header font color.

HeaderHAlignment QgsComposerTableV2::mHeaderHAlignment
protected

Alignment for table headers.

HeaderMode QgsComposerTableV2::mHeaderMode
protected

Header display mode.

QMap<int, double> QgsComposerTableV2::mMaxColumnWidthMap
protected

Map of maximum width for each column.

bool QgsComposerTableV2::mShowEmptyRows
protected

True if empty rows should be shown in the table.

bool QgsComposerTableV2::mShowGrid
protected

True if grid should be shown.

QgsComposerTableContents QgsComposerTableV2::mTableContents
protected

Contents to show in table.

QSizeF QgsComposerTableV2::mTableSize
protected

The documentation for this class was generated from the following files: