QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
QgsLayoutMultiFrame Class Referenceabstract

Abstract base class for layout items with the ability to distribute the content to several frames (QgsLayoutFrame items). More...

#include <qgslayoutmultiframe.h>

Inheritance diagram for QgsLayoutMultiFrame:
Inheritance graph
[legend]

Public Types

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 class  DataDefinedProperty : int {
  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 ,
  MapCrs , StartDateTime , EndDateTime , MapZRangeLower ,
  MapZRangeUpper , PictureSource , PictureSvgBackgroundColor , PictureSvgStrokeColor ,
  PictureSvgStrokeWidth , SourceUrl , LegendTitle , LegendColumnCount ,
  ScalebarLeftSegments , ScalebarRightSegments , ScalebarSegmentWidth , ScalebarMinimumWidth ,
  ScalebarMaximumWidth , ScalebarHeight , ScalebarRightSegmentSubdivisions , ScalebarSubdivisionHeight ,
  ScalebarFillColor , ScalebarFillColor2 , ScalebarLineColor , ScalebarLineWidth ,
  AttributeTableSourceLayer , 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 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::DataDefinedProperty::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.
 

Signals

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.
 

Public Member Functions

 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.
 
virtual QSizeF fixedFrameSize (int frameIndex=-1) const
 Returns the fixed size for a frame, if desired.
 
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.
 
virtual QSizeF minFrameSize (int frameIndex=-1) const
 Returns the minimum size for a frames, if desired.
 
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.
 
virtual void render (QgsLayoutItemRenderContext &context, const QRectF &renderExtent, int frameIndex)=0
 Renders a portion of the multiframe's content into a render context.
 
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 QSizeF totalSize () const =0
 Returns the total size of the multiframe's content, in layout units.
 
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
 

Protected Member Functions

virtual bool readPropertiesFromElement (const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context)
 Sets multiframe state from a DOM element.
 
virtual bool writePropertiesToElement (QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const
 Stores multiframe state within an XML DOM element.
 
- 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

QList< QgsLayoutFrame * > mFrameItems
 
ResizeMode mResizeMode = UseExistingFrames
 
- Protected Attributes inherited from QgsLayoutObject
QgsObjectCustomProperties mCustomProperties
 Custom properties for object.
 
QgsPropertyCollection mDataDefinedProperties
 
QPointer< QgsLayoutmLayout
 

Friends

class QgsLayout
 
class QgsLayoutFrame
 

Additional Inherited Members

- 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

Abstract base class for layout items with the ability to distribute the content to several frames (QgsLayoutFrame items).

Definition at line 47 of file qgslayoutmultiframe.h.

Member Enumeration Documentation

◆ ResizeMode

Specifies the behavior for creating new frames to fit the multiframe's content.

Enumerator
UseExistingFrames 

Don't automatically create new frames, just use existing frames.

ExtendToNextPage 

Creates new full page frames on the following page(s) until the entire multiframe content is visible.

RepeatOnEveryPage 

Repeats the same frame on every page.

RepeatUntilFinished 

creates new frames with the same position and dimensions as the existing frame on the following page(s), until the entire multiframe content is visible

Definition at line 97 of file qgslayoutmultiframe.h.

◆ UndoCommand

Multiframe item undo commands, used for collapsing undo commands.

Enumerator
UndoHtmlBreakDistance 

HTML page break distance.

UndoHtmlSource 

HTML source.

UndoHtmlStylesheet 

HTML stylesheet.

UndoTableCellStyle 

Table cell style.

UndoTableMaximumFeatures 

Maximum features in table.

UndoTableMargin 

Table margins.

UndoTableHeaderFontColor 

Table header font color.

UndoTableContentFontColor 

Table content font color.

UndoTableGridStrokeWidth 

Table grid stroke width.

UndoTableGridColor 

Table grid color.

UndoTableBackgroundColor 

Table background color.

UndoNone 

No command suppression.

Definition at line 107 of file qgslayoutmultiframe.h.

Constructor & Destructor Documentation

◆ QgsLayoutMultiFrame()

QgsLayoutMultiFrame::QgsLayoutMultiFrame ( QgsLayout layout)

Construct a new multiframe item, attached to the specified layout.

Definition at line 26 of file qgslayoutmultiframe.cpp.

◆ ~QgsLayoutMultiFrame()

QgsLayoutMultiFrame::~QgsLayoutMultiFrame ( )
override

Definition at line 35 of file qgslayoutmultiframe.cpp.

Member Function Documentation

◆ addFrame()

void QgsLayoutMultiFrame::addFrame ( QgsLayoutFrame frame,
bool  recalcFrameSizes = true 
)
virtual

Adds a frame to the multiframe.

If recalcFrameSizes is set to true, then a recalculation of all existing frame sizes will be forced.

See also
removeFrame()

Definition at line 57 of file qgslayoutmultiframe.cpp.

◆ beginCommand()

void QgsLayoutMultiFrame::beginCommand ( const QString &  commandText,
QgsLayoutMultiFrame::UndoCommand  command = UndoNone 
)

Starts new undo command for this item.

The commandText should be a capitalized, imperative tense description (e.g. "Add Map Item"). If specified, multiple consecutive commands for this item with the same command will be collapsed into a single undo command in the layout history.

See also
endCommand()
cancelCommand()

Definition at line 291 of file qgslayoutmultiframe.cpp.

◆ cancelCommand()

void QgsLayoutMultiFrame::cancelCommand ( )

Cancels the current item command and discards it.

See also
beginCommand()
endCommand()

Definition at line 305 of file qgslayoutmultiframe.cpp.

◆ contentsChanged

void QgsLayoutMultiFrame::contentsChanged ( )
signal

Emitted when the contents of the multi frame have changed and the frames must be redrawn.

◆ createCommand()

QgsAbstractLayoutUndoCommand * QgsLayoutMultiFrame::createCommand ( const QString &  text,
int  id,
QUndoCommand *  parent = nullptr 
)
overridevirtual

Creates a new layout undo command with the specified text and parent.

The id argument can be used to specify an id number for the source event - this is used to determine whether QUndoCommand command compression can apply to the command.

Implements QgsLayoutUndoObjectInterface.

Definition at line 279 of file qgslayoutmultiframe.cpp.

◆ createExpressionContext()

QgsExpressionContext QgsLayoutMultiFrame::createExpressionContext ( ) const
overridevirtual

This method needs to be reimplemented in all classes which implement this interface and return an expression context.

Implements QgsExpressionContextGenerator.

Definition at line 284 of file qgslayoutmultiframe.cpp.

◆ createNewFrame()

QgsLayoutFrame * QgsLayoutMultiFrame::createNewFrame ( QgsLayoutFrame currentFrame,
QPointF  pos,
QSizeF  size 
)

Creates a new frame and adds it to the multi frame and layout.

Parameters
currentFramean existing QgsLayoutFrame from which to copy the size and general frame properties (e.g., frame style, background, rendering settings).
posposition of top-left corner of the new frame, in layout units
sizesize of the new frame, in layout units

Definition at line 248 of file qgslayoutmultiframe.cpp.

◆ deleteFrames()

void QgsLayoutMultiFrame::deleteFrames ( )

Removes and deletes all child frames.

See also
removeFrame()

Definition at line 460 of file qgslayoutmultiframe.cpp.

◆ displayName()

QString QgsLayoutMultiFrame::displayName ( ) const
virtual

Returns the multiframe display name.

Reimplemented in QgsLayoutItemAttributeTable, QgsLayoutItemHtml, QgsLayoutItemManualTable, and QgsLayoutItemTextTable.

Definition at line 274 of file qgslayoutmultiframe.cpp.

◆ endCommand()

void QgsLayoutMultiFrame::endCommand ( )

Completes the current item command and push it onto the layout's undo stack.

See also
beginCommand()
cancelCommand()

Definition at line 299 of file qgslayoutmultiframe.cpp.

◆ finalizeRestoreFromXml()

void QgsLayoutMultiFrame::finalizeRestoreFromXml ( )
virtual

Called after all pending items have been restored from XML.

Multiframes can use this method to run steps which must take place after all items have been restored to the layout, such as connecting to signals emitted by other items, which may not have existed in the layout at the time readXml() was called. E.g. a scalebar can use this to connect to its linked map item after restoration from XML.

See also
readXml()

Reimplemented in QgsLayoutItemAttributeTable.

Definition at line 311 of file qgslayoutmultiframe.cpp.

◆ findNearbyPageBreak()

double QgsLayoutMultiFrame::findNearbyPageBreak ( double  yPos)
virtual

Finds the optimal position to break a frame at.

Parameters
yPosmaximum vertical position for break, in layout units.
Returns
the optimal breakable position which occurs in the multi frame close to and before the specified yPos

Reimplemented in QgsLayoutItemHtml.

Definition at line 52 of file qgslayoutmultiframe.cpp.

◆ fixedFrameSize()

QSizeF QgsLayoutMultiFrame::fixedFrameSize ( int  frameIndex = -1) const
virtual

Returns the fixed size for a frame, if desired.

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

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

Reimplemented in QgsLayoutTable.

Definition at line 40 of file qgslayoutmultiframe.cpp.

◆ frame()

QgsLayoutFrame * QgsLayoutMultiFrame::frame ( int  index) const

Returns the child frame at a specified index from the multiframe.

See also
frameIndex()

Definition at line 476 of file qgslayoutmultiframe.cpp.

◆ frameCount()

int QgsLayoutMultiFrame::frameCount ( ) const
inline

Returns the number of frames associated with this multiframe.

See also
frames()

Definition at line 261 of file qgslayoutmultiframe.h.

◆ frameIndex()

int QgsLayoutMultiFrame::frameIndex ( QgsLayoutFrame frame) const

Returns the index of a frame within the multiframe.

Returns
index for frame if found, -1 if frame not found in multiframe
See also
frame()

Definition at line 485 of file qgslayoutmultiframe.cpp.

◆ frames()

QList< QgsLayoutFrame * > QgsLayoutMultiFrame::frames ( ) const

Returns a list of all child frames for this multiframe.

See also
frameCount()

Definition at line 92 of file qgslayoutmultiframe.cpp.

◆ icon()

virtual QIcon QgsLayoutMultiFrame::icon ( ) const
inlinevirtual

Returns the item's icon.

Reimplemented in QgsLayoutItemAttributeTable, QgsLayoutItemHtml, and QgsLayoutItemManualTable.

Definition at line 150 of file qgslayoutmultiframe.h.

◆ minFrameSize()

QSizeF QgsLayoutMultiFrame::minFrameSize ( int  frameIndex = -1) const
virtual

Returns the minimum size for a frames, if desired.

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

Parameters
frameIndexframe number
Returns
minimum size for frame. If the size has a width or height of 0, then the frame size has no minimum in that direction.
See also
fixedFrameSize()
recalculateFrameRects()

Reimplemented in QgsLayoutTable.

Definition at line 46 of file qgslayoutmultiframe.cpp.

◆ readPropertiesFromElement()

bool QgsLayoutMultiFrame::readPropertiesFromElement ( const QDomElement &  element,
const QDomDocument &  document,
const QgsReadWriteContext context 
)
protectedvirtual

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 in QgsLayoutItemAttributeTable, QgsLayoutItemHtml, QgsLayoutItemManualTable, and QgsLayoutTable.

Definition at line 579 of file qgslayoutmultiframe.cpp.

◆ readXml()

bool QgsLayoutMultiFrame::readXml ( const QDomElement &  itemElement,
const QDomDocument &  document,
const QgsReadWriteContext context,
bool  includeFrames = false 
)

Sets the item state from a DOM element.

Parameters
itemElementis the DOM node corresponding to item (e.g. 'LayoutItem' element)
documentDOM document
contextread write context
includeFramesset to true to read state information about child frames from DOM
See also
writeXml()

Definition at line 521 of file qgslayoutmultiframe.cpp.

◆ recalculateFrameRects

void QgsLayoutMultiFrame::recalculateFrameRects ( )
slot

Forces a recalculation of all the associated frame's scene rectangles.

This method is useful for multiframes which implement a minFrameSize() or fixedFrameSize() method.

See also
minFrameSize()
fixedFrameSize()
recalculateFrameSizes

Definition at line 228 of file qgslayoutmultiframe.cpp.

◆ recalculateFrameSizes

void QgsLayoutMultiFrame::recalculateFrameSizes ( )
virtualslot

Recalculates the portion of the multiframe item which is shown in each of its component frames.

If the resize mode is set to anything but UseExistingFrames then this may cause new frames to be added or frames to be removed, in order to fit the current size of the multiframe's content.

See also
recalculateFrameRects()

Definition at line 97 of file qgslayoutmultiframe.cpp.

◆ refresh

void QgsLayoutMultiFrame::refresh ( )
overrideslot

Refreshes the multiframe, causing a recalculation of any property overrides.

Definition at line 339 of file qgslayoutmultiframe.cpp.

◆ refreshDataDefinedProperty

void QgsLayoutMultiFrame::refreshDataDefinedProperty ( QgsLayoutObject::DataDefinedProperty  property = QgsLayoutObject::DataDefinedProperty::AllProperties)
virtualslot

Refreshes a data defined property for the multi frame by reevaluating the property's value and redrawing the item with this new value.

If property is set to QgsLayoutObject::AllProperties then all data defined properties for the item will be refreshed.

Reimplemented in QgsLayoutItemAttributeTable.

Definition at line 243 of file qgslayoutmultiframe.cpp.

◆ removeFrame()

void QgsLayoutMultiFrame::removeFrame ( int  index,
bool  removeEmptyPages = false 
)

Removes a frame by index from the multiframe.

This method automatically removes the frame from the layout too.

If removeEmptyPages is set to true, then pages which are empty after the frame is removed will also be removed from the layout.

See also
addFrame()
deleteFrames()

Definition at line 420 of file qgslayoutmultiframe.cpp.

◆ render()

virtual void QgsLayoutMultiFrame::render ( QgsLayoutItemRenderContext context,
const QRectF &  renderExtent,
int  frameIndex 
)
pure virtual

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

Implemented in QgsLayoutItemHtml, and QgsLayoutTable.

◆ resizeMode()

ResizeMode QgsLayoutMultiFrame::resizeMode ( ) const
inline

Returns the resize mode for the multiframe.

See also
setResizeMode()

Definition at line 229 of file qgslayoutmultiframe.h.

◆ setResizeMode()

void QgsLayoutMultiFrame::setResizeMode ( ResizeMode  mode)

Sets the resize mode for the multiframe, and recalculates frame sizes to match.

See also
resizeMode()

Definition at line 80 of file qgslayoutmultiframe.cpp.

◆ totalSize()

virtual QSizeF QgsLayoutMultiFrame::totalSize ( ) const
pure virtual

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

Implemented in QgsLayoutItemHtml, and QgsLayoutTable.

◆ type()

virtual int QgsLayoutMultiFrame::type ( ) const
pure virtual

Returns unique multiframe type id.

Implemented in QgsLayoutItemAttributeTable, QgsLayoutItemHtml, QgsLayoutItemManualTable, and QgsLayoutItemTextTable.

◆ update

void QgsLayoutMultiFrame::update ( )
slot

Forces a redraw of all child frames.

Definition at line 452 of file qgslayoutmultiframe.cpp.

◆ uuid()

QString QgsLayoutMultiFrame::uuid ( ) const
inline

Returns the multiframe identification string.

This is a unique random string set for the multiframe upon creation.

Note
There is no corresponding setter for the uuid - it's created automatically.

Definition at line 135 of file qgslayoutmultiframe.h.

◆ writePropertiesToElement()

bool QgsLayoutMultiFrame::writePropertiesToElement ( QDomElement &  element,
QDomDocument &  document,
const QgsReadWriteContext context 
) const
protectedvirtual

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 in QgsLayoutItemAttributeTable, QgsLayoutItemHtml, QgsLayoutItemManualTable, and QgsLayoutTable.

Definition at line 574 of file qgslayoutmultiframe.cpp.

◆ writeXml()

bool QgsLayoutMultiFrame::writeXml ( QDomElement &  parentElement,
QDomDocument &  document,
const QgsReadWriteContext context,
bool  includeFrames = false 
) const

Stores the multiframe state in a DOM element.

Parameters
parentElementparent DOM element (e.g. 'Layout' element)
documentDOM document
contextread write context
includeFramesset to true to write state information about child frames into DOM
See also
readXml()

Definition at line 490 of file qgslayoutmultiframe.cpp.

Friends And Related Symbol Documentation

◆ QgsLayout

friend class QgsLayout
friend

Definition at line 437 of file qgslayoutmultiframe.h.

◆ QgsLayoutFrame

friend class QgsLayoutFrame
friend

Definition at line 436 of file qgslayoutmultiframe.h.

Member Data Documentation

◆ mFrameItems

QList<QgsLayoutFrame *> QgsLayoutMultiFrame::mFrameItems
protected

Definition at line 404 of file qgslayoutmultiframe.h.

◆ mResizeMode

ResizeMode QgsLayoutMultiFrame::mResizeMode = UseExistingFrames
protected

Definition at line 406 of file qgslayoutmultiframe.h.


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