Skip to content

Commit

Permalink
Convert doxygen notes and version added to sphinx style in sipify
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 2, 2017
1 parent 28a57c8 commit d3daf60
Show file tree
Hide file tree
Showing 12 changed files with 160 additions and 96 deletions.
2 changes: 1 addition & 1 deletion python/core/processing/qgsprocessingfeedback.sip
Expand Up @@ -17,7 +17,7 @@ class QgsProcessingFeedback : QgsFeedback
This base class implementation silently ignores all feedback reported by algorithms.
Subclasses of QgsProcessingFeedback can be used to log this feedback or report
it to users via the GUI.
\note added in QGIS 3.0
.. versionadded:: 3.0
%End

%TypeHeaderCode
Expand Down
2 changes: 1 addition & 1 deletion python/core/processing/qgsprocessingprovider.sip
Expand Up @@ -15,7 +15,7 @@ class QgsProcessingProvider
Abstract base class for processing providers. An algorithm provider is a set of
related algorithms, typically from the same external application or related
to a common area of analysis.
\note added in QGIS 3.0
.. versionadded:: 3.0
%End

%TypeHeaderCode
Expand Down
2 changes: 1 addition & 1 deletion python/core/processing/qgsprocessingregistry.sip
Expand Up @@ -17,7 +17,7 @@ class QgsProcessingRegistry : QObject

QgsProcessingRegistry is not usually directly created, but rather accessed through
QgsApplication::processingRegistry().
\note added in QGIS 3.0
.. versionadded:: 3.0
%End

%TypeHeaderCode
Expand Down
14 changes: 7 additions & 7 deletions python/core/qgsactionscope.sip
Expand Up @@ -29,7 +29,7 @@ class QgsActionScope
<dd>Show in attribute table and work on the layer or selection.</dd>
</dl>

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

%TypeHeaderCode
Expand All @@ -41,7 +41,7 @@ class QgsActionScope
%Docstring
Creates a new invalid action scope.

@note Added in QGSI 3.0
.. versionadded:: 3.0
%End

explicit QgsActionScope( const QString &id, const QString &title, const QString &description, const QgsExpressionContextScope &expressionContextScope = QgsExpressionContextScope() );
Expand All @@ -62,7 +62,7 @@ class QgsActionScope
This can be an `field_name` for the attribute which was clicked or
`clicked_x` and `clicked_y` for actions which are available as map canvas clicks.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

void setExpressionContextScope( const QgsExpressionContextScope &expressionContextScope );
Expand All @@ -74,7 +74,7 @@ class QgsActionScope
%Docstring
A unique identifier for this action scope.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

