QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
16 #ifndef QGSLAYOUTMULTIFRAME_H
17 #define QGSLAYOUTMULTIFRAME_H
19 #include "qgis_core.h"
36 class QStyleOptionGraphicsItem;
67 case QGraphicsItem::UserType + 112:
68 sipType = sipType_QgsLayoutItemHtml;
71 case QGraphicsItem::UserType + 113:
72 sipType = sipType_QgsLayoutItemAttributeTable;
75 case QGraphicsItem::UserType + 114:
76 sipType = sipType_QgsLayoutItemTextTable;
79 case QGraphicsItem::UserType + 116:
80 sipType = sipType_QgsLayoutItemManualTable;
103 UseExistingFrames = 0,
139 QString
uuid()
const {
return mUuid; }
144 virtual QSizeF totalSize()
const = 0;
149 virtual int type()
const = 0;
166 virtual QSizeF fixedFrameSize(
int frameIndex = -1 )
const;
178 virtual QSizeF minFrameSize(
int frameIndex = -1 )
const;
203 virtual double findNearbyPageBreak(
double yPos );
215 void removeFrame(
int index,
bool removeEmptyPages =
false );
227 void setResizeMode( ResizeMode mode );
243 bool writeXml( QDomElement &parentElement, QDomDocument &document,
const QgsReadWriteContext &context,
bool includeFrames =
false )
const;
253 bool readXml(
const QDomElement &itemElement,
const QDomDocument &document,
const QgsReadWriteContext &context,
bool includeFrames =
false );
259 QList<QgsLayoutFrame *> frames()
const;
292 virtual QString displayName()
const;
306 void beginCommand( const QString &commandText, UndoCommand command = UndoNone );
320 void cancelCommand();
330 virtual
void finalizeRestoreFromXml();
337 void refresh() override;
351 virtual
void recalculateFrameSizes();
361 void recalculateFrameRects();
377 void contentsChanged();
389 virtual
bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const
QgsReadWriteContext &context ) const;
406 virtual
bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const
QgsReadWriteContext &context );
417 void handlePageChange();
429 bool mIsRecalculatingSize = false;
431 bool mBlockUpdates = false;
432 bool mBlockUndoCommands = false;
434 QList< QString > mFrameUuids;
435 QList< QString > mFrameTemplateUuids;
439 QString mTemplateUuid;
445 #endif // QGSLAYOUTMULTIFRAME_H
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
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.
@ UndoHtmlBreakDistance
HTML page break distance.
The class is used as a container of context for various read/write operations on other objects.
@ UndoTableCellStyle
Table cell style.
Contains settings and helpers relating to a render of a QgsLayoutItem.
A layout multiframe subclass for HTML content.
Contains information about the context of a rendering operation.
Abstract base class for layout items with the ability to distribute the content to several frames (Qg...
virtual QIcon icon() const
Returns the item's icon.
@ UndoTableHeaderFontColor
Table header font color.
@ ExtendToNextPage
Creates new full page frames on the following page(s) until the entire multiframe content is visible.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
@ UndoHtmlStylesheet
HTML stylesheet.
@ UndoTableGridColor
Table grid color.
Base class for frame items, which form a layout multiframe item.
ResizeMode
Specifies the behavior for creating new frames to fit the multiframe's content.
@ UndoTableContentFontColor
Table content font color.
@ UndoTableBackgroundColor
Table background color.
A layout table subclass that displays attributes from a vector layer.
ResizeMode resizeMode() const
Returns the resize mode for the multiframe.
Base class for graphical items within a QgsLayout.
@ UndoTableMaximumFeatures
Maximum features in table.
Interface for layout objects which support undo/redo commands.
QString uuid() const
Returns the multiframe identification string.
A text table item that reads text from string lists.
Base class for commands to undo/redo layout and layout object changes.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
@ RepeatOnEveryPage
Repeats the same frame on every page.
UndoCommand
Multiframe item undo commands, used for collapsing undo commands.
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
@ UndoTableGridStrokeWidth
Table grid stroke width.
@ UndoTableMargin
Table margins.
A layout table subclass that displays manually entered (and formatted) content.
int frameCount() const
Returns the number of frames associated with this multiframe.
A base class for objects which belong to a layout.
@ UndoHtmlSource
HTML source.