Skip to content

Commit 5f86422

Browse files
committedDec 2, 2015
* fix QgsFeatureIds typedef (fixes missing signal
QgsVectorLayer.featuresDeleted and others; fixes #13740) * add missing notes for PyNames * include some missing new methods in bindings (backported from commit b5794b2)
1 parent e14cc4d commit 5f86422

35 files changed

+503
-64
lines changed
 

‎python/core/dxf/qgsdxfexport.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ class QgsDxfExport
6060
void writeInt( int i );
6161
void writeDouble( double d );
6262
void writeString( const QString &s );
63+
//! @note available in python bindings as writeGroupPoint
6364
void writeGroup( int code, const QgsPoint &p, double z = 0.0, bool skipz = false ) /PyName=writeGroupPoint/;
6465
void writeGroup( const QColor& color, int exactMatch = 62, int rgbCode = 420, int transparencyCode = 440 );
6566

66-
//! Write handle
6767
int writeHandle( int code = 5, int handle = 0 );
6868

69-
//! Draw dxf polyline
69+
//! Draw dxf primitives (LWPOLYLINE)
7070
void writePolyline( const QgsPolyline &line, const QString &layer, const QString &lineStyleName, const QColor& color, double width = -1 );
7171

7272
//! Draw dxf polygon (HATCH)

‎python/core/qgsdataitem.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ class QgsZipItem : QgsDataCollectionItem
354354
static QString vsiPrefix( const QString& uri );
355355

356356
static QgsDataItem* itemFromPath( QgsDataItem* parent, QString path, QString name ) /Factory/;
357+
//! @note available in python as itemFromFilePath
357358
static QgsDataItem* itemFromPath( QgsDataItem* parent, const QString& filePath, const QString& name, const QString& path ) /Factory,PyName=itemFromFilePath/;
358359

359360
static const QIcon &iconZip();

‎python/core/qgsdatasourceuri.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class QgsDataSourceURI
3838
//! Set generic param (generic mode)
3939
// \note if key exists, another is inserted
4040
void setParam( const QString &key, const QString &value );
41+
//! @note available in python as setParamList
4142
void setParam( const QString &key, const QStringList &value ) /PyName=setParamList/;
4243

4344
//! Remove generic param (generic mode)

‎python/core/qgsfeature.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,4 +498,4 @@ class QgsFeature
498498

499499
}; // class QgsFeature
500500

501-
typedef QSet<QgsFeatureId> QgsFeatureIds;
501+
typedef QSet<qint64> QgsFeatureIds;

‎python/core/qgsgml.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class QgsGml: QObject
2121
* @param password password for authentication
2222
* @param authcfg authentication configuration id
2323
* @return 0 in case of success
24+
* @note available in python as getFeaturesUri
2425
*/
2526
int getFeatures( const QString& uri, QGis::WkbType* wkbType, QgsRectangle* extent = 0, const QString& userName = QString(), const QString& password = QString(), const QString& authcfg = QString() ) /PyName=getFeaturesUri/;
2627

‎python/core/qgsvectorlayer.sip

Lines changed: 217 additions & 20 deletions
Large diffs are not rendered by default.

‎python/core/raster/qgssinglebandpseudocolorrenderer.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class QgsSingleBandPseudoColorRenderer: QgsRasterRenderer
1616
/** Takes ownership of the shader*/
1717
void setShader( QgsRasterShader* shader /Transfer/ );
1818
QgsRasterShader* shader();
19+
//! @note available in python as constShader
1920
const QgsRasterShader* shader() const /PyName=constShader/;
2021

2122
void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;

‎python/core/symbology-ng/qgscategorizedsymbolrendererv2.sip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ class QgsCategorizedSymbolRendererV2 : QgsFeatureRendererV2
4545

4646
virtual ~QgsCategorizedSymbolRendererV2();
4747

48+
//! @note available in python as symbolForFeature2
4849
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=symbolForFeature2/;
4950

51+
//! @note available in python as originalSymbolForFeature2
5052
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=originalSymbolForFeature2/;
5153

5254
virtual void startRender( QgsRenderContext& context, const QgsFields& fields );
@@ -64,6 +66,7 @@ class QgsCategorizedSymbolRendererV2 : QgsFeatureRendererV2
6466
//! returns bitwise OR-ed capabilities of the renderer
6567
virtual int capabilities();
6668

69+
//! @note available in python as symbols2
6770
virtual QgsSymbolV2List symbols( QgsRenderContext& context ) /PyName=symbols2/;
6871
void updateSymbols( QgsSymbolV2 * sym );
6972

‎python/core/symbology-ng/qgsgraduatedsymbolrendererv2.sip

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
8787

8888
virtual ~QgsGraduatedSymbolRendererV2();
8989

90+
//! @note labelForLowerUpper in python bindings
9091
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=symbolForFeature2/;
91-
92+
//! @note originalSymbolForFeature2 in python bindings
9293
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=originalSymbolForFeature2/;
9394

9495
virtual void startRender( QgsRenderContext& context, const QgsFields& fields );
@@ -106,6 +107,7 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
106107
//! returns bitwise OR-ed capabilities of the renderer
107108
virtual int capabilities();
108109

