16 #ifndef QGSLAYOUTMULTIFRAME_H 17 #define QGSLAYOUTMULTIFRAME_H 19 #include "qgis_core.h" 35 class QStyleOptionGraphicsItem;
65 case QGraphicsItem::UserType + 112:
66 sipType = sipType_QgsLayoutItemHtml;
69 case QGraphicsItem::UserType + 113:
70 sipType = sipType_QgsLayoutItemAttributeTable;
73 case QGraphicsItem::UserType + 114:
74 sipType = sipType_QgsLayoutItemTextTable;
97 UseExistingFrames = 0,
133 QString
uuid()
const {
return mUuid; }
138 virtual QSizeF totalSize()
const = 0;
143 virtual int type()
const = 0;
160 virtual QSizeF fixedFrameSize(
const int frameIndex = -1 )
const;
172 virtual QSizeF minFrameSize(
const int frameIndex = -1 )
const;
197 virtual double findNearbyPageBreak(
double yPos );
209 void removeFrame(
int index,
bool removeEmptyPages =
false );
237 bool writeXml( QDomElement &parentElement, QDomDocument &document,
const QgsReadWriteContext &context,
bool includeFrames =
false )
const;
247 bool readXml(
const QDomElement &itemElement,
const QDomDocument &document,
const QgsReadWriteContext &context,
bool includeFrames =
false );
253 QList<QgsLayoutFrame *> frames()
const;
286 virtual QString displayName()
const;
298 void beginCommand(
const QString &commandText,
UndoCommand command = UndoNone );
312 void cancelCommand();
322 virtual void finalizeRestoreFromXml();
343 virtual void recalculateFrameSizes();
353 void recalculateFrameRects();
369 void contentsChanged();
381 virtual bool writePropertiesToElement( QDomElement &element, QDomDocument &document,
const QgsReadWriteContext &context )
const;
398 virtual bool readPropertiesFromElement(
const QDomElement &element,
const QDomDocument &document,
const QgsReadWriteContext &context );
409 void handlePageChange();
421 bool mIsRecalculatingSize =
false;
423 bool mBlockUpdates =
false;
424 bool mBlockUndoCommands =
false;
426 QList< QString > mFrameUuids;
427 QList< QString > mFrameTemplateUuids;
431 QString mTemplateUuid;
437 #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.