Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add a common base class for print layouts and reports, and adapt
QgsLayoutManager to suit
- Loading branch information
Showing
with
543 additions
and 210 deletions.
- +6 −6 python/core/composer/qgslayoutmanager.sip
- +2 −1 python/core/core_auto.sip
- +2 −2 python/core/layout/qgsabstractreportsection.sip
- +1 −22 python/core/layout/qgslayout.sip
- +76 −0 python/core/layout/qgsmasterlayoutinterface.sip
- +21 −1 python/core/layout/qgsprintlayout.sip
- +18 −7 python/core/layout/qgsreport.sip
- +7 −1 python/gui/layout/qgslayoutdesignerinterface.sip
- +1 −1 python/gui/qgisinterface.sip
- +43 −14 src/app/layout/qgslayoutdesignerdialog.cpp
- +16 −0 src/app/layout/qgslayoutdesignerdialog.h
- +29 −16 src/app/layout/qgslayoutmanagerdialog.cpp
- +3 −3 src/app/layout/qgslayoutmanagerdialog.h
- +8 −8 src/app/qgisapp.cpp
- +3 −2 src/app/qgisapp.h
- +1 −1 src/app/qgisappinterface.cpp
- +1 −1 src/app/qgisappinterface.h
- +2 −1 src/core/CMakeLists.txt
- +52 −19 src/core/composer/qgslayoutmanager.cpp
- +8 −8 src/core/composer/qgslayoutmanager.h
- +12 −2 src/core/layout/qgsabstractreportsection.cpp
- +4 −4 src/core/layout/qgsabstractreportsection.h
- +0 −8 src/core/layout/qgslayout.cpp
- +2 −22 src/core/layout/qgslayout.h
- +5 −1 src/core/layout/qgslayoutexporter.cpp
- +77 −0 src/core/layout/qgsmasterlayoutinterface.h
- +25 −0 src/core/layout/qgsprintlayout.cpp
- +19 −1 src/core/layout/qgsprintlayout.h
- +20 −0 src/core/layout/qgsreport.cpp
- +17 −6 src/core/layout/qgsreport.h
- +1 −1 src/core/layout/qgsreportsectionfieldgroup.cpp
- +2 −1 src/core/qgsexpressioncontext.cpp
- +7 −1 src/gui/layout/qgslayoutdesignerinterface.h
- +2 −1 src/gui/qgisinterface.h
- +2 −2 tests/src/core/testqgslayout.cpp
- +2 −1 tests/src/core/testqgslayoutobject.cpp
- +3 −2 tests/src/python/test_qgslayout.py
- +21 −21 tests/src/python/test_qgslayoutmanager.py
- +22 −22 tests/src/python/test_qgsreport.py
@@ -0,0 +1,76 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/layout/qgsmasterlayoutinterface.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
class QgsMasterLayoutInterface | ||
{ | ||
%Docstring | ||
Interface for master layout type objects, such as print layouts and reports. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsmasterlayoutinterface.h" | ||
%End | ||
public: | ||
|
||
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 QString name() const = 0; | ||
%Docstring | ||
Returns the layout's name. | ||
|
||
.. seealso:: :py:func:`setName()` | ||
%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 null. | ||
%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 | ||
|
||
}; | ||
|
||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/layout/qgsmasterlayoutinterface.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.