16 #ifndef QGSLAYOUTMULTIFRAME_H 17 #define QGSLAYOUTMULTIFRAME_H 19 #include "qgis_core.h" 36 class QStyleOptionGraphicsItem;
66 case QGraphicsItem::UserType + 112:
67 sipType = sipType_QgsLayoutItemHtml;
70 case QGraphicsItem::UserType + 113:
71 sipType = sipType_QgsLayoutItemAttributeTable;
74 case QGraphicsItem::UserType + 114:
75 sipType = sipType_QgsLayoutItemTextTable;
98 UseExistingFrames = 0,
134 QString
uuid()
const {
return mUuid; }
139 virtual QSizeF totalSize()
const = 0;
144 virtual int type()
const = 0;
161 virtual QSizeF fixedFrameSize(
int frameIndex = -1 )
const;
173 virtual QSizeF minFrameSize(
int frameIndex = -1 )
const;
198 virtual double findNearbyPageBreak(
double yPos );
210 void removeFrame(
int index,
bool removeEmptyPages =
false );
238 bool writeXml( QDomElement &parentElement, QDomDocument &document,
const QgsReadWriteContext &context,
bool includeFrames =
false )
const;
248 bool readXml(
const QDomElement &itemElement,
const QDomDocument &document,
const QgsReadWriteContext &context,
bool includeFrames =
false );
254 QList<QgsLayoutFrame *> frames()
const;
287 virtual QString displayName()
const;
299 void beginCommand(
const QString &commandText,
UndoCommand command = UndoNone );
313 void cancelCommand();
323 virtual void finalizeRestoreFromXml();
344 virtual void recalculateFrameSizes();
354 void recalculateFrameRects();
370 void contentsChanged();
382 virtual bool writePropertiesToElement( QDomElement &element, QDomDocument &document,
const QgsReadWriteContext &context )
const;
399 virtual bool readPropertiesFromElement(
const QDomElement &element,
const QDomDocument &document,
const QgsReadWriteContext &context );
410 void handlePageChange();
422 bool mIsRecalculatingSize =
false;
424 bool mBlockUpdates =
false;
425 bool mBlockUndoCommands =
false;
427 QList< QString > mFrameUuids;
428 QList< QString > mFrameTemplateUuids;
432 QString mTemplateUuid;
438 #endif // QGSLAYOUTMULTIFRAME_H
QString uuid() const
Returns the multiframe identification string.
The class is used as a container of context for various read/write operations on other objects...
virtual QIcon icon() const
Returns the item's icon.
Base class for graphical items within a QgsLayout.
Base class for commands to undo/redo layout and layout object changes.
HTML page break distance.
static QIcon getThemeIcon(const QString &name)
Helper to get a theme icon.
QList< QgsLayoutFrame * > mFrameItems
int frameCount() const
Returns the number of frames associated with this multiframe.
Creates new full page frames on the following page(s) until the entire multiframe content is visible...
Abstract base class for layout items with the ability to distribute the content to several frames (Qg...
Maximum features in table.
Table content font color.
Repeats the same frame on every page.
A layout table subclass that displays attributes from a vector layer.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Contains settings and helpers relating to a render of a QgsLayoutItem.
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.
ResizeMode
Specifies the behavior for creating new frames to fit the multiframe's content.
Contains information about the context of a rendering operation.
ResizeMode resizeMode() const
Returns the resize mode for the multiframe.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Interface for layout objects which support undo/redo commands.
A base class for objects which belong to a layout.
UndoCommand
Multiframe item undo commands, used for collapsing undo commands.
virtual void refresh()
Refreshes the object, causing a recalculation of any property overrides.
DataDefinedProperty
Data defined properties for different item types.
Base class for frame items, which form a layout multiframe item.
A layout multiframe subclass for HTML content.
A text table item that reads text from string lists.