Skip to content

Commit bfd37e1

Browse files
committedApr 7, 2017
[sipify] Add return types for functions in docstrings
and change \return -> :return: in docystrings
1 parent 8c5e241 commit bfd37e1

28 files changed

+644
-102
lines changed
 

‎python/core/annotations/qgsannotationmanager.sip

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class QgsAnnotationManager : QObject
4444
Returns true if the addition was successful, or false if the annotation could not be added.
4545
\see removeAnnotation()
4646
\see annotationAdded()
47+
:rtype: bool
4748
%End
4849

4950
bool removeAnnotation( QgsAnnotation *annotation );
@@ -55,6 +56,7 @@ class QgsAnnotationManager : QObject
5556
\see compositionRemoved()
5657
\see compositionAboutToBeRemoved()
5758
\see clear()
59+
:rtype: bool
5860
%End
5961

6062
void clear();
@@ -66,19 +68,22 @@ class QgsAnnotationManager : QObject
6668
QList< QgsAnnotation * > annotations() const;
6769
%Docstring
6870
Returns a list of all annotations contained in the manager.
71+
:rtype: list of QgsAnnotation
6972
%End
7073

7174
bool readXml( const QDomElement &element, const QDomDocument &doc );
7275
%Docstring
7376
Reads the manager's state from a DOM element, restoring all annotations
7477
present in the XML document.
7578
\see writeXml()
79+
:rtype: bool
7680
%End
7781

7882
QDomElement writeXml( QDomDocument &doc ) const;
7983
%Docstring
8084
Returns a DOM element representing the state of the manager.
8185
\see readXml()
86+
:rtype: QDomElement
8287
%End
8388

8489
signals:

‎python/core/annotations/qgshtmlannotation.sip

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class QgsHtmlAnnotation: QgsAnnotation
2828
~QgsHtmlAnnotation();
2929

3030
QSizeF minimumFrameSize() const;
31+
%Docstring
32+
:rtype: QSizeF
33+
%End
3134

3235
void setSourceFile( const QString &htmlFile );
3336
%Docstring
@@ -39,6 +42,7 @@ class QgsHtmlAnnotation: QgsAnnotation
3942
%Docstring
4043
Returns the file path for the source HTML file.
4144
\see setSourceFile()
45+
:rtype: str
4246
%End
4347

4448
virtual void writeXml( QDomElement &elem, QDomDocument &doc ) const;
@@ -49,6 +53,7 @@ class QgsHtmlAnnotation: QgsAnnotation
4953
static QgsHtmlAnnotation *create() /Factory/;
5054
%Docstring
5155
Returns a new QgsHtmlAnnotation object.
56+
:rtype: QgsHtmlAnnotation
5257
%End
5358

5459
protected:

‎python/core/annotations/qgssvgannotation.sip

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ class QgsSvgAnnotation: QgsAnnotation
3939
%Docstring
4040
Returns the file path for the source SVG file.
4141
\see setFilePath()
42+
:rtype: str
4243
%End
4344

4445
static QgsSvgAnnotation *create() /Factory/;
4546
%Docstring
4647
Returns a new QgsSvgAnnotation object.
48+
:rtype: QgsSvgAnnotation
4749
%End
4850

4951
protected:

‎python/core/annotations/qgstextannotation.sip

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class QgsTextAnnotation: QgsAnnotation
3131
Returns the text document which will be rendered
3232
within the annotation.
3333
\see setDocument()
34+
:rtype: QTextDocument
3435
%End
3536

3637
void setDocument( const QTextDocument *doc );
@@ -46,6 +47,7 @@ class QgsTextAnnotation: QgsAnnotation
4647
static QgsTextAnnotation *create() /Factory/;
4748
%Docstring
4849
Returns a new QgsTextAnnotation object.
50+
:rtype: QgsTextAnnotation
4951
%End
5052

5153
protected:

‎python/core/processing/qgsprocessingalgorithm.sip

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class QgsProcessingAlgorithm
4949
\see displayName()
5050
\see group()
5151
\see tags()
52+
:rtype: str
5253
%End
5354

5455
QString id() const;
@@ -57,48 +58,56 @@ class QgsProcessingAlgorithm
5758
provider's ID and the algorithms unique name (e.g. "qgis:mergelayers" ).
5859
\see name()
5960
\see provider()
61+
:rtype: str
6062
%End
6163

6264
virtual QString displayName() const = 0;
6365
%Docstring
6466
Returns the translated algorithm name, which should be used for any user-visible display
6567
of the algorithm name.
6668
\see name()
69+
:rtype: str
6770
%End
6871

6972
virtual QStringList tags() const;
7073
%Docstring
7174
Returns a list of tags which relate to the algorithm, and are used to assist users in searching
7275
for suitable algorithms. These tags should be localised.
76+
:rtype: list of str
7377
%End
7478

7579
virtual QIcon icon() const;
7680
%Docstring
7781
Returns an icon for the algorithm.
7882
\see svgIconPath()
83+
:rtype: QIcon
7984
%End
8085

8186
virtual QString svgIconPath() const;
8287
%Docstring
8388
Returns a path to an SVG version of the algorithm's icon.
8489
\see icon()
90+
:rtype: str
8591
%End
8692

8793
virtual QString group() const;
8894
%Docstring
8995
Returns the name of the group this algorithm belongs to. This string
9096
should be localised.
9197
\see tags()
98+
:rtype: str
9299
%End
93100

94101
virtual Flags flags() const;
95102
%Docstring
96103
Returns the flags indicating how and when the algorithm operates and should be exposed to users.
104+
:rtype: Flags
97105
%End
98106

99107
QgsProcessingProvider *provider() const;
100108
%Docstring
101109
Returns the provider to which this algorithm belongs.
110+
:rtype: QgsProcessingProvider
102111
%End
103112

104113
private:

‎python/core/processing/qgsprocessingprovider.sip

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ class QgsProcessingProvider : QObject
3636
%Docstring
3737
Returns an icon for the provider.
3838
\see svgIconPath()
39+
:rtype: QIcon
3940
%End
4041

4142
virtual QString svgIconPath() const;
4243
%Docstring
4344
Returns a path to an SVG version of the provider's icon.
4445
\see icon()
46+
:rtype: str
4547
%End
4648

4749
virtual QString id() const = 0;
@@ -50,32 +52,37 @@ class QgsProcessingProvider : QObject
5052
should be a unique, short, character only string, eg "qgis" or "gdal". This
5153
string should not be localised.
5254
\see name()
55+
:rtype: str
5356
%End
5457

5558
virtual QString name() const = 0;
5659
%Docstring
5760
Returns the full provider name, which is used to describe the provider within the GUI.
5861
This string should be localised.
5962
\see id()
63+
:rtype: str
6064
%End
6165

6266
virtual bool canBeActivated() const;
6367
%Docstring
6468
Returns true if the provider can be activated, or false if it cannot be activated (e.g. due to
6569
missing external dependencies).
6670
\see isActive()
71+
:rtype: bool
6772
%End
6873

6974
virtual bool isActive() const;
7075
%Docstring
7176
Returns true if the provider is active and able to run algorithms.
77+
:rtype: bool
7278
%End
7379

7480
virtual QStringList supportedOutputRasterLayerExtensions() const;
7581
%Docstring
7682
Returns a list of the raster format file extensions supported by this provider.
7783
\see supportedOutputVectorLayerExtensions()
7884
\see supportedOutputTableExtensions()
85+
:rtype: list of str
7986
%End
8087

8188
virtual QStringList supportedOutputVectorLayerExtensions() const;
@@ -84,20 +91,23 @@ class QgsProcessingProvider : QObject
8491
\see supportedOutputRasterLayerExtensions()
8592
\see supportedOutputTableExtensions()
8693
\see supportsNonFileBasedOutput()
94+
:rtype: list of str
8795
%End
8896

8997
virtual QStringList supportedOutputTableExtensions() const;
9098
%Docstring
9199
Returns a list of the table format file extensions supported by this provider.
92100
\see supportedOutputRasterLayerExtensions()
93101
\see supportedOutputVectorLayerExtensions()
102+
:rtype: list of str
94103
%End
95104

96105
virtual bool supportsNonFileBasedOutput() const;
97106
%Docstring
98107
Returns true if the provider supports non-file based outputs (such as memory layers
99108
or direct database outputs).
100109
\see supportedOutputVectorLayerExtensions()
110+
:rtype: bool
101111
%End
102112

103113
virtual bool load();
@@ -107,8 +117,9 @@ class QgsProcessingProvider : QObject
107117
Subclasses should not individually load any algorithms in their load() implementations, as that must
108118
occur within the loadAlgorithms() method. Instead, subclasses should call refreshAlgorithms()
109119
from any overloaded load() method to trigger an initial load of the provider's algorithms.
110-
\returns true if provider could be successfully loaded
120+
:return: true if provider could be successfully loaded
111121
\see unload()
122+
:rtype: bool
112123
%End
113124

114125
virtual void unload();
@@ -126,13 +137,15 @@ class QgsProcessingProvider : QObject
126137
%Docstring
127138
Returns a list of algorithms supplied by this provider.
128139
\see algorithm()
140+
:rtype: list of const QgsProcessingAlgorithm
129141
%End
130142

