QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Types | Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
QgsLayoutTable Class Referenceabstract

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

#include <qgslayouttable.h>

Inheritance diagram for QgsLayoutTable:
Inheritance graph
[legend]

Public Types

enum  CellStyleGroup {
  OddColumns , EvenColumns , OddRows , EvenRows ,
  FirstColumn , LastColumn , HeaderRow , FirstRow ,
  LastRow
}
 Row or column groups for cell styling. More...
 
enum  EmptyTableMode { HeadersOnly = 0 , HideTable , ShowMessage }
 Controls how empty tables are displayed. More...
 
enum  HeaderHAlignment { FollowColumn , HeaderLeft , HeaderCenter , HeaderRight }
 Controls how headers are horizontally aligned in a table. More...
 
enum  HeaderMode { FirstFrame = 0 , AllFrames , NoHeaders }
 Controls where headers are shown in the table. More...
 
enum  WrapBehavior { TruncateText = 0 , WrapText }
 Controls how long strings in the table are handled. More...
 
- Public Types inherited from QgsLayoutMultiFrame
enum  ResizeMode { UseExistingFrames = 0 , ExtendToNextPage , RepeatOnEveryPage , RepeatUntilFinished }
 Specifies the behavior for creating new frames to fit the multiframe's content. More...
 
enum  UndoCommand {
  UndoHtmlBreakDistance , UndoHtmlSource , UndoHtmlStylesheet , UndoTableCellStyle ,
  UndoTableMaximumFeatures , UndoTableMargin , UndoTableHeaderFontColor , UndoTableContentFontColor ,
  UndoTableGridStrokeWidth , UndoTableGridColor , UndoTableBackgroundColor , UndoNone = -1
}
 Multiframe item undo commands, used for collapsing undo commands. More...
 
- Public Types inherited from QgsLayoutObject
enum  DataDefinedProperty {
  NoProperty = 0 , AllProperties , TestProperty , PresetPaperSize ,
  PaperWidth , PaperHeight , NumPages , PaperOrientation ,
  PageNumber , PositionX , PositionY , ItemWidth ,
  ItemHeight , ItemRotation , Transparency , Opacity ,
  BlendMode , ExcludeFromExports , FrameColor , BackgroundColor ,
  MarginLeft , MarginTop , MarginRight , MarginBottom ,
  MapRotation , MapScale , MapXMin , MapYMin ,
  MapXMax , MapYMax , MapAtlasMargin , MapLayers ,
  MapStylePreset , MapLabelMargin , MapGridEnabled , MapGridIntervalX ,
  MapGridIntervalY , MapGridOffsetX , MapGridOffsetY , MapGridFrameSize ,
  MapGridFrameMargin , MapGridLabelDistance , MapGridCrossSize , MapGridFrameLineThickness ,
  MapGridAnnotationDisplayLeft , MapGridAnnotationDisplayRight , MapGridAnnotationDisplayTop , MapGridAnnotationDisplayBottom ,
  MapGridFrameDivisionsLeft , MapGridFrameDivisionsRight , MapGridFrameDivisionsTop , MapGridFrameDivisionsBottom ,
  PictureSource , PictureSvgBackgroundColor , PictureSvgStrokeColor , PictureSvgStrokeWidth ,
  SourceUrl , LegendTitle , LegendColumnCount , ScalebarLeftSegments ,
  ScalebarRightSegments , ScalebarSegmentWidth , ScalebarMinimumWidth , ScalebarMaximumWidth ,
  ScalebarHeight , ScalebarRightSegmentSubdivisions , ScalebarSubdivisionHeight , ScalebarFillColor ,
  ScalebarFillColor2 , ScalebarLineColor , ScalebarLineWidth , AttributeTableSourceLayer ,
  MapCrs , StartDateTime , EndDateTime , ElevationProfileTolerance ,
  ElevationProfileDistanceMajorInterval , ElevationProfileDistanceMinorInterval , ElevationProfileDistanceLabelInterval , ElevationProfileElevationMajorInterval ,
  ElevationProfileElevationMinorInterval , ElevationProfileElevationLabelInterval , ElevationProfileMinimumDistance , ElevationProfileMaximumDistance ,
  ElevationProfileMinimumElevation , ElevationProfileMaximumElevation
}
 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

void recalculateFrameSizes () override
 
void refresh () override
 
virtual void refreshAttributes ()
 Refreshes the contents shown in the table by querying for new data.
 
- Public Slots inherited from QgsLayoutMultiFrame
void recalculateFrameRects ()
 Forces a recalculation of all the associated frame's scene rectangles.
 
virtual void recalculateFrameSizes ()
 Recalculates the portion of the multiframe item which is shown in each of its component frames.
 
void refresh () override
 Refreshes the multiframe, causing a recalculation of any property overrides.
 
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.
 
void update ()
 Forces a redraw of all child frames.
 
- Public Slots inherited from QgsLayoutObject
virtual void refresh ()
 Refreshes the object, causing a recalculation of any property overrides.
 

Public Member Functions

 QgsLayoutTable (QgsLayout *layout)
 Constructor for QgsLayoutTable, belonging to the specified layout.
 
 ~QgsLayoutTable () override
 
QColor backgroundColor () const
 Returns the color used for the background of the table.
 
double cellMargin () const
 Returns the margin distance between cell borders and their contents in mm.
 
const QgsLayoutTableStylecellStyle (CellStyleGroup group) const
 Returns the cell style for a cell group.
 
QgsLayoutTableColumnscolumns ()
 Returns a reference to the list of QgsLayoutTableColumns shown in the table.
 
virtual QgsConditionalStyle conditionalCellStyle (int row, int column) const
 Returns the conditional style to use for the cell at row, column.
 
Q_DECL_DEPRECATED QFont contentFont () const
 Returns the font used to draw text in table body cells.
 
Q_DECL_DEPRECATED QColor contentFontColor () const
 Returns the color used to draw text in table body cells.
 
