diff --git a/python/core/auto_generated/gps/qgsbabelformat.sip.in b/python/core/auto_generated/gps/qgsbabelformat.sip.in new file mode 100644 index 00000000000..d9c09c0cb21 --- /dev/null +++ b/python/core/auto_generated/gps/qgsbabelformat.sip.in @@ -0,0 +1,118 @@ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/core/gps/qgsbabelformat.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + +class QgsAbstractBabelFormat +{ +%Docstring(signature="appended") +Abstract base class for babel GPS formats. + +.. versionadded:: 3.22 +%End + +%TypeHeaderCode +#include "qgsbabelformat.h" +%End + public: + + virtual ~QgsAbstractBabelFormat(); + + QString name() const; +%Docstring +Returns the format's name. +%End + + Qgis::BabelFormatCapabilities capabilities() const; +%Docstring +Returns the format's capabilities. +%End + + virtual QStringList importCommand( const QString &babel, + Qgis::GpsFeatureType featureType, + const QString &input, + const QString &output ) const; +%Docstring +Generates a command for importing data into a GPS format using babel. + +:param babel: babel path to the babel executable +:param featureType: type of GPS feature to import +:param input: input data path +:param output: output path + +Returns an empty list if the format does not support imports (see :py:func:`~QgsAbstractBabelFormat.capabilities`). +%End + + virtual QStringList exportCommand( const QString &babel, + Qgis::GpsFeatureType featureType, + const QString &input, + const QString &output ) const; +%Docstring +Generates a command for exporting GPS data into a different format using babel. + +:param babel: path to the babel executable +:param featureType: type of GPS feature to export +:param input: input data path +:param output: output path + +Returns an empty list if the format does not support exports (see :py:func:`~QgsAbstractBabelFormat.capabilities`). +%End + + protected: + + explicit QgsAbstractBabelFormat( const QString &name = QString() ); +%Docstring +Constructor for QgsAbstractBabelFormat, with the specified ``name``. +%End + + static QString featureTypeToArgument( Qgis::GpsFeatureType type ); +%Docstring +Converts a GPS feature type to the equivalent babel argument. +%End + + +}; + + +class QgsBabelSimpleImportFormat : QgsAbstractBabelFormat +{ +%Docstring(signature="appended") +A babel format capable of converting input files to GPX files. + +.. versionadded:: 3.22 +%End + +%TypeHeaderCode +#include "qgsbabelformat.h" +%End + public: + + QgsBabelSimpleImportFormat( const QString &format, Qgis::BabelFormatCapabilities capabilities ); +%Docstring +Constructor for QgsBabelSimpleImportFormat. + +The ``format`` argument specifies a babel identifier for the input format. + +The ``capabilities`` argument must reflect whether the format is capable of handling +waypoints, routes and/or tracks. +%End + + virtual QStringList importCommand( const QString &babel, + Qgis::GpsFeatureType featureType, + const QString &input, + const QString &output ) const; +}; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/core/gps/qgsbabelformat.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/core/auto_generated/gps/qgsbabelgpsdevice.sip.in b/python/core/auto_generated/gps/qgsbabelgpsdevice.sip.in new file mode 100644 index 00000000000..fd63365c590 --- /dev/null +++ b/python/core/auto_generated/gps/qgsbabelgpsdevice.sip.in @@ -0,0 +1,61 @@ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/core/gps/qgsbabelgpsdevice.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + +class QgsBabelGpsDeviceFormat : QgsAbstractBabelFormat +{ +%Docstring(signature="appended") +A babel format capable of interacting directly with a GPS device. + +.. versionadded:: 3.22 +%End + +%TypeHeaderCode +#include "qgsbabelgpsdevice.h" +%End + public: + + QgsBabelGpsDeviceFormat(); +%Docstring +Default constructor +%End + + QgsBabelGpsDeviceFormat( const QString &waypointDownloadCommand, + const QString &waypointUploadCommand, + const QString &routeDownloadCommand, + const QString &routeUploadCommand, + const QString &trackDownloadCommand, + const QString &trackUploadCommand ); +%Docstring +Constructor for QgsBabelGpsDeviceFormat. + +:param waypointDownloadCommand: command for downloading waypoints from device +:param waypointUploadCommand: command for uploading waypoints to device +:param routeDownloadCommand: command for downloading routes from device +:param routeUploadCommand: command for uploading routes to device +:param trackDownloadCommand: command for downloading tracks from device +:param trackUploadCommand: command for uploading tracks to device +%End + + virtual QStringList importCommand( const QString &babel, Qgis::GpsFeatureType type, const QString &in, const QString &out ) const; + + virtual QStringList exportCommand( const QString &babel, Qgis::GpsFeatureType type, const QString &in, const QString &out ) const; + + +}; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/core/gps/qgsbabelgpsdevice.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/core/core_auto.sip b/python/core/core_auto.sip index 6f226f4b043..68b9adc2ea7 100644 --- a/python/core/core_auto.sip +++ b/python/core/core_auto.sip @@ -317,6 +317,8 @@ %Include auto_generated/geometry/qgswkbptr.sip %Include auto_generated/geometry/qgswkbtypes.sip %Include auto_generated/geometry/qgsray3d.sip +%Include auto_generated/gps/qgsbabelformat.sip +%Include auto_generated/gps/qgsbabelgpsdevice.sip %Include auto_generated/gps/qgsgpsconnection.sip %Include auto_generated/gps/qgsgpsdconnection.sip %Include auto_generated/gps/qgsgpsdetector.sip diff --git a/src/core/gps/qgsbabelformat.h b/src/core/gps/qgsbabelformat.h index 35011f9118f..0901d20afa0 100644 --- a/src/core/gps/qgsbabelformat.h +++ b/src/core/gps/qgsbabelformat.h @@ -21,8 +21,6 @@ #include "qgis.h" #include -#define SIP_NO_FILE - class QString; /** @@ -30,8 +28,6 @@ class QString; * \class QgsAbstractBabelFormat * \brief Abstract base class for babel GPS formats. * - * \note Not available in Python bindings - * * \since QGIS 3.22 */ class CORE_EXPORT QgsAbstractBabelFormat @@ -104,8 +100,6 @@ class CORE_EXPORT QgsAbstractBabelFormat * \class QgsBabelSimpleImportFormat * \brief A babel format capable of converting input files to GPX files. * - * \note Not available in Python bindings - * * \since QGIS 3.22 */ class CORE_EXPORT QgsBabelSimpleImportFormat : public QgsAbstractBabelFormat diff --git a/src/core/gps/qgsbabelgpsdevice.h b/src/core/gps/qgsbabelgpsdevice.h index 5a01a5c0c42..a566e49ca5b 100644 --- a/src/core/gps/qgsbabelgpsdevice.h +++ b/src/core/gps/qgsbabelgpsdevice.h @@ -25,15 +25,11 @@ #include "qgsbabelformat.h" -#define SIP_NO_FILE - /** * \ingroup core * \class QgsBabelGpsDeviceFormat * \brief A babel format capable of interacting directly with a GPS device. * - * \note Not available in Python bindings - * * \since QGIS 3.22 */ class CORE_EXPORT QgsBabelGpsDeviceFormat : public QgsAbstractBabelFormat