1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgsmasterlayoutinterface.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
%ModuleHeaderCode
#include "qgsprintlayout.h"
#include "qgsreport.h"
%End
class QgsMasterLayoutInterface
{
%Docstring(signature="appended")
Interface for master layout type objects, such as print layouts and
reports.
%End
%TypeHeaderCode
#include "qgsmasterlayoutinterface.h"
%End
%ConvertToSubClassCode
switch ( sipCpp->layoutType() )
{
case QgsMasterLayoutInterface::PrintLayout:
sipType = sipType_QgsPrintLayout;
*sipCppRet = static_cast<QgsPrintLayout *>( sipCpp );
break;
case QgsMasterLayoutInterface::Report:
*sipCppRet = static_cast<QgsReport *>( sipCpp );
sipType = sipType_QgsReport;
break;
default:
sipType = NULL;
}
%End
public:
enum Type /BaseType=IntEnum/
{
PrintLayout,
Report,
};
virtual ~QgsMasterLayoutInterface();
virtual QgsMasterLayoutInterface *clone() const = 0 /Factory/;
%Docstring
Creates a clone of the layout. Ownership of the returned layout is
transferred to the caller.
%End
virtual QgsMasterLayoutInterface::Type layoutType() const = 0;
%Docstring
Returns the master layout type.
%End
virtual QString name() const = 0;
%Docstring
Returns the layout's name.
.. seealso:: :py:func:`setName`
%End
virtual QIcon icon() const = 0;
%Docstring
Returns an icon for the layout.
%End
virtual void setName( const QString &name ) = 0;
%Docstring
Sets the layout's name.
.. seealso:: :py:func:`name`
%End
virtual QgsProject *layoutProject() const = 0;
%Docstring
The project associated with the layout. Used to get access to layers,
map themes, relations and various other bits. It is never ``None``.
%End
virtual QDomElement writeLayoutXml( QDomDocument &document, const QgsReadWriteContext &context ) const = 0;
%Docstring
Returns the layout's state encapsulated in a DOM element.
.. seealso:: :py:func:`readLayoutXml`
%End
virtual bool readLayoutXml( const QDomElement &layoutElement, const QDomDocument &document, const QgsReadWriteContext &context ) = 0;
%Docstring
Sets the layout's state from a DOM element. ``layoutElement`` is the DOM
node corresponding to the layout.
.. seealso:: :py:func:`writeLayoutXml`
%End
virtual void updateSettings() = 0;
%Docstring
Refreshes the layout when global layout related options change.
%End
virtual bool layoutAccept( QgsStyleEntityVisitorInterface *visitor ) const;
%Docstring
Accepts the specified style entity ``visitor``, causing it to visit all
style entities associated with the layout.
Returns ``True`` if the visitor should continue visiting other objects,
or ``False`` if visiting should be canceled.
.. versionadded:: 3.10
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgsmasterlayoutinterface.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|