131143
const QgsProcessingAlgorithm *algorithm( const QString &name ) const;
132144
%Docstring
133145
Returns the matching algorithm by name, or a None if no matching
134146
algorithm is contained by this provider.
135147
\see algorithms()
148+
:rtype: QgsProcessingAlgorithm
136149
%End
137150

138151
signals:
@@ -155,6 +168,7 @@ class QgsProcessingProvider : QObject
155168
bool addAlgorithm( QgsProcessingAlgorithm *algorithm /Transfer/ );
156169
%Docstring
157170
Adds an algorithm to the provider. Ownership of the algorithm is transferred to the provider.
171+
:rtype: bool
158172
%End
159173

160174
private:

‎python/core/processing/qgsprocessingregistry.sip

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class QgsProcessingRegistry : QObject
3737
QList<QgsProcessingProvider *> providers() const;
3838
%Docstring
3939
Get list of available providers.
40+
:rtype: list of QgsProcessingProvider
4041
%End
4142

4243
bool addProvider( QgsProcessingProvider *provider /Transfer/ );
@@ -48,38 +49,44 @@ class QgsProcessingRegistry : QObject
4849
Adding a provider to the registry automatically triggers the providers QgsProcessingProvider.load()
4950
method to populate the provider with algorithms.
5051
\see removeProvider()
52+
:rtype: bool
5153
%End
5254

5355
bool removeProvider( QgsProcessingProvider *provider );
5456
%Docstring
5557
Removes a provider implementation from the registry (the provider object is deleted).
5658
Returns false if the provider could not be removed (eg provider does not exist in the registry).
5759
\see addProvider()
60+
:rtype: bool
5861
%End
5962

6063
bool removeProvider( const QString &providerId );
6164
%Docstring
6265
Removes a provider implementation from the registry (the provider object is deleted).
6366
Returns false if the provider could not be removed (eg provider does not exist in the registry).
6467
\see addProvider()
68+
:rtype: bool
6569
%End
6670

6771
QgsProcessingProvider *providerById( const QString &id );
6872
%Docstring
6973
Returns a matching provider by provider ID.
74+
:rtype: QgsProcessingProvider
7075
%End
7176

7277
QList< const QgsProcessingAlgorithm *> algorithms() const;
7378
%Docstring
7479
Returns a list of all available algorithms from registered providers.
7580
\see algorithmById()
81+
:rtype: list of const QgsProcessingAlgorithm
7682
%End
7783

7884
const QgsProcessingAlgorithm *algorithmById( const QString &id ) const;
7985
%Docstring
8086
Finds an algorithm by its ID. If no matching algorithm is found, a None
8187
is returned.
8288
\see algorithms()
89+
:rtype: QgsProcessingAlgorithm
8390
%End
8491

8592
signals:

‎python/core/processing/qgsprocessingutils.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class QgsProcessingUtils
3333
value.
3434
\see compatibleVectorLayers()
3535
\see compatibleLayers()
36+
:rtype: list of QgsRasterLayer
3637
%End
3738

3839
static QList< QgsVectorLayer * > compatibleVectorLayers( QgsProject *project,
@@ -50,6 +51,7 @@ class QgsProcessingUtils
5051
value.
5152
\see compatibleRasterLayers()
5253
\see compatibleLayers()
54+
:rtype: list of QgsVectorLayer
5355
%End
5456

5557
static QList< QgsMapLayer * > compatibleLayers( QgsProject *project, bool sort = true );
@@ -61,6 +63,7 @@ class QgsProcessingUtils
6163
value.
6264
\see compatibleRasterLayers()
6365
\see compatibleVectorLayers()
66+
:rtype: list of QgsMapLayer
6467
%End
6568

6669

@@ -74,6 +77,7 @@ class QgsProcessingUtils
7477
for layers in the specified project, then those matching layers will be
7578
returned.
7679
\see mapLayerFromString()
80+
:rtype: QgsMapLayer
7781
%End
7882

7983
static QgsMapLayer *mapLayerFromString( const QString &string ) /Factory/;
@@ -83,12 +87,14 @@ class QgsProcessingUtils
8387
then the layer at this file path will be loaded.
8488
The caller takes responsibility for deleting the returned map layer.
8589
\see mapLayerFromProject()
90+
:rtype: QgsMapLayer
8691
%End
8792

8893
static QString normalizeLayerSource( const QString &source );
8994
%Docstring
9095
Normalizes a layer source string for safe comparison across different
9196
operating system environments.
97+
:rtype: str
9298
%End
9399

94100
};

‎python/core/qgsaction.sip

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,35 +60,41 @@ class QgsAction
6060
QString name() const;
6161
%Docstring
6262
The name of the action. This may be a longer description.
63+
:rtype: str
6364
%End
6465

6566
QString shortTitle() const;
6667
%Docstring
6768
The short title is used to label user interface elements like buttons
69+
:rtype: str
6870
%End
6971

7072
QUuid id() const;
7173
%Docstring
7274
Returns a unique id for this action.
7375

7476
.. versionadded:: 3.0
77+
:rtype: QUuid
7578
%End
7679

7780
bool isValid() const;
7881
%Docstring
7982
Returns true if this action was a default constructed one.
8083

8184
.. versionadded:: 3.0
85+
:rtype: bool
8286
%End
8387

8488
QString iconPath() const;
8589
%Docstring
8690
The path to the icon
91+
:rtype: str
8792
%End
8893

8994
QIcon icon() const;
9095
%Docstring
9196
The icon
97+
:rtype: QIcon
9298
%End
9399

94100
QString command() const;
@@ -98,21 +104,25 @@ The icon
98104
the actionScope().
99105

100106
.. versionadded:: 3.0
107+
:rtype: str
101108
%End
102109

103110
ActionType type() const;
104111
%Docstring
105112
The action type
113+
:rtype: ActionType
106114
%End
107115

108116
bool capture() const;
109117
%Docstring
110118
Whether to capture output for display when this action is run
119+
:rtype: bool
111120
%End
112121

113122
bool runable() const;
114123
%Docstring
115124
Checks if the action is runable on the current platform
125+
:rtype: bool
116126
%End
117127

118128
void run( QgsVectorLayer *layer, const QgsFeature &feature, const QgsExpressionContext &expressionContext ) const;
@@ -137,6 +147,7 @@ Checks if the action is runable on the current platform
137147

138148
\see QgsActionScope
139149
.. versionadded:: 3.0
150+
:rtype: set of str
140151
%End
141152

142153
void setActionScopes( const QSet<QString> &actionScopes );

‎python/core/qgsactionmanager.sip

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Constructor
3131
capture is true, when running the action using doAction(),
3232
any stdout from the process will be captured and displayed in a
3333
dialog box.
34+
:rtype: QUuid
3435
%End
3536

3637
QUuid addAction( QgsAction::ActionType type, const QString &name, const QString &command, const QString &icon, bool capture = false );
@@ -40,6 +41,7 @@ Constructor
4041
capture is true, when running the action using doAction(),
4142
any stdout from the process will be captured and displayed in a
4243
dialog box.
44+
:rtype: QUuid
4345
%End
4446

4547
void addAction( const QgsAction &action );
@@ -83,28 +85,33 @@ Removes all actions
8385
If no action scope is provided, all actions will be returned.
8486

8587
.. versionadded:: 3.0
88+
:rtype: list of QgsAction
8689
%End
8790

8891
QgsVectorLayer *layer() const;
8992
%Docstring
9093
Return the layer
94+
:rtype: QgsVectorLayer
9195
%End
9296

9397
bool writeXml( QDomNode &layer_node ) const;
9498
%Docstring
9599
Writes the actions out in XML format
100+
:rtype: bool
96101
%End
97102

98103
bool readXml( const QDomNode &layer_node );
99104
%Docstring
100105
Reads the actions in in XML format
106+
:rtype: bool
101107
%End
102108

103109
QgsAction action( const QUuid &id );
104110
%Docstring
105111
Get an action by its id.
106112

107113
.. versionadded:: 3.0
114+
:rtype: QgsAction
108115
%End
109116

110117
void setDefaultAction( const QString &actionScope, const QUuid &actionId );
@@ -121,6 +128,7 @@ Reads the actions in in XML format
121128
file.
122129

123130
.. versionadded:: 3.0
131+
:rtype: QgsAction
124132
%End
125133

126134
};

‎python/core/qgsactionscope.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class QgsActionScope
5454
bool operator==( const QgsActionScope &other ) const;
5555
%Docstring
5656
Compares two action scopes
57+
:rtype: bool
5758
%End
5859

5960
QgsExpressionContextScope expressionContextScope() const;
@@ -63,6 +64,7 @@ class QgsActionScope
6364
`clicked_x` and `clicked_y` for actions which are available as map canvas clicks.
6465

6566
.. versionadded:: 3.0
67+
:rtype: QgsExpressionContextScope
6668
%End
6769

6870
void setExpressionContextScope( const QgsExpressionContextScope &expressionContextScope );
@@ -75,6 +77,7 @@ class QgsActionScope
7577
A unique identifier for this action scope.
7678

