Denis Rouzaud
60682885c0
Small tweak to enum Python docs ( #9631 )
...
original credits to @nyalldawson
2019-03-26 14:00:37 -05:00
Denis Rouzaud
e232817e5b
add missing doc
2019-03-25 11:00:17 -05:00
Denis Rouzaud
9a6ddbd5c1
also monkey patch the former enum type
2019-03-24 21:40:33 -05:00
Denis Rouzaud
38c2d4a03d
fix dox for unnested enums
2019-03-24 21:40:33 -05:00
Denis Rouzaud
0e35c91edf
[sipify] handle enum class forward declaration and fix monkey patching
2019-03-24 21:40:33 -05:00
Denis Rouzaud
837607cb15
[sipify] handle moving enum to scope based and out of class enum
2019-03-24 21:37:04 -05:00
Denis Rouzaud
0e5c91234f
add missing new line
2019-03-08 12:00:02 +01:00
Denis Rouzaud
1281bcc256
[sipify] add macro to explicitely ask for monkey patching
...
because new scope based enum should not do the monkey patching, it's only done for python API compatibility
2019-03-08 10:27:34 +01:00
Denis Rouzaud
051ac1383b
[sipify] fix oneliners
2019-03-08 10:06:26 +01:00
Denis Rouzaud
ee37345aef
[sipify] monkey patch enum for PyQGIS API compatibility
2019-03-07 21:07:43 +01:00
Denis Rouzaud
e162040f04
[sipify] handle scope based enums
2019-03-07 16:32:39 +01:00
Nyall Dawson
107b48a430
Add NULLPTR macro for use in doxygen comments
...
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)
Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
eed9852fb9
Add TRUE and FALSE macros for use in doxygen comments
...
For the c++ api dox these expand to "\c true" and "\c false" (the
\c directive indicates a code literal value), and for sipify/Python
they expand to ``True`` and ``False`` (`` is sphinx annotation
for literal values)
Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
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