Skip to content
Permalink
Browse files
Add convert to subclass for QgsGpsConnection for python bindings
  • Loading branch information
NathanW2 committed May 1, 2012
1 parent 0d2230a commit 634a56504f7c63dde8a20d9d3973fa5ada598633
Showing with 12 additions and 0 deletions.
  1. +12 −0 python/core/qgsgpsconnection.sip
@@ -36,7 +36,19 @@ struct QgsGPSInformation {
class QgsGPSConnection: QObject {
%TypeHeaderCode
#include <qgsgpsconnection.h>
#include <qgsgpsdconnection.h>
#include <qgsnmeaconnection.h>
%End

%ConvertToSubClassCode
if (sipCpp->inherits("QgsGpsdConnection"))
sipClass = sipClass_QgsGpsdConnection;
else if (sipCpp->inherits("QgsNMEAConnection"))
sipClass = sipClass_QgsNMEAConnection;
else
sipClass = NULL;
%End

public:
enum Status {
NotConnected, Connected, DataReceived, GPSDataReceived

0 comments on commit 634a565

Please sign in to comment.