Skip to content

Commit

Permalink
[composer] Add a featureChanged signal for when the current atlas fea…
Browse files Browse the repository at this point in the history
…ture changes (sponsored by City of Uster, Switzerland)
  • Loading branch information
nyalldawson committed Apr 28, 2014
1 parent 85c2e14 commit ca186c7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/core/composer/qgsatlascomposition.sip
Expand Up @@ -187,4 +187,8 @@ public:

/**Is emitted when atlas rendering has ended*/
void renderEnded();

/**Is emitted when the current atlas feature changes*/
void featureChanged( QgsFeature* feature );

};
4 changes: 4 additions & 0 deletions src/core/composer/qgsatlascomposition.cpp
Expand Up @@ -411,6 +411,10 @@ void QgsAtlasComposition::prepareForFeature( int featureI )
// generate filename for current feature
evalFeatureFilename();

emit featureChanged( &mCurrentFeature );

// TODO - move these updates to label/shape/page item

// evaluate label expressions
QList<QgsComposerLabel*> labels;
mComposition->composerItems( labels );
Expand Down
3 changes: 3 additions & 0 deletions src/core/composer/qgsatlascomposition.h
Expand Up @@ -217,6 +217,9 @@ class CORE_EXPORT QgsAtlasComposition : public QObject
/**Is emitted when atlas rendering has ended*/
void renderEnded();

/**Is emitted when the current atlas feature changes*/
void featureChanged( QgsFeature* feature );

private:
/**Updates the filename expression*/
void updateFilenameExpression();
Expand Down

0 comments on commit ca186c7

Please sign in to comment.