From 8e94e2b336a38d98d4195b9ae86a8bb825e4ab4e Mon Sep 17 00:00:00 2001 From: DelazJ Date: Sun, 31 Mar 2024 20:02:57 +0200 Subject: [PATCH] un peu de cleanup dans la doc pyqgis --- .../auto_generated/qgsserverogcapi.sip.in | 8 ++--- .../qgsserverogcapihandler.sip.in | 20 ++++++------- .../auto_generated/qgsserverogcapi.sip.in | 8 ++--- .../qgsserverogcapihandler.sip.in | 20 ++++++------- scripts/sipify.pl | 2 +- .../processing/qgsalgorithmbatchgeocode.h | 4 +-- src/core/actions/qgsactionscope.h | 30 +++++++++++-------- src/server/qgsserverogcapi.h | 8 ++--- src/server/qgsserverogcapihandler.h | 20 ++++++------- 9 files changed, 63 insertions(+), 57 deletions(-) diff --git a/python/PyQt6/server/auto_generated/qgsserverogcapi.sip.in b/python/PyQt6/server/auto_generated/qgsserverogcapi.sip.in index 8a09af1c054c..e4ddcdcf5db6 100644 --- a/python/PyQt6/server/auto_generated/qgsserverogcapi.sip.in +++ b/python/PyQt6/server/auto_generated/qgsserverogcapi.sip.in @@ -24,10 +24,10 @@ as instances of :py:class:`QgsServerOgcApiHandler`. """A handler, see QgsServerOgcApiHandler for an example""" ... - h = Handler1() - api = QgsServerOgcApi(serverInterface(), "/api1", "apione", "A firs API", "1.0") - api.registerHandler(h) - server.serverInterface().serviceRegistry().registerApi(api) + h = Handler1() + api = QgsServerOgcApi(serverInterface(), "/api1", "apione", "A first API", "1.0") + api.registerHandler(h) + server.serverInterface().serviceRegistry().registerApi(api) diff --git a/python/PyQt6/server/auto_generated/qgsserverogcapihandler.sip.in b/python/PyQt6/server/auto_generated/qgsserverogcapihandler.sip.in index bed99d76eb0f..de9cb4329e9a 100644 --- a/python/PyQt6/server/auto_generated/qgsserverogcapihandler.sip.in +++ b/python/PyQt6/server/auto_generated/qgsserverogcapihandler.sip.in @@ -41,31 +41,31 @@ Optionally, override: """Example handler""" def path(self): - return QtCore.QRegularExpression("/handlerone") + return QtCore.QRegularExpression("/handlerone") def operationId(self): - return "handlerOne" + return "handlerOne" def summary(self): - return "First of its name" + return "First of its name" def description(self): - return "The first handler ever" + return "The first handler ever" def linkTitle(self): - return "Handler One Link Title" + return "Handler One Link Title" def linkType(self): - return QgsServerOgcApi.data + return QgsServerOgcApi.data def handleRequest(self, context): - """Simple mirror: returns the parameters""" + """Simple mirror: returns the parameters""" - params = self.values(context) - self.write(params, context) + params = self.values(context) + self.write(params, context) def parameters(self, context): - return [QgsServerQueryStringParameter("value1", True, QgsServerQueryStringParameter.Type.Double, "a double value")] + return [QgsServerQueryStringParameter("value1", True, QgsServerQueryStringParameter.Type.Double, "a double value")] diff --git a/python/server/auto_generated/qgsserverogcapi.sip.in b/python/server/auto_generated/qgsserverogcapi.sip.in index a72ff2ffa22f..d8d3d24a3857 100644 --- a/python/server/auto_generated/qgsserverogcapi.sip.in +++ b/python/server/auto_generated/qgsserverogcapi.sip.in @@ -24,10 +24,10 @@ as instances of :py:class:`QgsServerOgcApiHandler`. """A handler, see QgsServerOgcApiHandler for an example""" ... - h = Handler1() - api = QgsServerOgcApi(serverInterface(), "/api1", "apione", "A firs API", "1.0") - api.registerHandler(h) - server.serverInterface().serviceRegistry().registerApi(api) + h = Handler1() + api = QgsServerOgcApi(serverInterface(), "/api1", "apione", "A first API", "1.0") + api.registerHandler(h) + server.serverInterface().serviceRegistry().registerApi(api) diff --git a/python/server/auto_generated/qgsserverogcapihandler.sip.in b/python/server/auto_generated/qgsserverogcapihandler.sip.in index bed99d76eb0f..de9cb4329e9a 100644 --- a/python/server/auto_generated/qgsserverogcapihandler.sip.in +++ b/python/server/auto_generated/qgsserverogcapihandler.sip.in @@ -41,31 +41,31 @@ Optionally, override: """Example handler""" def path(self): - return QtCore.QRegularExpression("/handlerone") + return QtCore.QRegularExpression("/handlerone") def operationId(self): - return "handlerOne" + return "handlerOne" def summary(self): - return "First of its name" + return "First of its name" def description(self): - return "The first handler ever" + return "The first handler ever" def linkTitle(self): - return "Handler One Link Title" + return "Handler One Link Title" def linkType(self): - return QgsServerOgcApi.data + return QgsServerOgcApi.data def handleRequest(self, context): - """Simple mirror: returns the parameters""" + """Simple mirror: returns the parameters""" - params = self.values(context) - self.write(params, context) + params = self.values(context) + self.write(params, context) def parameters(self, context): - return [QgsServerQueryStringParameter("value1", True, QgsServerQueryStringParameter.Type.Double, "a double value")] + return [QgsServerQueryStringParameter("value1", True, QgsServerQueryStringParameter.Type.Double, "a double value")] diff --git a/scripts/sipify.pl b/scripts/sipify.pl index e6f842ac5049..db5110efe748 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -642,7 +642,7 @@ sub processDoxygenLine { if ( $line =~ m/\\code(\{\.?(\w+)\})?/ ) { my $codelang = ""; $codelang = " $2" if (defined $2); - $codelang =~ m/(cpp|py|unparsed)/ or exit_with_error("invalid code snippet format: $codelang"); + $codelang =~ m/(cpp|html|py|unparsed)/ or exit_with_error("invalid code snippet format: $codelang"); $COMMENT_CODE_SNIPPET = CODE_SNIPPET; $COMMENT_CODE_SNIPPET = CODE_SNIPPET_CPP if ($codelang =~ m/cpp/ ); $codelang =~ s/py/python/; diff --git a/src/analysis/processing/qgsalgorithmbatchgeocode.h b/src/analysis/processing/qgsalgorithmbatchgeocode.h index 0914349b256c..94eb202bea60 100644 --- a/src/analysis/processing/qgsalgorithmbatchgeocode.h +++ b/src/analysis/processing/qgsalgorithmbatchgeocode.h @@ -33,7 +33,7 @@ class QgsGeocoderInterface; * ### Example * * \code{.py} - * # create a class which implements the QgsGeocoderInterface interface: + * # create a class which implements the QgsGeocoderInterface interface * class MyGeocoder(QgsGeocoderInterface): * * def geocodeString(self, string, context, feedback): @@ -57,7 +57,7 @@ class QgsGeocoderInterface; * def createInstance(self): * return MyGeocoderAlgorithm() * - * # optionally, the group(), groupId(), tags(), shortHelpString() and other metadata style methods can be overridden and customized: + * # optionally, the group(), groupId(), tags(), shortHelpString() and other metadata style methods can be overridden and customized * def tags(self): * return 'geocode,my service,batch' * diff --git a/src/core/actions/qgsactionscope.h b/src/core/actions/qgsactionscope.h index 0da3dc0dde0e..0e3f98a6cd8f 100644 --- a/src/core/actions/qgsactionscope.h +++ b/src/core/actions/qgsactionscope.h @@ -30,17 +30,23 @@ * Examples: * --------- * - *
- *
Canvas
- *
Show for canvas tools. Adds `@click_x` and `@click_y` in map coordinates.
- *
Feature
- *
Show in feature specific places like the attribute table or feature - * form.
- *
Field
- *
Show in context menus for individual fields (e.g. attribute table). Adds `@field_index`, `@field_name` and `@field_value`.
- *
Layer
- *
Show in attribute table and work on the layer or selection.
- *
+ * \code{.html} + * + *
+ *
Canvas
+ *
Show for canvas tools. Adds `@click_x` and `@click_y` in map coordinates.
+ *
Feature
+ *
Show in feature specific places like the attribute table or feature + * form.
+ *
Field
+ *
Show in context menus for individual fields (e.g. attribute table). Adds `@field_index`, `@field_name` and `@field_value`.
+ *
Layer
+ *
Show in attribute table and work on the layer or selection.
+ *
Form
+ *
Show in a feature form designed using the drag-and-drop mode.
+ *
+ * + * \endcode * */ class CORE_EXPORT QgsActionScope @@ -72,7 +78,7 @@ class CORE_EXPORT QgsActionScope /** * An expression scope may offer additional variables for an action scope. - * This can be an `field_name` for the attribute which was clicked or + * This can be a `field_name` for the attribute which was clicked or * `click_x` and `click_y` for actions which are available as map canvas clicks. * */ diff --git a/src/server/qgsserverogcapi.h b/src/server/qgsserverogcapi.h index d8c712a1c681..dede737a90e0 100644 --- a/src/server/qgsserverogcapi.h +++ b/src/server/qgsserverogcapi.h @@ -36,10 +36,10 @@ class QgsServerOgcApiHandler; * """A handler, see QgsServerOgcApiHandler for an example""" * ... * - * h = Handler1() - * api = QgsServerOgcApi(serverInterface(), "/api1", "apione", "A firs API", "1.0") - * api.registerHandler(h) - * server.serverInterface().serviceRegistry().registerApi(api) + * h = Handler1() + * api = QgsServerOgcApi(serverInterface(), "/api1", "apione", "A first API", "1.0") + * api.registerHandler(h) + * server.serverInterface().serviceRegistry().registerApi(api) * * \endcode * diff --git a/src/server/qgsserverogcapihandler.h b/src/server/qgsserverogcapihandler.h index c864f30486f2..455fa6fb1e4a 100644 --- a/src/server/qgsserverogcapihandler.h +++ b/src/server/qgsserverogcapihandler.h @@ -56,34 +56,34 @@ class QgsServerApiContext; * * \code{.py} * - * class Handler1(QgsServerOgcApiHandler): - * """Example handler""" + * class Handler1(QgsServerOgcApiHandler): + * """Example handler""" * - * def path(self): + * def path(self): * return QtCore.QRegularExpression("/handlerone") * - * def operationId(self): + * def operationId(self): * return "handlerOne" * - * def summary(self): + * def summary(self): * return "First of its name" * - * def description(self): + * def description(self): * return "The first handler ever" * - * def linkTitle(self): + * def linkTitle(self): * return "Handler One Link Title" * - * def linkType(self): + * def linkType(self): * return QgsServerOgcApi.data * - * def handleRequest(self, context): + * def handleRequest(self, context): * """Simple mirror: returns the parameters""" * * params = self.values(context) * self.write(params, context) * - * def parameters(self, context): + * def parameters(self, context): * return [QgsServerQueryStringParameter("value1", True, QgsServerQueryStringParameter.Type.Double, "a double value")] * *