QgsLayoutTableContentscontents ()
 Returns the current contents of the table.
 
QgsTextFormat contentTextFormat () const
 Returns the format used to draw content text in the table.
 
EmptyTableMode emptyTableBehavior () const
 Returns the behavior mode for empty tables.
 
QString emptyTableMessage () const
 Returns the message for empty tables with no content rows.
 
QSizeF fixedFrameSize (int frameIndex=-1) const override
 Returns the fixed size for a frame, if desired.
 
virtual bool getTableContents (QgsLayoutTableContents &contents)=0
 Fetches the contents used for the cells in the table.
 
QColor gridColor () const
 Returns the color used for grid lines in the table.
 
double gridStrokeWidth () const
 Returns the width of grid lines in the table in mm.
 
Q_DECL_DEPRECATED QFont headerFont () const
 Returns the font used to draw header text in the table.
 
Q_DECL_DEPRECATED QColor headerFontColor () const
 Returns the color used to draw header text in the table.
 
HeaderHAlignment headerHAlignment () const
 Returns the horizontal alignment for table headers.
 
virtual QMap< int, QString > headerLabels () const
 Returns the text used in the column headers for the table.
 
HeaderMode headerMode () const
 Returns the display mode for headers in the table.
 
QgsTextFormat headerTextFormat () const
 Returns the format used to draw header text in the table.
 
bool horizontalGrid () const
 Returns whether the grid's horizontal lines are drawn in the table.
 
QSizeF minFrameSize (int frameIndex=-1) const override
 Returns the minimum size for a frames, if desired.
 
bool readPropertiesFromElement (const QDomElement &itemElem, const QDomDocument &doc, const QgsReadWriteContext &context) override
 Sets multiframe state from a DOM element.
 
void render (QgsLayoutItemRenderContext &context, const QRectF &renderExtent, int frameIndex) override
 Renders a portion of the multiframe's content into a render context.
 
virtual QgsExpressionContextScopescopeForCell (int row, int column) const
 Creates a new QgsExpressionContextScope for the cell at row, column.
 
void setBackgroundColor (const QColor &color)
 Sets the color used for background of table.
 
void setCellMargin (double margin)
 Sets the margin distance in mm between cell borders and their contents.
 
void setCellStyle (CellStyleGroup group, const QgsLayoutTableStyle &style)
 Sets the cell style for a cell group.
 
void setColumns (const QgsLayoutTableColumns &columns)
 Replaces the columns in the table with a specified list of QgsLayoutTableColumns.
 
Q_DECL_DEPRECATED void setContentFont (const QFont &font)
 Sets the font used to draw text in table body cells.
 
Q_DECL_DEPRECATED void setContentFontColor (const QColor &color)
 Sets the color used to draw text in table body cells.
 
void setContentTextFormat (const QgsTextFormat &format)
 Sets the format used to draw content text in the table.
 
void setEmptyTableBehavior (EmptyTableMode mode)
 Sets the behavior mode for empty tables with no content rows.
 
void setEmptyTableMessage (const QString &message)
 Sets the message for empty tables with no content rows.
 
void setGridColor (const QColor &color)
 Sets the color used for grid lines in the table.
 
void setGridStrokeWidth (double width)
 Sets the width in mm for grid lines in the table.
 
Q_DECL_DEPRECATED void setHeaderFont (const QFont &font)
 Sets the font used to draw header text in the table.
 
Q_DECL_DEPRECATED void setHeaderFontColor (const QColor &color)
 Sets the color used to draw header text in the table.
 
void setHeaderHAlignment (HeaderHAlignment alignment)
 Sets the horizontal alignment for table headers.
 
void setHeaderMode (HeaderMode mode)
 Sets the display mode for headers in the table.
 
void setHeaderTextFormat (const QgsTextFormat &format)
 Sets the format used to draw header text in the table.
 
void setHorizontalGrid (bool horizontalGrid)
 Sets whether the grid's horizontal lines should be drawn in the table.
 
void setShowEmptyRows (bool showEmpty)
 Sets whether empty rows should be drawn.
 
void setShowGrid (bool showGrid)
 Sets whether grid lines should be drawn in the table.
 
void setSortColumns (const QgsLayoutTableSortColumns &sortColumns)
 Replaces the sorting columns in the table with a specified list of QgsLayoutTableSortColumns.
 
void setVerticalGrid (bool verticalGrid)
 Sets whether the grid's vertical lines should be drawn in the table.
 
void setWrapBehavior (WrapBehavior behavior)
 Sets the wrap behavior for the table, which controls how text within cells is automatically wrapped.
 
bool showEmptyRows () const
 Returns whether empty rows are drawn in the table.
 
bool showGrid () const
 Returns whether grid lines are drawn in the table.
 
QgsLayoutTableSortColumnssortColumns ()
 Returns a reference to the list of QgsLayoutTableSortColumns shown in the table.
 
QSizeF totalSize () const override
 Returns the total size of the multiframe's content, in layout units.
 
bool verticalGrid () const
 Returns whether the grid's vertical lines are drawn in the table.
 
WrapBehavior wrapBehavior () const
 Returns the wrap behavior for the table, which controls how text within cells is automatically wrapped.
 
bool writePropertiesToElement (QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context) const override
 Stores multiframe state within an XML DOM element.
 
- Public Member Functions inherited from QgsLayoutMultiFrame
 QgsLayoutMultiFrame (QgsLayout *layout)
 Construct a new multiframe item, attached to the specified layout.
 
 ~QgsLayoutMultiFrame () override
 
virtual void addFrame (QgsLayoutFrame *frame, bool recalcFrameSizes=true)
 Adds a frame to the multiframe.
 
void beginCommand (const QString &commandText, UndoCommand command=UndoNone)
 Starts new undo command for this item.
 
void cancelCommand ()
 Cancels the current item command and discards it.
 
QgsAbstractLayoutUndoCommandcreateCommand (const QString &text, int id, QUndoCommand *parent=nullptr) override
 Creates a new layout undo command with the specified text and parent.
 
