Skip to content

Commit c0cf1ab

Browse files
committed
[BACKPORT] Nicer api for composer item frames and carry docs through to sip.
1 parent 3334c9c commit c0cf1ab

File tree

2 files changed

+55
-3
lines changed

2 files changed

+55
-3
lines changed

python/core/qgscomposeritem.sip

+27-1
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,34 @@ class QgsComposerItem: QObject, QGraphicsRectItem
204204

205205

206206

207-
bool frame() const;
207+
/** Whether this item has a frame or not.
208+
* @param none
209+
* @return boolean - true if there is a frame around this item, otherwise false.
210+
* @note deprecated since 1.8 dont use!
211+
* @see hasFrame
212+
*/
213+
bool frame();
214+
/** Whether this item has a frame or not.
215+
* @param none
216+
* @return boolean - true if there is a frame around this item, otherwise false.
217+
* @note introduced since 1.8
218+
* @see hasFrame
219+
*/
220+
bool hasFrame();
221+
/** Set whether this item has a frame drawn around it or not.
222+
* @param none
223+
* @return void
224+
* @note deprecated since 1.8 dont use!
225+
* @see hasFrame
226+
*/
208227
void setFrame( bool drawFrame );
228+
/** Set whether this item has a frame drawn around it or not.
229+
* @param none
230+
* @return void
231+
* @note deprecated since 1.8
232+
* @see hasFrame
233+
*/
234+
void setFrameEnabled( bool drawFrame );
209235

210236
/**Composite operations for item groups do nothing per default*/
211237
virtual void addItem( QgsComposerItem* item );

src/core/composer/qgscomposeritem.h

+28-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,34 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
158158
/**Reads parameter that are not subclass specific in document. Usually called from readXML methods of subclasses*/
159159
bool _readXML( const QDomElement& itemElem, const QDomDocument& doc );
160160

161-
bool frame() const {return mFrame;}
162-
void setFrame( bool drawFrame ) {mFrame = drawFrame;}
161+
/** Whether this item has a frame or not.
162+
* @param none
163+
* @return boolean - true if there is a frame around this item, otherwise false.
164+
* @note deprecated since 1.8 dont use!
165+
* @see hasFrame
166+
*/
167+
bool frame() const {return hasFrame();}
168+
/** Whether this item has a frame or not.
169+
* @param none
170+
* @return boolean - true if there is a frame around this item, otherwise false.
171+
* @note introduced since 1.8
172+
* @see hasFrame
173+
*/
174+
bool hasFrame() const {return mFrame;}
175+
/** Set whether this item has a frame drawn around it or not.
176+
* @param none
177+
* @return void
178+
* @note deprecated since 1.8 dont use!
179+
* @see hasFrame
180+
*/
181+
void setFrame( bool drawFrame ) { setFrameEnabled( drawFrame );}
182+
/** Set whether this item has a frame drawn around it or not.
183+
* @param none
184+
* @return void
185+
* @note deprecated since 1.8
186+
* @see hasFrame
187+
*/
188+
void setFrameEnabled( bool drawFrame ) {mFrame = drawFrame;}
163189

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

0 commit comments

Comments
 (0)