110+
//! @note symbol2 in python bindings
109111
virtual QgsSymbolV2List symbols( QgsRenderContext& context ) /PyName=symbols2/;
110112

111113
QString classAttribute() const;

‎python/core/symbology-ng/qgsheatmaprenderer.sip

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ class QgsHeatmapRenderer : QgsFeatureRendererV2
1313
virtual void startRender( QgsRenderContext& context, const QgsFields& fields );
1414
virtual bool renderFeature( QgsFeature& feature, QgsRenderContext& context, int layer = -1, bool selected = false, bool drawVertexMarker = false );
1515
virtual void stopRender( QgsRenderContext& context );
16+
//! @note symbolForFeature2 in python bindings
1617
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=symbolForFeature2/;
18+
//! @note symbol2 in python bindings
1719
virtual QgsSymbolV2List symbols( QgsRenderContext& context ) /PyName=symbols2/;
1820
virtual QString dump() const;
1921
virtual QList<QString> usedAttributes();

‎python/core/symbology-ng/qgsinvertedpolygonrenderer.sip

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,35 @@ class QgsInvertedPolygonRenderer : QgsFeatureRendererV2
4040
virtual QList<QString> usedAttributes();
4141
/** Proxy that will call this method on the embedded renderer. */
4242
virtual int capabilities();
43-
/** Proxy that will call this method on the embedded renderer. */
43+
/** Proxy that will call this method on the embedded renderer.
44+
@note available in python bindings as symbol2
45+
*/
4446
virtual QgsSymbolV2List symbols( QgsRenderContext& context ) /PyName=symbols2/;
45-
/** Proxy that will call this method on the embedded renderer. */
47+
/** Proxy that will call this method on the embedded renderer.
48+
@note available in python bindings as symbolForFeature2
49+
*/
4650
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=symbolForFeature2/;
47-
/** Proxy that will call this method on the embedded renderer. */
51+
/** Proxy that will call this method on the embedded renderer.
52+
@note available in python bindings as originalSymbolForFeature2
53+
*/
4854
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feat, QgsRenderContext& context ) /PyName=originalSymbolForFeature2/;
49-
/** Proxy that will call this method on the embedded renderer. */
55+
/** Proxy that will call this method on the embedded renderer.
56+
@note available in python bindings as symbolsForFeature
57+
*/
5058
virtual QgsSymbolV2List symbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) /PyName=symbolsForFeature/;
51-
/** Proxy that will call this method on the embedded renderer. */
59+
/** Proxy that will call this method on the embedded renderer.
60+
@note available in python bindings as originalSymbolsForFeature2
61+
*/
5262
virtual QgsSymbolV2List originalSymbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) /PyName=originalSymbolsForFeature2/;
5363
/** Proxy that will call this method on the embedded renderer. */
5464
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
5565
/** Proxy that will call this method on the embedded renderer.
5666
@note not available in python bindings
5767
*/
5868
// virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, const QString& rule = "" );
59-
/** Proxy that will call this method on the embedded renderer. */
69+
/** Proxy that will call this method on the embedded renderer.
70+
@note available in python bindings as willRenderFeature2
71+
*/
6072
virtual bool willRenderFeature( QgsFeature& feat, QgsRenderContext& context ) /PyName=willRenderFeature2/;
6173

6274
/** Creates a renderer out of an XML, for loading*/

‎python/core/symbology-ng/qgspointdisplacementrenderer.sip

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,29 @@ class QgsPointDisplacementRenderer : QgsFeatureRendererV2
2727
virtual QList<QString> usedAttributes();
2828
/** Proxy that will call this method on the embedded renderer. */
2929
virtual int capabilities();
30-
/** Proxy that will call this method on the embedded renderer. */
30+
/** Proxy that will call this method on the embedded renderer.
31+
@note available in python as symbols2
32+
*/
3133
virtual QgsSymbolV2List symbols( QgsRenderContext& context ) /PyName=symbols2/;
32-
/** Proxy that will call this method on the embedded renderer. */
34+
/** Proxy that will call this method on the embedded renderer.
35+
@note available in python as symbolForFeature2
36+
*/
3337
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=symbolForFeature2/;
34-
/** Proxy that will call this method on the embedded renderer. */
38+
/** Proxy that will call this method on the embedded renderer.
39+
@note available in python as originalSymbolForFeature2
40+
*/
3541
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feat, QgsRenderContext& context ) /PyName=originalSymbolForFeature2/;
36-
/** Proxy that will call this method on the embedded renderer. */
42+
/** Proxy that will call this method on the embedded renderer.
43+
@note available in python as symbolsForFeature2
44+
*/
3745
virtual QgsSymbolV2List symbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) /PyName=symbolsForFeature2/;
38-
/** Proxy that will call this method on the embedded renderer. */
46+
/** Proxy that will call this method on the embedded renderer.
47+
@note available in python as originalSymbolsForFeature2
48+
*/
3949
virtual QgsSymbolV2List originalSymbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) /PyName=originalSymbolsForFeature2/;
40-
/** Proxy that will call this method on the embedded renderer. */
50+
/** Proxy that will call this method on the embedded renderer.
51+
@note available in python as willRenderFeature2
52+
*/
4153
virtual bool willRenderFeature( QgsFeature& feat, QgsRenderContext& context ) /PyName=willRenderFeature2/;
4254