7779
.. versionadded:: 3.0
80+
:rtype: str
7881
%End
7982

8083
void setId( const QString &id );
@@ -88,6 +91,7 @@ class QgsActionScope
8891
presented to the user in the properties dialog.
8992

9093
.. versionadded:: 3.0
94+
:rtype: str
9195
%End
9296
void setTitle( const QString &title );
9397
%Docstring
@@ -101,6 +105,7 @@ class QgsActionScope
101105
in here, they are extracted automatically from the expressionContextScope().
102106

103107
.. versionadded:: 3.0
108+
:rtype: str
104109
%End
105110
void setDescription( const QString &description );
106111
%Docstring
@@ -112,6 +117,7 @@ class QgsActionScope
112117
Returns if this scope is valid.
113118

114119
.. versionadded:: 3.0
120+
:rtype: bool
115121
%End
116122

117123
};

‎python/core/qgsactionscoperegistry.sip

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class QgsActionScopeRegistry : QObject
4444
Get all registered action scopes.
4545

4646
.. versionadded:: 3.0
47+
:rtype: set of QgsActionScope
4748
%End
4849

4950
void registerActionScope( const QgsActionScope &actionScope );
@@ -65,6 +66,7 @@ class QgsActionScopeRegistry : QObject
6566
Get an action scope by its id.
6667

6768
.. versionadded:: 3.0
69+
:rtype: QgsActionScope
6870
%End
6971

7072
signals:

‎python/core/qgsaggregatecalculator.sip

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class QgsAggregateCalculator
7878
const QgsVectorLayer *layer() const;
7979
%Docstring
8080
Returns the associated vector layer.
81+
:rtype: QgsVectorLayer
8182
%End
8283

8384
void setParameters( const AggregateParameters &parameters );
@@ -97,6 +98,7 @@ class QgsAggregateCalculator
9798
%Docstring
9899
Returns the filter which limits the features used during the aggregate calculation.
99100
\see setFilter()
101+
:rtype: str
100102
%End
101103

102104
void setDelimiter( const QString &delimiter );
@@ -110,6 +112,7 @@ class QgsAggregateCalculator
110112
%Docstring
111113
Returns the delimiter used for joining values with the StringConcatenate aggregate.
112114
\see setDelimiter()
115+
:rtype: str
113116
%End
114117

115118
QVariant calculate( Aggregate aggregate, const QString &fieldOrExpression,
@@ -121,15 +124,17 @@ class QgsAggregateCalculator
121124
If an expression is used, then the context parameter must be set.
122125
\param context expression context for evaluating expressions
123126
\param ok if specified, will be set to true if aggregate calculation was successful
124-
\returns calculated aggregate value
127+
:return: calculated aggregate value
128+
:rtype: QVariant
125129
%End
126130

127131
static Aggregate stringToAggregate( const QString &string, bool *ok = 0 );
128132
%Docstring
129133
Converts a string to a aggregate type.
130134
\param string string to convert
131135
\param ok if specified, will be set to true if conversion was successful
132-
\returns aggregate type
136+
:return: aggregate type
137+
:rtype: Aggregate
133138
%End
134139

135140
};

‎python/core/qgsanimatedicon.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class QgsAnimatedIcon : QObject
2727
QString iconPath() const;
2828
%Docstring
2929
Path to a movie, e.g. animated GIF
30+
:rtype: str
3031
%End
3132

3233
void setIconPath( const QString &iconPath );
@@ -39,6 +40,7 @@ class QgsAnimatedIcon : QObject
3940
Get the icons representation in the current frame.
4041
This will need to be called repeatedly, whenever a frameChanged()
4142
signal is emitted.
43+
:rtype: QIcon
4244
%End
4345

4446

@@ -51,13 +53,15 @@ class QgsAnimatedIcon : QObject
5153
makes sure the annimation is started.
5254

5355
.. versionadded:: 3.0
56+
:rtype: bool
5457
%End
5558

5659
bool disconnectFrameChanged( const QObject *receiver, const char *method );
5760
%Docstring
5861
Convenience function to disconnect the same style that the frame change connection was established.
5962

6063
.. versionadded:: 3.0
64+
:rtype: bool
6165
%End
6266

6367

@@ -66,13 +70,15 @@ class QgsAnimatedIcon : QObject
6670
The native width of the icon.
6771

6872
.. versionadded:: 3.0
73+
:rtype: int
6974
%End
7075

7176
int height() const;
7277
%Docstring
7378
The native height of the icon.
7479

7580
.. versionadded:: 3.0
81+
:rtype: int
7682
%End
7783

7884
signals:

‎python/core/qgsattributeeditorelement.sip

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,24 @@ class QgsAttributeEditorElement /Abstract/
5656
%Docstring
5757
Return the name of this element
5858

59-
\returns The name for this element
59+
:return: The name for this element
60+
:rtype: str
6061
%End
6162

6263
AttributeEditorType type() const;
6364
%Docstring
6465
The type of this element
6566

66-
\returns The type
67+
:return: The type
68+
:rtype: AttributeEditorType
6769
%End
6870

6971
QgsAttributeEditorElement *parent() const;
7072
%Docstring
7173
Get the parent of this element.
7274

7375
.. versionadded:: 3.0
76+
:rtype: QgsAttributeEditorElement
7477
%End
7578

7679
QDomElement toDomElement( QDomDocument &doc ) const;
@@ -79,21 +82,24 @@ class QgsAttributeEditorElement /Abstract/
7982

8083
\param doc The QDomDocument which is used to create new XML elements
8184

82-
\returns A DOM element to serialize this element
85+
:return: A DOM element to serialize this element
86+
:rtype: QDomElement
8387
%End
8488

8589
virtual QgsAttributeEditorElement *clone( QgsAttributeEditorElement *parent ) const = 0 /Factory/;
8690
%Docstring
8791
Returns a clone of this element. To be implemented by subclasses.
8892

8993
.. versionadded:: 3.0
94+
:rtype: QgsAttributeEditorElement
9095
%End
9196

9297
bool showLabel() const;
9398
%Docstring
9499
Controls if this element should be labeled with a title (field, relation or groupname).
95100

96101
.. versionadded:: 2.18
102+
:rtype: bool
97103
%End
98104

99105
void setShowLabel( bool showLabel );
@@ -149,14 +155,16 @@ class QgsAttributeEditorContainer : QgsAttributeEditorElement
149155
%Docstring
150156
Returns if this container is going to be rendered as a group box
151157

152-
\returns True if it will be a group box, false if it will be a tab
158+
:return: True if it will be a group box, false if it will be a tab
159+
:rtype: bool
153160
%End
154161

155162
QList<QgsAttributeEditorElement *> children() const;
156163
%Docstring
157164
Get a list of the children elements of this container
158165

159-
\returns A list of elements
166+
:return: A list of elements
167+
:rtype: list of QgsAttributeEditorElement
160168
%End
161169

162170
virtual QList<QgsAttributeEditorElement *> findElements( AttributeEditorType type ) const;
@@ -165,7 +173,8 @@ class QgsAttributeEditorContainer : QgsAttributeEditorElement
165173

166174
\param type The type which should be searched
167175

168-
\returns A list of elements of the type which has been searched for
176+
:return: A list of elements of the type which has been searched for
177+
:rtype: list of QgsAttributeEditorElement
169178
%End
170179

171180
void clear();
@@ -181,6 +190,7 @@ class QgsAttributeEditorContainer : QgsAttributeEditorElement
181190
int columnCount() const;
182191
%Docstring
183192
Get the number of columns in this group
193+
:rtype: int
184194
%End
185195

186196
void setColumnCount( int columnCount );
@@ -193,6 +203,7 @@ class QgsAttributeEditorContainer : QgsAttributeEditorElement
193203
Creates a deep copy of this element. To be implemented by subclasses.
194204

195205
.. versionadded:: 3.0
206+
:rtype: QgsAttributeEditorElement
196207
%End
197208

198209
QgsOptionalExpression visibilityExpression() const;
@@ -202,6 +213,7 @@ class QgsAttributeEditorContainer : QgsAttributeEditorElement
202213
the field value controlled by editor widgets.
203214

204215
.. versionadded:: 3.0
216+
:rtype: QgsOptionalExpression
205217
%End
206218

207219
void setVisibilityExpression( const QgsOptionalExpression &visibilityExpression );
@@ -238,10 +250,14 @@ class QgsAttributeEditorField : QgsAttributeEditorElement
238250
int idx() const;
239251
%Docstring
240252
Return the index of the field
241-
\returns
253+
:return:
254+
:rtype: int
242255
%End
243256

244257
virtual QgsAttributeEditorElement *clone( QgsAttributeEditorElement *parent ) const /Factory/;
258+
%Docstring
259+
:rtype: QgsAttributeEditorElement
260+
%End
245261

246262
};
247263

@@ -278,24 +294,30 @@ class QgsAttributeEditorRelation : QgsAttributeEditorElement
278294
%Docstring
279295
Get the id of the relation which shall be embedded
280296

281-
\returns the id
297+
:return: the id
298+
:rtype: QgsRelation
282299
%End
283300

