|
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/core/layout/qgslayoutatlas.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +class QgsLayoutAtlas : QObject |
| 12 | +{ |
| 13 | +%Docstring |
| 14 | +Class used to render an Atlas, iterating over geometry features. |
| 15 | +prepareForFeature() modifies the atlas map's extent to zoom on the given feature. |
| 16 | +This class is used for printing, exporting to PDF and images. |
| 17 | + |
| 18 | +.. note:: |
| 19 | + |
| 20 | + This class should not be created directly. For the atlas to function correctly |
| 21 | +the atlasComposition() property for QgsComposition should be used to retrieve a |
| 22 | +QgsLayoutAtlas which is automatically created and attached to the composition. |
| 23 | + |
| 24 | +.. versionadded:: 3.0 |
| 25 | +%End |
| 26 | + |
| 27 | +%TypeHeaderCode |
| 28 | +#include "qgslayoutatlas.h" |
| 29 | +%End |
| 30 | + public: |
| 31 | + |
| 32 | + QgsLayoutAtlas( QgsLayout *layout ); |
| 33 | +%Docstring |
| 34 | +Constructor for new QgsLayoutAtlas. |
| 35 | +%End |
| 36 | + |
| 37 | + bool enabled() const; |
| 38 | +%Docstring |
| 39 | +Returns whether the atlas generation is enabled |
| 40 | + |
| 41 | +.. seealso:: :py:func:`setEnabled()` |
| 42 | +%End |
| 43 | + |
| 44 | + void setEnabled( bool enabled ); |
| 45 | +%Docstring |
| 46 | +Sets whether the atlas is ``enabled``. |
| 47 | + |
| 48 | +.. seealso:: :py:func:`enabled()` |
| 49 | +%End |
| 50 | + |
| 51 | + bool hideCoverage() const; |
| 52 | +%Docstring |
| 53 | +Returns true if the atlas is set to hide the coverage layer. |
| 54 | + |
| 55 | +.. seealso:: :py:func:`setHideCoverage()` |
| 56 | +%End |
| 57 | + |
| 58 | + void setHideCoverage( bool hide ); |
| 59 | +%Docstring |
| 60 | +Sets whether the coverage layer should be hidden in map items in the layouts. |
| 61 | + |
| 62 | +.. seealso:: :py:func:`hideCoverage()` |
| 63 | +%End |
| 64 | + |
| 65 | + QString filenameExpression() const; |
| 66 | +%Docstring |
| 67 | +Returns the filename expression used for generating output filenames for each |
| 68 | +atlas page. |
| 69 | + |
| 70 | +.. seealso:: :py:func:`setFilenameExpression()` |
| 71 | + |
| 72 | +.. seealso:: :py:func:`filenameExpressionErrorString()` |
| 73 | +%End |
| 74 | + |
| 75 | + bool setFilenameExpression( const QString &expression, QString &errorString ); |
| 76 | +%Docstring |
| 77 | +Sets the filename ``expression`` used for generating output filenames for each |
| 78 | +atlas page. |
| 79 | +If an invalid expression is passed, false will be returned and ``errorString`` |
| 80 | +will be set to the expression error. |
| 81 | + |
| 82 | +.. seealso:: :py:func:`filenameExpression()` |
| 83 | +%End |
| 84 | + |
| 85 | + QgsVectorLayer *coverageLayer() const; |
| 86 | +%Docstring |
| 87 | +Returns the coverage layer used for the atlas features. |
| 88 | + |
| 89 | +.. seealso:: :py:func:`setCoverageLayer()` |
| 90 | +%End |
| 91 | + |
| 92 | + void setCoverageLayer( QgsVectorLayer *layer ); |
| 93 | +%Docstring |
| 94 | +Sets the coverage ``layer`` to use for the atlas features. |
| 95 | + |
| 96 | +.. seealso:: :py:func:`coverageLayer()` |
| 97 | +%End |
| 98 | + |
| 99 | + QString pageNameExpression() const; |
| 100 | +%Docstring |
| 101 | +Returns the expression (or field name) used for calculating the page name. |
| 102 | + |
| 103 | +.. seealso:: :py:func:`setPageNameExpression()` |
| 104 | + |
| 105 | +.. seealso:: :py:func:`nameForPage()` |
| 106 | +%End |
| 107 | + |
| 108 | + void setPageNameExpression( const QString &expression ); |
| 109 | +%Docstring |
| 110 | +Sets the ``expression`` (or field name) used for calculating the page name. |
| 111 | + |
| 112 | +.. seealso:: :py:func:`pageNameExpression()` |
| 113 | +%End |
| 114 | + |
| 115 | + QString nameForPage( int page ) const; |
| 116 | +%Docstring |
| 117 | +Returns the calculated name for a specified atlas ``page`` number. Page numbers start at 0. |
| 118 | + |
| 119 | +.. seealso:: :py:func:`pageNameExpression()` |
| 120 | +%End |
| 121 | + |
| 122 | + bool sortFeatures() const; |
| 123 | +%Docstring |
| 124 | +Returns true if features should be sorted in the atlas. |
| 125 | + |
| 126 | +.. seealso:: :py:func:`setSortFeatures()` |
| 127 | + |
| 128 | +.. seealso:: :py:func:`sortAscending()` |
| 129 | + |
| 130 | +.. seealso:: :py:func:`sortExpression()` |
| 131 | +%End |
| 132 | + |
| 133 | + void setSortFeatures( bool enabled ); |
| 134 | +%Docstring |
| 135 | +Sets whether features should be sorted in the atlas. |
| 136 | + |
| 137 | +.. seealso:: :py:func:`sortFeatures()` |
| 138 | + |
| 139 | +.. seealso:: :py:func:`setSortAscending()` |
| 140 | + |
| 141 | +.. seealso:: :py:func:`setSortExpression()` |
| 142 | +%End |
| 143 | + |
| 144 | + bool sortAscending() const; |
| 145 | +%Docstring |
| 146 | +Returns true if features should be sorted in an ascending order. |
| 147 | + |
| 148 | +This property has no effect is sortFeatures() is false. |
| 149 | + |
| 150 | +.. seealso:: :py:func:`sortFeatures()` |
| 151 | + |
| 152 | +.. seealso:: :py:func:`setSortAscending()` |
| 153 | + |
| 154 | +.. seealso:: :py:func:`sortExpression()` |
| 155 | +%End |
| 156 | + |
| 157 | + void setSortAscending( bool ascending ); |
| 158 | +%Docstring |
| 159 | +Sets whether features should be sorted in an ascending order. |
| 160 | + |
| 161 | +This property has no effect is sortFeatures() is false. |
| 162 | + |
| 163 | +.. seealso:: :py:func:`setSortFeatures()` |
| 164 | + |
| 165 | +.. seealso:: :py:func:`sortAscending()` |
| 166 | + |
| 167 | +.. seealso:: :py:func:`setSortExpression()` |
| 168 | +%End |
| 169 | + |
| 170 | + QString sortExpression() const; |
| 171 | +%Docstring |
| 172 | +Returns the expression (or field name) to use for sorting features. |
| 173 | + |
| 174 | +This property has no effect is sortFeatures() is false. |
| 175 | + |
| 176 | +.. seealso:: :py:func:`sortFeatures()` |
| 177 | + |
| 178 | +.. seealso:: :py:func:`sortAscending()` |
| 179 | + |
| 180 | +.. seealso:: :py:func:`setSortExpression()` |
| 181 | +%End |
| 182 | + |
| 183 | + void setSortExpression( const QString &expression ); |
| 184 | +%Docstring |
| 185 | +Sets the ``expression`` (or field name) to use for sorting features. |
| 186 | + |
| 187 | +This property has no effect is sortFeatures() is false. |
| 188 | + |
| 189 | +.. seealso:: :py:func:`setSortFeatures()` |
| 190 | + |
| 191 | +.. seealso:: :py:func:`setSortAscending()` |
| 192 | + |
| 193 | +.. seealso:: :py:func:`sortExpression()` |
| 194 | +%End |
| 195 | + |
| 196 | + bool filterFeatures() const; |
| 197 | +%Docstring |
| 198 | +Returns true if features should be filtered in the coverage layer. |
| 199 | + |
| 200 | +.. seealso:: :py:func:`filterExpression()` |
| 201 | + |
| 202 | +.. seealso:: :py:func:`setFilterExpression()` |
| 203 | +%End |
| 204 | + |
| 205 | + void setFilterFeatures( bool filtered ); |
| 206 | +%Docstring |
| 207 | +Sets whether features should be ``filtered`` in the coverage layer. |
| 208 | + |
| 209 | +.. seealso:: :py:func:`filterFeatures()` |
| 210 | + |
| 211 | +.. seealso:: :py:func:`setFilterExpression()` |
| 212 | +%End |
| 213 | + |
| 214 | + QString filterExpression() const; |
| 215 | +%Docstring |
| 216 | +Returns the expression used for filtering features in the coverage layer. |
| 217 | + |
| 218 | +This property has no effect is filterFeatures() is false. |
| 219 | + |
| 220 | +.. seealso:: :py:func:`setFilterExpression()` |
| 221 | + |
| 222 | +.. seealso:: :py:func:`filterFeatures()` |
| 223 | +%End |
| 224 | + |
| 225 | + bool setFilterExpression( const QString &expression, QString &errorString ); |
| 226 | +%Docstring |
| 227 | +Sets the ``expression`` used for filtering features in the coverage layer. |
| 228 | + |
| 229 | +This property has no effect is filterFeatures() is false. |
| 230 | + |
| 231 | +If an invalid expression is passed, false will be returned and ``errorString`` |
| 232 | +will be set to the expression error. |
| 233 | + |
| 234 | +.. seealso:: :py:func:`filterExpression()` |
| 235 | + |
| 236 | +.. seealso:: :py:func:`setFilterFeatures()` |
| 237 | +%End |
| 238 | + |
| 239 | + public slots: |
| 240 | + |
| 241 | + signals: |
| 242 | + |
| 243 | + void changed(); |
| 244 | +%Docstring |
| 245 | +Emitted when one of the atlas parameters changes. |
| 246 | +%End |
| 247 | + |
| 248 | + void toggled( bool ); |
| 249 | +%Docstring |
| 250 | +Emitted when atlas is enabled or disabled. |
| 251 | +%End |
| 252 | + |
| 253 | + void coverageLayerChanged( QgsVectorLayer *layer ); |
| 254 | +%Docstring |
| 255 | +Emitted when the coverage layer for the atlas changes. |
| 256 | +%End |
| 257 | + |
| 258 | +}; |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
| 263 | +/************************************************************************ |
| 264 | + * This file has been generated automatically from * |
| 265 | + * * |
| 266 | + * src/core/layout/qgslayoutatlas.h * |
| 267 | + * * |
| 268 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 269 | + ************************************************************************/ |
0 commit comments