Skip to content

Commit

Permalink
Split out qgsgpsconnection files into modular components
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 17, 2022
1 parent 60e2c98 commit 3e818b9
Show file tree
Hide file tree
Showing 11 changed files with 727 additions and 588 deletions.
145 changes: 0 additions & 145 deletions python/core/auto_generated/gps/qgsgpsconnection.sip.in
Expand Up @@ -15,150 +15,6 @@
#include "qgsgpsconnection.h"
%End

class QgsSatelliteInfo
{
%Docstring(signature="appended")
Encapsulates information relating to a GPS satellite.
%End

%TypeHeaderCode
#include "qgsgpsconnection.h"
%End
public:

int id;

bool inUse;


double elevation;


double azimuth;

int signal;

QChar satType;

Qgis::GnssConstellation constellation() const;
%Docstring
Returns the GNSS constellation associated with the information.

.. versionadded:: 3.30
%End

bool operator==( const QgsSatelliteInfo &other ) const;

bool operator!=( const QgsSatelliteInfo &other ) const;

};

class QgsGpsInformation
{
%Docstring(signature="appended")
Encapsulates information relating to a GPS position fix.
%End

%TypeHeaderCode
#include "qgsgpsconnection.h"
%End
public:

double latitude;

double longitude;

double elevation;

double elevation_diff;

double speed;


double direction;

QList<QgsSatelliteInfo> satellitesInView;

double pdop;

double hdop;

double vdop;

//! Horizontal accuracy in meters
double hacc;
//! Vertical accuracy in meters
double vacc;

double hvacc;

QDateTime utcDateTime;

QChar fixMode;

int fixType;

QMap< Qgis::GnssConstellation, Qgis::GpsFixStatus > constellationFixStatus() const;
%Docstring
Returns a map of GNSS constellation to fix status.

.. versionadded:: 3.30
%End

Qgis::GpsFixStatus bestFixStatus( Qgis::GnssConstellation &constellation /Out/ ) const;
%Docstring
Returns the best fix status and corresponding constellation.


:return: - best current fix status
- constellation: will be set to the constellation with best fix status

.. versionadded:: 3.30
%End

int quality;

Qgis::GpsQualityIndicator qualityIndicator;

int satellitesUsed;

QChar status;

QList<int> satPrn;

bool satInfoComplete;

bool isValid() const;
%Docstring
Returns whether the connection information is valid

.. versionadded:: 3.10
%End

Qgis::GpsFixStatus fixStatus() const /Deprecated/;
%Docstring
Returns the fix status

.. deprecated::
, use :py:func:`~QgsGpsInformation.constellationFixStatus` or :py:func:`~QgsGpsInformation.bestFixStatus` instead.
%End

QString qualityDescription() const;
%Docstring
Returns a descriptive string for the signal quality.

.. versionadded:: 3.16
%End

QVariant componentValue( Qgis::GpsInformationComponent component ) const;
%Docstring
Returns the value of the corresponding GPS information ``component``.

.. versionadded:: 3.30
%End

};

class QgsGpsConnection : QObject
{
%Docstring(signature="appended")
Expand Down Expand Up @@ -278,7 +134,6 @@ Parse available data source content

};