284301
bool init( QgsRelationManager *relManager );
285302
%Docstring
286303
Initializes the relation from the id
287304

288305
\param relManager The relation manager to use for the initialization
289-
\returns true if the relation was found in the relationmanager
306+
:return: true if the relation was found in the relationmanager
307+
:rtype: bool
290308
%End
291309

292310
virtual QgsAttributeEditorElement *clone( QgsAttributeEditorElement *parent ) const /Factory/;
311+
%Docstring
312+
:rtype: QgsAttributeEditorElement
313+
%End
293314

294315
bool showLinkButton() const;
295316
%Docstring
296317
Determines if the "link feature" button should be shown
297318

298319
.. versionadded:: 2.18
320+
:rtype: bool
299321
%End
300322

301323
void setShowLinkButton( bool showLinkButton );
@@ -310,6 +332,7 @@ class QgsAttributeEditorRelation : QgsAttributeEditorElement
310332
Determines if the "unlink feature" button should be shown
311333

312334
.. versionadded:: 2.18
335+
:rtype: bool
313336
%End
314337

315338
void setShowUnlinkButton( bool showUnlinkButton );

‎python/core/qgsattributetableconfig.sip

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,21 @@ Constructor for ColumnConfig
5151
%Docstring
5252
Get the list with all columns and their configuration.
5353
The list order defines the order of appearance.
54+
:rtype: list of QgsAttributeTableConfig.ColumnConfig
5455
%End
5556

5657
bool isEmpty() const;
5758
%Docstring
5859
Returns true if the configuration is empty, ie it contains no columns.
60+
:rtype: bool
5961
%End
6062

6163
int mapVisibleColumnToIndex( int visibleColumn ) const;
6264
%Docstring
6365
Maps a visible column index to its original column index.
6466
\param visibleColumn index of visible column
65-
\returns corresponding index when hidden columns are considered
67+
:return: corresponding index when hidden columns are considered
68+
:rtype: int
6669
%End
6770

6871
void setColumns( const QVector<QgsAttributeTableConfig::ColumnConfig> &columns );
@@ -82,6 +85,7 @@ Constructor for ColumnConfig
8285
bool actionWidgetVisible() const;
8386
%Docstring
8487
Returns true if the action widget is visible
88+
:rtype: bool
8589
%End
8690

8791
void setActionWidgetVisible( bool visible );
@@ -92,6 +96,7 @@ Constructor for ColumnConfig
9296
ActionWidgetStyle actionWidgetStyle() const;
9397
%Docstring
9498
Get the style of the action widget
99+
:rtype: ActionWidgetStyle
95100
%End
96101

97102
void setActionWidgetStyle( ActionWidgetStyle actionWidgetStyle );
@@ -112,6 +117,7 @@ Constructor for ColumnConfig
112117
QString sortExpression() const;
113118
%Docstring
114119
Get the expression used for sorting.
120+
:rtype: str
115121
%End
116122

117123
void setSortExpression( const QString &sortExpression );
@@ -124,6 +130,7 @@ Constructor for ColumnConfig
124130
Returns the width of a column, or -1 if column should use default width.
125131
\param column column index
126132
\see setColumnWidth()
133+
:rtype: int
127134
%End
128135

129136
void setColumnWidth( int column, int width );
@@ -139,6 +146,7 @@ Constructor for ColumnConfig
139146
Returns true if the specified column is hidden.
140147
\param column column index
141148
\see setColumnHidden()
149+
:rtype: bool
142150
%End
143151

144152
void setColumnHidden( int column, bool hidden );
@@ -153,6 +161,7 @@ Constructor for ColumnConfig
153161
%Docstring
154162
Get the sort order
155163
.. versionadded:: 2.16
164+
:rtype: Qt.SortOrder
156165
%End
157166

158167
void setSortOrder( Qt::SortOrder sortOrder );

‎python/core/qgsclipper.sip

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ class QgsClipper
7272
Takes a linestring and clips it to clipExtent
7373
\param curve the linestring
7474
\param clipExtent clipping bounds
75-
\returns clipped line coordinates
75+
:return: clipped line coordinates
76+
:rtype: QPolygonF
7677
%End
7778

7879
};

‎python/core/qgsconditionalstyle.sip

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ class QgsConditionalLayerStyles
2626
QgsConditionalLayerStyles();
2727

2828
QList<QgsConditionalStyle> rowStyles();
29+
%Docstring
30+
:rtype: list of QgsConditionalStyle
31+
%End
2932

3033
void setRowStyles( const QList<QgsConditionalStyle> &styles );
3134
%Docstring
@@ -45,17 +48,20 @@ class QgsConditionalLayerStyles
4548
QList<QgsConditionalStyle> fieldStyles( const QString &fieldName );
4649
%Docstring
4750
Returns the conditional styles set for the field UI properties
48-
\returns A list of conditional styles that have been set.
51+
:return: A list of conditional styles that have been set.
52+
:rtype: list of QgsConditionalStyle
4953
%End
5054

5155
bool readXml( const QDomNode &node );
5256
%Docstring
5357
Reads field ui properties specific state from Dom node.
58+
:rtype: bool
5459
%End
5560

5661
bool writeXml( QDomNode &node, QDomDocument &doc ) const;
5762
%Docstring
5863
Write field ui properties specific state from Dom node.
64+
:rtype: bool
5965
%End
6066

6167
};
@@ -81,13 +87,15 @@ class QgsConditionalStyle
8187
Check if the rule matches using the given value and feature
8288
\param value The current value being checked. The "value" variable from the context is replaced with this value.
8389
\param context Expression context for evaluating rule expression
84-
\returns True of the rule matches against the given feature
90+
:return: True of the rule matches against the given feature
91+
:rtype: bool
8592
%End
8693

8794
QPixmap renderPreview() const;
8895
%Docstring
8996
Render a preview icon of the rule.
90-
\returns QPixmap preview of the style
97+
:return: QPixmap preview of the style
98+
:rtype: QPixmap
9199
%End
92100

93101
void setName( const QString &value );
@@ -130,107 +138,123 @@ class QgsConditionalStyle
130138
QString displayText() const;
131139
%Docstring
132140
The name of the style.
133-
\returns The name of the style. Names are optional so might be empty.
141+
:return: The name of the style. Names are optional so might be empty.
142+
:rtype: str
134143
%End
135144

136145
QString name() const;
137146
%Docstring
138147
The name of the style.
139-
\returns The name of the style. Names are optional so might be empty.
148+
:return: The name of the style. Names are optional so might be empty.
149+
:rtype: str
140150
%End
141151

142152
QPixmap icon() const;
143153
%Docstring
144154
The icon set for style generated from the set symbol
145-
\returns A QPixmap that was set for the icon using the symbol
155+
:return: A QPixmap that was set for the icon using the symbol
156+
:rtype: QPixmap
146157
%End
147158

148159
QgsSymbol *symbol() const;
149160
%Docstring
150161
The symbol used to generate the icon for the style
151-
\returns The QgsSymbol used for the icon
162+
:return: The QgsSymbol used for the icon
163+
:rtype: QgsSymbol
152164
%End
153165

154166
QColor textColor() const;
155167
%Docstring
156168
The text color set for style
157-
\returns QColor for text color
169+
:return: QColor for text color
170+
:rtype: QColor
158171
%End
159172

160173
bool validTextColor() const;
161174
%Docstring
162175
Check if the text color is valid for render.
163176
Valid colors are non invalid QColors and a color with a > 0 alpha
164-
\returns True of the color set for text is valid.
177+
:return: True of the color set for text is valid.
178+
:rtype: bool
165179
%End
166180

167181
QColor backgroundColor() const;
168182
%Docstring
169183
The background color for style
170-
\returns QColor for background color
184+
:return: QColor for background color
185+
:rtype: QColor
171186
%End
172187

173188
bool validBackgroundColor() const;
174189
%Docstring
175190
Check if the background color is valid for render.
176191
Valid colors are non invalid QColors and a color with a > 0 alpha
177-
\returns True of the color set for background is valid.
192+
:return: True of the color set for background is valid.
193+
:rtype: bool
178194
%End
179195

180196
QFont font() const;
181197
%Docstring
182198
The font for the style
183-
\returns QFont for the style
199+
:return: QFont for the style
200+
:rtype: QFont
184201
%End
185202

186203
QString rule() const;
187204
%Docstring
188205
The condition rule set for the style. Rule may contain variable \@value
189206
to represent the current value
190-
\returns QString of the current set rule
207+
:return: QString of the current set rule
208+
:rtype: str
191209
%End
192210

193211
bool isValid() const;
194212
%Docstring
195213
isValid Check if this rule is valid. A valid rule has one or more properties
196214
set.
197-
\returns True if the rule is valid.
215+
:return: True if the rule is valid.
216+
:rtype: bool
198217
%End
199218

200219
static QList<QgsConditionalStyle> matchingConditionalStyles( const QList<QgsConditionalStyle> &styles, const QVariant &value, QgsExpressionContext &context );
201220
%Docstring
202221
Find and return the matching styles for the value and feature.
203222
If no match is found a invalid QgsConditionalStyle is return.
204223