4355
virtual void startRender( QgsRenderContext& context, const QgsFields& fields );

‎python/core/symbology-ng/qgsrendererv2.sip

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ class QgsFeatureRendererV2
7474
* @note added in QGIS 2.12
7575
* @note available in Python bindings as symbolForFeature2
7676
*/
77-
//TODO - QGIS 3.0 change PyName to symbolForFeature when deprecated method is removed
77+
// TODO - QGIS 3.0 make pure virtual when above method is removed
78+
// TODO - QGIS 3.0 change PyName to symbolForFeature when deprecated method is removed
7879
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=symbolForFeature2/;
7980

8081
/**

‎python/core/symbology-ng/qgsrulebasedrendererv2.sip

Lines changed: 136 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,67 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
6767
~Rule();
6868
QString dump( int offset = 0 ) const;
6969
QSet<QString> usedAttributes();
70+
71+
//! @note available in python bindings as symbol2
7072
QgsSymbolV2List symbols( const QgsRenderContext& context = QgsRenderContext() ) /PyName=symbols2/;
73+
7174
//! @note not available in python bindings
7275
// QgsLegendSymbolList legendSymbolItems();
76+
7377
//! @note added in 2.6
7478
QgsLegendSymbolListV2 legendSymbolItemsV2( int currentLevel = -1 ) const;
75-
bool isFilterOK( QgsFeature& f, QgsRenderContext* context = 0 ) const;
79+
80+
/**
81+
* Check if a given feature shall be rendered by this rule
82+
*
83+
* @param f The feature to test
84+
* @param context The context in which the rendering happens
85+
* @return True if the feature shall be rendered
86+
*/
87+
bool isFilterOK( QgsFeature& f, QgsRenderContext *context = 0 ) const;
88+
89+
/**
90+
* Check if this rule applies for a given scale
91+
* @param scale The scale to check. If set to 0, it will always return true.
92+
*
93+
* @return If the rule will be evaluated at this scale
94+
*/
7695
bool isScaleOK( double scale ) const;
7796

7897
QgsSymbolV2* symbol();
7998
QString label() const;
8099
bool dependsOnScale() const;
81100
int scaleMinDenom() const;
82101
int scaleMaxDenom() const;
102+
103+
/**
104+
* A filter that will check if this rule applies
105+
* @return An expression
106+
*/
83107
QgsExpression* filter() const;
108+
109+
/**
110+
* A filter that will check if this rule applies
111+
* @return An expression
112+
*/
84113
QString filterExpression() const;
114+
115+
/**
116+
* A human readable description for this rule
117+
*
118+
* @return Description
119+
*/
85120
QString description() const;
121+
86122
//! @note added in 2.6
87-
bool checkState() const;
123+
//! @deprecated use active instead
124+
bool checkState() const /Deprecated/;
125+
/**
126+
* Returns if this rule is active
127+
*
128+
* @return True if the rule is active
129+
*/
130+
bool active() const;
88131

89132
//! Unique rule identifier (for identification of rule within renderer)
90133
//! @note added in 2.6
@@ -96,13 +139,41 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
96139
//! set a new symbol (or NULL). Deletes old symbol.
97140
void setSymbol( QgsSymbolV2* sym /Transfer/ );
98141
void setLabel( const QString& label );
142+
143+
/**
144+
* Set the minimum denominator for which this rule shall apply.
145+
* E.g. 1000 if it shall be evaluated between 1:1000 and 1:100'000
146+
* Set to 0 to disable the minimum check
147+
* @param scaleMinDenom The minimum scale denominator for this rule
148+
*/
99149
void setScaleMinDenom( int scaleMinDenom );
150+
151+
/**
152+
* Set the maximum denominator for which this rule shall apply.
153+
* E.g. 100'000 if it shall be evaluated between 1:1000 and 1:100'000
154+
* Set to 0 to disable the maximum check
155+
* @param scaleMaxDenom maximum scale denominator for this rule
156+
*/
100157
void setScaleMaxDenom( int scaleMaxDenom );
158+
159+
/**
160+
* Set the expression used to check if a given feature shall be rendered with this rule
161+
*
162+
* @param filterExp An expression
163+
*/
101164
void setFilterExpression( const QString& filterExp );
165+
166+
/**
167+
* Set a human readable description for this rule
168+
*
169+
* @param description Description
170+
*/
102171
void setDescription( const QString& description );
172+
103173
//! @note added in 2.6
104174
//! @deprecated use setActive instead
105175
void setCheckState( bool state );
176+
106177
/**
107178
* Sets if this rule is active
108179
* @param state Determines if the rule should be activated or deactivated
@@ -119,14 +190,26 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
119190

120191
//! prepare the rule for rendering and its children (build active children array)
121192
bool startRender( QgsRenderContext& context, const QgsFields& fields ) /Deprecated/;
193+
122194
//! prepare the rule for rendering and its children (build active children array)
123195
bool startRender( QgsRenderContext& context, const QgsFields& fields, QString& filter );
196+
124197
//! get all used z-levels from this rule and children
125198
QSet<int> collectZLevels();
199+
126200
//! assign normalized z-levels [0..N-1] for this rule's symbol for quick access during rendering
127201
//! @note not available in python bindings
128202
// void setNormZLevels( const QMap<int, int>& zLevelsToNormLevels );
129203

204+
/**
205+
* Render a given feature, will recursively call subclasses and only render if the constraints apply.
206+
*
207+
* @param featToRender The feature to render
208+
* @param context The rendering context
209+
* @param renderQueue The rendering queue to which the feature should be added
210+
* @return The result of the rendering. In explicit if the feature is added to the queue or
211+
* the reason for not rendering the feature.
212+
*/
130213
QgsRuleBasedRendererV2::Rule::RenderResult renderFeature( QgsRuleBasedRendererV2::FeatureToRender& featToRender, QgsRenderContext& context, QgsRuleBasedRendererV2::RenderQueue& renderQueue );
131214

