Skip to content

Commit

Permalink
Add convert to subclass for QgsGpsConnection for python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 1, 2012
1 parent 0d2230a commit 634a565
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python/core/qgsgpsconnection.sip
Expand Up @@ -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
Expand Down

0 comments on commit 634a565

Please sign in to comment.