205-
\returns A conditional style that matches the value and feature.
224+
:return: A conditional style that matches the value and feature.
206225
Check with QgsConditionalStyle.isValid()
226+
:rtype: list of QgsConditionalStyle
207227
%End
208228

209229
static QgsConditionalStyle matchingConditionalStyle( const QList<QgsConditionalStyle> &styles, const QVariant &value, QgsExpressionContext &context );
210230
%Docstring
211231
Find and return the matching style for the value and feature.
212232
If no match is found a invalid QgsConditionalStyle is return.
213233

214-
\returns A conditional style that matches the value and feature.
234+
:return: A conditional style that matches the value and feature.
215235
Check with QgsConditionalStyle.isValid()
236+
:rtype: QgsConditionalStyle
216237
%End
217238

218239
static QgsConditionalStyle compressStyles( const QList<QgsConditionalStyle> &styles );
219240
%Docstring
220241
Compress a list of styles into a single style. This can be used to stack the elements of the
221242
styles. The font of the last style is used in the output.
222243
\param styles The list of styles to compress down
223-
\returns A single style generated from joining each style property.
244+
:return: A single style generated from joining each style property.
245+
:rtype: QgsConditionalStyle
224246
%End
225247

226248
bool readXml( const QDomNode &node );
227249
%Docstring
228250
Reads vector conditional style specific state from layer Dom node.
251+
:rtype: bool
229252
%End
230253

231254
bool writeXml( QDomNode &node, QDomDocument &doc ) const;
232255
%Docstring
233256
Write vector conditional style specific state from layer Dom node.
257+
:rtype: bool
234258
%End
235259

236260

‎python/core/qgsfeature.sip

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,9 @@ class QgsFeature
162162
QgsFeatureId id() const;
163163
%Docstring
164164
Get the feature ID for this feature.
165-
\returns feature ID
165+
:return: feature ID
166166
\see setId()
167+
:rtype: QgsFeatureId
167168
%End
168169

169170
void setId( QgsFeatureId id );
@@ -176,12 +177,13 @@ class QgsFeature
176177
QgsAttributes attributes() const;
177178
%Docstring
178179
Returns the feature's attributes.
179-
\returns list of feature's attributes
180+
:return: list of feature's attributes
180181
\see setAttributes
181182
.. versionadded:: 2.9
182183
.. note::
183184

184185
Alternatively in Python: iterate feature, eg. @code [attr for attr in feature] @endcode
186+
:rtype: QgsAttributes
185187
%End
186188

187189
void setAttributes( const QgsAttributes &attrs );
@@ -199,14 +201,15 @@ class QgsFeature
199201
The feature will be valid if it was successful.
200202
\param field the index of the field to set
201203
\param attr the value of the attribute
202-
\returns false, if the field index does not exist
204+
:return: false, if the field index does not exist
203205
.. note::
204206

205207
For Python: raises a KeyError exception instead of returning false
206208
.. note::
207209

208210
Alternatively in Python: @code feature[field] = attr @endcode
209211
\see setAttributes
212+
:rtype: bool
210213
%End
211214
%MethodCode
212215
bool rv;
@@ -263,6 +266,7 @@ class QgsFeature
263266
the provider to indicate some problem that makes the feature
264267
invalid or to indicate a null feature.
265268
\see setValid
269+
:rtype: bool
266270
%End
267271

268272
void setValid( bool validity );
@@ -277,6 +281,7 @@ class QgsFeature
277281
Returns true if the feature has an associated geometry.
278282
\see geometry()
279283
.. versionadded:: 3.0.
284+
:rtype: bool
280285
%End
281286

282287
QgsGeometry geometry() const;
@@ -285,6 +290,7 @@ class QgsFeature
285290
an empty QgsGeometry object will be returned.
286291
\see hasGeometry()
287292
\see setGeometry()
293+
:rtype: QgsGeometry
288294
%End
289295

290296
void setGeometry( const QgsGeometry &geometry );
@@ -318,6 +324,7 @@ class QgsFeature
318324
%Docstring
319325
Returns the field map associated with the feature.
320326
\see setFields
327+
:rtype: QgsFields
321328
%End
322329

323330
void setAttribute( const QString &name, const QVariant &value /GetWrapper/ );
@@ -327,7 +334,7 @@ class QgsFeature
327334
The feature will be valid if it was successful
328335
\param name The name of the field to set
329336
\param value The value to set
330-
\returns false if attribute name could not be converted to index (C++ only)
337+
:return: false if attribute name could not be converted to index (C++ only)
331338
.. note::
332339

333340
For Python: raises a KeyError exception instead of returning false
@@ -361,14 +368,15 @@ class QgsFeature
361368
Removes an attribute value by field name. Field map must be associated using setFields()
362369
before this method can be used.
363370
\param name The name of the field to delete
364-
\returns false if attribute name could not be converted to index (C++ only)
371+
:return: false if attribute name could not be converted to index (C++ only)
365372
.. note::
366373

367374
For Python: raises a KeyError exception instead of returning false
368375
.. note::
369376

370377
Alternatively in Python: @code del feature[name] @endcode
371378
\see setFields
379+
:rtype: bool
372380
%End
373381
%MethodCode
374382
int fieldIdx = sipCpp->fieldNameIndex( *a0 );
@@ -390,7 +398,7 @@ class QgsFeature
390398
Lookup attribute value from attribute name. Field map must be associated using setFields()
391399
before this method can be used.
392400
\param name The name of the attribute to get
393-
\returns The value of the attribute (C++: Invalid variant if no such name exists )
401+
:return: The value of the attribute (C++: Invalid variant if no such name exists )
394402
.. note::
395403

396404
For Python: raises a KeyError exception if the field is not found
@@ -418,7 +426,7 @@ class QgsFeature
418426
Lookup attribute value from its index. Field map must be associated using setFields()
419427
before this method can be used.
420428
\param fieldIdx The index of the attribute to get
421-
\returns The value of the attribute (C++: Invalid variant if no such index exists )
429+
:return: The value of the attribute (C++: Invalid variant if no such index exists )
422430
.. note::
423431

424432
For Python: raises a KeyError exception if the field is not found
@@ -447,8 +455,9 @@ class QgsFeature
447455
Utility method to get attribute index from name. Field map must be associated using setFields()
448456
before this method can be used.
449457
\param fieldName name of field to get attribute index of
450-
\returns -1 if field does not exist or field map is not associated.
458+
:return: -1 if field does not exist or field map is not associated.
451459
\see setFields
460+
:rtype: int
452461
%End
453462

454463
operator QVariant() const;

‎python/core/qgspropertytransformer.sip

Lines changed: 97 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class QgsCurveTransform
4444
%Docstring
4545
Returns a list of the control points for the transform.
4646
\see setControlPoints()
47+
:rtype: list of QgsPoint
4748
%End
4849

4950
void setControlPoints( const QList< QgsPoint > &points );
@@ -70,13 +71,15 @@ class QgsCurveTransform
7071
double y( double x ) const;
7172
%Docstring
7273
Returns the mapped y value corresponding to the specified x value.
74+
:rtype: float
7375
%End
7476

7577
QVector< double > y( const QVector< double > &x ) const;
7678
%Docstring
7779
Returns a list of y values corresponding to a list of x values.
7880
Calling this method is faster then calling the double variant multiple
7981
times.
82+
:rtype: list of float
8083
%End
8184

8285
bool readXml( const QDomElement &elem, const QDomDocument &doc );
@@ -85,6 +88,7 @@ class QgsCurveTransform
8588
\param elem source DOM element for transform's state
8689
\param doc DOM document
8790
\see writeXml()
91+
:rtype: bool
8892
%End
8993

9094
bool writeXml( QDomElement &transformElem, QDomDocument &doc ) const;
@@ -93,6 +97,7 @@ class QgsCurveTransform
9397
\param transformElem destination element for the transform's state
9498
\param doc DOM document
9599
\see readXml()
100+
:rtype: bool
96101
%End
97102

98103
QVariant toVariant() const;
@@ -101,6 +106,7 @@ class QgsCurveTransform
101106
You can use QgsXmlUtils.writeVariant to save it to an XML document.
102107

103108
\see loadVariant()
109+
:rtype: QVariant
104110
%End
105111

106112
bool loadVariant( const QVariant &transformer );
@@ -109,6 +115,7 @@ class QgsCurveTransform
109115
You can use QgsXmlUtils.writeVariant to load it from an XML document.
110116

111117
\see toVariant()
118+
:rtype: bool
112119
%End
113120

114121
};
@@ -149,6 +156,7 @@ class QgsPropertyTransformer
149156
%Docstring
150157
Factory method for creating a new property transformer of the specified type.
151158
\param type transformer type to create
159+
:rtype: QgsPropertyTransformer
152160
%End
153161

154162
QgsPropertyTransformer( double minValue = 0.0, double maxValue = 1.0 );
@@ -169,11 +177,13 @@ class QgsPropertyTransformer
169177
virtual Type transformerType() const = 0;
170178
%Docstring
171179
Returns the transformer type.
180+
:rtype: Type
172181
%End
173182