/************************************************************************
* This file has been generated automatically from *
* *
Expand Down
127 changes: 127 additions & 0 deletions python/core/auto_generated/gps/qgsgpsinformation.sip.in
@@ -0,0 +1,127 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/gps/qgsgpsinformation.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/






class QgsGpsInformation
{
%Docstring(signature="appended")
Encapsulates information relating to a GPS position fix.
%End

%TypeHeaderCode
#include "qgsgpsinformation.h"
%End
public:

double latitude;

double longitude;

double elevation;

double elevation_diff;

double speed;


double direction;

QList<QgsSatelliteInfo> satellitesInView;

double pdop;

double hdop;

double vdop;

//! Horizontal accuracy in meters
double hacc;
//! Vertical accuracy in meters
double vacc;

double hvacc;

QDateTime utcDateTime;

QChar fixMode;

int fixType;

QMap< Qgis::GnssConstellation, Qgis::GpsFixStatus > constellationFixStatus() const;
%Docstring
Returns a map of GNSS constellation to fix status.

.. versionadded:: 3.30
%End

Qgis::GpsFixStatus bestFixStatus( Qgis::GnssConstellation &constellation /Out/ ) const;
%Docstring
Returns the best fix status and corresponding constellation.


:return: - best current fix status
- constellation: will be set to the constellation with best fix status

.. versionadded:: 3.30
%End

int quality;

Qgis::GpsQualityIndicator qualityIndicator;

int satellitesUsed;

QChar status;

QList<int> satPrn;

bool satInfoComplete;

bool isValid() const;
%Docstring
Returns whether the connection information is valid

.. versionadded:: 3.10
%End

Qgis::GpsFixStatus fixStatus() const /Deprecated/;
%Docstring
Returns the fix status

.. deprecated::
, use :py:func:`~QgsGpsInformation.constellationFixStatus` or :py:func:`~QgsGpsInformation.bestFixStatus` instead.
%End

QString qualityDescription() const;
%Docstring
Returns a descriptive string for the signal quality.

.. versionadded:: 3.16
%End

QVariant componentValue( Qgis::GpsInformationComponent component ) const;
%Docstring
Returns the value of the corresponding GPS information ``component``.

.. versionadded:: 3.30
%End

};


/************************************************************************
* This file has been generated automatically from *
* *
* src/core/gps/qgsgpsinformation.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
57 changes: 57 additions & 0 deletions python/core/auto_generated/gps/qgssatelliteinformation.sip.in
@@ -0,0 +1,57 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/gps/qgssatelliteinformation.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





class QgsSatelliteInfo
{
%Docstring(signature="appended")
Encapsulates information relating to a GPS satellite.
%End

%TypeHeaderCode
#include "qgssatelliteinformation.h"
%End
public:

int id;

bool inUse;


double elevation;


double azimuth;

int signal;

QChar satType;

Qgis::GnssConstellation constellation() const;
%Docstring
Returns the GNSS constellation associated with the information.

.. versionadded:: 3.30
%End

bool operator==( const QgsSatelliteInfo &other ) const;

bool operator!=( const QgsSatelliteInfo &other ) const;

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/gps/qgssatelliteinformation.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2 changes: 2 additions & 0 deletions python/core/core_auto.sip
Expand Up @@ -357,8 +357,10 @@
%Include auto_generated/gps/qgsgpsconnection.sip
%Include auto_generated/gps/qgsgpsdconnection.sip
%Include auto_generated/gps/qgsgpsdetector.sip
%Include auto_generated/gps/qgsgpsinformation.sip
%Include auto_generated/gps/qgsgpslogger.sip
%Include auto_generated/gps/qgsnmeaconnection.sip
%Include auto_generated/gps/qgssatelliteinformation.sip
%Include auto_generated/gps/qgsvectorlayergpslogger.sip
%Include auto_generated/labeling/qgscalloutposition.sip
%Include auto_generated/labeling/qgslabeling.sip
Expand Down
4 changes: 4 additions & 0 deletions src/core/CMakeLists.txt
Expand Up @@ -67,8 +67,10 @@ set(QGIS_CORE_SRCS
gps/qgsgpsconnectionregistry.cpp
gps/qgsgpsdconnection.cpp
gps/qgsgpsdetector.cpp
gps/qgsgpsinformation.cpp
gps/qgsgpslogger.cpp
gps/qgsnmeaconnection.cpp
gps/qgssatelliteinformation.cpp
gps/qgsvectorlayergpslogger.cpp

plot/qgsplot.cpp
Expand Down Expand Up @@ -1404,8 +1406,10 @@ set(QGIS_CORE_HDRS
gps/qgsgpsconnection.h
gps/qgsgpsdconnection.h
gps/qgsgpsdetector.h
gps/qgsgpsinformation.h
gps/qgsgpslogger.h
gps/qgsnmeaconnection.h
gps/qgssatelliteinformation.h
gps/qgsvectorlayergpslogger.h

labeling/qgscalloutposition.h
Expand Down

0 comments on commit 3e818b9

Please sign in to comment.