132215
//! only tell whether a feature will be rendered without actually rendering it
@@ -138,34 +221,85 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
138221
//! tell which rules will be used to render the feature
139222
QList<QgsRuleBasedRendererV2::Rule*> rulesForFeature( QgsFeature& feat, QgsRenderContext* context = 0 );
140223

224+
/**
225+
* Stop a rendering process. Used to clean up the internal state of this rule
226+
*
227+
* @param context The rendering context
228+
*/
141229
void stopRender( QgsRenderContext& context );
142230

231+
/**
232+
* Create a rule from an XML definition
233+
*
234+
* @param ruleElem The XML rule element
235+
* @param symbolMap Symbol map
236+
*
237+
* @return A new rule
238+
*/
143239
static QgsRuleBasedRendererV2::Rule* create( QDomElement& ruleElem, QgsSymbolV2Map& symbolMap ) /Factory/;
144240

241+
/**
242+
* Return all children rules of this rule
243+
*
244+
* @return A list of rules
245+
*/
145246
QList<QgsRuleBasedRendererV2::Rule*>& children();
247+
248+
/**
249+
* Returns all children, grand-children, grand-grand-children, grand-gra... you get it
250+
*
251+
* @return A list of descendant rules
252+
*/
146253
QList<QgsRuleBasedRendererV2::Rule*> descendants() const;
254+
255+
/**
256+
* The parent rule
257+
*
258+
* @return Parent rule
259+
*/
147260
QgsRuleBasedRendererV2::Rule* parent();
148261

149262
//! add child rule, take ownership, sets this as parent
150263
void appendChild( QgsRuleBasedRendererV2::Rule* rule /Transfer/ );
264+
151265
//! add child rule, take ownership, sets this as parent
152266
void insertChild( int i, QgsRuleBasedRendererV2::Rule* rule /Transfer/ );
267+
153268
//! delete child rule
154269
void removeChild( QgsRuleBasedRendererV2::Rule* rule );
270+
155271
//! delete child rule
156272
void removeChildAt( int i );
273+
157274
//! take child rule out, set parent as null
158275
void takeChild( QgsRuleBasedRendererV2::Rule* rule );
276+
159277
//! take child rule out, set parent as null
160278
QgsRuleBasedRendererV2::Rule* takeChildAt( int i ) /TransferBack/;
161279

162280
//! Try to find a rule given its unique key
163281
//! @note added in 2.6
164282
QgsRuleBasedRendererV2::Rule* findRuleByKey( const QString& key );
165283

284+
/**
285+
* Check which child rules are else rules and update the internal list of else rules
286+
*
287+
* TODO QGIS 3: Does this need to be public?
288+
*/
166289
void updateElseRules();
167290

291+
/**
292+
* Sets if this rule is an ELSE rule
293+
*
294+
* @param iselse If true, this rule is an ELSE rule
295+
*/
168296
void setIsElse( bool iselse );
297+
298+
/**
299+
* Check if this rule is an ELSE rule
300+
*
301+
* @return True if this rule is an else rule
302+
*/
169303
bool isElse();
170304

171305
protected:

‎python/core/symbology-ng/qgssinglesymbolrendererv2.sip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ class QgsSingleSymbolRendererV2 : QgsFeatureRendererV2
99

1010
virtual ~QgsSingleSymbolRendererV2();
1111

12+
//! @note available in python as symbolForFeature2
1213
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=symbolForFeature2/;
1314

15+
//! @note available in python as originalSymbolForFeature2
1416
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=originalSymbolForFeature2/;
1517

1618
virtual void startRender( QgsRenderContext& context, const QgsFields& fields );
@@ -41,6 +43,7 @@ class QgsSingleSymbolRendererV2 : QgsFeatureRendererV2
4143
//! returns bitwise OR-ed capabilities of the renderer
4244
virtual int capabilities();
4345

46+
//! @note available in python as symbol2
4447
virtual QgsSymbolV2List symbols( QgsRenderContext& context ) /PyName=symbols2/;
4548

4649
//! create renderer from XML element

