Showing with 55 additions and 2 deletions.
  1. +28 −2 python/core/qgscomposerlabel.sip
  2. +9 −0 python/core/qgscomposershape.sip
  3. +18 −0 src/core/composer/qgscomposerlabel.h
30 changes: 28 additions & 2 deletions python/core/qgscomposerlabel.sip
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,38 @@ class QgsComposerLabel: QgsComposerItem
/**Returns the text as it appears on screen (with replaced data field)
@note this function was added in version 1.2*/
QString displayText() const;

/** Accessor for the vertical alignment of the label
* @param none
* @returns Qt::AlignmentFlag
*/
Qt::AlignmentFlag vAlign() const;
/** Accessor for the horizontal alignment of the label
* @param none
* @returns Qt::AlignmentFlag
*/
Qt::AlignmentFlag hAlign() const;
/** Mutator for the horizontal alignment of the label
* @param Qt::AlignmentFlag
* @returns void
*/
void setHAlign( Qt::AlignmentFlag a );
/** Mutator for the vertical alignment of the label
* @param QQt::AlignmentFlag
* @returns void
*/
void setVAlign( Qt::AlignmentFlag a );

//!brief Accessor for the margin of the label
double margin();
//!brief Mutator for the margin of the label
void setMargin( double m );


/**Get font color
@note: this function was added in version 1.4*/
QFont font() const;
void setFont( const QFont& f );
double margin();
void setMargin( double m );

/**Sets text color
@note: this function was added in version 1.4*/
Expand Down
9 changes: 9 additions & 0 deletions python/core/qgscomposershape.sip
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,13 @@ class QgsComposerShape: QgsComposerItem
QColor fillColor() const;
QgsComposerShape::Shape shapeType() const;
void setShapeType( QgsComposerShape::Shape s );
bool transparentFill() const;
void setTransparentFill( bool transparent );

/**Sets this items bound in scene coordinates such that 1 item size units
corresponds to 1 scene size unit. Also, the shape is scaled*/
void setSceneRect( const QRectF& rectangle );
public slots:
/**Sets item rotation and resizes item bounds such that the shape always has the same size*/
virtual void setRotation( double r );
};
18 changes: 18 additions & 0 deletions src/core/composer/qgscomposerlabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,29 @@ class CORE_EXPORT QgsComposerLabel: public QgsComposerItem

QFont font() const;
void setFont( const QFont& f );
/** Accessor for the vertical alignment of the label
* @param none
* @returns Qt::AlignmentFlag
*/
Qt::AlignmentFlag vAlign() const { return mVAlignment; }
/** Accessor for the horizontal alignment of the label
* @param none
* @returns Qt::AlignmentFlag
*/
Qt::AlignmentFlag hAlign() const { return mHAlignment; }
/** Mutator for the horizontal alignment of the label
* @param Qt::AlignmentFlag
* @returns void
*/
void setHAlign( Qt::AlignmentFlag a ) {mHAlignment = a;}
/** Mutator for the vertical alignment of the label
* @param QQt::AlignmentFlag
* @returns void
*/
void setVAlign( Qt::AlignmentFlag a ) {mVAlignment = a;}
//!brief Accessor for the margin of the label
double margin() {return mMargin;}
//!brief Mutator for the margin of the label
void setMargin( double m ) {mMargin = m;}

/**Sets text color
Expand Down