Feature request #4826
Add python bindings for gps library
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Marco Hugentobler | ||
Category: | Python plugins | ||
Pull Request or Patch supplied: | Yes | Resolution: | fixed |
Easy fix?: | No | Copied to github as #: | 14670 |
Description
We need to have python bindings available for the gps part of the core libraries (on behalf of Stefan Keller). These binding will be used mainly to listen on QgsGPSConnection::stateChanged()
signals. This is more or less the follow up issue on the developer mailing list thread http://lists.osgeo.org/pipermail/qgis-developer/2012-January/017575.html
Therefor I created sip files for some - hopefully all - of the required gps components but as I am new to sip files it might be required that some of the pro's will check the attached files for completeness.
History
#1 Updated by Paolo Cavallini almost 13 years ago
- Priority changed from 7 to Normal
#2 Updated by Marco Hugentobler almost 13 years ago
- Assignee set to Marco Hugentobler
#3 Updated by Marco Hugentobler almost 13 years ago
Hi Marcel
The patch is applied to master. I'm not a sip expert, however, the best test of the bindings is probably to really use the bindings.
#4 Updated by Alexander Bruy almost 13 years ago
With this path QGIS won't compile. The error is
/usr/share/sip/PyQt4/QtCore/qlist.sip: In function 'int convertTo_QList_0111QgsGPSConnection(PyObject*, void**, int*, PyObject*)':
/usr/share/sip/PyQt4/QtCore/qlist.sip:195:18: error: cannot convert 'QList<QgsGPSConnection*>*' to 'QList<const QgsGPSConnection*>*' in assignment
#5 Updated by Alister Hood almost 13 years ago
The full message (on windows):
1>sipcorepart0.cpp
2>Build log was saved at "file://c:\\OSGeo4W\\building\\Quantum-GIS.build\\python\\compile_python_files.dir\\RelWithDebInfo\\BuildLog.htm"
2>compile_python_files - 0 error(s), 0 warning(s)
1>C:/OSGeo4W/apps/Python27/sip/PyQt4/QtCore/qlist.sip(195) : error C2440: '=' : cannot convert from 'QList<T> *' to 'QList<T> *'
1> with
1> [
1> T=QgsGPSConnection *
1> ]
1> and
1> [
1> T=const QgsGPSConnection *
1> ]
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>C:/OSGeo4W/apps/Python27/sip/PyQt4/QtCore/qlist.sip(138) : error C2440: 'initializing' : cannot convert from 'const QgsGPSConnection *const ' to 'QgsGPSConnection *'
1> Conversion loses qualifiers
#6 Updated by Giovanni Manghi over 12 years ago
- Target version set to Version 2.0.0
#7 Updated by Alexander Bruy over 12 years ago
- Resolution set to fixed
- Status changed from Open to Closed
As I can see GPS bindings already available in 1.8.0 and master. Please reopen if necessary