Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
2,807 additions
and
209 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<h3>$feature function</h3> | ||
In atlas generation, returns the current feature number that is iterated over on the coverage layer. | ||
|
||
<h4>Syntax</h4> | ||
<pre>$feature</pre> | ||
|
||
<h4>Arguments</h4> | ||
None | ||
|
||
<h4>Example</h4> | ||
<pre>$feature → 2</pre> | ||
|
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,12 @@ | ||
<h3>$numfeatures function</h3> | ||
In atlas generation, returns the total number of features within the coverage layer. | ||
|
||
<h4>Syntax</h4> | ||
<pre>$numfeatures</pre> | ||
|
||
<h4>Arguments</h4> | ||
None | ||
|
||
<h4>Example</h4> | ||
<pre>$numfeatures → 42</pre> | ||
|
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,12 @@ | ||
<h3>$numpages function</h3> | ||
Returns the total number of pages in the composition. | ||
|
||
<h4>Syntax</h4> | ||
<pre>$numpages</pre> | ||
|
||
<h4>Arguments</h4> | ||
None | ||
|
||
<h4>Example</h4> | ||
<pre>$numpages → 42</pre> | ||
|
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,12 @@ | ||
<h3>$page function</h3> | ||
Returns the current page number within a composition. | ||
|
||
<h4>Syntax</h4> | ||
<pre>$page</pre> | ||
|
||
<h4>Arguments</h4> | ||
None | ||
|
||
<h4>Example</h4> | ||
<pre>$page → 2</pre> | ||
|
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
Oops, something went wrong.