QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
An interface for layout objects which can be stored and read from DOM elements. More...
#include <qgslayoutserializableobject.h>
Public Member Functions | |
QgsAbstractLayoutUndoCommand * | createCommand (const QString &text, int id, QUndoCommand *parent=nullptr) override |
Creates a new layout undo command with the specified text and parent. More... | |
virtual QgsLayout * | layout ()=0 |
Returns the layout the object belongs to. More... | |
virtual bool | readXml (const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context)=0 |
Sets the objects's state from a DOM element. More... | |
virtual QString | stringType () const =0 |
Returns the object type as a string. More... | |
virtual bool | writeXml (QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context) const =0 |
Stores the objects's state in a DOM element. More... | |
Public Member Functions inherited from QgsLayoutUndoObjectInterface | |
virtual | ~QgsLayoutUndoObjectInterface ()=default |
Destructor for QgsLayoutUndoObjectInterface. More... | |
virtual QgsAbstractLayoutUndoCommand * | createCommand (const QString &text, int id=0, QUndoCommand *parent=nullptr)=0 |
Creates a new layout undo command with the specified text and parent. More... | |
Friends | |
class | QgsLayoutSerializableObjectUndoCommand |
An interface for layout objects which can be stored and read from DOM elements.
Definition at line 35 of file qgslayoutserializableobject.h.
|
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 78 of file qgslayoutserializableobject.cpp.
|
pure virtual |
Returns the layout the object belongs to.
Implemented in QgsLayoutAtlas, QgsLayoutGridSettings, QgsLayoutGuideCollection, QgsLayoutPageCollection, and QgsLayoutSnapper.
|
pure virtual |
Sets the objects's state from a DOM element.
element is the DOM node corresponding to the object.
Implemented in QgsLayoutGuideCollection, QgsLayoutPageCollection, QgsLayoutAtlas, QgsLayoutGridSettings, and QgsLayoutSnapper.
|
pure virtual |
Returns the object type as a string.
This string must be a unique, single word, character only representation of the item type, eg "LayoutScaleBar"
Implemented in QgsLayoutAtlas, QgsLayoutGridSettings, QgsLayoutGuideCollection, QgsLayoutPageCollection, and QgsLayoutSnapper.
|
pure virtual |
Stores the objects's state in a DOM element.
The parentElement should refer to the parent layout's DOM element.
Implemented in QgsLayoutAtlas, QgsLayoutGridSettings, QgsLayoutGuideCollection, QgsLayoutPageCollection, and QgsLayoutSnapper.
|
friend |
Definition at line 67 of file qgslayoutserializableobject.h.