Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #37715 from qgis-bot/backport-37713-to-release-3_14
[Backport release-3_14] [sipify] format section/subsection to RST
  • Loading branch information
3nids committed Jul 9, 2020
2 parents c0ae18e + 3366df7 commit 25c0246
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
9 changes: 6 additions & 3 deletions python/core/auto_generated/mesh/qgsmeshlayer.sip.in
Expand Up @@ -28,9 +28,11 @@ yet support editing transactions.

The main data providers supported by QGIS are listed below.

\section mesh_providers Mesh data providers
Mesh data providers
-------------------

\subsection mesh_memory Memory data providerType (mesh_memory)
Memory data providerType (mesh_memory)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The memory data provider is used to construct in memory data, for example scratch
data. There is no inherent persistent storage of the data. The data source uri is constructed.
Expand All @@ -52,7 +54,8 @@ E.g. to create mesh with one quad and one triangle
);
QgsMeshLayer *scratchLayer = new QgsMeshLayer(uri, "My Scratch layer", "mesh_memory");

\subsection mdal MDAL data provider (mdal)
MDAL data provider (mdal)
~~~~~~~~~~~~~~~~~~~~~~~~~

Accesses data using the MDAL drivers (https://github.com/lutraconsulting/MDAL). The url
is the MDAL connection string. QGIS must be built with MDAL support to allow this provider.
Expand Down
33 changes: 22 additions & 11 deletions python/core/auto_generated/qgsvectorlayer.sip.in
Expand Up @@ -41,9 +41,11 @@ Sample usage of the QgsVectorLayer class:

The main data providers supported by QGIS are listed below.

\section providers Vector data providers
Vector data providers
---------------------

\subsection memory Memory data providerType (memory)
Memory data providerType (memory)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The memory data provider is used to construct in memory data, for example scratch
data or data generated from spatial operations such as contouring. There is no
Expand All @@ -70,33 +72,38 @@ trigger such warning, it is possible to suppress that by setting the following c

layer.setCustomProperty("skipMemoryLayersCheck", 1)

\subsection ogr OGR data provider (ogr)
OGR data provider (ogr)
~~~~~~~~~~~~~~~~~~~~~~~

Accesses data using the OGR drivers (http://www.gdal.org/ogr/ogr_formats.html). The url
is the OGR connection string. A wide variety of data formats can be accessed using this
driver, including file based formats used by many GIS systems, database formats, and
web services. Some of these formats are also supported by custom data providers listed
below.

\subsection spatialite SpatiaLite data provider (spatialite)
SpatiaLite data provider (spatialite)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Access data in a SpatiaLite database. The url defines the connection parameters, table,
geometry column, and other attributes. The url can be constructed using the
QgsDataSourceUri class.

\subsection postgres PostgreSQL data provider (postgres)
PostgreSQL data provider (postgres)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Connects to a PostgreSQL database. The url defines the connection parameters, table,
geometry column, and other attributes. The url can be constructed using the
QgsDataSourceUri class.

\subsection mssql Microsoft SQL server data provider (mssql)
Microsoft SQL server data provider (mssql)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Connects to a Microsoft SQL server database. The url defines the connection parameters, table,
geometry column, and other attributes. The url can be constructed using the
QgsDataSourceUri class.

\subsection wfs WFS (web feature service) data provider (wfs)
WFS (web feature service) data provider (wfs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Used to access data provided by a web feature service.

Expand Down Expand Up @@ -129,7 +136,8 @@ attribute operators, “BBOX, Disjoint, Intersects, Touches, Crosses, Contains,
spatial binary operators and the QGIS local “geomFromWKT, geomFromGML”
geometry constructor functions.

\subsection oapif OGC API - Features data provider (oapif)
OGC API - Features data provider (oapif)
~~~~~~~~-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Used to access data provided by a OGC API - Features server.

Expand All @@ -154,7 +162,8 @@ Also note:
- Use the special $geometry parameter to provide the layer geometry column as input
into the spatial binary operators e.g intersects($geometry, geomFromWKT('POINT (5 6)'))

\subsection delimitedtext Delimited text file data provider (delimitedtext)
Delimited text file data provider (delimitedtext)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Accesses data in a delimited text file, for example CSV files generated by
spreadsheets. The contents of the file are split into columns based on specified
Expand Down Expand Up @@ -300,15 +309,17 @@ to monitor for changes.
Errors encountered loading the file will not be reported in a user dialog if
quiet is included (They will still be shown in the output log).

\subsection gpx GPX data provider (gpx)
GPX data provider (gpx)
~~~~~~~~~~~~~~~~~~~~~~~

Provider reads tracks, routes, and waypoints from a GPX file. The url
defines the name of the file, and the type of data to retrieve from it
("track", "route", or "waypoint").

An example url is "/home/user/data/holiday.gpx?type=route"

\subsection grass Grass data provider (grass)
Grass data provider (grass)
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Provider to display vector data in a GRASS GIS layer.

Expand Down
8 changes: 8 additions & 0 deletions scripts/sipify.pl
Expand Up @@ -185,6 +185,14 @@ sub processDoxygenLine {
# replace nullptr with None (nullptr means nothing to Python devs)
$line =~ s/\bnullptr\b/None/g;

if ( $line =~ m/^\\(?<SUB>sub)?section/) {
my $sep = "-";
$sep = "~" if defined $+{SUB};
$line =~ s/^\\(sub)?section \w+ //;
my $sep_line = $line =~ s/[\w ()]/$sep/gr;
$line .= "\n".$sep_line;
}

# convert ### style headings
if ( $line =~ m/^###\s+(.*)$/) {
$line = "$1\n".('-' x length($1));
Expand Down

0 comments on commit 25c0246

Please sign in to comment.