Nyall Dawson
384d310233
Minor improvements to PyQGIS returns for SIP_OUT params
2019-02-05 04:55:34 +11:00
Denis Rouzaud
bd32078635
[sipify] enhanced SIP_OUT handling
...
return an error if method with SIP_OUT arguments has no \return directive AND is not void
create list of outputs for better visualization
2018-12-19 08:03:47 -04:00
Denis Rouzaud
c20b5b2f75
fix multine removal for SIP_PYARGREOMVEq
2018-12-18 21:54:38 -04:00
Denis Rouzaud
32e844f9f8
fix multiline comments on out params
2018-12-18 17:29:04 -04:00
Denis Rouzaud
9b852fbf35
[sipify] handles SIP_OUT arguments
...
remove them from parameters list and add them to return values
2018-12-18 17:17:18 -04:00
Nyall Dawson
e23527bf92
Use TypeHint annotation to indicate correct return type when sip code returns SIP_PYOBJECT
...
Provides correct return type hints to IDEs (and hopefully PyQGIS docs too!)
2018-12-07 05:51:27 +10:00
Denis Rouzaud
7bce9342e5
[sipify] fix initializer in strcuts
2018-11-28 07:46:24 -04:00
Nyall Dawson
1e5479964f
[FEATURE][API] Add some nice PyQGIS methods and exceptions to QgsLineString
...
- len(QgsCurve) returns number of points in curve
- raise IndexErrors when calling pointN, xAt, yAt, zAt, mAt, setXAt, setYAt,
setMAt, setZAt with invalid vertex indices
- Add [] getter for retrieving specific vertices, eg. ls[0] returns QgsPoint(...)
- Add [] setter for setting specific (existing) vertices, e.g. ls[1] = QgsPoint(1,2)
- Add del support for removing vertices, e.g. del ls[1] removes the second vertex
2018-11-27 09:29:13 +10:00
Martin Dobias
88cb8313c8
Python bindings for QGIS 3D library
2018-10-13 22:05:39 +02:00
Matthias Kuhn
68dc6984da
Fix build with sip pre 4.19
2018-09-21 01:22:19 +02:00
Matthias Kuhn
b65f725cfa
Rename SIP_FINAL to FINAL
2018-09-19 08:42:44 +02:00
Matthias Kuhn
8d9c96c911
Add final
for sip >= 4.19
2018-09-19 07:47:02 +02:00
Matthias Kuhn
d9f5d53779
Add SIP_FINAL
2018-09-18 19:06:01 +02:00
Matthias Kuhn
ab91b8553f
Teach sipify the meaning of final
2018-09-18 17:23:42 +02:00
Denis Rouzaud
05f35f2e19
[sipify] fix annotations in multiline virtual methods
2018-09-14 16:35:30 +10:00
Nyall Dawson
6935027ead
[processing] Fix API break in widget wrapper
...
Fixes #19820
2018-09-13 05:40:39 +10:00
Denis Rouzaud
10fc175f2a
[sipify] finer detection of enum lines
2018-09-10 11:41:57 -04:00
Juergen E. Fischer
d0e94728d8
fix build with sip 4.18.1 (eg. ubuntu artful)
2018-06-27 23:30:04 +02:00
Denis Rouzaud
ac4f508c13
create Python __repr__ methods for QgsPoint and QgsPointXY
2018-06-19 07:02:17 -04:00
Nyall Dawson
c705670947
Upgrade INT_ methods to numeric_limits
2018-06-17 09:24:37 +10:00
Nyall Dawson
17cd2fd5f3
More DBL_MIN/MAX_EPSILON upgrades
2018-06-17 09:24:37 +10:00
Nyall Dawson
a4c8386e88
[sipify] Replace std::numeric_limits with old style DBL_MAX/etc
2018-06-17 09:24:37 +10:00
Denis Rouzaud
164f662dc0
fix sipify and run
2018-06-03 11:07:09 -08:00
Denis Rouzaud
e5b02cd2a8
use dedicated files for auto additions
2018-06-03 11:07:09 -08:00
Denis Rouzaud
7cb18cd5f1
[sipify] allow to define python operator in headers
...
sipify will take care of injecting them in python/{module}/__init__.py
2018-06-03 11:07:09 -08:00
Denis Rouzaud
83be4fae6b
[sipify] fix deprecated annotation without additional comment
2018-05-28 10:39:34 -08:00
Nyall Dawson
4c3a9ef7be
Ensure that class \brief comes before \since ( #7081 )
...
Otherwise it breaks the Python docstrings, which require
the brief to come first
2018-05-28 04:03:46 -08:00
Nyall Dawson
f8bc97030b
Remove extra space added before first line of docstring
2018-05-28 08:22:11 +10:00
Nyall Dawson
7a1a787c0a
Fix incorrect returns docstring when doxygen \returns has extra trailing spaces or uses tabs
2018-05-27 18:54:09 +10:00
Nyall Dawson
0e75f6ef85
Don't indent multiline versionadded/deprecated tags
...
Turns out there isn't any valid ones anyway - the only
multiline versionadded tags are due to incorrect ordering
of brief/since tags (which is fixed in a different PR)
2018-05-27 18:54:09 +10:00
Nyall Dawson
9f650fead9
Fix incorrect param docstring when doxygen \param has extra
...
trailing spaces or uses tabs
2018-05-27 18:54:09 +10:00
Nyall Dawson
4b1b752633
Fix bad regex
2018-05-27 18:54:09 +10:00
Nyall Dawson
3d6ea5972b
Remove some junk lines from docstrings
2018-05-27 18:54:09 +10:00
Nyall Dawson
38850bdb94
[pyqgis] Ensure that multiline param tags are indented for additional lines
2018-05-27 18:54:09 +10:00
Denis Rouzaud
b4ec9a3190
[pyqgis] add QgsSettings.enumValue and flagValue to the bindings ( #7024 )
...
* [pyqgis] add QgsSettings.enumValue and flagValue to the bindings
these are done in pure Python since no implementation is possible in SIP
there is a dirty hack for flags since QgsMapLayerProxyModel.Filters.__qualname__
returns 'Filters' and not 'QgsMapLayerProxyModel.Filters'
* fix typo
2018-05-18 09:25:12 -08:00
Denis Rouzaud
deccf205cf
[pyqgis] add method to retrieve metaEnum from an enum value or type ( #7023 )
2018-05-18 06:47:18 -08:00
Denis Rouzaud
6301f9b6f3
[sipify] write helpers in core.__init__.py for Q_ENUM
...
whenever reading a Q_ENUM macro, sipify will create a helper in the core module:
BaseClass.EnumType.parentClass = lamda: BaseClass
this will allow to use the meta object to access the QMetaEnum of the object
2018-05-17 22:54:18 -04:00
Denis Rouzaud
1fe0fb74ec
[sipify] fix remove value assignment in members
2018-05-17 21:49:07 -04:00
Denis Rouzaud
c1e16969f3
[QgsLocator] add the capability of adding group for elements within the same filter
2018-05-17 21:46:31 -04:00
Denis Rouzaud
2abcfa23b8
do not add static QMetaObject to QgsDefaultValue
...
it has no Q_ENUM so no need for now
I do not understand while it doesn't compile though
2018-05-16 14:25:01 -04:00
Denis Rouzaud
e8cf8c2f1c
[sipify] insert missing QMetaObject for gadget classes
2018-05-15 17:38:16 -04:00
Nyall Dawson
0f78277a59
Add SIP_THROW annotation
...
SIP uses the deprecated throw(...) annotation in order to determine
which exceptions may be thrown by c++ code. Without these, only
a generic unknown exception is throw, which is of limited value
to Python code (losing any valuable message and exception type).
So we add a new SIP_THROW macro, which can be added to method's
declaration:
bool doSomething() SIP_THROW( QgsCsException );
This is ignored outside of sipify, so we don't actually use
the deprecated c++ throw annotations, but sipify picks it up
and adds the appropriate change to the sip definition for
the method:
bool doSomething() throw( QgsCsException );
This means that calling the method from Python will raise
the QgsCsException instead of a generic exception.
2018-05-16 04:35:17 +10:00
Nyall Dawson
0acdcfadfd
Fix crash when using the identify tool on a categorized render
...
with an unchecked category corresponding to the feature at the
clicked point
Also fix count of default category symbols
2018-03-01 16:49:29 +11:00
Denis Rouzaud
d171ca7ae4
offer enterCategory in Python bindings by adding a context manager
2018-02-28 13:43:11 -04:00
Denis Rouzaud
d468e5bb6a
[sipify] fix Q_FLAG declaration
2018-02-19 05:55:09 -09:00
lbartoletti
124e26815d
Standardize shebangs (was Usr bin env) ( #6229 )
...
* Use portable /usr/bin/env/{perl,python} instead of /usr/bin/{perl,python}
* fix perl;add bash
* Fix indentation using modified scripts
* Revert "fix perl;add bash"
This reverts commit be8b9113c25f7c2fb9c8c9bad556fbca2f0c0ba2.
* python3 everywhere
* more bash
* rebase
change perl
* Linux perl; missing from last PR
* fix doxygen_space
* Use portable /usr/bin/env/{perl,python} instead of /usr/bin/{perl,python}
* fix perl;add bash
* Fix indentation using modified scripts
* Revert "fix perl;add bash"
This reverts commit be8b9113c25f7c2fb9c8c9bad556fbca2f0c0ba2.
* python3 everywhere
* more bash
* rebase
change perl
* fix doxygen_space
2018-02-05 03:38:02 -09:00
Denis Rouzaud
a09b9e7af9
[sipify] fix QMap/Qlist with init in header
2018-02-03 15:52:33 -09:00
Alessandro Pasotti
cbd0ece0a6
Support comma in annotations when merging inline
2018-01-31 12:50:07 +01:00
Nyall Dawson
f37c2bf6f6
Revert "[needs-qa]Usr bin env"
2018-01-30 11:33:49 +11:00
lbartoletti
1ce7dbad94
Merge branch 'master' of https://github.com/qgis/QGIS into usr_bin_env
2018-01-29 13:13:03 +01:00