Feature request #4826
Add python bindings for gps library
|Pull Request or Patch supplied:||Yes||Resolution:||fixed|
|Easy fix?:||No||Copied to github as #:||14670|
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.
#4 Updated by Alexander Bruy over 8 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 over 8 years ago
The full message (on windows):
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> T=QgsGPSConnection *
1> T=const QgsGPSConnection *
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