19#if QT_CONFIG( process )
35QString QgsConvertGpxFeatureTypeAlgorithm::name()
const
37 return QStringLiteral(
"convertgpxfeaturetype" );
40QString QgsConvertGpxFeatureTypeAlgorithm::displayName()
const
42 return QObject::tr(
"Convert GPX feature type" );
45QStringList QgsConvertGpxFeatureTypeAlgorithm::tags()
const
47 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes" ).split(
',' );
50QString QgsConvertGpxFeatureTypeAlgorithm::group()
const
52 return QObject::tr(
"GPS" );
55QString QgsConvertGpxFeatureTypeAlgorithm::groupId()
const
57 return QStringLiteral(
"gps" );
60void QgsConvertGpxFeatureTypeAlgorithm::initAlgorithm(
const QVariantMap & )
64 addParameter(
new QgsProcessingParameterEnum( QStringLiteral(
"CONVERSION" ), QObject::tr(
"Conversion" ), { QObject::tr(
"Waypoints from a Route" ), QObject::tr(
"Waypoints from a Track" ), QObject::tr(
"Route from Waypoints" ), QObject::tr(
"Track from Waypoints" ) },
false, 0 ) );
71QIcon QgsConvertGpxFeatureTypeAlgorithm::icon()
const
76QString QgsConvertGpxFeatureTypeAlgorithm::svgIconPath()
const
81QString QgsConvertGpxFeatureTypeAlgorithm::shortHelpString()
const
83 return QObject::tr(
"This algorithm uses the GPSBabel tool to convert GPX features from one type to another (e.g. converting all waypoint features to a route feature)." );
86QgsConvertGpxFeatureTypeAlgorithm *QgsConvertGpxFeatureTypeAlgorithm::createInstance()
const
88 return new QgsConvertGpxFeatureTypeAlgorithm();
94 const QString inputPath = parameterAsString( parameters, QStringLiteral(
"INPUT" ), context );
95 const QString outputPath = parameterAsString( parameters, QStringLiteral(
"OUTPUT" ), context );
97 const ConversionType convertType =
static_cast<ConversionType
>( parameterAsEnum( parameters, QStringLiteral(
"CONVERSION" ), context ) );
100 if ( babelPath.isEmpty() )
101 babelPath = QStringLiteral(
"gpsbabel" );
103 QStringList processArgs;
105 createArgumentLists( inputPath, outputPath, convertType, processArgs, logArgs );
106 feedback->
pushCommandInfo( QObject::tr(
"Conversion command: " ) + babelPath +
' ' + logArgs.join(
' ' ) );
108 QgsBlockingProcess babelProcess( babelPath, processArgs );
109 babelProcess.setStdErrHandler( [=](
const QByteArray &ba ) {
112 babelProcess.setStdOutHandler( [=](
const QByteArray &ba ) {
116 const int res = babelProcess.run( feedback );
119 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) );
121 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
127 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
129 else if ( babelProcess.processError() == QProcess::FailedToStart )
131 throw QgsProcessingException( QObject::tr(
"Process %1 failed to start. Either %1 is missing, or you may have insufficient permissions to run the program." ).arg( babelPath ) );
138 std::unique_ptr<QgsVectorLayer> layer;
141 switch ( convertType )
143 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromRoute:
144 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromTrack:
145 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=waypoint", layerName, QStringLiteral(
"gpx" ) );
147 case QgsConvertGpxFeatureTypeAlgorithm::RouteFromWaypoints:
148 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=route", layerName, QStringLiteral(
"gpx" ) );
150 case QgsConvertGpxFeatureTypeAlgorithm::TrackFromWaypoints:
151 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=track", layerName, QStringLiteral(
"gpx" ) );
156 if ( !layer->isValid() )
158 feedback->
reportError( QObject::tr(
"Resulting file is not a valid GPX layer" ) );
162 const QString layerId = layer->id();
163 outputs.insert( QStringLiteral(
"OUTPUT_LAYER" ), layerId );
169 outputs.insert( QStringLiteral(
"OUTPUT" ), outputPath );
173void QgsConvertGpxFeatureTypeAlgorithm::createArgumentLists(
const QString &inputPath,
const QString &outputPath, ConversionType conversion, QStringList &processArgs, QStringList &logArgs )
175 logArgs.reserve( 10 );
176 processArgs.reserve( 10 );
177 for (
const QString &arg : { QStringLiteral(
"-i" ), QStringLiteral(
"gpx" ), QStringLiteral(
"-f" ) } )
184 logArgs << QStringLiteral(
"\"%1\"" ).arg( inputPath );
185 processArgs << inputPath;
187 QStringList convertStrings;
188 switch ( conversion )
190 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromRoute:
191 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,wpt=rte,del" );
193 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromTrack:
194 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,wpt=trk,del" );
196 case QgsConvertGpxFeatureTypeAlgorithm::RouteFromWaypoints:
197 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,rte=wpt,del" );
199 case QgsConvertGpxFeatureTypeAlgorithm::TrackFromWaypoints:
200 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,trk=wpt,del" );
203 logArgs << convertStrings;
204 processArgs << convertStrings;
206 for (
const QString &arg : { QStringLiteral(
"-o" ), QStringLiteral(
"gpx" ), QStringLiteral(
"-F" ) } )
212 logArgs << QStringLiteral(
"\"%1\"" ).arg( outputPath );
213 processArgs << outputPath;
221QString QgsConvertGpsDataAlgorithm::name()
const
223 return QStringLiteral(
"convertgpsdata" );
226QString QgsConvertGpsDataAlgorithm::displayName()
const
228 return QObject::tr(
"Convert GPS data" );
231QStringList QgsConvertGpsDataAlgorithm::tags()
const
233 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes,gpx,import,export" ).split(
',' );
236QString QgsConvertGpsDataAlgorithm::group()
const
238 return QObject::tr(
"GPS" );
241QString QgsConvertGpsDataAlgorithm::groupId()
const
243 return QStringLiteral(
"gps" );
246void QgsConvertGpsDataAlgorithm::initAlgorithm(
const QVariantMap & )
250 std::unique_ptr<QgsProcessingParameterString> formatParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"FORMAT" ), QObject::tr(
"Format" ) );
254 for (
const QString &format : formatNames )
255 formats <<
QgsApplication::gpsBabelFormatRegistry()->importFormat( format )->description();
257 std::sort( formats.begin(), formats.end(), [](
const QString &a,
const QString &b ) {
258 return a.compare( b, Qt::CaseInsensitive ) < 0;
261 formatParam->setMetadata( { { QStringLiteral(
"widget_wrapper" ), QVariantMap( { { QStringLiteral(
"value_hints" ), formats } } ) }
263 addParameter( formatParam.release() );
265 addParameter(
new QgsProcessingParameterEnum( QStringLiteral(
"FEATURE_TYPE" ), QObject::tr(
"Feature type" ), { QObject::tr(
"Waypoints" ), QObject::tr(
"Routes" ), QObject::tr(
"Tracks" ) },
false, 0 ) );
272QIcon QgsConvertGpsDataAlgorithm::icon()
const
277QString QgsConvertGpsDataAlgorithm::svgIconPath()
const
282QString QgsConvertGpsDataAlgorithm::shortHelpString()
const
284 return QObject::tr(
"This algorithm uses the GPSBabel tool to convert a GPS data file from a range of formats to the GPX standard format." );
287QgsConvertGpsDataAlgorithm *QgsConvertGpsDataAlgorithm::createInstance()
const
289 return new QgsConvertGpsDataAlgorithm();
294 const QString inputPath = parameterAsString( parameters, QStringLiteral(
"INPUT" ), context );
295 const QString outputPath = parameterAsString( parameters, QStringLiteral(
"OUTPUT" ), context );
300 if ( babelPath.isEmpty() )
301 babelPath = QStringLiteral(
"gpsbabel" );
303 const QString formatName = parameterAsString( parameters, QStringLiteral(
"FORMAT" ), context );
314 switch ( featureType )
319 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting waypoints." )
320 .arg( formatName ) );
327 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting routes." )
328 .arg( formatName ) );
335 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting tracks." )
336 .arg( formatName ) );
344 const QStringList processCommand = format->
importCommand( babelPath, featureType, inputPath, outputPath );
345 feedback->
pushCommandInfo( QObject::tr(
"Conversion command: " ) + logCommand.join(
' ' ) );
347 QgsBlockingProcess babelProcess( processCommand.value( 0 ), processCommand.mid( 1 ) );
348 babelProcess.setStdErrHandler( [=](
const QByteArray &ba ) {
351 babelProcess.setStdOutHandler( [=](
const QByteArray &ba ) {
355 const int res = babelProcess.run( feedback );
358 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) );
360 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
366 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
368 else if ( babelProcess.processError() == QProcess::FailedToStart )
370 throw QgsProcessingException( QObject::tr(
"Process %1 failed to start. Either %1 is missing, or you may have insufficient permissions to run the program." ).arg( babelPath ) );
377 std::unique_ptr<QgsVectorLayer> layer;
380 switch ( featureType )
383 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=waypoint", layerName, QStringLiteral(
"gpx" ) );
386 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=route", layerName, QStringLiteral(
"gpx" ) );
389 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=track", layerName, QStringLiteral(
"gpx" ) );
394 if ( !layer->isValid() )
396 feedback->
reportError( QObject::tr(
"Resulting file is not a valid GPX layer" ) );
400 const QString layerId = layer->id();
401 outputs.insert( QStringLiteral(
"OUTPUT_LAYER" ), layerId );
407 outputs.insert( QStringLiteral(
"OUTPUT" ), outputPath );
415QString QgsDownloadGpsDataAlgorithm::name()
const
417 return QStringLiteral(
"downloadgpsdata" );
420QString QgsDownloadGpsDataAlgorithm::displayName()
const
422 return QObject::tr(
"Download GPS data from device" );
425QStringList QgsDownloadGpsDataAlgorithm::tags()
const
427 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes,gpx,import,export,export,device,serial" ).split(
',' );
430QString QgsDownloadGpsDataAlgorithm::group()
const
432 return QObject::tr(
"GPS" );
435QString QgsDownloadGpsDataAlgorithm::groupId()
const
437 return QStringLiteral(
"gps" );
440void QgsDownloadGpsDataAlgorithm::initAlgorithm(
const QVariantMap & )
442 std::unique_ptr<QgsProcessingParameterString> deviceParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"DEVICE" ), QObject::tr(
"Device" ) );
445 std::sort( deviceNames.begin(), deviceNames.end(), [](
const QString &a,
const QString &b ) {
446 return a.compare( b, Qt::CaseInsensitive ) < 0;
449 deviceParam->setMetadata( { { QStringLiteral(
"widget_wrapper" ), QVariantMap( { { QStringLiteral(
"value_hints" ), deviceNames } } ) }
451 addParameter( deviceParam.release() );
454 const QList<QPair<QString, QString>> devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
455 std::unique_ptr<QgsProcessingParameterString> portParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"PORT" ), QObject::tr(
"Port" ) );
458 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++it )
460 std::sort( ports.begin(), ports.end(), [](
const QString &a,
const QString &b ) {
461 return a.compare( b, Qt::CaseInsensitive ) < 0;
464 portParam->setMetadata( { { QStringLiteral(
"widget_wrapper" ), QVariantMap( { { QStringLiteral(
"value_hints" ), ports } } ) }
466 addParameter( portParam.release() );
468 addParameter(
new QgsProcessingParameterEnum( QStringLiteral(
"FEATURE_TYPE" ), QObject::tr(
"Feature type" ), { QObject::tr(
"Waypoints" ), QObject::tr(
"Routes" ), QObject::tr(
"Tracks" ) },
false, 0 ) );
475QIcon QgsDownloadGpsDataAlgorithm::icon()
const
480QString QgsDownloadGpsDataAlgorithm::svgIconPath()
const
485QString QgsDownloadGpsDataAlgorithm::shortHelpString()
const
487 return QObject::tr(
"This algorithm uses the GPSBabel tool to download data from a GPS device into the GPX standard format." );
490QgsDownloadGpsDataAlgorithm *QgsDownloadGpsDataAlgorithm::createInstance()
const
492 return new QgsDownloadGpsDataAlgorithm();
497 const QString outputPath = parameterAsString( parameters, QStringLiteral(
"OUTPUT" ), context );
501 if ( babelPath.isEmpty() )
502 babelPath = QStringLiteral(
"gpsbabel" );
504 const QString deviceName = parameterAsString( parameters, QStringLiteral(
"DEVICE" ), context );
512 const QString portName = parameterAsString( parameters, QStringLiteral(
"PORT" ), context );
514 const QList<QPair<QString, QString>> devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
515 QStringList validPorts;
516 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++it )
518 if ( it->first.compare( portName, Qt::CaseInsensitive ) == 0 || it->second.compare( portName, Qt::CaseInsensitive ) == 0 )
520 inputPort = it->first;
522 validPorts << it->first;
524 if ( inputPort.isEmpty() )
527 .arg( portName, validPorts.join( QLatin1String(
", " ) ) ) );
530 switch ( featureType )
535 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting waypoints." )
536 .arg( deviceName ) );
543 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting routes." )
544 .arg( deviceName ) );
551 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting tracks." )
552 .arg( deviceName ) );
560 const QStringList processCommand = format->
importCommand( babelPath, featureType, inputPort, outputPath );
561 feedback->
pushCommandInfo( QObject::tr(
"Download command: " ) + logCommand.join(
' ' ) );
563 QgsBlockingProcess babelProcess( processCommand.value( 0 ), processCommand.mid( 1 ) );
564 babelProcess.setStdErrHandler( [=](
const QByteArray &ba ) {
567 babelProcess.setStdOutHandler( [=](
const QByteArray &ba ) {
571 const int res = babelProcess.run( feedback );
574 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) );
576 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
582 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
584 else if ( babelProcess.processError() == QProcess::FailedToStart )
586 throw QgsProcessingException( QObject::tr(
"Process %1 failed to start. Either %1 is missing, or you may have insufficient permissions to run the program." ).arg( babelPath ) );
593 std::unique_ptr<QgsVectorLayer> layer;
596 switch ( featureType )
599 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=waypoint", layerName, QStringLiteral(
"gpx" ) );
602 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=route", layerName, QStringLiteral(
"gpx" ) );
605 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=track", layerName, QStringLiteral(
"gpx" ) );
610 if ( !layer->isValid() )
612 feedback->
reportError( QObject::tr(
"Resulting file is not a valid GPX layer" ) );
616 const QString layerId = layer->id();
617 outputs.insert( QStringLiteral(
"OUTPUT_LAYER" ), layerId );
623 outputs.insert( QStringLiteral(
"OUTPUT" ), outputPath );
632QString QgsUploadGpsDataAlgorithm::name()
const
634 return QStringLiteral(
"uploadgpsdata" );
637QString QgsUploadGpsDataAlgorithm::displayName()
const
639 return QObject::tr(
"Upload GPS data to device" );
642QStringList QgsUploadGpsDataAlgorithm::tags()
const
644 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes,gpx,import,export,export,device,serial" ).split(
',' );
647QString QgsUploadGpsDataAlgorithm::group()
const
649 return QObject::tr(
"GPS" );
652QString QgsUploadGpsDataAlgorithm::groupId()
const
654 return QStringLiteral(
"gps" );
657void QgsUploadGpsDataAlgorithm::initAlgorithm(
const QVariantMap & )
661 std::unique_ptr<QgsProcessingParameterString> deviceParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"DEVICE" ), QObject::tr(
"Device" ) );
664 std::sort( deviceNames.begin(), deviceNames.end(), [](
const QString &a,
const QString &b ) {
665 return a.compare( b, Qt::CaseInsensitive ) < 0;
668 deviceParam->setMetadata( { { QStringLiteral(
"widget_wrapper" ), QVariantMap( { { QStringLiteral(
"value_hints" ), deviceNames } } ) }
670 addParameter( deviceParam.release() );
672 const QList<QPair<QString, QString>> devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
673 std::unique_ptr<QgsProcessingParameterString> portParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"PORT" ), QObject::tr(
"Port" ) );
676 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++it )
678 std::sort( ports.begin(), ports.end(), [](
const QString &a,
const QString &b ) {
679 return a.compare( b, Qt::CaseInsensitive ) < 0;
682 portParam->setMetadata( { { QStringLiteral(
"widget_wrapper" ), QVariantMap( { { QStringLiteral(
"value_hints" ), ports } } ) }
684 addParameter( portParam.release() );
686 addParameter(
new QgsProcessingParameterEnum( QStringLiteral(
"FEATURE_TYPE" ), QObject::tr(
"Feature type" ), { QObject::tr(
"Waypoints" ), QObject::tr(
"Routes" ), QObject::tr(
"Tracks" ) },
false, 0 ) );
689QIcon QgsUploadGpsDataAlgorithm::icon()
const
694QString QgsUploadGpsDataAlgorithm::svgIconPath()
const
699QString QgsUploadGpsDataAlgorithm::shortHelpString()
const
701 return QObject::tr(
"This algorithm uses the GPSBabel tool to upload data to a GPS device from the GPX standard format." );
704QgsUploadGpsDataAlgorithm *QgsUploadGpsDataAlgorithm::createInstance()
const
706 return new QgsUploadGpsDataAlgorithm();
711 const QString inputPath = parameterAsString( parameters, QStringLiteral(
"INPUT" ), context );
715 if ( babelPath.isEmpty() )
716 babelPath = QStringLiteral(
"gpsbabel" );
718 const QString deviceName = parameterAsString( parameters, QStringLiteral(
"DEVICE" ), context );
726 const QString portName = parameterAsString( parameters, QStringLiteral(
"PORT" ), context );
728 const QList<QPair<QString, QString>> devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
729 QStringList validPorts;
730 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++it )
732 if ( it->first.compare( portName, Qt::CaseInsensitive ) == 0 || it->second.compare( portName, Qt::CaseInsensitive ) == 0 )
734 outputPort = it->first;
736 validPorts << it->first;
738 if ( outputPort.isEmpty() )
741 .arg( portName, validPorts.join( QLatin1String(
", " ) ) ) );
745 switch ( featureType )
751 .arg( deviceName ) );
759 .arg( deviceName ) );
767 .arg( deviceName ) );
775 const QStringList processCommand = format->
exportCommand( babelPath, featureType, inputPath, outputPort );
776 feedback->
pushCommandInfo( QObject::tr(
"Upload command: " ) + logCommand.join(
' ' ) );
778 QgsBlockingProcess babelProcess( processCommand.value( 0 ), processCommand.mid( 1 ) );
779 babelProcess.setStdErrHandler( [=](
const QByteArray &ba ) {
782 babelProcess.setStdOutHandler( [=](
const QByteArray &ba ) {
786 const int res = babelProcess.run( feedback );
789 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) );
791 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
797 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
799 else if ( babelProcess.processError() == QProcess::FailedToStart )
801 throw QgsProcessingException( QObject::tr(
"Process %1 failed to start. Either %1 is missing, or you may have insufficient permissions to run the program." ).arg( babelPath ) );
@ File
Parameter is a single file.
@ QuoteFilePaths
File paths should be enclosed in quotations and escaped.
GpsFeatureType
GPS feature types.
@ Tracks
Format supports tracks.
@ Waypoints
Format supports waypoints.
@ Routes
Format supports routes.
Extends QApplication to provide access to QGIS specific resources such as theme paths,...
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
static QgsBabelFormatRegistry * gpsBabelFormatRegistry()
Returns the application's GPSBabel format registry, used for managing GPSBabel formats.
static QString iconPath(const QString &iconFile)
Returns path to the desired icon file.
bool isCanceled() const
Tells whether the operation has been canceled already.
static QList< QPair< QString, QString > > availablePorts()
QgsMapLayer * addMapLayer(QgsMapLayer *layer, bool takeOwnership=true)
Add a layer to the store.
Details for layers to load into projects.
Contains information about the context in which a processing algorithm is executed.
void addLayerToLoadOnCompletion(const QString &layer, const QgsProcessingContext::LayerDetails &details)
Adds a layer to load (by ID or datasource) into the canvas upon completion of the algorithm or model.
QgsProject * project() const
Returns the project in which the algorithm is being executed.
QgsMapLayerStore * temporaryLayerStore()
Returns a reference to the layer store used for storing temporary layers during algorithm execution.
Custom exception class for processing related exceptions.
Base class for providing feedback from a processing algorithm.
virtual void pushCommandInfo(const QString &info)
Pushes an informational message containing a command from the algorithm.
virtual void pushInfo(const QString &info)
Pushes a general informational message from the algorithm.
virtual void pushDebugInfo(const QString &info)
Pushes an informational message containing debugging helpers from the algorithm.
virtual void reportError(const QString &error, bool fatalError=false)
Reports that the algorithm encountered an error while executing.
A vector layer output for processing algorithms.
An enum based parameter for processing algorithms, allowing for selection from predefined values.
A generic file based destination parameter, for specifying the destination path for a file (non-map l...
An input file or folder parameter for processing algorithms.
@ Vector
Vector layer type.
static QString suggestLayerNameFromFilePath(const QString &path)
Suggests a suitable layer name given only a file path.
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
static const QgsSettingsEntryString * settingsGpsBabelPath
Settings entry path to GPSBabel executable.