‎python/core/symbology-ng/qgssymbollayerv2.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ class QgsMarkerSymbolLayerV2 : QgsSymbolLayerV2
391391
//handles marker offset and anchor point shift together
392392
void markerOffset( QgsSymbolV2RenderContext& context, double& offsetX, double& offsetY ) const;
393393

394+
//! @note available in python as markerOffsetWithWidthAndHeight
394395
void markerOffset( QgsSymbolV2RenderContext& context, double width, double height, double& offsetX, double& offsetY ) const /PyName=markerOffsetWithWidthAndHeight/;
395396

396397
//! @note available in python bindings as markerOffset2

‎python/core/symbology-ng/qgssymbollayerv2utils.sip

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ class QgsSymbolLayerV2Utils
162162
static bool wellKnownMarkerFromSld( QDomElement &element,
163163
QString &name, QColor &color, QColor &borderColor,
164164
double &borderWidth, double &size ) /Deprecated/;
165+
166+
//! @note available in python as wellKnownMarkerFromSld2
165167
static bool wellKnownMarkerFromSld( QDomElement &element,
166168
QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle,
167169
double &borderWidth, double &size ) /PyName=wellKnownMarkerFromSld2/;
@@ -175,7 +177,7 @@ class QgsSymbolLayerV2Utils
175177

176178

177179
static void labelTextToSld( QDomDocument &doc, QDomElement &element, const QString& label,
178-
const QFont& font, const QColor& color = QColor(), double size = -1 );
180+
const QFont &font, const QColor& color = QColor(), double size = -1 );
179181

