mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-20 00:06:36 -04:00
Fix code sample rendering in pyqgis doc
This commit is contained in:
parent
c70d3cef2b
commit
63f5fa9c86
@ -54,6 +54,7 @@ The path pre-processor function is called before any bad layer handler.
|
|||||||
Setting a new ``processor`` replaces any existing processor.
|
Setting a new ``processor`` replaces any existing processor.
|
||||||
|
|
||||||
Example - replace an outdated folder path with a new one:
|
Example - replace an outdated folder path with a new one:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def my_processor(path):
|
def my_processor(path):
|
||||||
@ -62,6 +63,7 @@ Example - replace an outdated folder path with a new one:
|
|||||||
QgsPathResolver.setPathPreprocessor(my_processor)
|
QgsPathResolver.setPathPreprocessor(my_processor)
|
||||||
|
|
||||||
Example - replace a stored database host with a new one:
|
Example - replace a stored database host with a new one:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def my_processor(path):
|
def my_processor(path):
|
||||||
@ -71,6 +73,7 @@ Example - replace a stored database host with a new one:
|
|||||||
|
|
||||||
|
|
||||||
Example - replace stored database credentials with new ones:
|
Example - replace stored database credentials with new ones:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def my_processor(path):
|
def my_processor(path):
|
||||||
|
@ -79,6 +79,7 @@ class CORE_EXPORT QgsPathResolver
|
|||||||
* \note Setting a new \a processor replaces any existing processor.
|
* \note Setting a new \a processor replaces any existing processor.
|
||||||
*
|
*
|
||||||
* Example - replace an outdated folder path with a new one:
|
* Example - replace an outdated folder path with a new one:
|
||||||
|
*
|
||||||
* \code{.py}
|
* \code{.py}
|
||||||
* def my_processor(path):
|
* def my_processor(path):
|
||||||
* return path.replace('c:/Users/ClintBarton/Documents/Projects', 'x:/Projects/')
|
* return path.replace('c:/Users/ClintBarton/Documents/Projects', 'x:/Projects/')
|
||||||
@ -87,6 +88,7 @@ class CORE_EXPORT QgsPathResolver
|
|||||||
* \endcode
|
* \endcode
|
||||||
*
|
*
|
||||||
* Example - replace a stored database host with a new one:
|
* Example - replace a stored database host with a new one:
|
||||||
|
*
|
||||||
* \code{.py}
|
* \code{.py}
|
||||||
* def my_processor(path):
|
* def my_processor(path):
|
||||||
* return path.replace('host=10.1.1.115', 'host=10.1.1.116')
|
* return path.replace('host=10.1.1.115', 'host=10.1.1.116')
|
||||||
@ -95,6 +97,7 @@ class CORE_EXPORT QgsPathResolver
|
|||||||
* \endcode
|
* \endcode
|
||||||
*
|
*
|
||||||
* Example - replace stored database credentials with new ones:
|
* Example - replace stored database credentials with new ones:
|
||||||
|
*
|
||||||
* \code{.py}
|
* \code{.py}
|
||||||
* def my_processor(path):
|
* def my_processor(path):
|
||||||
* path = path.replace("user='gis_team'", "user='team_awesome'")
|
* path = path.replace("user='gis_team'", "user='team_awesome'")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user