void setId( const QString &id );
Expand All @@ -87,7 +87,7 @@ class QgsActionScope
The title is a human readable and translated string that will be
presented to the user in the properties dialog.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End
void setTitle( const QString &title );
%Docstring
Expand All @@ -100,7 +100,7 @@ class QgsActionScope
are available. It is not necessary to list the available expression variables
in here, they are extracted automatically from the expressionContextScope().

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End
void setDescription( const QString &description );
%Docstring
Expand All @@ -111,7 +111,7 @@ class QgsActionScope
%Docstring
Returns if this scope is valid.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

};
Expand Down
14 changes: 7 additions & 7 deletions python/core/qgsactionscoperegistry.sip
Expand Up @@ -21,7 +21,7 @@ class QgsActionScopeRegistry : QObject
QgsApplication::actionScopeRegistry()
```

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

%TypeHeaderCode
Expand All @@ -37,35 +37,35 @@ class QgsActionScopeRegistry : QObject
want to use QgsApplication::actionScopeRegistry() to get access
to that one instead.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

QSet<QgsActionScope> actionScopes() const;
%Docstring
Get all registered action scopes.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

void registerActionScope( const QgsActionScope &actionScope );
%Docstring
Register an additional action scope.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

void unregisterActionScope( const QgsActionScope &actionScope );
%Docstring
Unregister an additional action scope.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

QgsActionScope actionScope( const QString &id );
%Docstring
Get an action scope by its id.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

signals:
Expand All @@ -75,7 +75,7 @@ class QgsActionScopeRegistry : QObject
Emitted whenever a new action scope is registered or an action scope
is unregistered.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

};
Expand Down
8 changes: 4 additions & 4 deletions python/core/qgsanimatedicon.sip
Expand Up @@ -50,29 +50,29 @@ class QgsAnimatedIcon : QObject
Connect to the frame changed signal with this method and not directly. This method
makes sure the annimation is started.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

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

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End


int width() const;
%Docstring
The native width of the icon.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

int height() const;
%Docstring
The native height of the icon.

@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

signals:
Expand Down
64 changes: 46 additions & 18 deletions python/core/qgsfeature.sip
Expand Up @@ -22,7 +22,9 @@ class QgsFeature
%Docstring
The feature class encapsulates a single feature including its id,
geometry and a list of field/values attributes.
\note QgsFeature objects are implicitly shared.
.. note::

QgsFeature objects are implicitly shared.
@author Gary E.Sherman
%End

Expand Down Expand Up @@ -180,8 +182,10 @@ class QgsFeature
@link attributes @endlink method.
@returns list of feature's attributes
@see setAttributes
@note added in QGIS 2.9
@note Alternatively in Python: iterate feature, eg. @code [attr for attr in feature] @endcode
.. versionadded:: 2.9
.. note::

Alternatively in Python: iterate feature, eg. @code [attr for attr in feature] @endcode
%End

void setAttributes( const QgsAttributes &attrs );
Expand All @@ -200,8 +204,12 @@ class QgsFeature
@param field the index of the field to set
@param attr the value of the attribute
@return false, if the field index does not exist
@note For Python: raises a KeyError exception instead of returning false
@note Alternatively in Python: @code feature[field] = attr @endcode
.. note::

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

Alternatively in Python: @code feature[field] = attr @endcode
@see setAttributes
%End
%MethodCode
Expand Down Expand Up @@ -236,8 +244,12 @@ class QgsFeature
Deletes an attribute and its value.
@param field the index of the field
@see setAttribute
@note For Python: raises a KeyError exception if the field is not found
@note Alternatively in Python: @code del feature[field] @endcode
.. note::

For Python: raises a KeyError exception if the field is not found
.. note::

Alternatively in Python: @code del feature[field] @endcode
%End
%MethodCode
if ( a0 >= 0 && a0 < sipCpp->attributes().count() )
Expand Down Expand Up @@ -268,7 +280,7 @@ class QgsFeature
%Docstring
Returns true if the feature has an associated geometry.
@see geometry()
@note added in QGIS 3.0.
.. versionadded:: 3.0.
%End

QgsGeometry geometry() const;
Expand All @@ -292,7 +304,7 @@ class QgsFeature
Removes any geometry associated with the feature.
@see setGeometry()
@see hasGeometry()
@note added in QGIS 3.0
.. versionadded:: 3.0
%End

void setFields( const QgsFields &fields, bool initAttributes = true );
Expand All @@ -302,7 +314,7 @@ class QgsFeature
@param initAttributes If true, attributes are initialized. Clears any data previously assigned.
C++: Defaults to false
Python: Defaults to true
@note added in QGIS 2.9
.. versionadded:: 2.9
@see fields
%End

Expand All @@ -320,8 +332,12 @@ class QgsFeature
@param name The name of the field to set
@param value The value to set
@return false if attribute name could not be converted to index (C++ only)
@note For Python: raises a KeyError exception instead of returning false
@note Alternatively in Python: @code feature[name] = attr @endcode
.. note::

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

Alternatively in Python: @code feature[name] = attr @endcode
@see setFields
%End
%MethodCode
Expand Down Expand Up @@ -350,8 +366,12 @@ class QgsFeature
before this method can be used.
@param name The name of the field to delete
@return false if attribute name could not be converted to index (C++ only)
@note For Python: raises a KeyError exception instead of returning false
@note Alternatively in Python: @code del feature[name] @endcode
.. note::

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

Alternatively in Python: @code del feature[name] @endcode
@see setFields
%End
%MethodCode
Expand All @@ -375,8 +395,12 @@ class QgsFeature
before this method can be used.
@param name The name of the attribute to get
@return The value of the attribute (C++: Invalid variant if no such name exists )
@note For Python: raises a KeyError exception if the field is not found
@note Alternatively in Python: @code feature[name] @endcode
.. note::

For Python: raises a KeyError exception if the field is not found
.. note::

Alternatively in Python: @code feature[name] @endcode
@see setFields
%End
%MethodCode
Expand All @@ -399,8 +423,12 @@ class QgsFeature
before this method can be used.
@param fieldIdx The index of the attribute to get
@return The value of the attribute (C++: Invalid variant if no such index exists )
@note For Python: raises a KeyError exception if the field is not found
@note Alternatively in Python: @code feature[fieldIdx] @endcode
.. note::

For Python: raises a KeyError exception if the field is not found
.. note::

Alternatively in Python: @code feature[fieldIdx] @endcode
@see setFields
%End
%MethodCode
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgssettings.sip
Expand Up @@ -36,7 +36,7 @@ class QgsSettings : QObject
- Misc
- Auth

@note added in QGIS 3
.. versionadded:: 3
%End

%TypeHeaderCode
Expand Down

1 comment on commit d3daf60

@m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented on d3daf60 Apr 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

Please sign in to comment.