180182
/** Create ogr feature style string for pen */
181183
static QString ogrFeatureStylePen( double width, double mmScaleFactor, double mapUnitsScaleFactor, const QColor& c,

‎python/gui/attributetable/qgsifeatureselectionmanager.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* Is an interface class to abstract feature selection handling.
1818
*
19-
* e.g. @link{QgsVectorLayer} implements this interface to manage its selections.
19+
* e.g. { @link QgsVectorLayer } implements this interface to manage its selections.
2020
*/
2121

2222
class QgsIFeatureSelectionManager : QObject

‎python/gui/qgscollapsiblegroupbox.sip

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class QgsGroupBoxCollapseButton : QToolButton
2222
* Holding Alt modifier key when toggling collapsed state will synchronize the toggling across other collapsible group boxes with the same syncGroup QString value
2323
* Holding Shift modifier key when attempting to toggle collapsed state will expand current group box, then collapse any others with the same syncGroup QString value
2424
* @note To add Collapsible properties in promoted QtDesigner widgets, you can add the following "Dynamic properties" by clicking on the green + in the propreties palette:
25-
* bool collapsed, QString syncGroup
25+
* bool collapsed, QString syncGroup, bool scrollOnExpand
2626
*/
2727

2828
class QgsCollapsibleGroupBoxBasic : QGroupBox
@@ -35,16 +35,31 @@ class QgsCollapsibleGroupBoxBasic : QGroupBox
3535
QgsCollapsibleGroupBoxBasic( const QString &title, QWidget *parent /TransferThis/ = 0 );
3636
~QgsCollapsibleGroupBoxBasic();
3737

38+
/**
39+
* Returns the current collapsed state of this group box
40+
*/
3841
bool isCollapsed() const;
42+
/**
43+
* Collapse or uncollapse this groupbox
44+
*
45+
* @param collapse Will collapse on true and uncollapse on false
46+
*/
3947
void setCollapsed( bool collapse );
4048

41-
/** Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key */
49+
/**
50+
* Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
51+
*/
4252
QString syncGroup() const;
53+
54+
/**
55+
* Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
56+
*/
4357
void setSyncGroup( const QString& grp );
4458

45-
//! set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded
59+
//! Set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded
4660
void setScrollOnExpand( bool scroll );
4761

62+
//! If this is set to false the parent QScrollArea will not be automatically scrolled to this widget's contents when expanded
4863
bool scrollOnExpand();
4964

5065
signals:

‎src/core/dxf/qgsdxfexport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class CORE_EXPORT QgsDxfExport
7373
void writeInt( int i );
7474
void writeDouble( double d );
7575
void writeString( const QString &s );
76+
//! @note available in python bindings as writeGroupPoint
7677
void writeGroup( int code, const QgsPoint &p, double z = 0.0, bool skipz = false );
7778
void writeGroup( const QColor& color, int exactMatch = 62, int rgbCode = 420, int transparencyCode = 440 );
7879

‎src/core/qgsdataitem.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ class CORE_EXPORT QgsZipItem : public QgsDataCollectionItem
493493
static QString vsiPrefix( const QString& uri ) { return qgsVsiPrefix( uri ); }
494494

495495
static QgsDataItem* itemFromPath( QgsDataItem* parent, QString path, QString name );
496+
//! @note available in python as itemFromFilePath
496497
static QgsDataItem* itemFromPath( QgsDataItem* parent, const QString& filePath, const QString& name, const QString& path );
497498

498499
static const QIcon &iconZip();

‎src/core/qgsdatasourceuri.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class CORE_EXPORT QgsDataSourceURI
6868
//! Set generic param (generic mode)
6969
// \note if key exists, another is inserted
7070
void setParam( const QString &key, const QString &value );
71+
//! @note available in python as setParamList
7172
void setParam( const QString &key, const QStringList &value );
7273

7374
//! Remove generic param (generic mode)

‎src/core/qgsgml.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class CORE_EXPORT QgsGml : public QObject
5858
* @param password password for authentication
5959
* @param authcfg authentication configuration id
6060
* @return 0 in case of success
61+
* @note available in python as getFeaturesUri
6162
*/
6263
int getFeatures( const QString& uri,
6364
QGis::WkbType* wkbType,

‎src/core/qgsvectorlayer.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class CORE_EXPORT QgsAttributeEditorContainer : public QgsAttributeEditorElement
178178
virtual void setIsGroupBox( bool isGroupBox ) { mIsGroupBox = isGroupBox; }
179179

180180
/**
181-
* Returns if this ccontainer is going to be rendered as a group box
181+
* Returns if this container is going to be rendered as a group box
182182
*
183183
* @return True if it will be a group box, false if it will be a tab
184184
*/
@@ -1149,6 +1149,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
11491149
/** Moves the vertex at the given position number,
11501150
* ring and item (first number is index 0), and feature
11511151
* to the given coordinates
1152+
* @note available in python as moveVertexV2
11521153
*/
11531154
bool moveVertex( const QgsPointV2& p, QgsFeatureId atFeatureId, int atVertex );
11541155

@@ -1181,7 +1182,9 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
11811182
0 in case of success
11821183
1 problem with feature type
11831184
2 ring not closed
1184-
6 layer not editable*/
1185+
6 layer not editable
1186+
@note available in python as addCurvedRing
1187+
*/
11851188
int addRing( QgsCurveV2* ring, QgsFeatureId* featureId = 0 );
11861189

11871190
/** Adds a new part polygon to a multipart feature
@@ -1196,6 +1199,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
11961199
7 layer not editable */
11971200
int addPart( const QList<QgsPoint>& ring );
11981201

1202+
//! @note available in python as addCurvedPart
11991203
int addPart( QgsCurveV2* ring );
12001204

12011205
/** Translates feature by dx, dy
@@ -1885,6 +1889,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
18851889
* @see updatedFields()
18861890
*/
18871891
void attributeAdded( int idx );
1892+
18881893
/**
18891894
* Will be emitted, when an expression field is going to be added to this vector layer.
18901895
* Applies only to types {@link QgsFields::OriginExpression }
@@ -1901,6 +1906,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
19011906
* @see updatedFields()
19021907
*/
19031908
void attributeDeleted( int idx );
1909+
19041910
/**
19051911
* Will be emitted, when an expression field is going to be deleted from this vector layer.
19061912
* Applies only to types {@link QgsFields::OriginExpression }
@@ -1915,6 +1921,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
19151921
* @param fid The id of the new feature
19161922
*/
19171923
void featureAdded( QgsFeatureId fid );
1924+
19181925
/**
19191926
* Emitted when a feature has been deleted.
19201927
*
@@ -1924,16 +1931,18 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
19241931
* @param fid The id of the feature which has been deleted
19251932
*/
19261933
void featureDeleted( QgsFeatureId fid );
1934+
19271935
/**
19281936
* Emitted when features have been deleted.
19291937
*
19301938
* If features are deleted within an edit command, this will only be emitted once at the end
19311939
* to allow connected slots to minimize the overhead.
1932-
* If features are delted outside of an edit command, this signal will be emitted once per feature.
1940+
* If features are deleted outside of an edit command, this signal will be emitted once per feature.
19331941
*
19341942
* @param fids The feature ids that have been deleted.
19351943
*/
19361944
void featuresDeleted( QgsFeatureIds fids );
1945+
19371946
/**
19381947
* Is emitted, whenever the fields available from this layer have been changed.
19391948
* This can be due to manually adding attributes or due to a join.
@@ -2006,7 +2015,6 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
20062015
*/
20072016
void writeCustomSymbology( QDomElement& element, QDomDocument& doc, QString& errorMessage ) const;
20082017

2009-
20102018
private slots:
20112019
void onRelationsLoaded();
20122020
void onJoinedFieldsChanged();

‎src/core/raster/qgssinglebandpseudocolorrenderer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class CORE_EXPORT QgsSingleBandPseudoColorRenderer: public QgsRasterRenderer
4141
/** Takes ownership of the shader*/
4242
void setShader( QgsRasterShader* shader );
4343
QgsRasterShader* shader() { return mShader; }
44+
//! @note available in python as constShader
4445
const QgsRasterShader* shader() const { return mShader; }
4546

4647
void writeXML( QDomDocument& doc, QDomElement& parentElem ) const override;

‎src/core/symbology-ng/qgscategorizedsymbolrendererv2.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ class CORE_EXPORT QgsCategorizedSymbolRendererV2 : public QgsFeatureRendererV2
7676

7777
virtual ~QgsCategorizedSymbolRendererV2();
7878

79+
//! @note available in python as symbolForFeature2
7980
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) override;
8081

82+
//! @note available in python as originalSymbolForFeature2
8183
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feature, QgsRenderContext& context ) override;
8284

