Skip to content

Commit

Permalink
[BACKPORT] Nicer api for composer item frames and carry docs through …
Browse files Browse the repository at this point in the history
…to sip.
  • Loading branch information
timlinux committed Feb 28, 2012
1 parent 3334c9c commit c0cf1ab
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 3 deletions.
28 changes: 27 additions & 1 deletion python/core/qgscomposeritem.sip
Expand Up @@ -204,8 +204,34 @@ class QgsComposerItem: QObject, QGraphicsRectItem



bool frame() const;
/** Whether this item has a frame or not.
* @param none
* @return boolean - true if there is a frame around this item, otherwise false.
* @note deprecated since 1.8 dont use!
* @see hasFrame
*/
bool frame();
/** Whether this item has a frame or not.
* @param none
* @return boolean - true if there is a frame around this item, otherwise false.
* @note introduced since 1.8
* @see hasFrame
*/
bool hasFrame();
/** Set whether this item has a frame drawn around it or not.
* @param none
* @return void
* @note deprecated since 1.8 dont use!
* @see hasFrame
*/
void setFrame( bool drawFrame );
/** Set whether this item has a frame drawn around it or not.
* @param none
* @return void
* @note deprecated since 1.8
* @see hasFrame
*/
void setFrameEnabled( bool drawFrame );

/**Composite operations for item groups do nothing per default*/
virtual void addItem( QgsComposerItem* item );
Expand Down
30 changes: 28 additions & 2 deletions src/core/composer/qgscomposeritem.h
Expand Up @@ -158,8 +158,34 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
/**Reads parameter that are not subclass specific in document. Usually called from readXML methods of subclasses*/
bool _readXML( const QDomElement& itemElem, const QDomDocument& doc );

bool frame() const {return mFrame;}
void setFrame( bool drawFrame ) {mFrame = drawFrame;}
/** Whether this item has a frame or not.
* @param none
* @return boolean - true if there is a frame around this item, otherwise false.
* @note deprecated since 1.8 dont use!
* @see hasFrame
*/
bool frame() const {return hasFrame();}
/** Whether this item has a frame or not.
* @param none
* @return boolean - true if there is a frame around this item, otherwise false.
* @note introduced since 1.8
* @see hasFrame
*/
bool hasFrame() const {return mFrame;}
/** Set whether this item has a frame drawn around it or not.
* @param none
* @return void
* @note deprecated since 1.8 dont use!
* @see hasFrame
*/
void setFrame( bool drawFrame ) { setFrameEnabled( drawFrame );}
/** Set whether this item has a frame drawn around it or not.
* @param none
* @return void
* @note deprecated since 1.8
* @see hasFrame
*/
void setFrameEnabled( bool drawFrame ) {mFrame = drawFrame;}

/**Composite operations for item groups do nothing per default*/
virtual void addItem( QgsComposerItem* item ) { Q_UNUSED( item ); }
Expand Down

0 comments on commit c0cf1ab

Please sign in to comment.