QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Signals | Public Member Functions | Private Attributes | List of all members
QgsAtlasComposition Class Reference

Class used to render an Atlas, iterating over geometry features. More...

#include <qgsatlascomposition.h>

Collaboration diagram for QgsAtlasComposition:
Collaboration graph
[legend]

Public Types

typedef std::map< QgsFeatureId,
QVariant > 
SorterKeys

Signals

void parameterChanged ()
 emitted when one of the parameters changes

Public Member Functions

 QgsAtlasComposition (QgsComposition *composition)
 ~QgsAtlasComposition ()
bool enabled () const
 Is the atlas generation enabled ?
void setEnabled (bool e)
QgsComposerMapcomposerMap () 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)
QgsVectorLayercoverageLayer () const
void setCoverageLayer (QgsVectorLayer *lmap)
bool singleFile () const
void setSingleFile (bool single)
bool sortFeatures () const
void setSortFeatures (bool doSort)
bool sortAscending () const
void setSortAscending (bool ascending)
bool filterFeatures () const
void setFilterFeatures (bool doFilter)
QString featureFilter () const
void setFeatureFilter (const QString &expression)
size_t sortKeyAttributeIndex () const
void setSortKeyAttributeIndex (size_t idx)
void beginRender ()
 Begins the rendering.
void endRender ()
 Ends the rendering.
size_t numFeatures () const
 Returns the number of features in the coverage layer.
void prepareForFeature (size_t i)
 Prepare the atlas map for the given feature.
const QString & currentFilename () const
 Returns the current filename.
void writeXML (QDomElement &elem, QDomDocument &doc) const
void readXML (const QDomElement &elem, const QDomDocument &doc)
QgsCompositioncomposition ()

Private Attributes

QgsCompositionmComposition
bool mEnabled
QgsComposerMapmComposerMap
bool mHideCoverage
bool mFixedScale
double mMargin
QString mFilenamePattern
QgsVectorLayermCoverageLayer
bool mSingleFile
QgsCoordinateTransform mTransform
QString mCurrentFilename
bool mSortFeatures
bool mSortAscending
SorterKeys mFeatureKeys
size_t mSortKeyAttributeIdx
bool mFilterFeatures
QString mFeatureFilter
std::vector< QgsFeatureIdmFeatureIds
QgsFeature mCurrentFeature
QgsRectangle mOrigExtent
bool mRestoreLayer
std::auto_ptr< QgsExpressionmFilenameExpr

Detailed Description

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.

Definition at line 37 of file qgsatlascomposition.h.

Member Typedef Documentation

typedef std::map< QgsFeatureId, QVariant > QgsAtlasComposition::SorterKeys

Definition at line 126 of file qgsatlascomposition.h.

Constructor & Destructor Documentation

QgsAtlasComposition::QgsAtlasComposition ( QgsComposition composition)

Definition at line 29 of file qgsatlascomposition.cpp.

References QgsExpression::setSpecialColumn().

QgsAtlasComposition::~QgsAtlasComposition ( )

Definition at line 46 of file qgsatlascomposition.cpp.

Member Function Documentation

void QgsAtlasComposition::beginRender ( )
QgsComposerMap* QgsAtlasComposition::composerMap ( ) const
inline

Definition at line 48 of file qgsatlascomposition.h.

QgsComposition* QgsAtlasComposition::composition ( )
inline

Definition at line 101 of file qgsatlascomposition.h.

QgsVectorLayer* QgsAtlasComposition::coverageLayer ( ) const
inline

Definition at line 63 of file qgsatlascomposition.h.

const QString & QgsAtlasComposition::currentFilename ( ) const

Returns the current filename.

Must be called after prepareForFeature( i )

Definition at line 322 of file qgsatlascomposition.cpp.

References mCurrentFilename.

bool QgsAtlasComposition::enabled ( ) const
inline

Is the atlas generation enabled ?

Definition at line 45 of file qgsatlascomposition.h.

void QgsAtlasComposition::endRender ( )
QString QgsAtlasComposition::featureFilter ( ) const
inline

Definition at line 78 of file qgsatlascomposition.h.

QString QgsAtlasComposition::filenamePattern ( ) const
inline

Definition at line 60 of file qgsatlascomposition.h.

bool QgsAtlasComposition::filterFeatures ( ) const
inline

Definition at line 75 of file qgsatlascomposition.h.

bool QgsAtlasComposition::fixedScale ( ) const
inline

Definition at line 54 of file qgsatlascomposition.h.

bool QgsAtlasComposition::hideCoverage ( ) const
inline

Definition at line 51 of file qgsatlascomposition.h.

float QgsAtlasComposition::margin ( ) const
inline

Definition at line 57 of file qgsatlascomposition.h.

size_t QgsAtlasComposition::numFeatures ( ) const

Returns the number of features in the coverage layer.

Definition at line 214 of file qgsatlascomposition.cpp.

References mFeatureIds.

void QgsAtlasComposition::parameterChanged ( )
signal

emitted when one of the parameters changes

Referenced by readXML().

void QgsAtlasComposition::prepareForFeature ( size_t  i)
void QgsAtlasComposition::readXML ( const QDomElement &  elem,
const QDomDocument &  doc 
)
void QgsAtlasComposition::setComposerMap ( QgsComposerMap map)
inline

Definition at line 49 of file qgsatlascomposition.h.

void QgsAtlasComposition::setCoverageLayer ( QgsVectorLayer lmap)
void QgsAtlasComposition::setEnabled ( bool  e)
inline

Definition at line 46 of file qgsatlascomposition.h.

void QgsAtlasComposition::setFeatureFilter ( const QString &  expression)
inline

Definition at line 79 of file qgsatlascomposition.h.