8385
virtual void startRender( QgsRenderContext& context, const QgsFields& fields ) override;
@@ -95,6 +97,7 @@ class CORE_EXPORT QgsCategorizedSymbolRendererV2 : public QgsFeatureRendererV2
9597
//! returns bitwise OR-ed capabilities of the renderer
9698
virtual int capabilities() override { return SymbolLevels | RotationField | Filter; }
9799

100+
//! @note available in python as symbols2
98101
virtual QgsSymbolV2List symbols( QgsRenderContext& context ) override;
99102
void updateSymbols( QgsSymbolV2 * sym );
100103

‎src/core/symbology-ng/qgsgraduatedsymbolrendererv2.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ class CORE_EXPORT QgsGraduatedSymbolRendererV2 : public QgsFeatureRendererV2
120120

121121
virtual ~QgsGraduatedSymbolRendererV2();
122122

123+
//! @note labelForLowerUpper in python bindings
123124
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext &context ) override;
124-
125+
//! @note originalSymbolForFeature2 in python bindings
125126
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feature, QgsRenderContext &context ) override;
126127

127128
virtual void startRender( QgsRenderContext& context, const QgsFields& fields ) override;
@@ -139,6 +140,7 @@ class CORE_EXPORT QgsGraduatedSymbolRendererV2 : public QgsFeatureRendererV2
139140
//! returns bitwise OR-ed capabilities of the renderer
140141
virtual int capabilities() override { return SymbolLevels | RotationField | Filter; }
141142

143+
//! @note symbol2 in python bindings
142144
virtual QgsSymbolV2List symbols( QgsRenderContext &context ) override;
143145

144146
QString classAttribute() const { return mAttrName; }

‎src/core/symbology-ng/qgsheatmaprenderer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ class CORE_EXPORT QgsHeatmapRenderer : public QgsFeatureRendererV2
4242
virtual void startRender( QgsRenderContext& context, const QgsFields& fields ) override;
4343
virtual bool renderFeature( QgsFeature& feature, QgsRenderContext& context, int layer = -1, bool selected = false, bool drawVertexMarker = false ) override;
4444
virtual void stopRender( QgsRenderContext& context ) override;
45+
//! @note symbolForFeature2 in python bindings
4546
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext &context ) override;
47+
//! @note symbol2 in python bindings
4648
virtual QgsSymbolV2List symbols( QgsRenderContext &context ) override;
4749
virtual QString dump() const override;
4850
virtual QList<QString> usedAttributes() override;

‎src/core/symbology-ng/qgsinvertedpolygonrenderer.h

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,35 @@ class CORE_EXPORT QgsInvertedPolygonRenderer : public QgsFeatureRendererV2
7676
virtual QList<QString> usedAttributes() override;
7777
/** Proxy that will call this method on the embedded renderer. */
7878
virtual int capabilities() override;
79-
/** Proxy that will call this method on the embedded renderer. */
79+
/** Proxy that will call this method on the embedded renderer.
80+
@note available in python bindings as symbol2
81+
*/
8082
virtual QgsSymbolV2List symbols( QgsRenderContext& context ) override;
81-
/** Proxy that will call this method on the embedded renderer. */
83+
/** Proxy that will call this method on the embedded renderer.
84+
@note available in python bindings as symbolForFeature2
85+
*/
8286
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) override;
83-
/** Proxy that will call this method on the embedded renderer. */
87+
/** Proxy that will call this method on the embedded renderer.
88+
@note available in python bindings as originalSymbolForFeature2
89+
*/
8490
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feat, QgsRenderContext& context ) override;
85-
/** Proxy that will call this method on the embedded renderer. */
91+
/** Proxy that will call this method on the embedded renderer.
92+
@note available in python bindings as symbolsForFeature
93+
*/
8694
virtual QgsSymbolV2List symbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) override;
87-
/** Proxy that will call this method on the embedded renderer. */
95+
/** Proxy that will call this method on the embedded renderer.
96+
@note available in python bindings as originalSymbolsForFeature2
97+
*/
8898
virtual QgsSymbolV2List originalSymbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) override;
8999
/** Proxy that will call this method on the embedded renderer. */
90100
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize ) override;
91101
/** Proxy that will call this method on the embedded renderer.
92102
@note not available in python bindings
93103
*/
94104
virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, const QString& rule = "" ) override;
95-
/** Proxy that will call this method on the embedded renderer. */
105+
/** Proxy that will call this method on the embedded renderer.
106+
@note available in python bindings as willRenderFeature2
107+
*/
96108
virtual bool willRenderFeature( QgsFeature& feat, QgsRenderContext& context ) override;
97109

98110
/** Creates a renderer out of an XML, for loading*/

