QGIS/python/core/composer/qgsatlascomposition.sip

76 lines
2.1 KiB
Plaintext
Raw Normal View History

/** \ingroup MapComposer
* Class used to render an Atlas, iterating over geometry features.
* prepareForFeature() modifies the atlas map's extent to zoom on the given feature.
* This class is used for printing, exporting to PDF and images.
* */
2012-10-06 14:49:01 +03:00
class QgsAtlasComposition : QObject
{
%TypeHeaderCode
#include <qgsatlascomposition.h>
%End
public:
QgsAtlasComposition( QgsComposition* composition );
~QgsAtlasComposition();
2012-10-06 14:49:01 +03:00
/** Is the atlas generation enabled ? */
bool enabled() const;
void setEnabled( bool e );
QgsComposerMap* composerMap() const;
void setComposerMap( QgsComposerMap* map );
2012-10-06 14:49:01 +03:00
bool hideCoverage() const;
void setHideCoverage( bool hide );
2012-10-06 14:49:01 +03:00
bool fixedScale() const;
void setFixedScale( bool fixed );
2012-10-06 14:49:01 +03:00
float margin() const;
void setMargin( float margin );
2012-10-06 14:49:01 +03:00
QString filenamePattern() const;
void setFilenamePattern( const QString& pattern );
2012-10-06 14:49:01 +03:00
QgsVectorLayer* coverageLayer() const;
void setCoverageLayer( QgsVectorLayer* lmap );
2012-10-06 14:49:01 +03:00
bool singleFile() const;
void setSingleFile( bool single );
2012-10-06 14:49:01 +03:00
bool sortFeatures() const;
void setSortFeatures( bool doSort );
bool sortAscending() const;
void setSortAscending( bool ascending );
QString featureFilter() const;
void setFeatureFilter( const QString& expression );
size_t sortKeyAttributeIndex() const;
void setSortKeyAttributeIndex( size_t idx );
/** Begins the rendering. */
void beginRender();
/** Ends the rendering. Restores original extent */
void endRender();
/** Returns the number of features in the coverage layer */
size_t numFeatures() const;
/** Prepare the atlas map for the given feature. Sets the extent and context variables */
void prepareForFeature( size_t i );
/** Returns the current filename. Must be called after prepareForFeature( i ) */
const QString& currentFilename() const;
void writeXML( QDomElement& elem, QDomDocument& doc ) const;
void readXML( const QDomElement& elem, const QDomDocument& doc );
QgsComposition* composition();
signals:
/** emitted when one of the parameters changes */
void parameterChanged();
2012-10-06 14:49:01 +03:00
};