QGIS/python/core/auto_generated/layout/qgslayout.sip.in

658 lines
20 KiB
Plaintext
Raw Normal View History

2017-06-30 17:01:52 +10:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayout.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayout : QGraphicsScene, QgsExpressionContextGenerator, QgsLayoutUndoObjectInterface
2017-06-30 17:01:52 +10:00
{
%Docstring
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
2017-12-15 10:36:55 -04:00
2017-12-16 08:16:52 +10:00
While the raw QGraphicsScene API can be used to render the contents of a QgsLayout
to a QPainter, it is recommended to instead use a QgsLayoutExporter to handle rendering
layouts instead. QgsLayoutExporter automatically takes care of the intracacies of
preparing the layout and paint devices for correct exports, respecting various
user settings such as the layout context DPI.
2017-06-30 17:01:52 +10:00
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgslayout.h"
%End
public:
enum ZValues
{
ZPage,
2017-07-25 14:14:20 +10:00
ZItem,
2017-07-24 07:57:25 +10:00
ZGrid,
ZGuide,
ZSmartGuide,
2017-09-29 16:25:03 +10:00
ZMouseHandles,
2017-10-17 17:39:55 +10:00
ZViewTool,
2017-07-25 14:14:20 +10:00
ZSnapIndicator,
};
enum UndoCommand
{
UndoLayoutDpi,
UndoNone,
};
QgsLayout( QgsProject *project );
%Docstring
2017-12-15 10:36:55 -04:00
Construct a new layout linked to the specified ``project``.
2017-12-15 10:36:55 -04:00
If the layout is a "new" layout (as opposed to a layout which will
restore a previous state from XML) then initializeDefaults() should be
called on the new layout.
%End
~QgsLayout();
QgsLayout *clone() const /Factory/;
2017-12-29 09:38:30 +10:00
%Docstring
Creates a clone of the layout. Ownership of the return layout
is transferred to the caller.
%End
void initializeDefaults();
%Docstring
2017-12-15 10:36:55 -04:00
Initializes an empty layout, e.g. by adding a default page to the layout. This should be called after creating
a new layout.
%End
void clear();
%Docstring
2017-12-15 10:36:55 -04:00
Clears the layout.
2017-12-15 10:36:55 -04:00
Calling this method removes all items and pages from the layout.
%End
QgsProject *project() const;
%Docstring
2017-12-15 10:36:55 -04:00
The project associated with the layout. Used to get access to layers, map themes,
relations and various other bits. It is never ``None``.
%End
2017-06-30 17:01:52 +10:00
QgsLayoutModel *itemsModel();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the items model attached to the layout.
2017-10-16 14:03:57 +10:00
%End
2017-07-28 15:54:17 +10:00
QList<QgsLayoutItem *> selectedLayoutItems( bool includeLockedItems = true );
%Docstring
2017-12-15 10:36:55 -04:00
Returns list of selected layout items.
2019-02-26 19:54:09 +10:00
If ``includeLockedItems`` is set to ``True``, then locked items will also be included
2017-12-15 10:36:55 -04:00
in the returned list.
%End
void setSelectedItem( QgsLayoutItem *item );
%Docstring
2017-12-15 10:36:55 -04:00
Clears any selected items and sets ``item`` as the current selection.
%End
void deselectAll();
%Docstring
2017-12-15 10:36:55 -04:00
Clears any selected items in the layout.
2017-12-15 10:36:55 -04:00
Call this method rather than QGraphicsScene.clearSelection, as the latter does
not correctly emit signals to allow the layout's model to update.
%End
2017-10-03 20:21:52 +10:00
bool raiseItem( QgsLayoutItem *item, bool deferUpdate = false );
2017-10-03 15:56:22 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Raises an ``item`` up the z-order.
2019-02-26 19:54:09 +10:00
Returns ``True`` if the item was successfully raised.
2017-12-15 10:36:55 -04:00
2019-02-26 19:54:09 +10:00
If ``deferUpdate`` is ``True``, the scene will not be visibly updated
2017-12-15 10:36:55 -04:00
to reflect the new stacking order. This allows multiple
raiseItem() calls to be made in sequence without the cost of
updating the scene for each one.
2017-10-03 20:21:52 +10:00
.. seealso:: :py:func:`lowerItem`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`updateZValues`
2017-10-03 15:56:22 +10:00
%End
2017-10-03 20:21:52 +10:00
bool lowerItem( QgsLayoutItem *item, bool deferUpdate = false );
2017-10-03 15:56:22 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Lowers an ``item`` down the z-order.
2019-02-26 19:54:09 +10:00
Returns ``True`` if the item was successfully lowered.
2017-12-15 10:36:55 -04:00
2019-02-26 19:54:09 +10:00
If ``deferUpdate`` is ``True``, the scene will not be visibly updated
2017-12-15 10:36:55 -04:00
to reflect the new stacking order. This allows multiple
raiseItem() calls to be made in sequence without the cost of
updating the scene for each one.
2017-10-03 20:21:52 +10:00
.. seealso:: :py:func:`raiseItem`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`updateZValues`
2017-10-03 15:56:22 +10:00
%End
2017-10-03 20:21:52 +10:00
bool moveItemToTop( QgsLayoutItem *item, bool deferUpdate = false );
2017-10-03 15:56:22 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Raises an ``item`` up to the top of the z-order.
2019-02-26 19:54:09 +10:00
Returns ``True`` if the item was successfully raised.
2017-10-03 20:21:52 +10:00
2019-02-26 19:54:09 +10:00
If ``deferUpdate`` is ``True``, the scene will not be visibly updated
2017-12-15 10:36:55 -04:00
to reflect the new stacking order. This allows multiple
raiseItem() calls to be made in sequence without the cost of
updating the scene for each one.
.. seealso:: :py:func:`moveItemToBottom`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`updateZValues`
2017-10-03 15:56:22 +10:00
%End
2017-10-03 20:21:52 +10:00
bool moveItemToBottom( QgsLayoutItem *item, bool deferUpdate = false );
2017-10-03 15:56:22 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Lowers an ``item`` down to the bottom of the z-order.
2019-02-26 19:54:09 +10:00
Returns ``True`` if the item was successfully lowered.
If ``deferUpdate`` is ``True``, the scene will not be visibly updated
2017-12-15 10:36:55 -04:00
to reflect the new stacking order. This allows multiple
raiseItem() calls to be made in sequence without the cost of
updating the scene for each one.
.. seealso:: :py:func:`moveItemToTop`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`updateZValues`
2017-10-03 15:56:22 +10:00
%End
void updateZValues( bool addUndoCommands = true );
2017-10-03 15:56:22 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Resets the z-values of items based on their position in the internal
z order list. This should be called after any stacking changes
which deferred z-order updates.
%End
2017-12-16 08:16:52 +10:00
QgsLayoutItem *itemByUuid( const QString &uuid, bool includeTemplateUuids = false ) const;
2017-07-28 15:54:17 +10:00
%Docstring
Returns the layout item with matching ``uuid`` unique identifier, or ``None``
2017-12-15 10:36:55 -04:00
if a matching item could not be found.
2019-02-26 19:54:09 +10:00
If ``includeTemplateUuids`` is ``True``, then item's template UUID
will also be tested when trying to match the uuid. This may differ from the item's UUID
for items which have been added to an existing layout from a template. In this case
the template UUID returns the original item UUID at the time the template was created,
vs the item's uuid() which returns the current instance of the item's unique identifier.
Note that template UUIDs are only available while a layout is being restored from XML.
.. seealso:: :py:func:`itemByTemplateUuid`
.. seealso:: :py:func:`multiFrameByUuid`
.. seealso:: :py:func:`itemById`
%End
QgsLayoutItem *itemByTemplateUuid( const QString &uuid ) const;
%Docstring
Returns the layout item with matching template ``uuid`` unique identifier, or ``None``
if a matching item could not be found. Unlike itemByUuid(), this method ONLY checks
template UUIDs for a match.
Template UUIDs are valid only for items which have been added to an existing layout from a template. In this case
the template UUID is the original item UUID at the time the template was created,
vs the item's uuid() which returns the current instance of the item's unique identifier.
Note that template UUIDs are only available while a layout is being restored from XML.
.. seealso:: :py:func:`itemByUuid`
2017-12-05 15:27:49 +10:00
.. seealso:: :py:func:`multiFrameByUuid`
2017-12-28 12:33:36 +10:00
.. seealso:: :py:func:`itemById`
2017-12-28 12:33:36 +10:00
%End
QgsLayoutItem *itemById( const QString &id ) const;
%Docstring
Returns a layout item given its ``id``.
Since item IDs are not necessarely unique, this function returns the first matching
item found.
.. seealso:: :py:func:`itemByUuid`
2017-07-28 15:54:17 +10:00
%End
QgsLayoutMultiFrame *multiFrameByUuid( const QString &uuid, bool includeTemplateUuids = false ) const;
2017-10-31 17:20:02 +10:00
%Docstring
Returns the layout multiframe with matching ``uuid`` unique identifier, or ``None``
2017-12-15 10:36:55 -04:00
if a matching multiframe could not be found.
2019-02-26 19:54:09 +10:00
If ``includeTemplateUuids`` is ``True``, then the multiframe's :py:func:`QgsLayoutMultiFrame.templateUuid()`
will also be tested when trying to match the uuid. Template UUIDs are valid only for items
which have been added to an existing layout from a template. In this case
the template UUID is the original item UUID at the time the template was created,
vs the item's uuid() which returns the current instance of the item's unique identifier.
Note that template UUIDs are only available while a layout is being restored from XML.
.. seealso:: :py:func:`itemByUuid`
2017-10-31 17:20:02 +10:00
%End
QgsLayoutItem *layoutItemAt( QPointF position, bool ignoreLocked = false ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the topmost layout item at a specified ``position``. Ignores paper items.
2019-02-26 19:54:09 +10:00
If ``ignoreLocked`` is set to ``True`` any locked items will be ignored.
%End
QgsLayoutItem *layoutItemAt( QPointF position, const QgsLayoutItem *belowItem, bool ignoreLocked = false ) const;
%Docstring
Returns the topmost layout item at a specified ``position`` which is below a specified ``item``. Ignores paper items.
2019-02-26 19:54:09 +10:00
If ``ignoreLocked`` is set to ``True`` any locked items will be ignored.
%End
void setUnits( QgsUnitTypes::LayoutUnit units );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the native measurement ``units`` for the layout. These also form the default unit
for measurements for the layout.
.. seealso:: :py:func:`units`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`convertToLayoutUnits`
%End
QgsUnitTypes::LayoutUnit units() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the native units for the layout.
.. seealso:: :py:func:`setUnits`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`convertToLayoutUnits`
%End
double convertToLayoutUnits( QgsLayoutMeasurement measurement ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Converts a measurement into the layout's native units.
:return: length of measurement in layout units
.. seealso:: :py:func:`convertFromLayoutUnits`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`units`
%End
QSizeF convertToLayoutUnits( const QgsLayoutSize &size ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Converts a size into the layout's native units.
:return: size of measurement in layout units
.. seealso:: :py:func:`convertFromLayoutUnits`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`units`
%End
QPointF convertToLayoutUnits( const QgsLayoutPoint &point ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Converts a ``point`` into the layout's native units.
:return: point in layout units
.. seealso:: :py:func:`convertFromLayoutUnits`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`units`
%End
QgsLayoutMeasurement convertFromLayoutUnits( double length, QgsUnitTypes::LayoutUnit unit ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Converts a ``length`` measurement from the layout's native units to a specified target ``unit``.
:return: length of measurement in specified units
.. seealso:: :py:func:`convertToLayoutUnits`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`units`
%End
QgsLayoutSize convertFromLayoutUnits( QSizeF size, QgsUnitTypes::LayoutUnit unit ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Converts a ``size`` from the layout's native units to a specified target ``unit``.
:return: size of measurement in specified units
.. seealso:: :py:func:`convertToLayoutUnits`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`units`
%End
QgsLayoutPoint convertFromLayoutUnits( QPointF point, QgsUnitTypes::LayoutUnit unit ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Converts a ``point`` from the layout's native units to a specified target ``unit``.
:return: point in specified units
.. seealso:: :py:func:`convertToLayoutUnits`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`units`
%End
QgsLayoutRenderContext &renderContext();
%Docstring
Returns a reference to the layout's render context, which stores information relating to the
current rendering settings for the layout.
%End
QgsLayoutReportContext &reportContext();
%Docstring
Returns a reference to the layout's report context, which stores information relating to the
current reporting context for the layout.
%End
2017-07-24 08:12:07 +10:00
QgsLayoutSnapper &snapper();
%Docstring
2017-12-15 10:36:55 -04:00
Returns a reference to the layout's snapper, which stores handles layout snap grids and lines
and snapping points to the nearest matching point.
2017-07-24 08:12:07 +10:00
%End
QgsLayoutGridSettings &gridSettings();
%Docstring
2017-12-15 10:36:55 -04:00
Returns a reference to the layout's grid settings, which stores settings relating
to grid appearance, spacing and offsets.
%End
void reloadSettings();
%Docstring
Refreshes the layout when global layout related options change.
%End
QgsLayoutGuideCollection &guides();
%Docstring
2017-12-15 10:36:55 -04:00
Returns a reference to the layout's guide collection, which manages page snap guides.
%End
virtual QgsExpressionContext createExpressionContext() const;
%Docstring
2017-12-15 10:36:55 -04:00
Creates an expression context relating to the layout's current state. The context includes
scopes for global, project, layout and layout context properties.
%End
void setCustomProperty( const QString &key, const QVariant &value );
%Docstring
2017-12-15 10:36:55 -04:00
Set a custom property for the layout.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param key: property key. If a property with the same key already exists it will be overwritten.
:param value: property value
.. seealso:: :py:func:`customProperty`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`removeCustomProperty`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`customProperties`
%End
QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Read a custom property from the layout.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param key: property key
:param defaultValue: default value to return if property with matching key does not exist
:return: value of matching property
.. seealso:: :py:func:`setCustomProperty`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`removeCustomProperty`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`customProperties`
%End
void removeCustomProperty( const QString &key );
%Docstring
2017-12-15 10:36:55 -04:00
Remove a custom property from the layout.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param key: property key
.. seealso:: :py:func:`setCustomProperty`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`customProperty`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`customProperties`
%End
QStringList customProperties() const;
%Docstring
Returns list of keys stored in custom properties for the layout.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setCustomProperty`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`customProperty`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`removeCustomProperty`
%End
QgsLayoutItemMap *referenceMap() const;
2017-12-16 08:16:52 +10:00
%Docstring
Returns the map item which will be used to generate corresponding world files when the
layout is exported. If no map was explicitly set via setReferenceMap(), the largest
map in the layout will be returned (or ``None`` if there are no maps in the layout).
2017-12-16 08:16:52 +10:00
.. seealso:: :py:func:`setReferenceMap`
2017-12-16 08:16:52 +10:00
%End
void setReferenceMap( QgsLayoutItemMap *map );
2017-12-16 08:16:52 +10:00
%Docstring
Sets the ``map`` item which will be used to generate corresponding world files when the
layout is exported.
.. seealso:: :py:func:`referenceMap`
2017-12-16 08:16:52 +10:00
%End
QgsLayoutPageCollection *pageCollection();
%Docstring
2017-12-15 10:36:55 -04:00
Returns a pointer to the layout's page collection, which stores and manages
page items in the layout.
%End
QRectF layoutBounds( bool ignorePages = false, double margin = 0.0 ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Calculates the bounds of all non-gui items in the layout. Ignores snap lines, mouse handles
and other cosmetic items.
2017-12-15 21:36:08 -04:00
2019-02-26 19:54:09 +10:00
:param ignorePages: set to ``True`` to ignore page items
2017-12-15 10:36:55 -04:00
:param margin: optional marginal (in percent, e.g., 0.05 = 5% ) to add around items
:return: layout bounds, in layout units.
2017-12-16 08:16:52 +10:00
.. seealso:: :py:func:`pageItemBounds`
2017-12-16 08:16:52 +10:00
%End
QRectF pageItemBounds( int page, bool visibleOnly = false ) const;
%Docstring
Returns the bounding box of the items contained on a specified ``page``.
A page number of 0 represents the first page in the layout.
2019-02-26 19:54:09 +10:00
Set ``visibleOnly`` to ``True`` to only include visible items.
2017-12-16 08:16:52 +10:00
The returned bounds are in layout units.
.. seealso:: :py:func:`layoutBounds`
%End
void addLayoutItem( QgsLayoutItem *item /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Adds an ``item`` to the layout. This should be called instead of the base class addItem()
method. Ownership of the item is transferred to the layout.
%End
void removeLayoutItem( QgsLayoutItem *item );
%Docstring
2017-12-15 10:36:55 -04:00
Removes an ``item`` from the layout. This should be called instead of the base class removeItem()
method.
The item will also be deleted.
%End
2017-11-20 13:38:28 +10:00
void addMultiFrame( QgsLayoutMultiFrame *multiFrame /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Adds a ``multiFrame`` to the layout. The object is owned by the layout until removeMultiFrame() is called.
.. seealso:: :py:func:`removeMultiFrame`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`multiFrames`
2017-11-20 13:38:28 +10:00
%End
void removeMultiFrame( QgsLayoutMultiFrame *multiFrame );
%Docstring
2017-12-15 10:36:55 -04:00
Removes a ``multiFrame`` from the layout (but does not delete it).
.. seealso:: :py:func:`addMultiFrame`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`multiFrames`
2017-11-20 13:38:28 +10:00
%End
QList< QgsLayoutMultiFrame * > multiFrames() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns a list of multi frames contained in the layout.
.. seealso:: :py:func:`addMultiFrame`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`removeMultiFrame`
2017-11-20 13:38:28 +10:00
%End
2017-10-27 13:08:20 +10:00
bool saveAsTemplate( const QString &path, const QgsReadWriteContext &context ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Saves the layout as a template at the given file ``path``.
2019-02-26 19:54:09 +10:00
Returns ``True`` if save was successful.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`loadFromTemplate`
%End
QList< QgsLayoutItem * > loadFromTemplate( const QDomDocument &document, const QgsReadWriteContext &context, bool clearExisting = true, bool *ok /Out/ = 0 );
%Docstring
2017-12-15 10:36:55 -04:00
Load a layout template ``document``.
2017-12-15 10:36:55 -04:00
By default this method will clear all items from the existing layout and real all layout
2019-02-26 19:54:09 +10:00
settings from the template. Setting ``clearExisting`` to ``False`` will only add new items
2017-12-15 10:36:55 -04:00
from the template, without overwriting the existing items or layout settings.
2019-02-26 19:54:09 +10:00
If ``ok`` is specified, it will be set to ``True`` if the load was successful.
2017-12-15 10:36:55 -04:00
Returns a list of loaded items.
%End
2017-12-19 15:31:15 +10:00
virtual QDomElement writeXml( QDomDocument &document, const QgsReadWriteContext &context ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the layout's state encapsulated in a DOM element.
.. seealso:: :py:func:`readXml`
%End
2017-12-19 15:31:15 +10:00
virtual bool readXml( const QDomElement &layoutElement, const QDomDocument &document, const QgsReadWriteContext &context );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the collection's state from a DOM element. ``layoutElement`` is the DOM node corresponding to the layout.
.. seealso:: :py:func:`writeXml`
%End
2017-11-30 17:29:23 +10:00
QList< QgsLayoutItem * > addItemsFromXml( const QDomElement &parentElement, const QDomDocument &document,
const QgsReadWriteContext &context,
QPointF *position = 0, bool pasteInPlace = false );
%Docstring
2017-12-15 10:36:55 -04:00
Add items from an XML representation to the layout. Used for project file reading and pasting items from clipboard.
The ``position`` argument is optional, and if it is not specified the items will be restored to their
original position from the XML serialization. If specified, the items will be positioned such that the top-left
bounds of all added items is located at this ``position``.
2017-12-15 10:36:55 -04:00
The ``pasteInPlace`` argument determines whether the serialized position should be respected, but remapped to the
origin of the page corresponding to the page at ``position``.
2017-12-15 10:36:55 -04:00
A list of the newly added items is returned.
%End
QgsLayoutUndoStack *undoStack();
%Docstring
2017-12-15 10:36:55 -04:00
Returns a pointer to the layout's undo stack, which manages undo/redo states for the layout
and it's associated objects.
%End
virtual QgsAbstractLayoutUndoCommand *createCommand( const QString &text, int id = 0, QUndoCommand *parent = 0 ) /Factory/;
QgsLayoutItemGroup *groupItems( const QList<QgsLayoutItem *> &items );
%Docstring
2017-12-15 10:36:55 -04:00
Creates a new group from a list of layout ``items`` and adds the group to the layout.
If grouping was not possible, ``None`` will be returned.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`ungroupItems`
%End
QList<QgsLayoutItem *> ungroupItems( QgsLayoutItemGroup *group );
%Docstring
2017-12-15 10:36:55 -04:00
Ungroups items by removing them from an item ``group`` and removing the group from the
layout. Child items will remain in the layout and will not be deleted.
2017-12-15 10:36:55 -04:00
Returns a list of the items removed from the group, or an empty list if ungrouping
was not successful.
.. seealso:: :py:func:`groupItems`
%End
public slots:
2017-10-13 12:23:55 +10:00
void refresh();
%Docstring
2017-12-15 10:36:55 -04:00
Forces the layout, and all items contained within it, to refresh. For instance, this causes maps to redraw
and rebuild cached images, html items to reload their source url, and attribute tables
to refresh their contents. Calling this also triggers a recalculation of all data defined
attributes within the layout.
2017-10-13 12:23:55 +10:00
.. seealso:: :py:func:`refreshed`
2017-10-13 12:23:55 +10:00
%End
void updateBounds();
%Docstring
2017-12-15 10:36:55 -04:00
Updates the scene bounds of the layout.
%End
signals:
void changed();
%Docstring
2019-02-25 19:18:29 +10:00
Emitted when properties of the layout change. This signal is only
2017-12-16 08:16:52 +10:00
emitted for settings directly managed by the layout, and is not emitted
when child items change.
%End
void variablesChanged();
%Docstring
2017-12-15 10:36:55 -04:00
Emitted whenever the expression variables stored in the layout have been changed.
%End
void selectedItemChanged( QgsLayoutItem *selected );
%Docstring
2017-12-15 10:36:55 -04:00
Emitted whenever the selected item changes.
If ``None``, no item is selected.
%End
2017-10-13 12:23:55 +10:00
void refreshed();
%Docstring
2019-02-25 19:18:29 +10:00
Emitted when the layout has been refreshed and items should also be refreshed
2017-12-15 10:36:55 -04:00
and updated.
%End
2017-06-30 17:01:52 +10:00
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayout.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/