‎src/core/symbology-ng/qgspointdisplacementrenderer.h

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,29 @@ class CORE_EXPORT QgsPointDisplacementRenderer: public QgsFeatureRendererV2
5454
virtual QList<QString> usedAttributes() override;
5555
/** Proxy that will call this method on the embedded renderer. */
5656
virtual int capabilities() override;
57-
/** Proxy that will call this method on the embedded renderer. */
57+
/** Proxy that will call this method on the embedded renderer.
58+
@note available in python as symbols2
59+
*/
5860
virtual QgsSymbolV2List symbols( QgsRenderContext& context ) override;
59-
/** Proxy that will call this method on the embedded renderer. */
61+
/** Proxy that will call this method on the embedded renderer.
62+
@note available in python as symbolForFeature2
63+
*/
6064
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) override;
61-
/** Proxy that will call this method on the embedded renderer. */
65+
/** Proxy that will call this method on the embedded renderer.
66+
@note available in python as originalSymbolForFeature2
67+
*/
6268
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feat, QgsRenderContext& context ) override;
63-
/** Proxy that will call this method on the embedded renderer. */
69+
/** Proxy that will call this method on the embedded renderer.
70+
@note available in python as symbolsForFeature2
71+
*/
6472
virtual QgsSymbolV2List symbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) override;
65-
/** Proxy that will call this method on the embedded renderer. */
73+
/** Proxy that will call this method on the embedded renderer.
74+
@note available in python as originalSymbolsForFeature2
75+
*/
6676
virtual QgsSymbolV2List originalSymbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) override;
67-
/** Proxy that will call this method on the embedded renderer. */
77+
/** Proxy that will call this method on the embedded renderer.
78+
@note available in python as willRenderFeature2
79+
*/
6880
virtual bool willRenderFeature( QgsFeature& feat, QgsRenderContext& context ) override;
6981

7082
virtual void startRender( QgsRenderContext& context, const QgsFields& fields ) override;

‎src/core/symbology-ng/qgsrendererv2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ class CORE_EXPORT QgsFeatureRendererV2
9494
* @note added in QGIS 2.12
9595
* @note available in Python bindings as symbolForFeature2
9696
*/
97-
//TODO - QGIS 3.0 make pure virtual when above method is removed
98-
//TODO - QGIS 3.0 change PyName to symbolForFeature when deprecated method is removed
97+
// TODO - QGIS 3.0 make pure virtual when above method is removed
98+
// TODO - QGIS 3.0 change PyName to symbolForFeature when deprecated method is removed
9999
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context );
100100

101101
/**

‎src/core/symbology-ng/qgsrulebasedrendererv2.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class CORE_EXPORT QgsRuleBasedRendererV2 : public QgsFeatureRendererV2
110110
*/
111111
QSet<QString> usedAttributes();
112112

113+
//! @note available in python bindings as symbol2
113114
QgsSymbolV2List symbols( const QgsRenderContext& context = QgsRenderContext() );
114115

115116
//! @note not available in python bindings
@@ -162,7 +163,7 @@ class CORE_EXPORT QgsRuleBasedRendererV2 : public QgsFeatureRendererV2
162163

163164
//! @note added in 2.6
164165
//! @deprecated use active instead
165-
bool checkState() const { return mIsActive; }
166+
Q_DECL_DEPRECATED bool checkState() const { return mIsActive; }
166167
/**
167168
* Returns if this rule is active
168169
*

‎src/core/symbology-ng/qgssinglesymbolrendererv2.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
3030

3131
virtual ~QgsSingleSymbolRendererV2();
3232

33+
//! @note available in python as symbolForFeature2
3334
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) override;
3435

36+
//! @note available in python as originalSymbolForFeature2
3537
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feature, QgsRenderContext& context ) override;
3638

3739
virtual void startRender( QgsRenderContext& context, const QgsFields& fields ) override;
@@ -62,6 +64,7 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
6264
//! returns bitwise OR-ed capabilities of the renderer
6365
virtual int capabilities() override { return SymbolLevels | RotationField; }
6466

67+
//! @note available in python as symbol2
6568
virtual QgsSymbolV2List symbols( QgsRenderContext& context ) override;
6669

6770
//! create renderer from XML element

‎src/core/symbology-ng/qgssymbollayerv2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ class CORE_EXPORT QgsMarkerSymbolLayerV2 : public QgsSymbolLayerV2
448448
//handles marker offset and anchor point shift together
449449
void markerOffset( QgsSymbolV2RenderContext& context, double& offsetX, double& offsetY ) const;
450450

451+
//! @note available in python as markerOffsetWithWidthAndHeight
451452
void markerOffset( QgsSymbolV2RenderContext& context, double width, double height, double& offsetX, double& offsetY ) const;
452453

453454
//! @note available in python bindings as markerOffset2

‎src/core/symbology-ng/qgssymbollayerv2utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ class CORE_EXPORT QgsSymbolLayerV2Utils
214214
Q_DECL_DEPRECATED static bool wellKnownMarkerFromSld( QDomElement &element,
215215
QString &name, QColor &color, QColor &borderColor,
216216
double &borderWidth, double &size );
217+
218+
//! @note available in python as wellKnownMarkerFromSld2
217219
static bool wellKnownMarkerFromSld( QDomElement &element,
218220
QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle,
219221
double &borderWidth, double &size );

0 commit comments

Comments
 (0)
Please sign in to comment.