mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
sipify core gps
This commit is contained in:
parent
e052933b14
commit
e545d44c4f
@ -41,12 +41,6 @@ core/composer/qgspaperitem.sip
|
||||
core/composer/qgsscalebarstyle.sip
|
||||
core/composer/qgssingleboxscalebarstyle.sip
|
||||
core/composer/qgsticksscalebarstyle.sip
|
||||
core/gps/qgsgpsconnection.sip
|
||||
core/gps/qgsgpsconnectionregistry.sip
|
||||
core/gps/qgsgpsdconnection.sip
|
||||
core/gps/qgsgpsdetector.sip
|
||||
core/gps/qgsnmeaconnection.sip
|
||||
core/gps/qgsqtlocationconnection.sip
|
||||
core/symbology-ng/qgsrulebasedrenderer.sip
|
||||
core/symbology-ng/qgssinglesymbolrenderer.sip
|
||||
core/symbology-ng/qgsgeometrygeneratorsymbollayer.sip
|
||||
|
@ -1,9 +1,18 @@
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsgpsconnection.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct QgsSatelliteInfo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgsgpsconnection.h>
|
||||
%End
|
||||
|
||||
int id;
|
||||
bool inUse;
|
||||
int elevation;
|
||||
@ -13,10 +22,6 @@ struct QgsSatelliteInfo
|
||||
|
||||
struct QgsGPSInformation
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgsgpsconnection.h>
|
||||
%End
|
||||
|
||||
double latitude;
|
||||
double longitude;
|
||||
double elevation;
|
||||
@ -38,24 +43,15 @@ struct QgsGPSInformation
|
||||
bool satInfoComplete; // based on GPGSV sentences - to be used to determine when to graph signal and satellite position
|
||||
};
|
||||
|
||||
/** Abstract base class for connection to a GPS device*/
|
||||
class QgsGPSConnection : QObject
|
||||
{
|
||||
%Docstring
|
||||
Abstract base class for connection to a GPS device*
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include <qgsgpsconnection.h>
|
||||
#include <qgsgpsdconnection.h>
|
||||
#include <qgsnmeaconnection.h>
|
||||
#include "qgsgpsconnection.h"
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
if (sipCpp->inherits("QgsGpsdConnection"))
|
||||
sipType = sipType_QgsGpsdConnection;
|
||||
else if (sipCpp->inherits("QgsNMEAConnection"))
|
||||
sipType = sipType_QgsNMEAConnection;
|
||||
else
|
||||
sipType = NULL;
|
||||
%End
|
||||
|
||||
public:
|
||||
|
||||
enum Status
|
||||
@ -66,30 +62,57 @@ class QgsGPSConnection : QObject
|
||||
GPSDataReceived
|
||||
};
|
||||
|
||||
/** Constructor
|
||||
@param dev input device for the connection (e.g. serial device). The class takes ownership of the object
|
||||
*/
|
||||
QgsGPSConnection( QIODevice *dev /Transfer/ );
|
||||
%Docstring
|
||||
Constructor
|
||||
\param dev input device for the connection (e.g. serial device). The class takes ownership of the object
|
||||
%End
|
||||
virtual ~QgsGPSConnection();
|
||||
/** Opens connection to device*/
|
||||
bool connect();
|
||||
/** Closes connection to device*/
|
||||
%Docstring
|
||||
Opens connection to device
|
||||
:rtype: bool
|
||||
%End
|
||||
bool close();
|
||||
%Docstring
|
||||
Closes connection to device
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Sets the GPS source. The class takes ownership of the device class*/
|
||||
void setSource( QIODevice *source /Transfer/ );
|
||||
%Docstring
|
||||
Sets the GPS source. The class takes ownership of the device class
|
||||
%End
|
||||
|
||||
/** Returns the status. Possible state are not connected, connected, data received*/
|
||||
Status status() const;
|
||||
%Docstring
|
||||
Returns the status. Possible state are not connected, connected, data received
|
||||
:rtype: Status
|
||||
%End
|
||||
|
||||
/** Returns the current gps information (lat, lon, etc.)*/
|
||||
QgsGPSInformation currentGPSInformation() const;
|
||||
%Docstring
|
||||
Returns the current gps information (lat, lon, etc.)
|
||||
:rtype: QgsGPSInformation
|
||||
%End
|
||||
|
||||
signals:
|
||||
void stateChanged( const QgsGPSInformation &info );
|
||||
void nmeaSentenceReceived( const QString &substring );
|
||||
void nmeaSentenceReceived( const QString &substring ); // added to capture 'raw' data
|
||||
|
||||
protected:
|
||||
|
||||
protected slots:
|
||||
/** Parse available data source content*/
|
||||
virtual void parseData() = 0;
|
||||
%Docstring
|
||||
Parse available data source content
|
||||
%End
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsgpsconnection.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,22 +1,54 @@
|
||||
/** A singleton class to register / unregister existing GPS connections such that the information
|
||||
is available to all classes and plugins*/
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsgpsconnectionregistry.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsGPSConnectionRegistry
|
||||
{
|
||||
%Docstring
|
||||
A class to register / unregister existing GPS connections such that the information
|
||||
is available to all classes and plugins.
|
||||
|
||||
QgsGPSConnectionRegistry is not usually directly created, but rather accessed through
|
||||
QgsApplication.gpsConnectionRegistry().
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include <qgsgpsconnectionregistry.h>
|
||||
#include "qgsgpsconnectionregistry.h"
|
||||
%End
|
||||
public:
|
||||
QgsGPSConnectionRegistry();
|
||||
~QgsGPSConnectionRegistry();
|
||||
|
||||
/** Inserts a connection into the registry. The connection is owned by the registry class until it is unregistered again*/
|
||||
|
||||
void registerConnection( QgsGPSConnection *c );
|
||||
/** Unregisters connection. The registry does no longer own the connection*/
|
||||
%Docstring
|
||||
Inserts a connection into the registry. The connection is owned by the registry class until it is unregistered again
|
||||
%End
|
||||
void unregisterConnection( QgsGPSConnection *c );
|
||||
%Docstring
|
||||
Unregisters connection. The registry does no longer own the connection
|
||||
%End
|
||||
|
||||
QList< QgsGPSConnection *> connectionList() const;
|
||||
%Docstring
|
||||
:rtype: list of QgsGPSConnection
|
||||
%End
|
||||
|
||||
private:
|
||||
|
||||
QgsGPSConnectionRegistry( const QgsGPSConnectionRegistry &rh );
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsgpsconnectionregistry.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,10 +1,34 @@
|
||||
/** Evaluates NMEA sentences coming from gpsd*/
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsgpsdconnection.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsGpsdConnection: QgsNMEAConnection
|
||||
{
|
||||
%Docstring
|
||||
Evaluates NMEA sentences coming from gpsd*
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgsgpsdconnection.h"
|
||||
%End
|
||||
public:
|
||||
QgsGpsdConnection( const QString &host, qint16 port, const QString &device );
|
||||
~QgsGpsdConnection();
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsgpsdconnection.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,22 +1,49 @@
|
||||
// Class to detect the GPS port
|
||||
class QgsGPSDetector: QObject
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsgpsdetector.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsGPSDetector : QObject
|
||||
{
|
||||
%Docstring
|
||||
Class to detect the GPS port
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgsgpsdetector.h"
|
||||
%End
|
||||
|
||||
public:
|
||||
QgsGPSDetector( const QString &portName );
|
||||
~QgsGPSDetector();
|
||||
|
||||
static QList< QPair<QString, QString> > availablePorts();
|
||||
%Docstring
|
||||
:rtype: list of QPair<str, QString>
|
||||
%End
|
||||
|
||||
public slots:
|
||||
void advance();
|
||||
void detected( const QgsGPSInformation& );
|
||||
void detected( const QgsGPSInformation & );
|
||||
void connDestroyed( QObject * );
|
||||
|
||||
signals:
|
||||
void detected( QgsGPSConnection * );
|
||||
void detectionFailed();
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsgpsdetector.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,5 +1,20 @@
|
||||
/** Evaluates NMEA sentences coming from a GPS device*/
|
||||
class QgsNMEAConnection: QgsGPSConnection {
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsnmeaconnection.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsNMEAConnection: QgsGPSConnection
|
||||
{
|
||||
%Docstring
|
||||
Evaluates NMEA sentences coming from a GPS device
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgsnmeaconnection.h"
|
||||
%End
|
||||
@ -8,16 +23,28 @@ class QgsNMEAConnection: QgsGPSConnection {
|
||||
~QgsNMEAConnection();
|
||||
|
||||
protected slots:
|
||||
/** Parse available data source content*/
|
||||
void parseData();
|
||||
virtual void parseData();
|
||||
|
||||
%Docstring
|
||||
Parse available data source content
|
||||
%End
|
||||
|
||||
protected:
|
||||
/** Splits mStringBuffer into sentences and calls libnmea*/
|
||||
void processStringBuffer();
|
||||
//handle the different sentence type
|
||||
%Docstring
|
||||
Splits mStringBuffer into sentences and calls libnmea
|
||||
%End
|
||||
void processGGASentence( const char *data, int len );
|
||||
void processRMCSentence( const char *data, int len );
|
||||
void processGSVSentence( const char *data, int len );
|
||||
void processVTGSentence( const char *data, int len );
|
||||
void processGSASentence( const char *data, int len );
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsnmeaconnection.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,41 +1,70 @@
|
||||
%Feature MOBILITY_LOCATION
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsqtlocationconnection.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QTM_USE_NAMESPACE
|
||||
%Docstring
|
||||
*************************************************************************
|
||||
*
|
||||
This program is free software; you can redistribute it and/or modify *
|
||||
it under the terms of the GNU General Public License as published by *
|
||||
the Free Software Foundation; either version 2 of the License, or *
|
||||
(at your option) any later version. *
|
||||
*
|
||||
**************************************************************************
|
||||
%End
|
||||
|
||||
%If (MOBILITY_LOCATION)
|
||||
/**
|
||||
* \class QgsQtLocationConnection
|
||||
* \note may not be available in Python bindings on all platforms
|
||||
*/
|
||||
class QgsQtLocationConnection: QgsGPSConnection
|
||||
{
|
||||
%Docstring
|
||||
.. note::
|
||||
|
||||
may not be available in Python bindings on all platforms
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include <qgsqtlocationconnection.h>
|
||||
#include "qgsqtlocationconnection.h"
|
||||
%End
|
||||
public:
|
||||
QgsQtLocationConnection();
|
||||
~QgsQtLocationConnection();
|
||||
|
||||
protected slots:
|
||||
/** Needed to make QtLocation detected*/
|
||||
void broadcastConnectionAvailable();
|
||||
%Docstring
|
||||
Needed to make QtLocation detected
|
||||
%End
|
||||
|
||||
/** Parse available data source content*/
|
||||
void parseData();
|
||||
|
||||
/** Called when the position updated.
|
||||
* @note not available in python binding
|
||||
*/
|
||||
// void positionUpdated( const QGeoPositionInfo &info );
|
||||
|
||||
%If (!ANDROID)
|
||||
/** Called when the number of satellites in view is updated.
|
||||
* @note not available in python bindings on android
|
||||
*/
|
||||
void satellitesInViewUpdated( const QList<QGeoSatelliteInfo> &satellites );
|
||||
|
||||
/** Called when the number of satellites in use is updated.
|
||||
* @note not available in python bindings on android
|
||||
*/
|
||||
void satellitesInUseUpdated( const QList<QGeoSatelliteInfo> &satellites );
|
||||
%Docstring
|
||||
Parse available data source content
|
||||
%End
|
||||
|
||||
void positionUpdated( const QGeoPositionInfo &info );
|
||||
%Docstring
|
||||
Called when the position updated.
|
||||
.. note::
|
||||
|
||||
not available in Python binding
|
||||
%End
|
||||
|
||||
|
||||
|
||||
};
|
||||
%End
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/gps/qgsqtlocationconnection.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user