QgsExpressionContext createExpressionContext () const override
 This method needs to be reimplemented in all classes which implement this interface and return an expression context.
 
QgsLayoutFramecreateNewFrame (QgsLayoutFrame *currentFrame, QPointF pos, QSizeF size)
 Creates a new frame and adds it to the multi frame and layout.
 
void deleteFrames ()
 Removes and deletes all child frames.
 
virtual QString displayName () const
 Returns the multiframe display name.
 
void endCommand ()
 Completes the current item command and push it onto the layout's undo stack.
 
virtual void finalizeRestoreFromXml ()
 Called after all pending items have been restored from XML.
 
virtual double findNearbyPageBreak (double yPos)
 Finds the optimal position to break a frame at.
 
QgsLayoutFrameframe (int index) const
 Returns the child frame at a specified index from the multiframe.
 
int frameCount () const
 Returns the number of frames associated with this multiframe.
 
int frameIndex (QgsLayoutFrame *frame) const
 Returns the index of a frame within the multiframe.
 
QList< QgsLayoutFrame * > frames () const
 Returns a list of all child frames for this multiframe.
 
virtual QIcon icon () const
 Returns the item's icon.
 
bool readXml (const QDomElement &itemElement, const QDomDocument &document, const QgsReadWriteContext &context, bool includeFrames=false)
 Sets the item state from a DOM element.
 
void removeFrame (int index, bool removeEmptyPages=false)
 Removes a frame by index from the multiframe.
 
ResizeMode resizeMode () const
 Returns the resize mode for the multiframe.
 
void setResizeMode (ResizeMode mode)
 Sets the resize mode for the multiframe, and recalculates frame sizes to match.
 
virtual int type () const =0
 Returns unique multiframe type id.
 
QString uuid () const
 Returns the multiframe identification string.
 
bool writeXml (QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context, bool includeFrames=false) const
 Stores the multiframe state in a DOM element.
 
- Public Member Functions inherited from QgsLayoutObject
 QgsLayoutObject (QgsLayout *layout)
 Constructor for QgsLayoutObject, with the specified parent layout.
 
QgsExpressionContext createExpressionContext () const override
 Creates an expression context relating to the objects' current state.
 
QStringList customProperties () const
 Returns list of keys stored in custom properties for the object.
 
QVariant customProperty (const QString &key, const QVariant &defaultValue=QVariant()) const
 Read a custom property from the object.
 
QgsPropertyCollectiondataDefinedProperties ()
 Returns a reference to the object's property collection, used for data defined overrides.
 
const QgsPropertyCollectiondataDefinedProperties () const
 Returns a reference to the object's property collection, used for data defined overrides.
 
QgsLayoutlayout ()
 Returns the layout the object is attached to.
 
const QgsLayoutlayout () const
 Returns the layout the object is attached to.
 
void removeCustomProperty (const QString &key)
 Remove a custom property from the object.
 
void setCustomProperty (const QString &key, const QVariant &value)
 Set a custom property for the object.
 
void setDataDefinedProperties (const QgsPropertyCollection &collection)
 Sets the objects's property collection, used for data defined overrides.
 
- Public Member Functions inherited from QgsExpressionContextGenerator
virtual ~QgsExpressionContextGenerator ()=default
 
- Public Member Functions inherited from QgsLayoutUndoObjectInterface
virtual ~QgsLayoutUndoObjectInterface ()=default
 Destructor for QgsLayoutUndoObjectInterface.
 

Protected Member Functions

virtual bool calculateMaxColumnWidths ()
 Calculates the maximum width of text shown in columns.
 
virtual bool calculateMaxRowHeights ()
 Calculates the maximum height of text shown in rows.
 
bool contentsContainsRow (const QgsLayoutTableContents &contents, const QgsLayoutTableRow &row) const
 Checks whether a table contents contains a given row.
 
void drawHorizontalGridLines (QgsLayoutItemRenderContext &context, int firstRow, int lastRow, bool drawHeaderLines) const
 Draws the horizontal grid lines for the table.
 
void drawVerticalGridLines (QgsLayoutItemRenderContext &context, const QMap< int, double > &maxWidthMap, int firstRow, int lastRow, bool hasHeader, bool mergeCells=false) const
 Draws the vertical grid lines for the table.
 
virtual Qt::Alignment horizontalAlignmentForCell (int row, int column) const
 Returns the horizontal alignment to use for the cell at the specified row and column.
 
void recalculateTableSize ()
 Recalculates and updates the size of the table and all table frames.
 
QPair< int, int > rowRange (QgsRenderContext &context, int frameIndex) const
 Calculates a range of rows which should be visible in a given frame.
 
int rowsVisible (QgsRenderContext &context, double frameHeight, int firstRow, bool includeHeader, bool includeEmptyRows) const
 Calculates how many content rows would be visible within a frame of the specified height.
 
int rowsVisible (QgsRenderContext &context, int frameIndex, int firstRow, bool includeEmptyRows) const
 Calculates how many content rows are visible within a given frame.
 
virtual QgsTextFormat textFormatForCell (int row, int column) const
 Returns the text format to use for the cell at the specified row and column.
 
virtual QgsTextFormat textFormatForHeader (int column) const
 Returns the text format to use for the header cell at the specified column.
 
double totalHeight ()
 Returns total height of table contents.
 
double totalWidth ()
 Returns total width of table contents.
 
virtual Qt::Alignment verticalAlignmentForCell (int row, int column) const
 Returns the vertical alignment to use for the cell at the specified row and column.
 
- Protected Member Functions inherited from QgsLayoutObject
bool readObjectPropertiesFromElement (const QDomElement &parentElement, const QDomDocument &document, const QgsReadWriteContext &context)
 Sets object properties from a DOM element.
 
bool writeObjectPropertiesToElement (QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context) const
 Stores object properties within an XML DOM element.
 

Protected Attributes

