Skip to content

Commit

Permalink
Added python bindings for changes in r9649.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@9653 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Nov 17, 2008
1 parent f5e577c commit 84eafcc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
20 changes: 19 additions & 1 deletion python/core/qgslabel.sip
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public:
LabelFieldCount
};

struct labelpoint {
QgsPoint p;
double angle;
};

/** \brief render label
* \param sizeScale global scale factor for size in pixels, labels in map units are not scaled
*/
Expand All @@ -55,7 +60,7 @@ public:
void readXML(const QDomNode& node);

/** Writes the contents of the renderer to a configuration file */
// TODO: wrap void writeXML(std::ostream& xml);
void writeXML( QDomNode & label_node, QDomDocument & document );

//! add vector of required fields to existing list of fields
void addRequiredFields ( QList<int> & fields );
Expand All @@ -82,5 +87,18 @@ public:
*/
QString fieldValue ( int attr, QgsFeature& feature );


/** Accessor and mutator for the minimum scale member */
void setMinScale( float theMinScale );
float minScale();

/** Accessor and mutator for the maximum scale member */
void setMaxScale( float theMaxScale );
float maxScale();

/** Accessor and mutator for the scale based visilibility flag */
void setScaleBasedVisibility( bool theVisibilityFlag );
bool scaleBasedVisibility();

};

3 changes: 3 additions & 0 deletions python/core/qgslabelattributes.sip
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public:
bool angleIsSet ( ) const;
double angle ( ) const;

bool angleIsAuto( ) const;
void setAutoAngle(bool state);

/* Alignment */
void setAlignment ( int alignment );
bool alignmentIsSet ( ) const;
Expand Down
3 changes: 3 additions & 0 deletions python/core/qgsrendercontext.sip
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class QgsRenderContext

bool drawEditingInformation() const;

double rendererScale() const;

//setters

/**Sets coordinate transformation. QgsRenderContext takes ownership and deletes if necessary*/
Expand All @@ -40,5 +42,6 @@ class QgsRenderContext
void setRenderingStopped(bool stopped);
void setScaleFactor(double factor);
void setRasterScaleFactor(double factor);
void setRendererScale( double scale );
void setPainter(QPainter* p);
};

0 comments on commit 84eafcc

Please sign in to comment.