QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsabstractlayoutiterator.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsabstractlayoutiterator.h
3  ---------------------------
4  begin : December 2017
5  copyright : (C) 2017 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 #ifndef QGSABSTRACTLAYOUTITERATOR_H
17 #define QGSABSTRACTLAYOUTITERATOR_H
18 
19 #include "qgis_core.h"
20 #include <QString>
21 
22 class QgsLayout;
23 
30 class CORE_EXPORT QgsAbstractLayoutIterator
31 {
32 
33  public:
34 
35  virtual ~QgsAbstractLayoutIterator() = default;
36 
40  virtual QgsLayout *layout() = 0;
41 
47  virtual bool beginRender() = 0;
48 
52  virtual bool endRender() = 0;
53 
57  virtual int count() const = 0;
58 
62  virtual bool next() = 0;
63 
68  virtual QString filePath( const QString &baseFilePath, const QString &extension ) = 0;
69 
70 };
71 
72 #endif //QGSABSTRACTLAYOUTITERATOR_H
73 
74 
75 
QgsAbstractLayoutIterator::count
virtual int count() const =0
Returns the number of features to iterate over.
QgsAbstractLayoutIterator::next
virtual bool next()=0
Iterates to next feature, returning false if no more features exist to iterate over.
QgsAbstractLayoutIterator
An abstract base class for QgsLayout based classes which can be exported by QgsLayoutExporter.
Definition: qgsabstractlayoutiterator.h:31
QgsAbstractLayoutIterator::layout
virtual QgsLayout * layout()=0
Returns the layout associated with the iterator.
QgsAbstractLayoutIterator::endRender
virtual bool endRender()=0
Ends the render, performing any required cleanup tasks.
QgsLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition: qgslayout.h:50
QgsAbstractLayoutIterator::beginRender
virtual bool beginRender()=0
Called when rendering begins, before iteration commences.
QgsAbstractLayoutIterator::filePath
virtual QString filePath(const QString &baseFilePath, const QString &extension)=0
Returns the file path for the current feature, based on a specified base file path and extension.
QgsAbstractLayoutIterator::~QgsAbstractLayoutIterator
virtual ~QgsAbstractLayoutIterator()=default