Skip to content

Commit

Permalink
Merge pull request #5966 from nyalldawson/layout_next
Browse files Browse the repository at this point in the history
[layouts] Atlas and reporting framework
  • Loading branch information
nyalldawson authored Jan 5, 2018
2 parents 63cc124 + bf6c95d commit 421ef88
Show file tree
Hide file tree
Showing 191 changed files with 14,274 additions and 1,265 deletions.
1 change: 1 addition & 0 deletions images/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@
<file>themes/default/mIconPythonFile.svg</file>
<file>themes/default/mIconQptFile.svg</file>
<file>themes/default/mActionNewPage.svg</file>
<file>themes/default/mActionExport.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
Expand Down
192 changes: 192 additions & 0 deletions images/themes/default/mActionExport.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions python/core/composer/qgslayoutmanager.sip
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ as a result of a duplicate composition name).
.. seealso:: :py:func:`compositionAdded()`
%End

bool addLayout( QgsLayout *layout /Transfer/ );
bool addLayout( QgsMasterLayoutInterface *layout /Transfer/ );
%Docstring
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
Expand All @@ -76,7 +76,7 @@ of removing a composition which is not contained in the manager).
.. seealso:: :py:func:`clear()`
%End

bool removeLayout( QgsLayout *layout );
bool removeLayout( QgsMasterLayoutInterface *layout );
%Docstring
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
Expand All @@ -103,7 +103,7 @@ Removes and deletes all layouts from the manager.
Returns a list of all compositions contained in the manager.
%End

QList< QgsLayout * > layouts() const;
QList< QgsMasterLayoutInterface * > layouts() const;
%Docstring
Returns a list of all layouts contained in the manager.
%End
Expand All @@ -114,7 +114,7 @@ Returns the composition with a matching name, or None if no matching composition
were found.
%End

QgsLayout *layoutByName( const QString &name ) const;
QgsMasterLayoutInterface *layoutByName( const QString &name ) const;
%Docstring
Returns the layout with a matching name, or None if no matching layouts
were found.
Expand Down Expand Up @@ -148,7 +148,7 @@ composition will automatically be stored in the manager.
Returns new composition if duplication was successful.
%End

QgsLayout *duplicateLayout( const QgsLayout *layout, const QString &newName );
QgsMasterLayoutInterface *duplicateLayout( const QgsMasterLayoutInterface *layout, const QString &newName );
%Docstring
Duplicates an existing ``layout`` from the manager. The new
layout will automatically be stored in the manager.
Expand All @@ -161,9 +161,9 @@ Generates a unique title for a new composition, which does not
clash with any already contained by the manager.
%End

QString generateUniqueTitle() const;
QString generateUniqueTitle( QgsMasterLayoutInterface::Type type = QgsMasterLayoutInterface::PrintLayout ) const;
%Docstring
Generates a unique title for a new layout, which does not
Generates a unique title for a new layout of the specified ``type``, which does not
clash with any already contained by the manager.
%End

Expand Down Expand Up @@ -214,7 +214,7 @@ Emitted when a layout is about to be removed from the manager
Emitted when a composition is renamed
%End

void layoutRenamed( QgsLayout *layout, const QString &newName );
void layoutRenamed( QgsMasterLayoutInterface *layout, const QString &newName );
%Docstring
Emitted when a layout is renamed
%End
Expand Down
11 changes: 10 additions & 1 deletion python/core/core_auto.sip
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@
%Include composer/qgscomposermultiframecommand.sip
%Include composer/qgscomposertexttable.sip
%Include composer/qgspaperitem.sip
%Include layout/qgsabstractlayoutiterator.sip
%Include layout/qgsabstractreportsection.sip
%Include layout/qgsmasterlayoutinterface.sip
%Include layout/qgslayoutaligner.sip
%Include layout/qgslayoutexporter.sip
%Include layout/qgslayoutgridsettings.sip
Expand All @@ -173,6 +176,8 @@
%Include layout/qgslayoutsnapper.sip
%Include layout/qgslayoutundocommand.sip
%Include layout/qgslayoututils.sip
%Include layout/qgsreportsectionfieldgroup.sip
%Include layout/qgsreportsectionlayout.sip
%Include metadata/qgslayermetadata.sip
%Include metadata/qgslayermetadatavalidator.sip
%Include metadata/qgslayermetadataformatter.sip
Expand Down Expand Up @@ -406,7 +411,7 @@
%Include gps/qgsnmeaconnection.sip
%Include gps/qgsgpsdconnection.sip
%Include layout/qgslayout.sip
%Include layout/qgslayoutcontext.sip
%Include layout/qgslayoutatlas.sip
%Include layout/qgslayouteffect.sip
%Include layout/qgslayoutguidecollection.sip
%Include layout/qgslayoutframe.sip
Expand All @@ -433,9 +438,13 @@
%Include layout/qgslayoutmultiframe.sip
%Include layout/qgslayoutpagecollection.sip
%Include layout/qgslayoutobject.sip
%Include layout/qgslayoutrendercontext.sip
%Include layout/qgslayoutreportcontext.sip
%Include layout/qgslayouttable.sip
%Include layout/qgslayouttablecolumn.sip
%Include layout/qgslayoutundostack.sip
%Include layout/qgsprintlayout.sip
%Include layout/qgsreport.sip
%Include symbology/qgscptcityarchive.sip
%Include symbology/qgssvgcache.sip
%Include symbology/qgsstyle.sip
Expand Down
71 changes: 71 additions & 0 deletions python/core/layout/qgsabstractlayoutiterator.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgsabstractlayoutiterator.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/



class QgsAbstractLayoutIterator
{
%Docstring
An abstract base class for QgsLayout based classes which can be exported by QgsLayoutExporter.

.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsabstractlayoutiterator.h"
%End
public:

virtual ~QgsAbstractLayoutIterator();

virtual QgsLayout *layout() = 0;
%Docstring
Returns the layout associated with the iterator.
%End

virtual bool beginRender() = 0;
%Docstring
Called when rendering begins, before iteration commences. Returns true if successful, false if no iteration
is available or required.

.. seealso:: :py:func:`endRender()`
%End

virtual bool endRender() = 0;
%Docstring
Ends the render, performing any required cleanup tasks.
%End

virtual int count() = 0;
%Docstring
Returns the number of features to iterate over.
%End

virtual bool next() = 0;
%Docstring
Iterates to next feature, returning false if no more features exist to iterate over.
%End

virtual QString filePath( const QString &baseFilePath, const QString &extension ) = 0;
%Docstring
Returns the file path for the current feature, based on a
specified base file path and extension.
%End

};




/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgsabstractlayoutiterator.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
Loading

0 comments on commit 421ef88

Please sign in to comment.