Convert doxygen notes and version added to sphinx style in sipify

This commit is contained in:
Nyall Dawson 2017-04-02 20:52:50 +10:00
parent 28a57c8f95
commit d3daf60020
12 changed files with 160 additions and 96 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
@ -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() );
@ -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 );
@ -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 );
@ -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
@ -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
@ -111,7 +111,7 @@ class QgsActionScope
%Docstring
Returns if this scope is valid.
@note Added in QGIS 3.0
.. versionadded:: 3.0
%End
};

View File

@ -21,7 +21,7 @@ class QgsActionScopeRegistry : QObject
QgsApplication::actionScopeRegistry()
```
@note Added in QGIS 3.0
.. versionadded:: 3.0
%End
%TypeHeaderCode
@ -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:
@ -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
};

View File

@ -50,14 +50,14 @@ 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
@ -65,14 +65,14 @@ class QgsAnimatedIcon : QObject
%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:

View File

@ -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
@ -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 );
@ -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
@ -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() )
@ -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;
@ -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 );
@ -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
@ -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
@ -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
@ -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
@ -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

View File

@ -36,7 +36,7 @@ class QgsSettings : QObject
- Misc
- Auth
@note added in QGIS 3
.. versionadded:: 3
%End
%TypeHeaderCode

View File

@ -399,7 +399,9 @@ Setup the coordinate system transformation for the layer
%Docstring
Joins another vector layer to this layer
@param joinInfo join object containing join layer id, target and source field
@note since 2.6 returns bool indicating whether the join can be added *
.. note::
since 2.6 returns bool indicating whether the join can be added *
%End
bool removeJoin( const QString &joinLayerId );
@ -411,7 +413,7 @@ Setup the coordinate system transformation for the layer
QgsVectorLayerJoinBuffer *joinBuffer();
%Docstring
Accessor to the join buffer object
@note added 2.14.7
.. versionadded:: 2.14.7
%End
const QList<QgsVectorLayerJoinInfo> vectorJoins() const;
@ -422,7 +424,7 @@ Setup the coordinate system transformation for the layer
@param layers set of QgsMapLayerDependency. Only user-defined dependencies will be added
@returns false if a dependency cycle has been detected
@note added in QGIS 3.0
.. versionadded:: 3.0
%End
virtual QSet<QgsMapLayerDependency> dependencies() const;
@ -431,7 +433,7 @@ Setup the coordinate system transformation for the layer
as well as dependencies given by the provider
@returns a set of QgsMapLayerDependency
@note added in QGIS 3.0
.. versionadded:: 3.0
%End
int addExpressionField( const QString &exp, const QgsField &fld );
@ -443,7 +445,7 @@ Setup the coordinate system transformation for the layer
@return The index of the new field
@note added in 2.6, return value added in 2.9
.. versionadded:: 2.6
%End
void removeExpressionField( int index );
@ -452,7 +454,7 @@ Setup the coordinate system transformation for the layer
@param index The index of the field
@note added in 2.6
.. versionadded:: 2.6
%End
QString expressionField( int index ) const;
@ -463,7 +465,7 @@ Setup the coordinate system transformation for the layer
@return The expression for the field at index
@note added in 2.9
.. versionadded:: 2.9
%End
void updateExpressionField( int index, const QString &exp );
@ -474,7 +476,7 @@ Setup the coordinate system transformation for the layer
@param exp The new expression to set
@note added in 2.9
.. versionadded:: 2.9
%End
QgsActionManager *actions();
@ -509,7 +511,7 @@ Setup the coordinate system transformation for the layer
@param expression expression to evaluate to select features
@param behavior selection type, allows adding to current selection, removing
from selection, etc.
@note added in QGIS 2.16
.. versionadded:: 2.16
@see selectByRect()
@see selectByIds()
%End
@ -521,7 +523,7 @@ Setup the coordinate system transformation for the layer
@param ids feature IDs to select
@param behavior selection type, allows adding to current selection, removing
from selection, etc.
@note added in QGIS 2.16
.. versionadded:: 2.16
@see selectByRect()
@see selectByExpression()
%End
@ -604,14 +606,14 @@ Returns the bounding box of the selected features. If there is no selection, Qgs
%Docstring
Returns whether the layer contains labels which are enabled and should be drawn.
@return true if layer contains enabled labels
@note added in QGIS 2.9
.. versionadded:: 2.9
%End
bool diagramsEnabled() const;
%Docstring
Returns whether the layer contains diagrams which are enabled and should be drawn.
@return true if layer contains enabled diagrams
@note added in QGIS 2.9
.. versionadded:: 2.9
%End
void setDiagramRenderer( QgsDiagramRenderer *r /Transfer/ );
@ -658,19 +660,23 @@ Return the provider type for this layer
virtual bool readXml( const QDomNode &layer_node );
%Docstring
Reads vector layer specific state from project file Dom node.
@note Called by QgsMapLayer::readXml().
.. note::
Called by QgsMapLayer::readXml().
%End
virtual bool writeXml( QDomNode &layer_node, QDomDocument &doc ) const;
%Docstring
Write vector layer specific state to project file Dom node.
@note Called by QgsMapLayer::writeXml().
.. note::
Called by QgsMapLayer::writeXml().
%End
void resolveReferences( QgsProject *project );
%Docstring
Resolve references to other layers (kept as layer IDs after reading XML) into layer objects.
@note added in 3.0
.. versionadded:: 3.0
%End
virtual void saveStyleToDatabase( const QString &name, const QString &description,
@ -704,7 +710,7 @@ Return the provider type for this layer
virtual bool deleteStyleFromDatabase( const QString &styleId, QString &msgError /Out/ );
%Docstring
Delete a style from the database
@note added in QGIS 3.0
.. versionadded:: 3.0
@param styleId the provider's layer_styles table id of the style to delete
@param msgError reference to string that will be updated with any error messages
@return true in case of success
@ -786,7 +792,7 @@ Return the provider type for this layer
@param provider provider string
@param loadDefaultStyleFlag set to true to reset the layer's style to the default for the
data source
@note added in QGIS 2.10
.. versionadded:: 2.10
%End
bool countSymbolFeatures( bool showProgress = true );
@ -882,7 +888,9 @@ on every call. Consider using {@link changeAttributeValue()} or
Moves the vertex at the given position number,
ring and item (first number is index 0), and feature
to the given coordinates
@note available in python as moveVertexV2
.. note::
available in python as moveVertexV2
%End
EditResult deleteVertex( QgsFeatureId featureId, int vertex );
@ -890,7 +898,7 @@ on every call. Consider using {@link changeAttributeValue()} or
Deletes a vertex from a feature.
@param featureId ID of feature to remove vertex from
@param vertex index of vertex to delete
@note added in QGIS 2.14
.. versionadded:: 2.14
%End
bool deleteSelectedFeatures( int *deletedCount = 0 );
@ -921,7 +929,10 @@ TODO QGIS 3.0 returns an enum instead of a magic constant
int addPart( QgsCurve *ring /Transfer/ ) /PyName=addCurvedPart/;
%Docstring
@note available in python as addCurvedPart
.. note::
available in python as addCurvedPart
%End
int translateFeature( QgsFeatureId featureId, double dx, double dy );
@ -947,7 +958,9 @@ TODO QGIS 3.0 returns an enum instead of a magic constant
%Docstring
Adds topological points for every vertex of the geometry.
@param geom the geometry where each vertex is added to segments of other features
@note geom is not going to be modified by the function
.. note::
geom is not going to be modified by the function
@return 0 in case of success
%End
@ -1013,7 +1026,7 @@ Synchronises with changes in the datasource
virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) /Factory/;
%Docstring
Return new instance of QgsMapLayerRenderer that will be used for rendering of given context
@note added in 2.4
.. versionadded:: 2.4
%End
QgsRectangle extent() const;
@ -1106,14 +1119,14 @@ Change feature's geometry
%Docstring
Sets an alias (a display name) for attributes to display in dialogs
@note Added in QGIS 3.0
.. versionadded:: 3.0
%End
void removeFieldAlias( int index );
%Docstring
Removes an alias (a display name) for attributes to display in dialogs
@note Added in QGIS 3.0
.. versionadded:: 3.0
%End
bool renameAttribute( int index, const QString &newName );
@ -1121,7 +1134,7 @@ Change feature's geometry
Renames an attribute field (but does not commit it).
@param index attribute index
@param newName new name of field
@note added in QGIS 2.16
.. versionadded:: 2.16
%End
QString attributeAlias( int index ) const;
@ -1295,7 +1308,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
@param context optional expression context to evaluate expressions again. If not
specified, a default context will be created
@return calculated default value
@note added in QGIS 3.0
.. versionadded:: 3.0
@see setDefaultValueExpression()
%End
@ -1305,7 +1318,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
@param index field index
@param expression expression to evaluate when calculating default values for field. Pass
an empty expression to clear the default.
@note added in QGIS 3.0
.. versionadded:: 3.0
@see defaultValue()
@see defaultValueExpression()
%End
@ -1316,7 +1329,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
@param index field index
@returns expression evaluated when calculating default values for field, or an
empty string if no default is set
@note added in QGIS 3.0
.. versionadded:: 3.0
@see defaultValue()
@see setDefaultValueExpression()
%End
@ -1326,7 +1339,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
Returns any constraints which are present for a specified
field index. These constraints may be inherited from the layer's data provider
or may be set manually on the vector layer from within QGIS.
@note added in QGIS 3.0
.. versionadded:: 3.0
@see setFieldConstraint()
%End
@ -1335,7 +1348,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
Sets a constraint for a specified field index. Any constraints inherited from the layer's
data provider will be kept intact and cannot be modified. Ie, calling this method only allows for new
constraints to be added on top of the existing provider constraints.
@note added in QGIS 3.0
.. versionadded:: 3.0
@see fieldConstraints()
@see removeFieldConstraint()
%End
@ -1344,7 +1357,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
%Docstring
Removes a constraint for a specified field index. Any constraints inherited from the layer's
data provider will be kept intact and cannot be removed.
@note added in QGIS 3.0
.. versionadded:: 3.0
@see fieldConstraints()
@see setFieldConstraint()
%End
@ -1352,7 +1365,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
QString constraintExpression( int index ) const;
%Docstring
Returns the constraint expression for for a specified field index, if set.
@note added in QGIS 3.0
.. versionadded:: 3.0
@see fieldConstraints()
@see constraintDescription()
@see setConstraintExpression()
@ -1361,7 +1374,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
QString constraintDescription( int index ) const;
%Docstring
Returns the descriptive name for the constraint expression for a specified field index.
@note added in QGIS 3.0
.. versionadded:: 3.0
@see constraints()
@see constraintExpression()
@see setConstraintExpression()
@ -1371,7 +1384,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
%Docstring
Set the constraint expression for the specified field index. An optional descriptive name for the constraint
can also be set. Setting an empty expression will clear any existing expression constraint.
@note added in QGIS 3.0
.. versionadded:: 3.0
@see constraintExpression()
@see constraintDescription()
@see constraints()
@ -1387,7 +1400,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
The editor widget setup defines which QgsFieldFormatter and editor widget will be used
for the field at `index`.
@note Added in QGIS 3.0
.. versionadded:: 3.0
%End
void uniqueValues( int index, QList<QVariant> &uniqueValues /Out/, int limit = -1 ) const;
@ -1453,7 +1466,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
@param context expression context for expressions and filters
@param ok if specified, will be set to true if aggregate calculation was successful
@return calculated aggregate value
@note added in QGIS 2.16
.. versionadded:: 2.16
%End
QList< QVariant > getValues( const QString &fieldOrExpression, bool &ok, bool selectedOnly = false, QgsFeedback *feedback = 0 ) const;
@ -1464,7 +1477,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
@param selectedOnly set to true to get values from selected features only
@param feedback optional feedback object to allow cancelation
@returns list of fetched values
@note added in QGIS 2.9
.. versionadded:: 2.9
@see getDoubleValues
%End
@ -1478,7 +1491,7 @@ Assembles mUpdatedFields considering provider fields, joined fields and added fi
@param nullCount optional pointer to integer to store number of null values encountered in
@param feedback optional feedback object to allow cancelation
@returns list of fetched values
@note added in QGIS 2.9
.. versionadded:: 2.9
@see getValues
%End
@ -1506,20 +1519,22 @@ Returns the current transparency for the vector layer
void setSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod );
%Docstring
Set the simplification settings for fast rendering of features
@note added in 2.2
.. versionadded:: 2.2
%End
const QgsVectorSimplifyMethod &simplifyMethod() const;
%Docstring
Returns the simplification settings for fast rendering of features
@note added in 2.2
.. versionadded:: 2.2
%End
bool simplifyDrawingCanbeApplied( const QgsRenderContext &renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const;
%Docstring
Returns whether the VectorLayer can apply the specified simplification hint
@note Do not use in 3rd party code - may be removed in future version!
@note added in 2.2
.. note::
Do not use in 3rd party code - may be removed in future version!
.. versionadded:: 2.2
%End
QgsConditionalLayerStyles *conditionalStyles() const;
@ -1528,7 +1543,7 @@ Returns the current transparency for the vector layer
used to render conditional formatting in the attribute table.
@return Return a QgsConditionalLayerStyles object holding the conditional attribute
style information. Style information is generic and can be used for anything.
@note added in QGIS 2.12
.. versionadded:: 2.12
%End
QgsAttributeTableConfig attributeTableConfig() const;
@ -1549,7 +1564,7 @@ Returns the current transparency for the vector layer
It may also contain embedded expressions.
@note added in 3.0
.. versionadded:: 3.0
%End
void setMapTipTemplate( const QString &mapTipTemplate );
@ -1558,7 +1573,7 @@ Returns the current transparency for the vector layer
It may also contain embedded expressions.
@note added in 3.0
.. versionadded:: 3.0
%End
QgsExpressionContext createExpressionContext() const;
@ -1570,7 +1585,7 @@ Returns the current transparency for the vector layer
@return The configuration of this layers' form
@note Added in QGIS 2.14
.. versionadded:: 2.14
%End
void setEditFormConfig( const QgsEditFormConfig &editFormConfig );
@ -1580,7 +1595,7 @@ Returns the current transparency for the vector layer
@return The configuration of this layers' form
@note Added in QGIS 3.0
.. versionadded:: 3.0
%End
public slots:
@ -1832,14 +1847,18 @@ Signal emitted when setLayerTransparency() is called
void editCommandEnded();
%Docstring
Signal emitted, when an edit command successfully ended
@note This does not mean it is also committed, only that it is written
.. note::
This does not mean it is also committed, only that it is written
to the edit buffer. See {@link beforeCommitChanges()}
%End
void editCommandDestroyed();
%Docstring
Signal emitted, whan an edit command is destroyed
@note This is not a rollback, it is only related to the current edit command.
.. note::
This is not a rollback, it is only related to the current edit command.
See {@link beforeRollBack()}
%End
@ -1869,14 +1888,14 @@ Signal emitted when setLayerTransparency() is called
%Docstring
Emitted when the map tip changes
@note added in QGIS 3.0
.. versionadded:: 3.0
%End
void displayExpressionChanged();
%Docstring
Emitted when the display expression changes
@note added in QGIS 3.0
.. versionadded:: 3.0
%End
void raiseError( const QString &msg );
@ -1888,7 +1907,7 @@ Signal emitted when setLayerTransparency() is called
%Docstring
Will be emitted whenever the edit form configuration of this layer changes.
@note added in QGIS 3.0
.. versionadded:: 3.0
%End
void readOnlyChanged();
@ -1896,7 +1915,7 @@ Signal emitted when setLayerTransparency() is called
Emitted when the read only state of this layer is changed.
Only applies to manually set readonly state, not to the edit mode.
@note Added in QGIS 3.0
.. versionadded:: 3.0
%End

View File

@ -17,6 +17,17 @@ sub shouldSkipDoxygenLine
}
}
sub processDoxygenLine
{
if ( $_[0] =~ m/[\\@]note added .*?([\d\.]+)/i ) {
return ".. versionadded:: $1\n";
}
if ( $_[0] =~ m/[\\@]note (.*)/ ) {
return ".. note::\n\n $1\n";
}
return $_[0];
}
my $headerfile = $ARGV[0];
@ -163,7 +174,7 @@ while(!eof $header){
do {no warnings 'uninitialized';
if ( !shouldSkipDoxygenLine($line) )
{
$comment = $line =~ s/^\s*\/\*(\*)?(.*)$/$2/r;
$comment = processDoxygenLine( $line =~ s/^\s*\/\*(\*)?(.*)$/$2/r );
}
};
$comment =~ s/^\s*$//;
@ -171,7 +182,7 @@ while(!eof $header){
$line = readline $header;
if ( !shouldSkipDoxygenLine($line) )
{
$comment .= $line =~ s/\s*\*?(.*?)(\/)?$/$1/r;
$comment .= processDoxygenLine( $line =~ s/\s*\*?(.*?)(\/)?$/$1/r );
}
if ( $line =~ m/\*\/$/ ){
last;
@ -186,7 +197,7 @@ while(!eof $header){
if ( $SIP_RUN == 0 ){
if ( $line =~ m/^\s*\/\// && !shouldSkipDoxygenLine($line) ){
$line =~ s/^\s*\/\/\!*\s*(.*)\n?$/$1/;
$comment = $line;
$comment = processDoxygenLine( $line );
next;
}
}

View File

@ -40,6 +40,10 @@ class QgsSipifyHeader : QtClass<QVariant>
{
%Docstring
Documentation goes here
.. versionadded:: 3.0
.. note::
some other note
%End
%TypeHeaderCode

View File

@ -77,6 +77,8 @@ typedef QVector<QVariant> QgsSuperClass;
/** \ingroup core
* Documentation goes here
* \note added in QGIS 3.0
* \note some other note
*/
class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private QgsBaseClass
{