[SCM] qgis branch, master, updated. a2ee769957385f4e084c5e8b6ba178a8c877d1db

Tim Sutton tim at linfiniti.com
Tue Mar 20 13:42:20 UTC 2012


The following commit has been merged in the master branch:
commit 643db0e328566e95a90035cc92d9a5f6c287d77c
Author: Tim Sutton <tim at linfiniti.com>
Date:   Tue Feb 28 09:30:44 2012 +0200

    Added missing composer label alignment bindings to python api and better api docs.

diff --git a/python/core/qgscomposerlabel.sip b/python/core/qgscomposerlabel.sip
index 6aeb1ef..d0d0c49 100644
--- a/python/core/qgscomposerlabel.sip
+++ b/python/core/qgscomposerlabel.sip
@@ -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*/
diff --git a/src/core/composer/qgscomposerlabel.h b/src/core/composer/qgscomposerlabel.h
index 13c4496..2978633 100644
--- a/src/core/composer/qgscomposerlabel.h
+++ b/src/core/composer/qgscomposerlabel.h
@@ -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

-- 
The Quantum GIS in Debian project



More information about the Pkg-grass-devel mailing list