Skip to content

Commit

Permalink
[composer] Add signal for when composition print resolution changes (…
Browse files Browse the repository at this point in the history
…sponsored by City of Uster, Switzerland)
  • Loading branch information
nyalldawson committed Apr 28, 2014
1 parent 21a2929 commit ecc2ebf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions python/core/composer/qgscomposition.sip
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ class QgsComposition : QGraphicsScene
void paperSizeChanged();
void nPagesChanged();

/**Is emitted when the compositions print resolution changes*/
void printResolutionChanged();

/**Is emitted when selected item changed. If 0, no item is selected*/
void selectedItemChanged( QgsComposerItem* selected );
/**Is emitted when new composer arrow has been added to the view*/
Expand Down
5 changes: 5 additions & 0 deletions src/core/composer/qgscomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,11 @@ const QgsComposerItem* QgsComposition::getComposerItemByUuid( QString theUuid )
return 0;
}

void QgsComposition::setPrintResolution( int dpi )
{
mPrintResolution = dpi;
emit printResolutionChanged();
}

void QgsComposition::setUseAdvancedEffects( bool effectsEnabled )
{
Expand Down
5 changes: 4 additions & 1 deletion src/core/composer/qgscomposition.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene
const QgsComposerItem* getComposerItemByUuid( QString theUuid ) const;

int printResolution() const {return mPrintResolution;}
void setPrintResolution( int dpi ) {mPrintResolution = dpi;}
void setPrintResolution( int dpi );

bool printAsRaster() const {return mPrintAsRaster;}
void setPrintAsRaster( bool enabled ) { mPrintAsRaster = enabled; }
Expand Down Expand Up @@ -570,6 +570,9 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene
void paperSizeChanged();
void nPagesChanged();

/**Is emitted when the compositions print resolution changes*/
void printResolutionChanged();

/**Is emitted when selected item changed. If 0, no item is selected*/
void selectedItemChanged( QgsComposerItem* selected );
/**Is emitted when new composer arrow has been added to the view*/
Expand Down

0 comments on commit ecc2ebf

Please sign in to comment.