Skip to content

Commit 8fd7805

Browse files
committed
Added bindings for getting an item by id and a composerhtml instance that belongs to an item.
1 parent 8f3027b commit 8fd7805

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎python/core/qgscomposition.sip‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,22 @@ class QgsComposition: QGraphicsScene
7878
@return id or 0 pointer if the composer map item does not exist*/
7979
const QgsComposerMap* getComposerMapById( int id ) const;
8080

81+
/*Returns the composer html with specified id (a string as named in the
82+
composer user interface item properties).
83+
@note Added in QGIS 2.0
84+
@param id - A QString representing the id of the item.
85+
@return QgsComposerHtml pointer or 0 pointer if no such item exists.
86+
*/
87+
const QgsComposerHtml* getComposerHtmlByItem( QgsComposerItem *item ) const;
88+
89+
/**Returns a composer item given its text identifier.
90+
@note added in 2.0
91+
@param theId - A QString representing the identifier of the item to
92+
retrieve.
93+
@return QgsComposerItem pointer or 0 pointer if no such item exists.
94+
**/
95+
const QgsComposerItem* getComposerItemById( QString theId ) const;
96+
8197
int printResolution() const;
8298
void setPrintResolution( int dpi );
8399

0 commit comments

Comments
 (0)