Skip to content

Commit 0cead31

Browse files
author
wonder
committedNov 17, 2008

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed
 

‎python/core/qgslabel.sip

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public:
4141
LabelFieldCount
4242
};
4343

44+
struct labelpoint {
45+
QgsPoint p;
46+
double angle;
47+
};
48+
4449
/** \brief render label
4550
* \param sizeScale global scale factor for size in pixels, labels in map units are not scaled
4651
*/
@@ -55,7 +60,7 @@ public:
5560
void readXML(const QDomNode& node);
5661

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

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

90+
91+
/** Accessor and mutator for the minimum scale member */
92+
void setMinScale( float theMinScale );
93+
float minScale();
94+
95+
/** Accessor and mutator for the maximum scale member */
96+
void setMaxScale( float theMaxScale );
97+
float maxScale();
98+
99+
/** Accessor and mutator for the scale based visilibility flag */
100+
void setScaleBasedVisibility( bool theVisibilityFlag );
101+
bool scaleBasedVisibility();
102+
85103
};
86104

‎python/core/qgslabelattributes.sip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ public:
6868
bool angleIsSet ( ) const;
6969
double angle ( ) const;
7070

71+
bool angleIsAuto( ) const;
72+
void setAutoAngle(bool state);
73+
7174
/* Alignment */
7275
void setAlignment ( int alignment );
7376
bool alignmentIsSet ( ) const;

‎python/core/qgsrendercontext.sip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class QgsRenderContext
3030

3131
bool drawEditingInformation() const;
3232

33+
double rendererScale() const;
34+
3335
//setters
3436

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

0 commit comments

Comments
 (0)
Please sign in to comment.