Public Member Functions |
| QgsComposerAttributeTableV2 (QgsComposition *composition, bool createUndoCommands) |
| ~QgsComposerAttributeTableV2 () |
virtual QString | displayName () const |
| Get multiframe display name.
|
virtual bool | writeXML (QDomElement &elem, QDomDocument &doc, bool ignoreFrames=false) const |
| Writes properties specific to attribute tables.
|
virtual bool | readXML (const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames=false) |
| Reads the properties specific to an attribute table from xml.
|
virtual void | addFrame (QgsComposerFrame *frame, bool recalcFrameSizes=true) |
| Adds a frame to the multiframe.
|
void | setSource (const ContentSource source) |
| Sets the source for attributes to show in table body.
|
ContentSource | source () const |
| Returns the source for attributes shown in the table body.
|
QgsVectorLayer * | sourceLayer () |
| Returns the source layer for the table, considering the table source mode.
|
void | setVectorLayer (QgsVectorLayer *layer) |
| Sets the vector layer from which to display feature attributes.
|
QgsVectorLayer * | vectorLayer () const |
| Returns the vector layer the attribute table is currently using.
|
void | setRelationId (const QString relationId) |
| Sets the relation id from which to display child features.
|
QString | relationId () const |
| Returns the relation id which the table displays child features from.
|
void | resetColumns () |
| Resets the attribute table's columns to match the vector layer's fields.
|
void | setComposerMap (const QgsComposerMap *map) |
| Sets the composer map to use to limit the extent of features shown in the attribute table.
|
const QgsComposerMap * | composerMap () const |
| Returns the composer map whose extents are controlling the features shown in the table.
|
void | setMaximumNumberOfFeatures (const int features) |
| Sets the maximum number of features shown by the table.
|
int | maximumNumberOfFeatures () const |
| Returns the maximum number of features to be shown by the table.
|
void | setUniqueRowsOnly (const bool uniqueOnly) |
| Sets attribute table to only show unique rows.
|
bool | uniqueRowsOnly () const |
| Returns true if the table is set to show only unique rows.
|
void | setDisplayOnlyVisibleFeatures (const bool visibleOnly) |
| Sets attribute table to only show features which are visible in a composer map item.
|
bool | displayOnlyVisibleFeatures () const |
| Returns true if the table is set to show only features visible on a corresponding composer map item.
|
void | setFilterToAtlasFeature (const bool filterToAtlas) |
| Sets attribute table to only show features which intersect the current atlas feature.
|
bool | filterToAtlasFeature () const |
| Returns true if the table is set to only show features which intersect the current atlas feature.
|
bool | filterFeatures () const |
| Returns true if a feature filter is active on the attribute table.
|
void | setFilterFeatures (const bool filter) |
| Sets whether the feature filter is active for the attribute table.
|
QString | featureFilter () const |
| Returns the current expression used to filter features for the table.
|
void | setFeatureFilter (const QString &expression) |
| Sets the expression used for filtering features in the table.
|
void | setDisplayAttributes (const QSet< int > &attr, bool refresh=true) |
| Sets the attributes to display in the table.
|
QList< QPair< int, bool > > | sortAttributes () const |
| Returns the attributes used to sort the table's features.
|
bool | getTableContents (QgsComposerTableContents &contents) |
| Queries the attribute table's vector layer for attributes to show in the table.
|
| 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.
|
QgsComposerTableColumns * | columns () |
| 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.
|
QgsComposerTableContents * | contents () |
| 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 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.
|
| 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 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.
|
QgsComposition * | composition () |
| 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.
|
QgsComposerFrame * | frame (int i) const |
| Returns a child frame from the multiframe.
|
int | frameIndex (QgsComposerFrame *frame) const |
| Returns the index of a frame within the multiframe.
|
QgsComposerFrame * | createNewFrame (QgsComposerFrame *currentFrame, QPointF pos, QSizeF size) |
| Creates a new frame and adds it to the multi frame and composition.
|
| QgsComposerObject (QgsComposition *composition) |
| Constructor.
|
virtual | ~QgsComposerObject () |
const QgsComposition * | composition () 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.
|
QgsDataDefined * | dataDefinedProperty (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.
|
Additional Inherited Members |
virtual void | refreshAttributes () |
| Refreshes the contents shown in the table by querying for new data.
|
void | recalculateFrameSizes () |
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.
|
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.
|
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.
|
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 |