Showing with 61 additions and 3 deletions.
  1. +27 −1 python/core/qgscomposeritem.sip
  2. +2 −0 python/core/symbology-ng-core.sip
  3. +28 −2 src/core/composer/qgscomposeritem.h
  4. +4 −0 src/core/symbology-ng/qgssymbolv2.h
28 changes: 27 additions & 1 deletion python/core/qgscomposeritem.sip
Original file line number Diff line number Diff line change
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
2 changes: 2 additions & 0 deletions python/core/symbology-ng-core.sip
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,9 @@ class QgsSymbolV2RenderContext
QgsSymbolV2::OutputUnit outputUnit() const;
void setOutputUnit( QgsSymbolV2::OutputUnit u );

//! Get alpha transparency 1 for opaque, 0 for invisible
qreal alpha() const;
//! Set alpha transparency 1 for opaque, 0 for invisible
void setAlpha( qreal alpha );

bool selected() const;
Expand Down
30 changes: 28 additions & 2 deletions src/core/composer/qgscomposeritem.h
Original file line number Diff line number Diff line change
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
4 changes: 4 additions & 0 deletions src/core/symbology-ng/qgssymbolv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ class CORE_EXPORT QgsSymbolV2
OutputUnit outputUnit() const { return mOutputUnit; }
void setOutputUnit( OutputUnit u ) { mOutputUnit = u; }

//! Get alpha transparency 1 for opaque, 0 for invisible
qreal alpha() const { return mAlpha; }
//! Set alpha transparency 1 for opaque, 0 for invisible
void setAlpha( qreal alpha ) { mAlpha = alpha; }

//! @note added in 1.5
Expand Down Expand Up @@ -137,7 +139,9 @@ class CORE_EXPORT QgsSymbolV2RenderContext
QgsSymbolV2::OutputUnit outputUnit() const { return mOutputUnit; }
void setOutputUnit( QgsSymbolV2::OutputUnit u ) { mOutputUnit = u; }

//! Get alpha transparency 1 for opaque, 0 for invisible
qreal alpha() const { return mAlpha; }
//! Set alpha transparency 1 for opaque, 0 for invisible
void setAlpha( qreal alpha ) { mAlpha = alpha; }

bool selected() const { return mSelected; }
Expand Down