-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update of QgsAtlasComposition SIP (with Python unit tests as well)
- Loading branch information
Hugo Mercier
committed
Oct 5, 2012
1 parent
e4371d8
commit d904da4
Showing
6 changed files
with
133 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/** \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. | ||
* */ | ||
class QgsAtlasComposition : public QObject | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsatlascomposition.h> | ||
%End | ||
|
||
public: | ||
QgsAtlasComposition( QgsComposition* composition ); | ||
~QgsAtlasComposition(); | ||
|
||
/** Is the atlas generation enabled ? */ | ||
bool enabled() const; | ||
void setEnabled( bool e ); | ||
|
||
QgsComposerMap* composerMap() const; | ||
void setComposerMap( QgsComposerMap* map ); | ||
|
||
bool hideCoverage() const; | ||
void setHideCoverage( bool hide ); | ||
|
||
bool fixedScale() const; | ||
void setFixedScale( bool fixed ); | ||
|
||
float margin() const; | ||
void setMargin( float margin ); | ||
|
||
QString filenamePattern() const; | ||
void setFilenamePattern( const QString& pattern ); | ||
|
||
QgsVectorLayer* coverageLayer() const; | ||
void setCoverageLayer( QgsVectorLayer* lmap ); | ||
|
||
bool singleFile() const; | ||
void setSingleFile( bool single ); | ||
|
||
/** 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(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters