QGIS API Documentation
3.6.0-Noosa (5873452)
|
A class to display a table in the print layout, and allow the table to span over multiple frames. More...
#include <qgslayouttable.h>
Public Slots | |
void | recalculateFrameSizes () override |
void | refresh () override |
virtual void | refreshAttributes () |
Refreshes the contents shown in the table by querying for new data. More... | |
Public Slots inherited from QgsLayoutMultiFrame | |
void | recalculateFrameRects () |
Forces a recalculation of all the associated frame's scene rectangles. More... | |
virtual void | recalculateFrameSizes () |
Recalculates the portion of the multiframe item which is shown in each of its component frames. More... | |
void | refresh () override |
Refreshes the multiframe, causing a recalculation of any property overrides. More... | |
virtual void | refreshDataDefinedProperty (QgsLayoutObject::DataDefinedProperty property=QgsLayoutObject::AllProperties) |
Refreshes a data defined property for the multi frame by reevaluating the property's value and redrawing the item with this new value. More... | |
void | update () |
Forces a redraw of all child frames. More... | |
Public Slots inherited from QgsLayoutObject | |
virtual void | refresh () |
Refreshes the object, causing a recalculation of any property overrides. More... | |
Public Member Functions | |
QgsLayoutTable (QgsLayout *layout) | |
Constructor for QgsLayoutTable, belonging to the specified layout. More... | |
~QgsLayoutTable () override | |
QColor | backgroundColor () const |
Returns the color used for the background of the table. More... | |
double | cellMargin () const |
Returns the margin distance between cell borders and their contents in mm. More... | |
const QgsLayoutTableStyle * | cellStyle (CellStyleGroup group) const |
Returns the cell style for a cell group. More... | |
QgsLayoutTableColumns & | columns () |
Returns a reference to the list of QgsLayoutTableColumns shown in the table. More... | |
QFont | contentFont () const |
Returns the font used to draw text in table body cells. More... | |
QColor | contentFontColor () const |
Returns the color used to draw text in table body cells. More... | |
QgsLayoutTableContents & | contents () |
Returns the current contents of the table. More... | |
EmptyTableMode | emptyTableBehavior () const |
Returns the behavior mode for empty tables. More... | |
QString | emptyTableMessage () const |
Returns the message for empty tables with no content rows. More... | |
QSizeF | fixedFrameSize (int frameIndex=-1) const override |
Returns the fixed size for a frame, if desired. More... | |
virtual bool | getTableContents (QgsLayoutTableContents &contents)=0 |
Fetches the contents used for the cells in the table. More... | |
QColor | gridColor () const |
Returns the color used for grid lines in the table. More... | |
double | gridStrokeWidth () const |
Returns the width of grid lines in the table in mm. More... | |
QFont | headerFont () const |
Returns the font used to draw header text in the table. More... | |
QColor | headerFontColor () const |
Returns the color used to draw header text in the table. More... | |
HeaderHAlignment | headerHAlignment () const |
Returns the horizontal alignment for table headers. More... | |
virtual QMap< int, QString > | headerLabels () const |
Returns the text used in the column headers for the table. More... | |
HeaderMode | headerMode () const |
Returns the display mode for headers in the table. More... | |
bool | horizontalGrid () const |
Returns whether the grid's horizontal lines are drawn in the table. More... | |
QSizeF | minFrameSize (int frameIndex=-1) const override |
Returns the minimum size for a frames, if desired. More... | |
bool | readPropertiesFromElement (const QDomElement &itemElem, const QDomDocument &doc, const QgsReadWriteContext &context) override |
Sets multiframe state from a DOM element. More... | |
void | render (QgsLayoutItemRenderContext &context, const QRectF &renderExtent, int frameIndex) override |
Renders a portion of the multiframe's content into a render context. More... | |
void | setBackgroundColor (const QColor &color) |
Sets the color used for background of table. More... | |
void | setCellMargin (double margin) |
Sets the margin distance in mm between cell borders and their contents. More... | |
void | setCellStyle (CellStyleGroup group, const QgsLayoutTableStyle &style) |
Sets the cell style for a cell group. More... | |
void | setColumns (const QgsLayoutTableColumns &columns) |
Replaces the columns in the table with a specified list of QgsLayoutTableColumns. More... | |
void | setContentFont (const QFont &font) |
Sets the font used to draw text in table body cells. More... | |
void | setContentFontColor (const QColor &color) |
Sets the color used to draw text in table body cells. More... | |
void | setEmptyTableBehavior (EmptyTableMode mode) |
Sets the behavior mode for empty tables with no content rows. More... | |
void | setEmptyTableMessage (const QString &message) |
Sets the message for empty tables with no content rows. More... | |
void | setGridColor (const QColor &color) |
Sets the color used for grid lines in the table. More... | |
void | setGridStrokeWidth (double width) |
Sets the width in mm for grid lines in the table. More... | |
void | setHeaderFont (const QFont &font) |
Sets the font used to draw header text in the table. More... | |
void | setHeaderFontColor (const QColor &color) |
Sets the color used to draw header text in the table. More... | |
void | setHeaderHAlignment (HeaderHAlignment alignment) |
Sets the horizontal alignment for table headers. More... | |
void | setHeaderMode (HeaderMode mode) |
Sets the display mode for headers in the table. More... | |
void | setHorizontalGrid (bool horizontalGrid) |
Sets whether the grid's horizontal lines should be drawn in the table. More... | |
void | setShowEmptyRows (bool showEmpty) |
Sets whether empty rows should be drawn. More... | |
void | setShowGrid (bool showGrid) |
Sets whether grid lines should be drawn in the table. More... | |
void | setVerticalGrid (bool verticalGrid) |
Sets whether the grid's vertical lines should be drawn in the table. More... | |
void | setWrapBehavior (WrapBehavior behavior) |
Sets the wrap behavior for the table, which controls how text within cells is automatically wrapped. More... | |
bool | showEmptyRows () const |
Returns whether empty rows are drawn in the table. More... | |
bool | showGrid () const |
Returns whether grid lines are drawn in the table. More... | |
QSizeF | totalSize () const override |
Returns the total size of the multiframe's content, in layout units. More... | |
bool | verticalGrid () const |
Returns whether the grid's vertical lines are drawn in the table. More... | |
WrapBehavior | wrapBehavior () const |
Returns the wrap behavior for the table, which controls how text within cells is automatically wrapped. More... | |
bool | writePropertiesToElement (QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context) const override |
Stores multiframe state within an XML DOM element. More... | |
Public Member Functions inherited from QgsLayoutMultiFrame | |
QgsLayoutMultiFrame (QgsLayout *layout) | |
Construct a new multiframe item, attached to the specified layout. More... | |
~QgsLayoutMultiFrame () override | |
virtual void | addFrame (QgsLayoutFrame *frame, bool recalcFrameSizes=true) |
Adds a frame to the multiframe. More... | |
void | beginCommand (const QString &commandText, UndoCommand command=UndoNone) |
Starts new undo command for this item. More... | |
void | cancelCommand () |
Cancels the current item command and discards it. More... | |
QgsAbstractLayoutUndoCommand * | createCommand (const QString &text, int id, QUndoCommand *parent=nullptr) override |
Creates a new layout undo command with the specified text and parent. More... | |
QgsLayoutFrame * | createNewFrame (QgsLayoutFrame *currentFrame, QPointF pos, QSizeF size) |
Creates a new frame and adds it to the multi frame and layout. More... | |
void | deleteFrames () |
Removes and deletes all child frames. More... | |
virtual QString | displayName () const |
Returns the multiframe display name. More... | |
void | endCommand () |
Completes the current item command and push it onto the layout's undo stack. More... | |
virtual void | finalizeRestoreFromXml () |
Called after all pending items have been restored from XML. More... | |
virtual double | findNearbyPageBreak (double yPos) |
Finds the optimal position to break a frame at. More... | |
QgsLayoutFrame * | frame (int index) const |
Returns the child frame at a specified index from the multiframe. More... | |
int | frameCount () const |
Returns the number of frames associated with this multiframe. More... | |
int | frameIndex (QgsLayoutFrame *frame) const |
Returns the index of a frame within the multiframe. More... | |
QList< QgsLayoutFrame * > | frames () const |
Returns a list of all child frames for this multiframe. More... | |
virtual QIcon | icon () const |
Returns the item's icon. More... | |
bool | readXml (const QDomElement &itemElement, const QDomDocument &document, const QgsReadWriteContext &context, bool includeFrames=false) |
Sets the item state from a DOM element. More... | |
void | removeFrame (int index, bool removeEmptyPages=false) |
Removes a frame by index from the multiframe. More... | |
ResizeMode | resizeMode () const |
Returns the resize mode for the multiframe. More... | |
void | setResizeMode (ResizeMode mode) |
Sets the resize mode for the multiframe, and recalculates frame sizes to match. More... | |
virtual int | type () const =0 |
Returns unique multiframe type id. More... | |
QString | uuid () const |
Returns the multiframe identification string. More... | |
bool | writeXml (QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context, bool includeFrames=false) const |
Stores the multiframe state in a DOM element. More... | |
Public Member Functions inherited from QgsLayoutObject | |
QgsLayoutObject (QgsLayout *layout) | |
Constructor for QgsLayoutObject, with the specified parent layout. More... | |
QgsExpressionContext | createExpressionContext () const override |
Creates an expression context relating to the objects' current state. More... | |
QStringList | customProperties () const |
Returns list of keys stored in custom properties for the object. More... | |
QVariant | customProperty (const QString &key, const QVariant &defaultValue=QVariant()) const |
Read a custom property from the object. More... | |
QgsPropertyCollection & | dataDefinedProperties () |
Returns a reference to the object's property collection, used for data defined overrides. More... | |
const QgsPropertyCollection & | dataDefinedProperties () const |
Returns a reference to the object's property collection, used for data defined overrides. More... | |
const QgsLayout * | layout () const |
Returns the layout the object is attached to. More... | |
QgsLayout * | layout () |
Returns the layout the object is attached to. More... | |
void | removeCustomProperty (const QString &key) |
Remove a custom property from the object. More... | |
void | setCustomProperty (const QString &key, const QVariant &value) |
Set a custom property for the object. More... | |
void | setDataDefinedProperties (const QgsPropertyCollection &collection) |
Sets the objects's property collection, used for data defined overrides. More... | |
Public Member Functions inherited from QgsExpressionContextGenerator | |
virtual | ~QgsExpressionContextGenerator ()=default |
Public Member Functions inherited from QgsLayoutUndoObjectInterface | |
virtual | ~QgsLayoutUndoObjectInterface ()=default |
Destructor for QgsLayoutUndoObjectInterface. More... | |
Protected Member Functions | |
virtual bool | calculateMaxColumnWidths () |
Calculates the maximum width of text shown in columns. More... | |
virtual bool | calculateMaxRowHeights () |
Calculates the maximum height of text shown in rows. More... | |
bool | contentsContainsRow (const QgsLayoutTableContents &contents, const QgsLayoutTableRow &row) const |
Checks whether a table contents contains a given row. More... | |
void | drawHorizontalGridLines (QPainter *painter, int firstRow, int lastRow, bool drawHeaderLines) const |
Draws the horizontal grid lines for the table. More... | |
void | drawVerticalGridLines (QPainter *painter, const QMap< int, double > &maxWidthMap, int firstRow, int lastRow, bool hasHeader, bool mergeCells=false) const |
Draws the vertical grid lines for the table. More... | |
void | recalculateTableSize () |
Recalculates and updates the size of the table and all table frames. More... | |
QPair< int, int > | rowRange (int frameIndex) const |
Calculates a range of rows which should be visible in a given frame. More... | |
int | rowsVisible (double frameHeight, int firstRow, bool includeHeader, bool includeEmptyRows) const |
Calculates how many content rows would be visible within a frame of the specified height. More... | |
int | rowsVisible (int frameIndex, int firstRow, bool includeEmptyRows) const |
Calculates how many content rows are visible within a given frame. More... | |
double | totalHeight () |
Returns total height of table contents. More... | |
double | totalWidth () |
Returns total width of table contents. More... | |
Protected Member Functions inherited from QgsLayoutObject | |
bool | readObjectPropertiesFromElement (const QDomElement &parentElement, const QDomDocument &document, const QgsReadWriteContext &context) |
Sets object properties from a DOM element. More... | |
bool | writeObjectPropertiesToElement (QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context) const |
Stores object properties within an XML DOM element. More... | |
Protected Attributes | |
QColor | mBackgroundColor = Qt::white |
Color for table background. More... | |
double | mCellMargin = 1.0 |
Margin between cell borders and cell text. More... | |
QMap< CellStyleGroup, QgsLayoutTableStyle *> | mCellStyles |
QgsLayoutTableColumns | mColumns |
Columns to show in table. More... | |
QFont | mContentFont |
Table contents font. More... | |
QColor | mContentFontColor = Qt::black |
Table contents font color. More... | |
QString | mEmptyTableMessage |
String to show in empty tables. More... | |
EmptyTableMode | mEmptyTableMode = HeadersOnly |
Behavior for empty tables. More... | |
QColor | mGridColor = Qt::black |
Color for grid lines. More... | |
double | mGridStrokeWidth = 0.5 |
Width of grid lines. More... | |
QFont | mHeaderFont |
Header font. More... | |
QColor | mHeaderFontColor = Qt::black |
Header font color. More... | |
HeaderHAlignment | mHeaderHAlignment = FollowColumn |
Alignment for table headers. More... | |
HeaderMode | mHeaderMode = FirstFrame |
Header display mode. More... | |
bool | mHorizontalGrid = true |
True if grid should be shown. More... | |
QMap< int, double > | mMaxColumnWidthMap |
Map of maximum width for each column. More... | |
QMap< int, double > | mMaxRowHeightMap |
Map of maximum height for each row. More... | |
bool | mShowEmptyRows = false |
True if empty rows should be shown in the table. More... | |
bool | mShowGrid = true |
True if grid should be shown. More... | |
QgsLayoutTableContents | mTableContents |
Contents to show in table. More... | |
QSizeF | mTableSize |
bool | mVerticalGrid = true |
True if grid should be shown. More... | |
WrapBehavior | mWrapBehavior = TruncateText |
Protected Attributes inherited from QgsLayoutMultiFrame | |
QList< QgsLayoutFrame * > | mFrameItems |
ResizeMode | mResizeMode = UseExistingFrames |
Protected Attributes inherited from QgsLayoutObject | |
QgsObjectCustomProperties | mCustomProperties |
Custom properties for object. More... | |
QgsPropertyCollection | mDataDefinedProperties |
QPointer< QgsLayout > | mLayout |
Friends | |
class | QgsCompositionConverter |
class | TestQgsLayoutTable |
Additional Inherited Members | |
Signals inherited from QgsLayoutMultiFrame | |
void | contentsChanged () |
Emitted when the contents of the multi frame have changed and the frames must be redrawn. More... | |
Signals inherited from QgsLayoutObject | |
void | changed () |
Emitted when the object's properties change. More... | |
Static Public Member Functions inherited from QgsLayoutObject | |
static const QgsPropertiesDefinition & | propertyDefinitions () |
Returns the layout object property definitions. More... | |
A class to display a table in the print layout, and allow the table to span over multiple frames.
Definition at line 102 of file qgslayouttable.h.
Row or column groups for cell styling.
Definition at line 151 of file qgslayouttable.h.
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. |
Definition at line 132 of file qgslayouttable.h.
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. |
Definition at line 111 of file qgslayouttable.h.
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. |
Definition at line 122 of file qgslayouttable.h.
Controls how long strings in the table are handled.
Definition at line 142 of file qgslayouttable.h.
QgsLayoutTable::QgsLayoutTable | ( | QgsLayout * | layout | ) |
Constructor for QgsLayoutTable, belonging to the specified layout.
Definition at line 52 of file qgslayouttable.cpp.
|
override |
Definition at line 67 of file qgslayouttable.cpp.
|
inline |
Returns the color used for the background of the table.
Definition at line 412 of file qgslayouttable.h.
|
protectedvirtual |
Calculates the maximum width of text shown in columns.
Definition at line 853 of file qgslayouttable.cpp.
|
protectedvirtual |
Calculates the maximum height of text shown in rows.
Definition at line 928 of file qgslayouttable.cpp.
|
inline |
Returns the margin distance between cell borders and their contents in mm.
Definition at line 181 of file qgslayouttable.h.
const QgsLayoutTableStyle * QgsLayoutTable::cellStyle | ( | QgsLayoutTable::CellStyleGroup | group | ) | const |
Returns the cell style for a cell group.
Definition at line 771 of file qgslayouttable.cpp.
|
inline |
Returns a reference to the list of QgsLayoutTableColumns shown in the table.
Definition at line 432 of file qgslayouttable.h.
|
inline |
Returns the font used to draw text in table body cells.
Definition at line 295 of file qgslayouttable.h.
|
inline |
Returns the color used to draw text in table body cells.
Definition at line 311 of file qgslayouttable.h.
|
inline |
Returns the current contents of the table.
Excludes header cells.
Definition at line 471 of file qgslayouttable.h.
|
protected |
Checks whether a table contents contains a given row.
contents | table contents to check |
row | row to check for |
Definition at line 1276 of file qgslayouttable.cpp.
|
protected |
Draws the horizontal grid lines for the table.
painter | destination painter for grid lines |
firstRow | index corresponding to first row shown in frame |
lastRow | index corresponding to last row shown in frame. If greater than the number of content rows in the table, then the default row height will be used for the remaining rows. |
drawHeaderLines | set to true to include for the table header |
Definition at line 1079 of file qgslayouttable.cpp.
|
protected |
Draws the vertical grid lines for the table.
painter | destination painter for grid lines |
maxWidthMap | QMap of int to double, where the int contains the column number and the double is the maximum width of text present in the column. |
firstRow | index corresponding to first row shown in frame |
lastRow | index corresponding to last row shown in frame. If greater than the number of content rows in the table, then the default row height will be used for the remaining rows. |
hasHeader | set to true if table frame includes header cells |
mergeCells | set to true to merge table content cells |
Definition at line 1220 of file qgslayouttable.cpp.
|
inline |
Returns the behavior mode for empty tables.
This property controls how the table is drawn if it contains no content rows.
Definition at line 194 of file qgslayouttable.h.
|
inline |
Returns the message for empty tables with no content rows.
This message is displayed in the table body if the empty table behavior is set to ShowMessage.
Definition at line 212 of file qgslayouttable.h.
|
overridevirtual |
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().
frameIndex | frame number |
Reimplemented from QgsLayoutMultiFrame.
Definition at line 793 of file qgslayouttable.cpp.
|
pure virtual |
Fetches the contents used for the cells in the table.
contents | QgsLayoutTableContents to store retrieved row data in |
Implemented in QgsLayoutItemAttributeTable, and QgsLayoutItemTextTable.
|
inline |
Returns the color used for grid lines in the table.
Definition at line 360 of file qgslayouttable.h.
|
inline |
Returns the width of grid lines in the table in mm.
Definition at line 344 of file qgslayouttable.h.
|
inline |
Returns the font used to draw header text in the table.
Definition at line 239 of file qgslayouttable.h.
|
inline |
Returns the color used to draw header text in the table.
Definition at line 255 of file qgslayouttable.h.
|
inline |
Returns the horizontal alignment for table headers.
Definition at line 267 of file qgslayouttable.h.
|
virtual |
Returns the text used in the column headers for the table.
Definition at line 779 of file qgslayouttable.cpp.
|
inline |
Returns the display mode for headers in the table.
This property controls if and where headers are shown in the table.
Definition at line 281 of file qgslayouttable.h.
|
inline |
Returns whether the grid's horizontal lines are drawn in the table.
Definition at line 379 of file qgslayouttable.h.
|
overridevirtual |
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().
frameIndex | frame number |
Reimplemented from QgsLayoutMultiFrame.
Definition at line 799 of file qgslayouttable.cpp.
|
overridevirtual |
Sets multiframe state from a DOM element.
element | is the DOM element for the multiframe |
document | DOM document |
context | read write context |
Note that item subclasses should not rely on all other items being present in the layout at the time this method is called. Instead, any connections and links to other items must be made in the finalizeRestoreFromXml() method. E.g. when restoring a scalebar, the connection to the linked map's signals should be implemented in finalizeRestoreFromXml(), not readPropertiesFromElement().
Reimplemented from QgsLayoutMultiFrame.
Definition at line 124 of file qgslayouttable.cpp.
|
overrideslot |
Definition at line 824 of file qgslayouttable.cpp.
|
protected |
Recalculates and updates the size of the table and all table frames.
Definition at line 1267 of file qgslayouttable.cpp.
|
overrideslot |
Definition at line 197 of file qgslayouttable.cpp.
|
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.
Definition at line 811 of file qgslayouttable.cpp.
|
overridevirtual |
Renders a portion of the multiframe's content into a render context.
context | destination render painter |
renderExtent | visible extent of content to render into the painter. |
frameIndex | frame number for content |
Implements QgsLayoutMultiFrame.
Definition at line 283 of file qgslayouttable.cpp.
|
protected |
Calculates a range of rows which should be visible in a given frame.
frameIndex | index number for frame |
Definition at line 258 of file qgslayouttable.cpp.
|
protected |
Calculates how many content rows would be visible within a frame of the specified height.
frameHeight | height of frame |
firstRow | index of first row visible in frame (where 0 = first row in table) |
includeHeader | set to true if frame would include a header row |
includeEmptyRows | set to true to also include rows which would be empty in the returned count. For instance, if the frame would include all table content rows and have space left for extra rows then setting this parameter to true would also include a count of these extra blank rows. |
Definition at line 203 of file qgslayouttable.cpp.
|
protected |
Calculates how many content rows are visible within a given frame.
frameIndex | index number for frame |
firstRow | index of first row visible in frame (where 0 = first row in table) |
includeEmptyRows | set to true to also include rows which would be empty in the returned count. For instance, if the frame would include all table content rows and have space left for extra rows then setting this parameter to true would also include a count of these extra blank rows. |
Definition at line 240 of file qgslayouttable.cpp.
void QgsLayoutTable::setBackgroundColor | ( | const QColor & | color | ) |
Sets the color used for background of table.
Definition at line 728 of file qgslayouttable.cpp.
void QgsLayoutTable::setCellMargin | ( | double | margin | ) |
Sets the margin distance in mm between cell borders and their contents.
Definition at line 522 of file qgslayouttable.cpp.
void QgsLayoutTable::setCellStyle | ( | QgsLayoutTable::CellStyleGroup | group, |
const QgsLayoutTableStyle & | style | ||
) |
Sets the cell style for a cell group.
Definition at line 763 of file qgslayouttable.cpp.
void QgsLayoutTable::setColumns | ( | const QgsLayoutTableColumns & | columns | ) |
Replaces the columns in the table with a specified list of QgsLayoutTableColumns.
columns | list of QgsLayoutTableColumns to show in table. |
Definition at line 754 of file qgslayouttable.cpp.
void QgsLayoutTable::setContentFont | ( | const QFont & | font | ) |
Sets the font used to draw text in table body cells.
Definition at line 632 of file qgslayouttable.cpp.
void QgsLayoutTable::setContentFontColor | ( | const QColor & | color | ) |
Sets the color used to draw text in table body cells.
Definition at line 646 of file qgslayouttable.cpp.
void QgsLayoutTable::setEmptyTableBehavior | ( | const QgsLayoutTable::EmptyTableMode | mode | ) |
Sets the behavior mode for empty tables with no content rows.
Definition at line 537 of file qgslayouttable.cpp.
void QgsLayoutTable::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 behavior is set to ShowMessage.
Definition at line 552 of file qgslayouttable.cpp.
void QgsLayoutTable::setGridColor | ( | const QColor & | color | ) |
Sets the color used for grid lines in the table.
Definition at line 687 of file qgslayouttable.cpp.
void QgsLayoutTable::setGridStrokeWidth | ( | double | width | ) |
Sets the width in mm for grid lines in the table.
Definition at line 673 of file qgslayouttable.cpp.
void QgsLayoutTable::setHeaderFont | ( | const QFont & | font | ) |
Sets the font used to draw header text in the table.
Definition at line 579 of file qgslayouttable.cpp.
void QgsLayoutTable::setHeaderFontColor | ( | const QColor & | color | ) |
Sets the color used to draw header text in the table.
Definition at line 593 of file qgslayouttable.cpp.
void QgsLayoutTable::setHeaderHAlignment | ( | const QgsLayoutTable::HeaderHAlignment | alignment | ) |
Sets the horizontal alignment for table headers.
Definition at line 606 of file qgslayouttable.cpp.
void QgsLayoutTable::setHeaderMode | ( | const QgsLayoutTable::HeaderMode | mode | ) |
Sets the display mode for headers in the table.
This property controls if and where headers are shown in the table.
Definition at line 619 of file qgslayouttable.cpp.
void QgsLayoutTable::setHorizontalGrid | ( | bool | horizontalGrid | ) |
Sets whether the grid's horizontal lines should be drawn in the table.
horizontalGrid | set to true to draw grid's horizontal lines |
Definition at line 700 of file qgslayouttable.cpp.
void QgsLayoutTable::setShowEmptyRows | ( | bool | showEmpty | ) |
Sets whether empty rows should be drawn.
Tables default to hiding empty rows.
showEmpty | set to true to show empty rows in the table |
Definition at line 567 of file qgslayouttable.cpp.
void QgsLayoutTable::setShowGrid | ( | bool | showGrid | ) |
Sets whether grid lines should be drawn in the table.
showGrid | set to true to show grid lines |
Definition at line 659 of file qgslayouttable.cpp.
void QgsLayoutTable::setVerticalGrid | ( | bool | verticalGrid | ) |
Sets whether the grid's vertical lines should be drawn in the table.
verticalGrid | set to true to draw grid's vertical lines |
Definition at line 714 of file qgslayouttable.cpp.
void QgsLayoutTable::setWrapBehavior | ( | QgsLayoutTable::WrapBehavior | behavior | ) |
Sets the wrap behavior for the table, which controls how text within cells is automatically wrapped.
Definition at line 741 of file qgslayouttable.cpp.
|
inline |
Returns whether empty rows are drawn in the table.
Definition at line 225 of file qgslayouttable.h.
|
inline |
Returns whether grid lines are drawn in the table.
Definition at line 328 of file qgslayouttable.h.
|
protected |
Returns total height of table contents.
Definition at line 1006 of file qgslayouttable.cpp.
|
overridevirtual |
Returns the total size of the multiframe's content, in layout units.
Implements QgsLayoutMultiFrame.
Definition at line 192 of file qgslayouttable.cpp.
|
protected |
Returns total width of table contents.
Definition at line 985 of file qgslayouttable.cpp.
|
inline |
Returns whether the grid's vertical lines are drawn in the table.
Definition at line 398 of file qgslayouttable.h.
|
inline |
Returns the wrap behavior for the table, which controls how text within cells is automatically wrapped.
Definition at line 426 of file qgslayouttable.h.
|
overridevirtual |
Stores multiframe state within an XML DOM element.
element | is the DOM element to store the multiframe's properties in |
document | DOM document |
context | read write context |
Reimplemented from QgsLayoutMultiFrame.
Definition at line 76 of file qgslayouttable.cpp.
|
friend |
Definition at line 678 of file qgslayouttable.h.
|
friend |
Definition at line 677 of file qgslayouttable.h.
|
protected |
Color for table background.
Definition at line 541 of file qgslayouttable.h.
|
protected |
Margin between cell borders and cell text.
Definition at line 496 of file qgslayouttable.h.
|
protected |
Definition at line 559 of file qgslayouttable.h.
|
protected |
Columns to show in table.
Definition at line 544 of file qgslayouttable.h.
|
protected |
Table contents font.
Definition at line 520 of file qgslayouttable.h.
|
protected |
Table contents font color.
Definition at line 523 of file qgslayouttable.h.
|
protected |
String to show in empty tables.
Definition at line 502 of file qgslayouttable.h.
|
protected |
Behavior for empty tables.
Definition at line 499 of file qgslayouttable.h.
|
protected |
Color for grid lines.
Definition at line 532 of file qgslayouttable.h.
|
protected |
Width of grid lines.
Definition at line 529 of file qgslayouttable.h.
|
protected |
Header font.
Definition at line 508 of file qgslayouttable.h.
|
protected |
Header font color.
Definition at line 511 of file qgslayouttable.h.
|
protected |
Alignment for table headers.
Definition at line 514 of file qgslayouttable.h.
|
protected |
Header display mode.
Definition at line 517 of file qgslayouttable.h.
|
protected |
True if grid should be shown.
Definition at line 535 of file qgslayouttable.h.
|
protected |
Map of maximum width for each column.
Definition at line 550 of file qgslayouttable.h.
|
protected |
Map of maximum height for each row.
Definition at line 553 of file qgslayouttable.h.
|
protected |
True if empty rows should be shown in the table.
Definition at line 505 of file qgslayouttable.h.
|
protected |
True if grid should be shown.
Definition at line 526 of file qgslayouttable.h.
|
protected |
Contents to show in table.
Definition at line 547 of file qgslayouttable.h.
|
protected |
Definition at line 555 of file qgslayouttable.h.
|
protected |
True if grid should be shown.
Definition at line 538 of file qgslayouttable.h.
|
protected |
Definition at line 557 of file qgslayouttable.h.