QColor mBackgroundColor = Qt::white
 Color for table background.
 
double mCellMargin = 1.0
 Margin between cell borders and cell text.
 
QMap< CellStyleGroup, QgsLayoutTableStyle * > mCellStyles
 
QgsLayoutTableColumns mColumns
 Columns to show in table.
 
QgsTextFormat mContentTextFormat
 
QString mEmptyTableMessage
 String to show in empty tables.
 
EmptyTableMode mEmptyTableMode = HeadersOnly
 Behavior for empty tables.
 
QColor mGridColor = Qt::black
 Color for grid lines.
 
double mGridStrokeWidth = 0.5
 Width of grid lines.
 
HeaderHAlignment mHeaderHAlignment = FollowColumn
 Alignment for table headers.
 
HeaderMode mHeaderMode = FirstFrame
 Header display mode.
 
QgsTextFormat mHeaderTextFormat
 
bool mHorizontalGrid = true
 True if grid should be shown.
 
QMap< int, double > mMaxColumnWidthMap
 Map of maximum width for each column.
 
QMap< int, double > mMaxRowHeightMap
 Map of maximum height for each row.
 
bool mShowEmptyRows = false
 True if empty rows should be shown in the table.
 
bool mShowGrid = true
 True if grid should be shown.
 
QgsLayoutTableSortColumns mSortColumns
 Columns to sort the table.
 
QgsLayoutTableContents mTableContents
 Contents to show in table.
 
QSizeF mTableSize
 
bool mVerticalGrid = true
 True if grid should be shown.
 
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.
 
QgsPropertyCollection mDataDefinedProperties
 
QPointer< QgsLayoutmLayout
 

Friends

class QgsCompositionConverter
 
class TestQgsLayoutManualTable
 
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.
 
- Signals inherited from QgsLayoutObject
void changed ()
 Emitted when the object's properties change.
 
- Static Public Member Functions inherited from QgsLayoutObject
static bool propertyAssociatesWithParentMultiframe (DataDefinedProperty property)
 Returns true if the specified property key is normally associated with the parent QgsLayoutMultiFrame object instead of a child QgsLayoutFrame object.
 
static const QgsPropertiesDefinitionpropertyDefinitions ()
 Returns the layout object property definitions.
 

Detailed Description

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

Since
QGIS 3.0

Definition at line 112 of file qgslayouttable.h.

Member Enumeration Documentation

◆ CellStyleGroup

Row or column groups for cell styling.

Enumerator
OddColumns 

Style odd numbered columns.

EvenColumns 

Style even numbered columns.

OddRows 

Style odd numbered rows.

EvenRows 

Style even numbered rows.

FirstColumn 

Style first column only.

LastColumn 

Style last column only.

HeaderRow 

Style header row.

FirstRow 

Style first row only.

LastRow 

Style last row only.

Definition at line 161 of file qgslayouttable.h.

◆ EmptyTableMode

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 142 of file qgslayouttable.h.

◆ HeaderHAlignment

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 121 of file qgslayouttable.h.

◆ HeaderMode

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 132 of file qgslayouttable.h.

◆ WrapBehavior

Controls how long strings in the table are handled.

Enumerator
TruncateText 

Text which doesn't fit inside the cell is truncated.

WrapText 

Text which doesn't fit inside the cell is wrapped. Note that this only applies to text in columns with a fixed width.

Definition at line 152 of file qgslayouttable.h.

Constructor & Destructor Documentation

◆ QgsLayoutTable()

QgsLayoutTable::QgsLayoutTable ( QgsLayout layout)

Constructor for QgsLayoutTable, belonging to the specified layout.

Definition at line 54 of file qgslayouttable.cpp.

◆ ~QgsLayoutTable()

QgsLayoutTable::~QgsLayoutTable ( )
override

Definition at line 60 of file qgslayouttable.cpp.

Member Function Documentation

◆ backgroundColor()

QColor QgsLayoutTable::backgroundColor ( ) const
inline

Returns the color used for the background of the table.

See also
setBackgroundColor()
gridColor()

Definition at line 462 of file qgslayouttable.h.

◆ calculateMaxColumnWidths()

bool QgsLayoutTable::calculateMaxColumnWidths ( )
protectedvirtual

Calculates the maximum width of text shown in columns.

Definition at line 1064 of file qgslayouttable.cpp.

◆ calculateMaxRowHeights()

bool QgsLayoutTable::calculateMaxRowHeights ( )
protectedvirtual

Calculates the maximum height of text shown in rows.

Reimplemented in QgsLayoutItemManualTable.

Definition at line 1150 of file qgslayouttable.cpp.

◆ cellMargin()

double QgsLayoutTable::cellMargin ( ) const
inline

Returns the margin distance between cell borders and their contents in mm.

See also
setCellMargin()

Definition at line 191 of file qgslayouttable.h.

◆ cellStyle()

const QgsLayoutTableStyle * QgsLayoutTable::cellStyle ( QgsLayoutTable::CellStyleGroup  group) const

Returns the cell style for a cell group.

See also
setCellStyle()

Definition at line 964 of file qgslayouttable.cpp.

◆ columns()

QgsLayoutTableColumns & QgsLayoutTable::columns ( )
inline

Returns a reference to the list of QgsLayoutTableColumns shown in the table.

See also
setColumns()

Definition at line 482 of file qgslayouttable.h.

◆ conditionalCellStyle()

QgsConditionalStyle QgsLayoutTable::conditionalCellStyle ( int  row,
int  column 
) const
virtual

Returns the conditional style to use for the cell at row, column.

Since
QGIS 3.12

Reimplemented in QgsLayoutItemAttributeTable, and QgsLayoutItemManualTable.

Definition at line 993 of file qgslayouttable.cpp.

◆ contentFont()

QFont QgsLayoutTable::contentFont ( ) const

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

See also
setContentFont()
headerFont()
Deprecated:
use contextTextFormat() instead

Definition at line 800 of file qgslayouttable.cpp.

◆ contentFontColor()

