QGIS API Documentation  3.20.0-Odense (decaadbb31)
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 
An abstract base class for QgsLayout based classes which can be exported by QgsLayoutExporter.
virtual bool endRender()=0
Ends the render, performing any required cleanup tasks.
virtual bool next()=0
Iterates to next feature, returning false if no more features exist to iterate over.
virtual QgsLayout * layout()=0
Returns the layout associated with the iterator.
virtual ~QgsAbstractLayoutIterator()=default
virtual bool beginRender()=0
Called when rendering begins, before iteration commences.
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.
virtual int count() const =0
Returns the number of features to iterate over.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition: qgslayout.h:51