174183
virtual QgsPropertyTransformer *clone() = 0 /Factory/;
175184
%Docstring
176185
Returns a clone of the transformer.
186+
:rtype: QgsPropertyTransformer
177187
%End
178188

179189
virtual bool loadVariant( const QVariant &transformer );
@@ -182,6 +192,7 @@ class QgsPropertyTransformer
182192
You can use QgsXmlUtils.writeVariant to save it to an XML document.
183193

184194
\see loadVariant()
195+
:rtype: bool
185196
%End
186197

187198
virtual QVariant toVariant() const;
@@ -190,13 +201,15 @@ class QgsPropertyTransformer
190201
You can use QgsXmlUtils.writeVariant to save it to an XML document.
191202

192203
\see toVariant()
204+
:rtype: QVariant
193205
%End
194206

195207
double minValue() const;
196208
%Docstring
197209
Returns the minimum value expected by the transformer.
198210
\see maxValue()
199211
\see setMinValue()
212+
:rtype: float
200213
%End
201214

202215
void setMinValue( double min );
@@ -212,6 +225,7 @@ class QgsPropertyTransformer
212225
Returns the maximum value expected by the transformer.
213226
\see minValue()
214227
\see setMaxValue()
228+
:rtype: float
215229
%End
216230

217231
void setMaxValue( double max );
@@ -227,6 +241,7 @@ class QgsPropertyTransformer
227241
Returns the curve transform applied to input values before they are transformed
228242
by the individual transform subclasses.
229243
\see setCurveTransform()
244+
:rtype: QgsCurveTransform
230245
%End
231246

232247
void setCurveTransform( QgsCurveTransform *transform /Transfer/ );
@@ -243,12 +258,14 @@ class QgsPropertyTransformer
243258
on input values
244259
\param context expression context
245260
\param value input value to transform
261+
:rtype: QVariant
246262
%End
247263

248264
virtual QString toExpression( const QString &baseExpression ) const = 0;
249265
%Docstring
250266
Converts the transformer to a QGIS expression string. The baseExpression string consists
251267
of a sub-expression reflecting the parent property's state.
268+
:rtype: str
252269
%End
253270

254271
static QgsPropertyTransformer *fromExpression( const QString &expression, QString &baseExpression /Out/, QString &fieldName /Out/ ) /Factory/;
@@ -261,8 +278,9 @@ class QgsPropertyTransformer
261278
\param fieldName will be set to a field name which is used to calculate the input
262279
to the property transformer. This will be set to an
263280
empty string if an expression is the transformer input.
264-
\returns corresponding property transformer, or None if expression could not
281+
:return: corresponding property transformer, or None if expression could not
265282
be parsed to a transformer.
283+
:rtype: QgsPropertyTransformer
266284
%End
267285

268286
protected:
@@ -272,6 +290,7 @@ class QgsPropertyTransformer
272290
Applies base class numeric transformations. Derived classes should call this
273291
to transform an input numeric value before they apply any transform to the result.
274292
This applies any curve transforms which may exist on the transformer.
293+
:rtype: float
275294
%End
276295
};
277296

@@ -307,11 +326,29 @@ class QgsGenericNumericTransformer : QgsPropertyTransformer
307326
// QgsGenericNumericTransformer &operator=( const QgsGenericNumericTransformer &other );
308327

309328
virtual Type transformerType() const;
329+
%Docstring
330+
:rtype: Type
331+
%End
310332
virtual QgsGenericNumericTransformer *clone();
333+
%Docstring
334+
:rtype: QgsGenericNumericTransformer
335+
%End
311336
virtual QVariant toVariant() const;
337+
%Docstring
338+
:rtype: QVariant
339+
%End
312340
virtual bool loadVariant( const QVariant &definition );
341+
%Docstring
342+
:rtype: bool
343+
%End
313344
virtual QVariant transform( const QgsExpressionContext &context, const QVariant &value ) const;
345+
%Docstring
346+
:rtype: QVariant
347+
%End
314348
virtual QString toExpression( const QString &baseExpression ) const;
349+
%Docstring
350+
:rtype: str
351+
%End
315352

316353
static QgsGenericNumericTransformer *fromExpression( const QString &expression, QString &baseExpression /Out/, QString &fieldName /Out/ ) /Factory/;
317354
%Docstring
@@ -323,21 +360,24 @@ class QgsGenericNumericTransformer : QgsPropertyTransformer
323360
\param fieldName will be set to a field name which is used to calculate the input
324361
to the property transformer. This will be set to an
325362
empty string if an expression is the transformer input.
326-
\returns corresponding QgsSizeScaleTransformer, or None if expression could not
363+
:return: corresponding QgsSizeScaleTransformer, or None if expression could not
327364
be parsed to a size scale transformer.
365+
:rtype: QgsGenericNumericTransformer
328366
%End
329367

330368
double value( double input ) const;
331369
%Docstring
332370
Calculates the size corresponding to a specific input value.
333-
\returns calculated size using size scale transformer's parameters and type
371+
:return: calculated size using size scale transformer's parameters and type
372+
:rtype: float
334373
%End
335374

336375
double minOutputValue() const;
337376
%Docstring
338377
Returns the minimum calculated size.
339378
\see setMinSize()
340379
\see maxSize()
380+
:rtype: float
341381
%End
342382

343383
void setMinOutputValue( double size );
@@ -352,6 +392,7 @@ class QgsGenericNumericTransformer : QgsPropertyTransformer
352392
%Docstring
353393
Returns the maximum calculated size.
354394
\see minSize()
395+
:rtype: float
355396
%End
356397

357398
void setMaxOutputValue( double size );
@@ -366,6 +407,7 @@ class QgsGenericNumericTransformer : QgsPropertyTransformer
366407
%Docstring
367408
Returns the size value when an expression evaluates to NULL.
368409
\see setNullSize()
410+
:rtype: float
369411
%End
370412

371413
void setNullOutputValue( double size );
@@ -380,6 +422,7 @@ class QgsGenericNumericTransformer : QgsPropertyTransformer
380422
Returns the exponent for an exponential expression.
381423
\see setExponent()
382424
\see type()
425+
:rtype: float
383426
%End
384427

385428
void setExponent( double exponent );
@@ -433,11 +476,29 @@ class QgsSizeScaleTransformer : QgsPropertyTransformer
433476
// QgsSizeScaleTransformer &operator=( const QgsSizeScaleTransformer &other );
434477

435478
virtual Type transformerType() const;
479+
%Docstring
480+
:rtype: Type
481+
%End
436482
virtual QgsSizeScaleTransformer *clone() /Factory/;
483+
%Docstring
484+
:rtype: QgsSizeScaleTransformer
485+
%End
437486
virtual QVariant toVariant() const;
487+
%Docstring
488+
:rtype: QVariant
489+
%End
438490
virtual bool loadVariant( const QVariant &definition );
491+
%Docstring
492+
:rtype: bool
493+
%End
439494
virtual QVariant transform( const QgsExpressionContext &context, const QVariant &value ) const;
495+
%Docstring
496+
:rtype: QVariant
497+
%End
440498
virtual QString toExpression( const QString &baseExpression ) const;
499+
%Docstring
500+
:rtype: str
501+
%End
441502

442503
static QgsSizeScaleTransformer *fromExpression( const QString &expression, QString &baseExpression /Out/, QString &fieldName /Out/ ) /Factory/;
443504
%Docstring
@@ -449,22 +510,25 @@ class QgsSizeScaleTransformer : QgsPropertyTransformer
449510
\param fieldName will be set to a field name which is used to calculate the input
450511
to the property transformer. This will be set to an
451512
empty string if an expression is the transformer input.
452-
\returns corresponding QgsSizeScaleTransformer, or None if expression could not
513+
:return: corresponding QgsSizeScaleTransformer, or None if expression could not
453514
be parsed to a size scale transformer.
515+
:rtype: QgsSizeScaleTransformer
454516
%End
455517

456518
double size( double value ) const;
457519
%Docstring
458520
Calculates the size corresponding to a specific value.
459521
\param value value to calculate size for
460-
\returns calculated size using size scale transformer's parameters and type
522+
:return: calculated size using size scale transformer's parameters and type
523+
:rtype: float
461524
%End
462525

463526
double minSize() const;
464527
%Docstring
465528
Returns the minimum calculated size.
466529
\see setMinSize()
467530
\see maxSize()
531+
:rtype: float
468532
%End
469533

470534
void setMinSize( double size );
@@ -479,6 +543,7 @@ class QgsSizeScaleTransformer : QgsPropertyTransformer
479543
%Docstring
480544
Returns the maximum calculated size.
481545
\see minSize()
546+
:rtype: float
482547
%End
483548

484549
void setMaxSize( double size );
@@ -493,6 +558,7 @@ class QgsSizeScaleTransformer : QgsPropertyTransformer
493558
%Docstring
494559
Returns the size value when an expression evaluates to NULL.
495560
\see setNullSize()
561+
:rtype: float
496562
%End
497563

498564
void setNullSize( double size );
@@ -507,6 +573,7 @@ class QgsSizeScaleTransformer : QgsPropertyTransformer
507573
Returns the exponent for an exponential expression.
508574
\see setExponent()
509575
\see type()
576+
:rtype: float
510577
%End
511578

