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

159 lines
4.6 KiB
Plaintext
Raw Normal View History

2017-06-20 13:34:27 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2018-01-08 12:18:07 +10:00
* src/core/layout/qgslayoutmanager.h *
2017-06-20 13:34:27 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayoutManager : QObject
{
2017-06-20 13:34:27 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
2017-06-20 13:34:27 +02:00
.. versionadded:: 3.0
2017-12-05 15:27:49 +10:00
Manages storage of a set of layouts.
2017-06-20 13:34:27 +02:00
2017-12-15 10:36:55 -04:00
QgsLayoutManager handles the storage, serializing and deserializing
of print layouts and reports. Usually this class is not constructed directly, but
2017-12-19 11:43:52 -04:00
rather accessed through a QgsProject via :py:func:`QgsProject.layoutManager()`
2017-06-20 13:34:27 +02:00
2017-12-15 10:36:55 -04:00
QgsLayoutManager retains ownership of all the layouts contained
in the manager.
.. note::
Not available in Python bindings
2017-06-20 13:34:27 +02:00
%End
%TypeHeaderCode
2017-06-20 13:34:27 +02:00
#include "qgslayoutmanager.h"
%End
public:
explicit QgsLayoutManager( QgsProject *project /TransferThis/ = 0 );
2017-06-20 13:34:27 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsLayoutManager. The project will become the parent object for this
manager.
2017-06-20 13:34:27 +02:00
%End
~QgsLayoutManager();
2017-06-20 13:34:27 +02:00
bool addLayout( QgsMasterLayoutInterface *layout /Transfer/ );
2017-12-05 15:27:49 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Adds a ``layout`` to the manager. Ownership of the layout is transferred to the manager.
Returns true if the addition was successful, or false if the layout could not be added (eg
as a result of a duplicate layout name).
.. seealso:: :py:func:`removeLayout`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`layoutAdded`
2017-12-05 15:27:49 +10:00
%End
bool removeLayout( QgsMasterLayoutInterface *layout );
2017-12-05 15:27:49 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Removes a ``layout`` from the manager. The layout is deleted.
Returns true if the removal was successful, or false if the removal failed (eg as a result
of removing a layout which is not contained in the manager).
.. seealso:: :py:func:`addLayout`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`layoutRemoved`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`layoutAboutToBeRemoved`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`clear`
2017-06-20 13:34:27 +02:00
%End
void clear();
2017-06-20 13:34:27 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Removes and deletes all layouts from the manager.
.. seealso:: :py:func:`removeLayout`
2017-06-20 13:34:27 +02:00
%End
QList< QgsMasterLayoutInterface * > layouts() const;
2017-12-05 15:27:49 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns a list of all layouts contained in the manager.
2017-12-05 15:27:49 +10:00
%End
QList< QgsPrintLayout * > printLayouts() const;
%Docstring
Returns a list of all print layouts contained in the manager.
%End
QgsMasterLayoutInterface *layoutByName( const QString &name ) const;
2017-12-05 15:27:49 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the layout with a matching name, or None if no matching layouts
were found.
2017-12-05 15:27:49 +10:00
%End
bool readXml( const QDomElement &element, const QDomDocument &doc );
2017-06-20 13:34:27 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Reads the manager's state from a DOM element, restoring all layouts
present in the XML document.
.. seealso:: :py:func:`writeXml`
2017-06-20 13:34:27 +02:00
%End
QDomElement writeXml( QDomDocument &doc ) const;
2017-06-20 13:34:27 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns a DOM element representing the state of the manager.
.. seealso:: :py:func:`readXml`
2017-06-20 13:34:27 +02:00
%End
QgsMasterLayoutInterface *duplicateLayout( const QgsMasterLayoutInterface *layout, const QString &newName );
2017-12-04 16:33:37 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Duplicates an existing ``layout`` from the manager. The new
layout will automatically be stored in the manager.
Returns new the layout if duplication was successful.
2017-06-20 13:34:27 +02:00
%End
QString generateUniqueTitle( QgsMasterLayoutInterface::Type type = QgsMasterLayoutInterface::PrintLayout ) const;
2017-12-05 15:27:49 +10:00
%Docstring
Generates a unique title for a new layout of the specified ``type``, which does not
2017-12-15 10:36:55 -04:00
clash with any already contained by the manager.
2017-12-05 15:27:49 +10:00
%End
signals:
2017-12-05 15:27:49 +10:00
void layoutAboutToBeAdded( const QString &name );
%Docstring
Emitted when a layout is about to be added to the manager
%End
void layoutAdded( const QString &name );
%Docstring
Emitted when a layout has been added to the manager
%End
void layoutRemoved( const QString &name );
%Docstring
Emitted when a layout was removed from the manager
%End
void layoutAboutToBeRemoved( const QString &name );
%Docstring
Emitted when a layout is about to be removed from the manager
2017-06-20 13:34:27 +02:00
%End
void layoutRenamed( QgsMasterLayoutInterface *layout, const QString &newName );
2017-12-05 15:27:49 +10:00
%Docstring
Emitted when a layout is renamed
2017-06-20 13:34:27 +02:00
%End
};
2017-06-20 13:34:27 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2018-01-08 12:18:07 +10:00
* src/core/layout/qgslayoutmanager.h *
2017-06-20 13:34:27 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/