QColor QgsLayoutTable::contentFontColor ( ) const

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

See also
setContentFontColor()
contentFont()
headerFontColor()
Deprecated:
use contextTextFormat() instead

Definition at line 818 of file qgslayouttable.cpp.

◆ contents()

QgsLayoutTableContents & QgsLayoutTable::contents ( )
inline

Returns the current contents of the table.

Excludes header cells.

Definition at line 559 of file qgslayouttable.h.

◆ contentsContainsRow()

bool QgsLayoutTable::contentsContainsRow ( const QgsLayoutTableContents contents,
const QgsLayoutTableRow 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

Definition at line 1461 of file qgslayouttable.cpp.

◆ contentTextFormat()

QgsTextFormat QgsLayoutTable::contentTextFormat ( ) const

Returns the format used to draw content text in the table.

See also
setContentTextFormat()
headerTextFormat()
Since
QGIS 3.16

Definition at line 833 of file qgslayouttable.cpp.

◆ drawHorizontalGridLines()

void QgsLayoutTable::drawHorizontalGridLines ( QgsLayoutItemRenderContext context,
int  firstRow,
int  lastRow,
bool  drawHeaderLines 
) const
protected

Draws the horizontal grid lines for the table.

Parameters
contextdestination render context
firstRowindex corresponding to first row shown in frame
lastRowindex 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.
drawHeaderLinesset to true to include for the table header
See also
drawVerticalGridLines()

Definition at line 1332 of file qgslayouttable.cpp.

◆ drawVerticalGridLines()

void QgsLayoutTable::drawVerticalGridLines ( QgsLayoutItemRenderContext context,
const QMap< int, double > &  maxWidthMap,
int  firstRow,
int  lastRow,
bool  hasHeader,
bool  mergeCells = false 
) const
protected

Draws the vertical grid lines for the table.

Parameters
contextdestination render context
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.
firstRowindex corresponding to first row shown in frame
lastRowindex 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.
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

Definition at line 1403 of file qgslayouttable.cpp.

◆ emptyTableBehavior()

EmptyTableMode QgsLayoutTable::emptyTableBehavior ( ) const
inline

Returns the behavior mode for empty tables.

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

See also
setEmptyTableBehavior()

Definition at line 204 of file qgslayouttable.h.

◆ emptyTableMessage()

QString QgsLayoutTable::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 behavior is set to ShowMessage.

See also
setEmptyTableMessage()
emptyTableBehavior()

Definition at line 222 of file qgslayouttable.h.

◆ fixedFrameSize()

QSizeF QgsLayoutTable::fixedFrameSize ( int  frameIndex = -1) const
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().

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.
See also
minFrameSize()
recalculateFrameRects()

Reimplemented from QgsLayoutMultiFrame.

Definition at line 998 of file qgslayouttable.cpp.

◆ getTableContents()

virtual bool QgsLayoutTable::getTableContents ( QgsLayoutTableContents contents)
pure virtual

Fetches the contents used for the cells in the table.

Returns
true if table contents were successfully retrieved.
Parameters
contentsQgsLayoutTableContents to store retrieved row data in

Implemented in QgsLayoutItemAttributeTable, QgsLayoutItemManualTable, and QgsLayoutItemTextTable.

◆ gridColor()

QColor QgsLayoutTable::gridColor ( ) const
inline

Returns the color used for grid lines in the table.

See also
setGridColor()
showGrid()
gridStrokeWidth()

Definition at line 410 of file qgslayouttable.h.

◆ gridStrokeWidth()

double QgsLayoutTable::gridStrokeWidth ( ) const
inline

Returns the width of grid lines in the table in mm.

See also
setGridStrokeWidth()
showGrid()
gridColor()

Definition at line 394 of file qgslayouttable.h.

◆ headerFont()

QFont QgsLayoutTable::headerFont ( ) const

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

See also
setHeaderFont()
contentFont()
Deprecated:
use headerTextFormat() instead

Definition at line 716 of file qgslayouttable.cpp.

◆ headerFontColor()

QColor QgsLayoutTable::headerFontColor ( ) const

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

See also
setHeaderFontColor()
headerFont()
contentFontColor()
Deprecated:
use headerTextFormat() instead

Definition at line 734 of file qgslayouttable.cpp.

◆ headerHAlignment()

HeaderHAlignment QgsLayoutTable::headerHAlignment ( ) const
inline

Returns the horizontal alignment for table headers.

See also
setHeaderHAlignment()

Definition at line 297 of file qgslayouttable.h.

◆ headerLabels()

QMap< int, QString > QgsLayoutTable::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

Definition at line 972 of file qgslayouttable.cpp.

◆ headerMode()

HeaderMode QgsLayoutTable::headerMode ( ) const
inline

Returns the display mode for headers in the table.

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

See also
setHeaderMode()

Definition at line 311 of file qgslayouttable.h.

◆ headerTextFormat()

QgsTextFormat QgsLayoutTable::headerTextFormat ( ) const

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

See also
setHeaderTextFormat()
contentTextFormat()
Since
QGIS 3.16

Definition at line 749 of file qgslayouttable.cpp.

◆ horizontalAlignmentForCell()

Qt::Alignment QgsLayoutTable::horizontalAlignmentForCell ( int  row,
int  column 
) const
protectedvirtual

Returns the horizontal alignment to use for the cell at the specified row and column.

See also
verticalAlignmentForCell()
Since
QGIS 3.16

Reimplemented in QgsLayoutItemManualTable.

Definition at line 1476 of file qgslayouttable.cpp.

◆ horizontalGrid()

bool QgsLayoutTable::horizontalGrid ( ) const
inline

Returns whether the grid's horizontal lines are drawn in the table.

See also
setShowGrid()
setGridStrokeWidth()
setGridColor()
setVerticalGrid()

Definition at line 429 of file qgslayouttable.h.

◆ minFrameSize()

QSizeF QgsLayoutTable::minFrameSize ( int  frameIndex = -1) const
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().

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.
See also
fixedFrameSize()
recalculateFrameRects()

Reimplemented from QgsLayoutMultiFrame.

Definition at line 1004 of file qgslayouttable.cpp.

◆ readPropertiesFromElement()

bool QgsLayoutTable::readPropertiesFromElement ( const QDomElement &  element,
const QDomDocument &  document,
const QgsReadWriteContext context 
)
overridevirtual

Sets multiframe state from a DOM element.

Parameters
elementis the DOM element for the multiframe
documentDOM document
contextread write context
See also
writePropertiesToElement()

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().

See also
readXml()

Reimplemented from QgsLayoutMultiFrame.

Definition at line 133 of file qgslayouttable.cpp.

◆ recalculateFrameSizes

void QgsLayoutTable::recalculateFrameSizes ( )
overrideslot

Definition at line 1035 of file qgslayouttable.cpp.

◆ recalculateTableSize()

void QgsLayoutTable::recalculateTableSize ( )
protected

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

Definition at line 1452 of file qgslayouttable.cpp.

◆ refresh

void QgsLayoutTable::refresh ( )
overrideslot

Definition at line 279 of file qgslayouttable.cpp.

◆ refreshAttributes

void QgsLayoutTable::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.

Definition at line 1022 of file qgslayouttable.cpp.

◆ render()

void QgsLayoutTable::render ( QgsLayoutItemRenderContext context,
const QRectF &  renderExtent,
int  frameIndex 
)
overridevirtual

Renders a portion of the multiframe's content into a render context.

Parameters
contextdestination render painter
renderExtentvisible extent of content to render into the painter.
frameIndexframe number for content

Implements QgsLayoutMultiFrame.

Definition at line 365 of file qgslayouttable.cpp.

◆ rowRange()

QPair< int, int > QgsLayoutTable::rowRange ( QgsRenderContext context,
int  frameIndex 
) const
protected

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

Parameters
contextrender context
frameIndexindex number for frame
Returns
row range

Definition at line 340 of file qgslayouttable.cpp.

◆ rowsVisible() [1/2]

int QgsLayoutTable::rowsVisible ( QgsRenderContext context,
double  frameHeight,
int  firstRow,
bool  includeHeader,
bool  includeEmptyRows 
) const
protected

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

Parameters
contextrender context
frameHeightheight of frame
firstRowindex of first row visible in frame (where 0 = first row in table)
includeHeaderset to true if frame would include a header row
includeEmptyRowsset 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.
Returns
number of visible content rows (excluding header row)

Definition at line 285 of file qgslayouttable.cpp.

◆ rowsVisible() [2/2]

int QgsLayoutTable::rowsVisible ( QgsRenderContext context,
int  frameIndex,
int  firstRow,
bool  includeEmptyRows 
) const
protected

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

Parameters
contextrender context
frameIndexindex number for frame
firstRowindex of first row visible in frame (where 0 = first row in table)
includeEmptyRowsset 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.
Returns
number of visible content rows (excludes header rows)

Definition at line 322 of file qgslayouttable.cpp.

◆ scopeForCell()

QgsExpressionContextScope * QgsLayoutTable::scopeForCell ( int  row,
int  column 
) const
virtual

Creates a new QgsExpressionContextScope for the cell at row, column.

Since
QGIS 3.16

Reimplemented in QgsLayoutItemAttributeTable.

Definition at line 985 of file qgslayouttable.cpp.

◆ setBackgroundColor()

void QgsLayoutTable::setBackgroundColor ( const QColor &  color)

Sets the color used for background of table.

See also
backgroundColor()
setGridColor()

Definition at line 907 of file qgslayouttable.cpp.

◆ setCellMargin()

void QgsLayoutTable::setCellMargin ( double  margin)

Sets the margin distance in mm between cell borders and their contents.

See also
cellMargin()

Definition at line 639 of file qgslayouttable.cpp.

◆ setCellStyle()

void QgsLayoutTable::setCellStyle ( QgsLayoutTable::CellStyleGroup  group,
const QgsLayoutTableStyle style 
)

Sets the cell style for a cell group.

See also
cellStyle()

Definition at line 956 of file qgslayouttable.cpp.

◆ setColumns()

void QgsLayoutTable::setColumns ( const QgsLayoutTableColumns columns)

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

Parameters
columnslist of QgsLayoutTableColumns to show in table.
See also
columns()

Definition at line 933 of file qgslayouttable.cpp.

◆ setContentFont()

void QgsLayoutTable::setContentFont ( const QFont &  font)

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

See also
contentFont()
setHeaderFont()
Deprecated:
use setContentTextFormat() instead

Definition at line 780 of file qgslayouttable.cpp.

◆ setContentFontColor()

void QgsLayoutTable::setContentFontColor ( const QColor &  color)

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

See also
contentFontColor()
setContentFont()
setHeaderFontColor()
Deprecated:
use setContentTextFormat() instead

Definition at line 805 of file qgslayouttable.cpp.

◆ setContentTextFormat()

void QgsLayoutTable::setContentTextFormat ( const QgsTextFormat format)

Sets the format used to draw content text in the table.

See also
contentTextFormat()
setHeaderTextFormat()
Since
QGIS 3.16

Definition at line 823 of file qgslayouttable.cpp.

◆ setEmptyTableBehavior()

void QgsLayoutTable::setEmptyTableBehavior ( const QgsLayoutTable::EmptyTableMode  mode)

Sets the behavior mode for empty tables with no content rows.

See also
emptyTableBehavior()

Definition at line 654 of file qgslayouttable.cpp.

◆ setEmptyTableMessage()

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.

See also
emptyTableMessage()
setEmptyTableBehavior()

Definition at line 669 of file qgslayouttable.cpp.

◆ setGridColor()

void QgsLayoutTable::setGridColor ( const QColor &  color)

Sets the color used for grid lines in the table.

See also
gridColor()
setShowGrid()
setGridStrokeWidth()

Definition at line 866 of file qgslayouttable.cpp.

◆ setGridStrokeWidth()

void QgsLayoutTable::setGridStrokeWidth ( double  width)

Sets the width in mm for grid lines in the table.

See also
gridStrokeWidth()
setShowGrid()
setGridColor()

Definition at line 852 of file qgslayouttable.cpp.

◆ setHeaderFont()

void QgsLayoutTable::setHeaderFont ( const QFont &  font)

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

See also
headerFont()
setContentFont()
Deprecated:
use setHeaderTextFormat() instead

Definition at line 696 of file qgslayouttable.cpp.

◆ setHeaderFontColor()

void QgsLayoutTable::setHeaderFontColor ( const QColor &  color)

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

See also
headerFontColor()
setHeaderFont()
setContentFontColor()
Deprecated:
use setHeaderTextFormat() instead

Definition at line 721 of file qgslayouttable.cpp.

◆ setHeaderHAlignment()

void QgsLayoutTable::setHeaderHAlignment ( const QgsLayoutTable::HeaderHAlignment  alignment)

Sets the horizontal alignment for table headers.

See also
headerHAlignment()

Definition at line 754 of file qgslayouttable.cpp.

◆ setHeaderMode()

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.

See also
headerMode()

Definition at line 767 of file qgslayouttable.cpp.

◆ setHeaderTextFormat()

void QgsLayoutTable::setHeaderTextFormat ( const QgsTextFormat format)

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

See also
headerTextFormat()
setContentTextFormat()
Since
QGIS 3.16

Definition at line 739 of file qgslayouttable.cpp.

◆ setHorizontalGrid()

void QgsLayoutTable::setHorizontalGrid ( bool  horizontalGrid)

Sets whether the grid's horizontal lines should be drawn in the table.

Parameters
horizontalGridset to true to draw grid's horizontal lines
See also
setShowGrid()
setGridStrokeWidth()
setGridColor()
setVerticalGrid()

Definition at line 879 of file qgslayouttable.cpp.

◆ setShowEmptyRows()

void QgsLayoutTable::setShowEmptyRows ( 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()

Definition at line 684 of file qgslayouttable.cpp.

◆ setShowGrid()

void QgsLayoutTable::setShowGrid ( 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()

Definition at line 838 of file qgslayouttable.cpp.

◆ setSortColumns()

void QgsLayoutTable::setSortColumns ( const QgsLayoutTableSortColumns sortColumns)

Replaces the sorting columns in the table with a specified list of QgsLayoutTableSortColumns.

Parameters
sortColumnslist of QgsLayoutTableColumns used to sort the table.
Warning
It is expected that the QgsLayoutTableColumn::attribute() values in sortColumns are valid QGIS expression values, and that column references are correctly escaped accordingly.
See also
sortColumns()
Since
QGIS 3.14

Definition at line 951 of file qgslayouttable.cpp.

◆ setVerticalGrid()

void QgsLayoutTable::setVerticalGrid ( bool  verticalGrid)

Sets whether the grid's vertical lines should be drawn in the table.

Parameters
verticalGridset to true to draw grid's vertical lines
See also
setShowGrid()
setGridStrokeWidth()
setGridColor()
setHorizontalGrid()

Definition at line 893 of file qgslayouttable.cpp.

◆ setWrapBehavior()

void QgsLayoutTable::setWrapBehavior ( QgsLayoutTable::WrapBehavior  behavior)

Sets the wrap behavior for the table, which controls how text within cells is automatically wrapped.

See also
wrapBehavior()

Definition at line 920 of file qgslayouttable.cpp.

◆ showEmptyRows()

bool QgsLayoutTable::showEmptyRows ( ) const
inline

Returns whether empty rows are drawn in the table.

See also
setShowEmptyRows()

Definition at line 235 of file qgslayouttable.h.

◆ showGrid()

bool QgsLayoutTable::showGrid ( ) const
inline

Returns whether grid lines are drawn in the table.

See also
setShowGrid()
gridStrokeWidth()
gridColor()

Definition at line 378 of file qgslayouttable.h.

◆ sortColumns()

QgsLayoutTableSortColumns & QgsLayoutTable::sortColumns ( )
inline

Returns a reference to the list of QgsLayoutTableSortColumns shown in the table.

Warning
It is expected that the QgsLayoutTableColumn::attribute() values in the columns are valid QGIS expression values, and that column references are correctly escaped accordingly.
See also
setSortColumns()
Since
QGIS 3.14

Definition at line 501 of file qgslayouttable.h.

◆ textFormatForCell()

QgsTextFormat QgsLayoutTable::textFormatForCell ( int  row,
int  column 
) const
protectedvirtual

Returns the text format to use for the cell at the specified row and column.

See also
textFormatForHeader()
Since
QGIS 3.16

Reimplemented in QgsLayoutItemAttributeTable, and QgsLayoutItemManualTable.

Definition at line 1466 of file qgslayouttable.cpp.

◆ textFormatForHeader()

QgsTextFormat QgsLayoutTable::textFormatForHeader ( int  column) const
protectedvirtual

Returns the text format to use for the header cell at the specified column.

See also
textFormatForCell()
Since
QGIS 3.16

Reimplemented in QgsLayoutItemManualTable.

Definition at line 1471 of file qgslayouttable.cpp.

◆ totalHeight()

double QgsLayoutTable::totalHeight ( )
protected

Returns total height of table contents.

See also
totalWidth()

Definition at line 1256 of file qgslayouttable.cpp.

◆ totalSize()

QSizeF QgsLayoutTable::totalSize ( ) const
overridevirtual

Returns the total size of the multiframe's content, in layout units.

Implements QgsLayoutMultiFrame.

Definition at line 274 of file qgslayouttable.cpp.

◆ totalWidth()

double QgsLayoutTable::totalWidth ( )
protected

Returns total width of table contents.

Returns
table width
See also
totalHeight

Definition at line 1235 of file qgslayouttable.cpp.

◆ verticalAlignmentForCell()

Qt::Alignment QgsLayoutTable::verticalAlignmentForCell ( int  row,
int  column 
) const
protectedvirtual

Returns the vertical alignment to use for the cell at the specified row and column.

See also
horizontalAlignmentForCell()
Since
QGIS 3.16

Reimplemented in QgsLayoutItemManualTable.

Definition at line 1481 of file qgslayouttable.cpp.

◆ verticalGrid()

bool QgsLayoutTable::verticalGrid ( ) const
inline

Returns whether the grid's vertical lines are drawn in the table.

See also
setShowGrid()
setGridStrokeWidth()
setGridColor()
setHorizontalGrid()

Definition at line 448 of file qgslayouttable.h.

◆ wrapBehavior()

WrapBehavior QgsLayoutTable::wrapBehavior ( ) const
inline

Returns the wrap behavior for the table, which controls how text within cells is automatically wrapped.

See also
setWrapBehavior()

Definition at line 476 of file qgslayouttable.h.

◆ writePropertiesToElement()

bool QgsLayoutTable::writePropertiesToElement ( QDomElement &  element,
QDomDocument &  document,
const QgsReadWriteContext context 
) const
overridevirtual

Stores multiframe state within an XML DOM element.

Parameters
elementis the DOM element to store the multiframe's properties in
documentDOM document
contextread write context
See also
writeXml()
readPropertiesFromElement()

Reimplemented from QgsLayoutMultiFrame.

Definition at line 69 of file qgslayouttable.cpp.

Friends And Related Symbol Documentation

◆ QgsCompositionConverter

friend class QgsCompositionConverter
friend

Definition at line 793 of file qgslayouttable.h.

◆ TestQgsLayoutManualTable

friend class TestQgsLayoutManualTable
friend

Definition at line 792 of file qgslayouttable.h.

◆ TestQgsLayoutTable

friend class TestQgsLayoutTable
friend

Definition at line 791 of file qgslayouttable.h.

Member Data Documentation

◆ mBackgroundColor

QColor QgsLayoutTable::mBackgroundColor = Qt::white
protected

Color for table background.

Definition at line 621 of file qgslayouttable.h.

◆ mCellMargin

double QgsLayoutTable::mCellMargin = 1.0
protected

Margin between cell borders and cell text.

Definition at line 584 of file qgslayouttable.h.

◆ mCellStyles

QMap< CellStyleGroup, QgsLayoutTableStyle * > QgsLayoutTable::mCellStyles
protected

Definition at line 642 of file qgslayouttable.h.

◆ mColumns

QgsLayoutTableColumns QgsLayoutTable::mColumns
protected

Columns to show in table.

Definition at line 624 of file qgslayouttable.h.

◆ mContentTextFormat

QgsTextFormat QgsLayoutTable::mContentTextFormat
protected

Definition at line 603 of file qgslayouttable.h.

◆ mEmptyTableMessage

QString QgsLayoutTable::mEmptyTableMessage
protected

String to show in empty tables.

Definition at line 590 of file qgslayouttable.h.

◆ mEmptyTableMode

EmptyTableMode QgsLayoutTable::mEmptyTableMode = HeadersOnly
protected

Behavior for empty tables.

Definition at line 587 of file qgslayouttable.h.

◆ mGridColor

QColor QgsLayoutTable::mGridColor = Qt::black
protected

Color for grid lines.

Definition at line 612 of file qgslayouttable.h.

◆ mGridStrokeWidth

double QgsLayoutTable::mGridStrokeWidth = 0.5
protected

Width of grid lines.

Definition at line 609 of file qgslayouttable.h.

◆ mHeaderHAlignment

HeaderHAlignment QgsLayoutTable::mHeaderHAlignment = FollowColumn
protected

Alignment for table headers.

Definition at line 597 of file qgslayouttable.h.

◆ mHeaderMode

HeaderMode QgsLayoutTable::mHeaderMode = FirstFrame
protected

Header display mode.

Definition at line 600 of file qgslayouttable.h.

◆ mHeaderTextFormat

QgsTextFormat QgsLayoutTable::mHeaderTextFormat
protected

Definition at line 602 of file qgslayouttable.h.

◆ mHorizontalGrid

bool QgsLayoutTable::mHorizontalGrid = true
protected

True if grid should be shown.

Definition at line 615 of file qgslayouttable.h.

◆ mMaxColumnWidthMap

QMap<int, double> QgsLayoutTable::mMaxColumnWidthMap
protected

Map of maximum width for each column.

Definition at line 633 of file qgslayouttable.h.

◆ mMaxRowHeightMap

QMap<int, double> QgsLayoutTable::mMaxRowHeightMap
protected

Map of maximum height for each row.

Definition at line 636 of file qgslayouttable.h.

◆ mShowEmptyRows

bool QgsLayoutTable::mShowEmptyRows = false
protected

True if empty rows should be shown in the table.

Definition at line 593 of file qgslayouttable.h.

◆ mShowGrid

bool QgsLayoutTable::mShowGrid = true
protected

True if grid should be shown.

Definition at line 606 of file qgslayouttable.h.

◆ mSortColumns

QgsLayoutTableSortColumns QgsLayoutTable::mSortColumns
protected

Columns to sort the table.

Definition at line 627 of file qgslayouttable.h.

◆ mTableContents

QgsLayoutTableContents QgsLayoutTable::mTableContents
protected

Contents to show in table.

Definition at line 630 of file qgslayouttable.h.

◆ mTableSize

QSizeF QgsLayoutTable::mTableSize
protected

Definition at line 638 of file qgslayouttable.h.

◆ mVerticalGrid

bool QgsLayoutTable::mVerticalGrid = true
protected

True if grid should be shown.

Definition at line 618 of file qgslayouttable.h.

◆ mWrapBehavior

WrapBehavior QgsLayoutTable::mWrapBehavior = TruncateText
protected

Definition at line 640 of file qgslayouttable.h.


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