512579
void setExponent( double exponent );
@@ -521,6 +588,7 @@ class QgsSizeScaleTransformer : QgsPropertyTransformer
521588
Returns the size transformer's scaling type (the method used to calculate
522589
the size from a value).
523590
\see setType()
591+
:rtype: ScaleType
524592
%End
525593

526594
void setType( ScaleType type );
@@ -562,24 +630,44 @@ Copy constructor
562630
// QgsColorRampTransformer &operator=( const QgsColorRampTransformer &other );
563631

564632
virtual Type transformerType() const;
633+
%Docstring
634+
:rtype: Type
635+
%End
565636
virtual QgsColorRampTransformer *clone() /Factory/;
637+
%Docstring
638+
:rtype: QgsColorRampTransformer
639+
%End
566640
virtual QVariant toVariant() const;
641+
%Docstring
642+
:rtype: QVariant
643+
%End
567644
virtual bool loadVariant( const QVariant &definition );
645+
%Docstring
646+
:rtype: bool
647+
%End
568648
virtual QVariant transform( const QgsExpressionContext &context, const QVariant &value ) const;
649+
%Docstring
650+
:rtype: QVariant
651+
%End
569652
virtual QString toExpression( const QString &baseExpression ) const;
653+
%Docstring
654+
:rtype: str
655+
%End
570656

571657
QColor color( double value ) const;
572658
%Docstring
573659
Calculates the color corresponding to a specific value.
574660
\param value value to calculate color for
575-
\returns calculated color using transformer's parameters and type
661+
:return: calculated color using transformer's parameters and type
662+
:rtype: QColor
576663
%End
577664

578665
QgsColorRamp *colorRamp() const;
579666
%Docstring
580667
Returns the color ramp used for calculating property colors.
581-
\returns color ramp
668+
:return: color ramp
582669
\see setColorRamp()
670+
:rtype: QgsColorRamp
583671
%End
584672

585673
void setColorRamp( QgsColorRamp *ramp /Transfer/ );
@@ -593,6 +681,7 @@ Copy constructor
593681
%Docstring
594682
Returns the color corresponding to a null value.
595683
\see setNullColor()
684+
:rtype: QColor
596685
%End
597686

598687
void setNullColor( const QColor &color );
@@ -606,6 +695,7 @@ Copy constructor
606695
%Docstring
607696
Returns the color ramp's name.
608697
\see setRampName()
698+
:rtype: str
609699
%End
610700

611701
void setRampName( const QString &name );

‎python/core/qgssettings.sip

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,26 +142,32 @@ Resets the group to what it was before the corresponding beginGroup() call.
142142
QStringList allKeys() const;
143143
%Docstring
144144
Returns a list of all keys, including subkeys, that can be read using the QSettings object.
145+
:rtype: list of str
145146
%End
146147
QStringList childKeys() const;
147148
%Docstring
148149
Returns a list of all top-level keys that can be read using the QSettings object.
150+
:rtype: list of str
149151
%End
150152
QStringList childGroups() const;
151153
%Docstring
152154
Returns a list of all key top-level groups that contain keys that can be read using the QSettings object.
155+
:rtype: list of str
153156
%End
154157
static QString globalSettingsPath();
155158
%Docstring
156159
Return the path to the Global Settings QSettings storage file
160+
:rtype: str
157161
%End
158162
static bool setGlobalSettingsPath( QString path );
159163
%Docstring
160164
Set the Global Settings QSettings storage file
165+
:rtype: bool
161166
%End
162167
int beginReadArray( const QString &prefix );
163168
%Docstring
164169
Adds prefix to the current group and starts reading from an array. Returns the size of the array.
170+
:rtype: int
165171
%End
166172
void endArray();
167173
%Docstring
@@ -202,10 +208,12 @@ An optional Section argument can be used to set a value to a specific Section.
202208
bool contains( const QString &key, const QgsSettings::Section section = QgsSettings::NoSection ) const;
203209
%Docstring
204210
If a group is set using beginGroup(), key is taken to be relative to that group.
211+
:rtype: bool
205212
%End
206213
QString fileName() const;
207214
%Docstring
208215
Returns the path where settings written using this QSettings object are stored.
216+
:rtype: str
209217
%End
210218
void sync();
211219
%Docstring
@@ -218,6 +226,7 @@ Removes the setting key and any sub-settings of key.
218226
QString prefixedKey( const QString &key, const QgsSettings::Section section ) const;
219227
%Docstring
220228
Return the sanitized and prefixed key
229+
:rtype: str
221230
%End
222231
void clear();
223232
%Docstring

‎python/core/qgsvectorlayer.sip

Lines changed: 193 additions & 49 deletions
Large diffs are not rendered by default.

‎python/core/raster/qgsrasterfilewriter.sip

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ class QgsRasterFileWriter
4848
.. note::
4949

5050
Does not work with tiled mode enabled.
51-
\returns Instance of data provider in editing mode (on success) or None on error.
51+
:return: Instance of data provider in editing mode (on success) or None on error.
5252
.. versionadded:: 3.0
53+
:rtype: QgsRasterDataProvider
5354
%End
5455

5556
WriterError writeRaster( const QgsRasterPipe *pipe, int nCols, int nRows, const QgsRectangle &outputExtent,
@@ -62,46 +63,81 @@ class QgsRasterFileWriter
6263
\param outputExtent extent to output
6364
\param crs crs to reproject to
6465
\param feedback optional feedback object for progress reports
66+
:rtype: WriterError
6567
%End
6668

6769
QString outputUrl() const;
6870
%Docstring
6971
Returns the output URL for the raster.
7072
.. versionadded:: 3.0
73+
:rtype: str
7174
%End
7275

7376
void setOutputFormat( const QString &format );
7477
QString outputFormat() const;
78+
%Docstring
79+
:rtype: str
80+
%End
7581

7682
void setOutputProviderKey( const QString &key );
7783
QString outputProviderKey() const;
84+
%Docstring
85+
:rtype: str
86+
%End
7887

7988
void setTiledMode( bool t );
8089
bool tiledMode() const;
90+
%Docstring
91+
:rtype: bool
92+
%End
8193

8294
void setMaxTileWidth( int w );
8395
int maxTileWidth() const;
96+
%Docstring
97+
:rtype: int
98+
%End
8499

85100
QgsRaster::RasterBuildPyramids buildPyramidsFlag() const;
101+
%Docstring
102+
:rtype: QgsRaster.RasterBuildPyramids
103+
%End
86104
void setBuildPyramidsFlag( QgsRaster::RasterBuildPyramids f );
87105

88106
QList< int > pyramidsList() const;
107+
%Docstring
108+
:rtype: list of int
109+
%End
89110
void setPyramidsList( const QList< int > &list );
90111

91112
QString pyramidsResampling() const;
113+
%Docstring
114+
:rtype: str
115+
%End
92116
void setPyramidsResampling( const QString &str );
93117

94118
QgsRaster::RasterPyramidsFormat pyramidsFormat() const;
119+
%Docstring
120+
:rtype: QgsRaster.RasterPyramidsFormat
121+
%End
95122
void setPyramidsFormat( QgsRaster::RasterPyramidsFormat f );
96123

97124
void setMaxTileHeight( int h );
98125
int maxTileHeight() const;
126+
%Docstring
127+
:rtype: int
128+
%End
99129

100130
void setCreateOptions( const QStringList &list );
101131
QStringList createOptions() const;
132+
%Docstring
133+
:rtype: list of str
134+
%End
102135

103136
void setPyramidsConfigOptions( const QStringList &list );
104137
QStringList pyramidsConfigOptions() const;
138+
%Docstring
139+
:rtype: list of str
140+
%End
105141

106142
};
107143

‎python/core/raster/qgsrasterfilewritertask.sip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ class QgsRasterFileWriterTask : QgsTask
5454
protected:
5555

5656
virtual bool run();
57+
%Docstring
58+
:rtype: bool
59+
%End
5760
virtual void finished( bool result );
5861

5962
};

‎python/gui/symbology-ng/characterwidget.sip

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,36 @@ class CharacterWidget : QWidget
2828
%End
2929

3030
QSize sizeHint() const;
31+
%Docstring
32+
:rtype: QSize
33+
%End
3134

3235
int columns() const;
3336
%Docstring
3437
Returns the number of columns of characters shown in the widget.
38+
:rtype: int
3539
%End
3640

3741
int squareSize() const;
3842
%Docstring
3943
Returns the size (in pixels) of the square used to render each character preview.
44+
:rtype: int
4045
%End
4146

4247
QChar character() const;
4348
%Docstring
4449
Returns the currently selected character in the widget.
4550
\see setCharacter()
4651
.. versionadded:: 3.0
52+
:rtype: QChar
4753
%End
4854

4955
QFont font() const;
5056
%Docstring
5157
Returns the font shown in the widget
5258
\see setFont()
5359
.. versionadded:: 3.0
60+
:rtype: QFont
5461
%End
5562

5663
public slots:

‎scripts/sipify.pl

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ sub processDoxygenLine
2020
$line =~ s/::/./g;
2121
# replace nullptr with None (nullptr means nothing to Python devs)
2222
$line =~ s/\bnullptr\b/None/g;
23+
# replace \returns with :return:
24+
$line =~ s/\\return(s)?/:return:/g;
2325

2426
if ( $line =~ m/[\\@](ingroup|class)/ ) {
2527
return ""
@@ -52,6 +54,7 @@ sub processDoxygenLine
5254
my $private_section_line = '';
5355
my $line;
5456
my $classname = '';
57+
my $return_type = '';
5558
my %qflag_hash;
5659

5760
print "/************************************************************************\n";
@@ -344,7 +347,7 @@ sub processDoxygenLine
344347
}
345348

346349
# remove function bodies
347-
if ( $line =~ m/^(\s*)?(const )?(virtual |static )?(([\w:]+(<.*?>)?\s+(\*|&)?)?(\w+|operator.)\(.*?(\(.*\))*.*\)( (?:const|SIP_[A-Z_]*?))*)\s*(\{.*\})?(?!;)(\s*\/\/.*)?$/ ){
350+
if ( $line =~ m/^(\s*)?(const )?(virtual |static )?(([\w:]+(<.*?>)?\s+(\*|&)?)?(\w+|operator.{1,2})\(.*?(\(.*\))*.*\)( (?:const|SIP_[A-Z_]*?))*)\s*(\{.*\})?(?!;)(\s*\/\/.*)?$/ ){
348351
my $newline = "$1$2$3$4;\n";
349352
if ($line !~ m/\{.*?\}$/){
350353
$line = readline $header;
@@ -359,10 +362,29 @@ sub processDoxygenLine
359362
}
360363
$line = $newline;
361364
}
365+
366+
if ( $line =~ m/^\s*(?:const |virtual |static |inline )*(?!explicit)([\w:]+(?:<.*?>)?)\s+(?:\*|&)?(?:\w+|operator.{1,2})\(.*$/ ){
367+
if ($1 !~ m/(void|SIP_PYOBJECT|operator|return|QFlag)/ ){
368+
$return_type = $1;
369+
# replace :: with . (changes c++ style namespace/class directives to Python style)
370+
$return_type =~ s/::/./g;
371+
372+
# replace with builtin Python types
373+
$return_type =~ s/\bdouble\b/float/;
374+
$return_type =~ s/\bQString\b/str/;
375+
$return_type =~ s/\bQStringList\b/list of str/;
376+
if ( $return_type =~ m/^(?:QList|QVector)<\s*(.*?)[\s*\*]*>$/ ){
377+
$return_type = "list of $1";
378+
}
379+
if ( $return_type =~ m/^QSet<\s*(.*?)[\s*\*]*>$/ ){
380+
$return_type = "set of $1";
381+
}
382+
}
383+
}
362384
};
363385

364386
# deleted functions
365-
if ( $line =~ m/^(\s*)?(const )?(virtual |static )?((\w+(<.*?>)?\s+(\*|&)?)?(\w+|operator.)\(.*?(\(.*\))*.*\)( const)?)\s*= delete;(\s*\/\/.*)?$/ ){
387+
if ( $line =~ m/^(\s*)?(const )?(virtual |static )?((\w+(<.*?>)?\s+(\*|&)?)?(\w+|operator.{1,2})\(.*?(\(.*\))*.*\)( const)?)\s*= delete;(\s*\/\/.*)?$/ ){
366388
$comment = '';
367389
next;
368390
}
@@ -405,9 +427,17 @@ sub processDoxygenLine
405427
if ( $line =~ m/^\s*$/ || $line =~ m/\/\// || $line =~ m/\s*typedef / || $line =~ m/\s*struct / ){
406428
$comment = '';
407429
}
408-
elsif ( $comment !~ m/^\s*$/ ){
409-
print "%Docstring\n$comment\n%End\n";
430+
elsif ( $comment !~ m/^\s*$/ || $return_type ne ''){
431+
print "%Docstring\n";
432+
if ( $comment !~ m/^\s*$/ ){
433+
print "$comment\n";
434+
}
435+
if ($return_type ne '' ){
436+
print " :rtype: $return_type\n";
437+
}
438+
print "%End\n";
410439
$comment = '';
440+
$return_type = '';
411441
}
412442
}
413443
print "/************************************************************************\n";

‎tests/scripts/sipifyheader.expected.sip

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Default constructor
104104
bool operator==( const QgsSipifyHeader other );
105105
%Docstring
106106
Comparison operator should be kept
107+
:rtype: bool
107108
%End
108109

109110
void multilineMethod( const QgsPoint &startPoint,
@@ -118,9 +119,13 @@ A multiline method signature
118119
virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) /Factory/;
119120
%Docstring
120121
Factory annotation
122+
:rtype: QgsMapLayerRenderer
121123
%End
122124

123125
SomeObject *createAnother() /Factory/;
126+
%Docstring
127+
:rtype: SomeObject
128+
%End
124129

125130
void LongDocStringMethod();
126131
%Docstring
@@ -139,9 +144,14 @@ Factory annotation
139144
MyPointer *pointerReturnValue();
140145
%Docstring
141146
I return a pointer. If something bad happens, I return None.
147+
:return: pointer to something cool
148+
:rtype: MyPointer
142149
%End
143150

144151
bool isOKwithErrMesg( QString &ErrMsg /Out/ );
152+
%Docstring
153+
:rtype: bool
154+
%End
145155

146156
void InOutParam( bool &ok = true /In,Out/ );
147157

@@ -156,24 +166,70 @@ Factory annotation
156166
complex default value and type (i.e. containing commas) should be given as a string with single quotes
157167
%End
158168

159-
inlineKeyWordShouldNotAppear();
169+
int inlineKeyWordShouldNotAppear();
170+
%Docstring
171+
:rtype: int
172+
%End
160173

161174
QString labelForRange( double lower, double upper ) const /PyName=labelForLowerUpper/;
175+
%Docstring
176+
:rtype: str
177+
%End
162178

163179
void setComposition( QgsComposition *c /KeepReference/ );
164180

165181
void removeProxyFactory( QNetworkProxyFactory *factory /TransferBack/ );
166182

167183
bool removeFunctionBody( const QList<int, QString> &list, QgsVectorLayer *vl );
184+
%Docstring
185+
:rtype: bool
186+
%End
168187
QgsRaster::RasterBuildPyramids buildPyramidsFlag() const;
169188
%Docstring
170189
Removing function body with namespaced return value
190+
:rtype: QgsRaster.RasterBuildPyramids
171191
%End
172192

173193

174194
virtual int overriddenProperty();
195+
%Docstring
196+
:rtype: int
197+
%End
198+
QString returnTypeString() const;
199+
%Docstring
200+
:rtype: str
201+
%End
202+
203+
double returnTypeDouble() const;
204+
%Docstring
205+
:rtype: float
206+
%End
207+
208+
QList< QgsAnnotation * > returnTypeList();
209+
%Docstring
210+
:rtype: list of QgsAnnotation
211+
%End
212+
213+
QVector< QgsAnnotation > returnTypeVector();
214+
%Docstring
215+
:rtype: list of QgsAnnotation
216+
%End
217+
218+
QStringList returnTypeStringList();
219+
%Docstring
220+
:rtype: list of str
221+
%End
222+
223+
QSet<QgsActionScope> returnTypeSet();
224+
%Docstring
225+
:rtype: set of QgsActionScope
226+
%End
227+
175228
protected:
176229
bool thisShouldBeListed();
230+
%Docstring
231+
:rtype: bool
232+
%End
177233

178234

179235
private:

‎tests/scripts/sipifyheader.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
175175

176176
/**
177177
* I return a pointer. If something bad happens, I return nullptr.
178+
* \returns pointer to something cool
178179
*/
179180
MyPointer *pointerReturnValue();
180181

@@ -191,7 +192,7 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
191192
//! complex default value and type (i.e. containing commas) should be given as a string with single quotes
192193
void complexDefaultValueAndType( QList<QPair<QgsFeatureId SIP_PYTYPE( qint64 ), QMap<int, QString>>> list = QList<QPair<QgsFeatureId, QMap<int, QString>>>() SIP_PYDEFAULTVALUE( 'QList<QPair<qint64, QMap<int, QString>>>()' ) );
193194

194-
inline inlineKeyWordShouldNotAppear();
195+
inline int inlineKeyWordShouldNotAppear();
195196

196197
QString labelForRange( double lower, double upper ) const SIP_PYNAME( labelForLowerUpper );
197198

@@ -208,6 +209,18 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
208209

209210
virtual int overriddenProperty() override { return 42; } // if in doubt, comment it out
210211

212+
QString returnTypeString() const;
213+
214+
double returnTypeDouble() const;
215+
216+
QList< QgsAnnotation * > returnTypeList();
217+
218+
QVector< QgsAnnotation > returnTypeVector();
219+
220+
QStringList returnTypeStringList();
221+
222+
QSet<QgsActionScope> returnTypeSet();
223+
211224
protected:
212225
bool thisShouldBeListed();
213226

0 commit comments

Comments
 (0)
Please sign in to comment.