Skip to content

Commit

Permalink
Python bindings for multipage composer
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jul 17, 2012
1 parent f064cb0 commit cb1ecad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/core/qgscomposition.sip
Expand Up @@ -39,6 +39,11 @@ class QgsComposition: QGraphicsScene
/**Returns width of paper item*/ /**Returns width of paper item*/
double paperWidth() const; double paperWidth() const;


/**Note: added in version 1.9*/
void setNumPages( int pages );
/**Note: added in version 1.9*/
int numPages() const;

void setSnapToGridEnabled( bool b ); void setSnapToGridEnabled( bool b );
bool snapToGridEnabled() const; bool snapToGridEnabled() const;


Expand Down Expand Up @@ -172,4 +177,8 @@ class QgsComposition: QGraphicsScene


/**Convenience function to create a QgsAddRemoveItemCommand, connect its signals and push it to the undo stack*/ /**Convenience function to create a QgsAddRemoveItemCommand, connect its signals and push it to the undo stack*/
void pushAddRemoveCommand( QgsComposerItem* item, const QString& text, QgsAddRemoveItemCommand::State state ); void pushAddRemoveCommand( QgsComposerItem* item, const QString& text, QgsAddRemoveItemCommand::State state );

/**Render a page to a paint device
@note added in version 1.9*/
void renderPage( QPainter* p, int page );
}; };
4 changes: 4 additions & 0 deletions src/core/composer/qgscomposition.h
Expand Up @@ -79,7 +79,9 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene
/**Returns width of paper item*/ /**Returns width of paper item*/
double paperWidth() const; double paperWidth() const;


/**Note: added in version 1.9*/
void setNumPages( int pages ); void setNumPages( int pages );
/**Note: added in version 1.9*/
int numPages() const; int numPages() const;


void setSnapToGridEnabled( bool b ); void setSnapToGridEnabled( bool b );
Expand Down Expand Up @@ -217,6 +219,8 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene
/**Convenience function to create a QgsAddRemoveItemCommand, connect its signals and push it to the undo stack*/ /**Convenience function to create a QgsAddRemoveItemCommand, connect its signals and push it to the undo stack*/
void pushAddRemoveCommand( QgsComposerItem* item, const QString& text, QgsAddRemoveItemCommand::State state = QgsAddRemoveItemCommand::Added ); void pushAddRemoveCommand( QgsComposerItem* item, const QString& text, QgsAddRemoveItemCommand::State state = QgsAddRemoveItemCommand::Added );


/**Render a page to a paint device
@note added in version 1.9*/
void renderPage( QPainter* p, int page ); void renderPage( QPainter* p, int page );


public slots: public slots:
Expand Down

0 comments on commit cb1ecad

Please sign in to comment.