void QgsAtlasComposition::setFilenamePattern ( const QString &  pattern)
inline

Definition at line 61 of file qgsatlascomposition.h.

void QgsAtlasComposition::setFilterFeatures ( bool  doFilter)
inline

Definition at line 76 of file qgsatlascomposition.h.

void QgsAtlasComposition::setFixedScale ( bool  fixed)
inline

Definition at line 55 of file qgsatlascomposition.h.

void QgsAtlasComposition::setHideCoverage ( bool  hide)
inline

Definition at line 52 of file qgsatlascomposition.h.

void QgsAtlasComposition::setMargin ( float  margin)
inline

Definition at line 58 of file qgsatlascomposition.h.

void QgsAtlasComposition::setSingleFile ( bool  single)
inline

Definition at line 67 of file qgsatlascomposition.h.

void QgsAtlasComposition::setSortAscending ( bool  ascending)
inline

Definition at line 73 of file qgsatlascomposition.h.

void QgsAtlasComposition::setSortFeatures ( bool  doSort)
inline

Definition at line 70 of file qgsatlascomposition.h.

void QgsAtlasComposition::setSortKeyAttributeIndex ( size_t  idx)
inline

Definition at line 82 of file qgsatlascomposition.h.

bool QgsAtlasComposition::singleFile ( ) const
inline

Definition at line 66 of file qgsatlascomposition.h.

bool QgsAtlasComposition::sortAscending ( ) const
inline

Definition at line 72 of file qgsatlascomposition.h.

bool QgsAtlasComposition::sortFeatures ( ) const
inline

Definition at line 69 of file qgsatlascomposition.h.

size_t QgsAtlasComposition::sortKeyAttributeIndex ( ) const
inline

Definition at line 81 of file qgsatlascomposition.h.

void QgsAtlasComposition::writeXML ( QDomElement &  elem,
QDomDocument &  doc 
) const

Member Data Documentation

QgsComposerMap* QgsAtlasComposition::mComposerMap
private

Definition at line 111 of file qgsatlascomposition.h.

Referenced by beginRender(), endRender(), prepareForFeature(), readXML(), and writeXML().

QgsComposition* QgsAtlasComposition::mComposition
private

Definition at line 108 of file qgsatlascomposition.h.

Referenced by beginRender(), endRender(), prepareForFeature(), and readXML().

QgsVectorLayer* QgsAtlasComposition::mCoverageLayer
private
QgsFeature QgsAtlasComposition::mCurrentFeature
private

Definition at line 141 of file qgsatlascomposition.h.

Referenced by prepareForFeature().

QString QgsAtlasComposition::mCurrentFilename
private

Definition at line 120 of file qgsatlascomposition.h.

Referenced by currentFilename(), and prepareForFeature().

bool QgsAtlasComposition::mEnabled
private

Definition at line 110 of file qgsatlascomposition.h.

Referenced by readXML(), and writeXML().

QString QgsAtlasComposition::mFeatureFilter
private

Definition at line 136 of file qgsatlascomposition.h.

Referenced by beginRender(), readXML(), and writeXML().

std::vector<QgsFeatureId> QgsAtlasComposition::mFeatureIds
private
SorterKeys QgsAtlasComposition::mFeatureKeys
private

Definition at line 129 of file qgsatlascomposition.h.

Referenced by beginRender().

std::auto_ptr<QgsExpression> QgsAtlasComposition::mFilenameExpr
private

Definition at line 144 of file qgsatlascomposition.h.

Referenced by beginRender(), and prepareForFeature().

QString QgsAtlasComposition::mFilenamePattern
private

Definition at line 115 of file qgsatlascomposition.h.

Referenced by beginRender(), prepareForFeature(), readXML(), and writeXML().

bool QgsAtlasComposition::mFilterFeatures
private

Definition at line 134 of file qgsatlascomposition.h.

Referenced by beginRender(), readXML(), and writeXML().

bool QgsAtlasComposition::mFixedScale
private

Definition at line 113 of file qgsatlascomposition.h.

Referenced by prepareForFeature(), readXML(), and writeXML().

bool QgsAtlasComposition::mHideCoverage
private

Definition at line 112 of file qgsatlascomposition.h.

Referenced by beginRender(), readXML(), and writeXML().

double QgsAtlasComposition::mMargin
private

Definition at line 114 of file qgsatlascomposition.h.

Referenced by prepareForFeature(), readXML(), and writeXML().

QgsRectangle QgsAtlasComposition::mOrigExtent
private

Definition at line 142 of file qgsatlascomposition.h.

Referenced by beginRender(), endRender(), and prepareForFeature().

bool QgsAtlasComposition::mRestoreLayer
private

Definition at line 143 of file qgsatlascomposition.h.

Referenced by beginRender(), and endRender().

bool QgsAtlasComposition::mSingleFile
private

Definition at line 117 of file qgsatlascomposition.h.

Referenced by beginRender(), prepareForFeature(), readXML(), and writeXML().

bool QgsAtlasComposition::mSortAscending
private

Definition at line 124 of file qgsatlascomposition.h.

Referenced by beginRender(), readXML(), and writeXML().

bool QgsAtlasComposition::mSortFeatures
private

Definition at line 122 of file qgsatlascomposition.h.

Referenced by beginRender(), readXML(), and writeXML().

size_t QgsAtlasComposition::mSortKeyAttributeIdx
private

Definition at line 131 of file qgsatlascomposition.h.

Referenced by beginRender(), readXML(), and writeXML().

QgsCoordinateTransform QgsAtlasComposition::mTransform
private

Definition at line 119 of file qgsatlascomposition.h.

Referenced by beginRender(), and prepareForFeature().


The documentation for this class was generated from the following files: