20#if QT_CONFIG( process )
36QString QgsConvertGpxFeatureTypeAlgorithm::name()
const
38 return QStringLiteral(
"convertgpxfeaturetype" );
41QString QgsConvertGpxFeatureTypeAlgorithm::displayName()
const
43 return QObject::tr(
"Convert GPX feature type" );
46QStringList QgsConvertGpxFeatureTypeAlgorithm::tags()
const
48 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes" ).split(
',' );
51QString QgsConvertGpxFeatureTypeAlgorithm::group()
const
53 return QObject::tr(
"GPS" );
56QString QgsConvertGpxFeatureTypeAlgorithm::groupId()
const
58 return QStringLiteral(
"gps" );
61void QgsConvertGpxFeatureTypeAlgorithm::initAlgorithm(
const QVariantMap & )
65 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 ) );
72QIcon QgsConvertGpxFeatureTypeAlgorithm::icon()
const
77QString QgsConvertGpxFeatureTypeAlgorithm::svgIconPath()
const
82QString QgsConvertGpxFeatureTypeAlgorithm::shortHelpString()
const
84 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)." );
87QString QgsConvertGpxFeatureTypeAlgorithm::shortDescription()
const
89 return QObject::tr(
"Converts GPX features from one type to another." );
92QgsConvertGpxFeatureTypeAlgorithm *QgsConvertGpxFeatureTypeAlgorithm::createInstance()
const
94 return new QgsConvertGpxFeatureTypeAlgorithm();
100 const QString inputPath = parameterAsString( parameters, QStringLiteral(
"INPUT" ), context );
101 const QString outputPath = parameterAsString( parameters, QStringLiteral(
"OUTPUT" ), context );
103 const ConversionType convertType =
static_cast<ConversionType
>( parameterAsEnum( parameters, QStringLiteral(
"CONVERSION" ), context ) );
106 if ( babelPath.isEmpty() )
107 babelPath = QStringLiteral(
"gpsbabel" );
109 QStringList processArgs;
111 createArgumentLists( inputPath, outputPath, convertType, processArgs, logArgs );
112 feedback->
pushCommandInfo( QObject::tr(
"Conversion command: " ) + babelPath +
' ' + logArgs.join(
' ' ) );
114 QgsBlockingProcess babelProcess( babelPath, processArgs );
115 babelProcess.setStdErrHandler( [feedback](
const QByteArray &ba ) {
118 babelProcess.setStdOutHandler( [feedback](
const QByteArray &ba ) {
122 const int res = babelProcess.run( feedback );
125 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) );
127 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
133 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
135 else if ( babelProcess.processError() == QProcess::FailedToStart )
137 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 ) );
144 std::unique_ptr<QgsVectorLayer> layer;
147 switch ( convertType )
149 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromRoute:
150 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromTrack:
151 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=waypoint", layerName, QStringLiteral(
"gpx" ) );
153 case QgsConvertGpxFeatureTypeAlgorithm::RouteFromWaypoints:
154 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=route", layerName, QStringLiteral(
"gpx" ) );
156 case QgsConvertGpxFeatureTypeAlgorithm::TrackFromWaypoints:
157 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=track", layerName, QStringLiteral(
"gpx" ) );
162 if ( !layer->isValid() )
164 feedback->
reportError( QObject::tr(
"Resulting file is not a valid GPX layer" ) );
168 const QString layerId = layer->id();
169 outputs.insert( QStringLiteral(
"OUTPUT_LAYER" ), layerId );
175 outputs.insert( QStringLiteral(
"OUTPUT" ), outputPath );
179void QgsConvertGpxFeatureTypeAlgorithm::createArgumentLists(
const QString &inputPath,
const QString &outputPath, ConversionType conversion, QStringList &processArgs, QStringList &logArgs )
181 logArgs.reserve( 10 );
182 processArgs.reserve( 10 );
183 for (
const QString &arg : { QStringLiteral(
"-i" ), QStringLiteral(
"gpx" ), QStringLiteral(
"-f" ) } )
190 logArgs << QStringLiteral(
"\"%1\"" ).arg( inputPath );
191 processArgs << inputPath;
193 QStringList convertStrings;
194 switch ( conversion )
196 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromRoute:
197 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,wpt=rte,del" );
199 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromTrack:
200 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,wpt=trk,del" );
202 case QgsConvertGpxFeatureTypeAlgorithm::RouteFromWaypoints:
203 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,rte=wpt,del" );
205 case QgsConvertGpxFeatureTypeAlgorithm::TrackFromWaypoints:
206 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,trk=wpt,del" );
209 logArgs << convertStrings;
210 processArgs << convertStrings;
212 for (
const QString &arg : { QStringLiteral(
"-o" ), QStringLiteral(
"gpx" ), QStringLiteral(
"-F" ) } )
218 logArgs << QStringLiteral(
"\"%1\"" ).arg( outputPath );
219 processArgs << outputPath;
227QString QgsConvertGpsDataAlgorithm::name()
const
229 return QStringLiteral(
"convertgpsdata" );
232QString QgsConvertGpsDataAlgorithm::displayName()
const
234 return QObject::tr(
"Convert GPS data" );
237QStringList QgsConvertGpsDataAlgorithm::tags()
const
239 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes,gpx,import,export" ).split(
',' );
242QString QgsConvertGpsDataAlgorithm::group()
const
244 return QObject::tr(
"GPS" );
247QString QgsConvertGpsDataAlgorithm::groupId()
const
249 return QStringLiteral(
"gps" );
252void QgsConvertGpsDataAlgorithm::initAlgorithm(
const QVariantMap & )
256 auto formatParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"FORMAT" ), QObject::tr(
"Format" ) );
260 for (
const QString &format : formatNames )
263 std::sort( formats.begin(), formats.end(), [](
const QString &a,
const QString &b ) {
264 return a.compare( b, Qt::CaseInsensitive ) < 0;
267 formatParam->setMetadata( { { QStringLiteral(
"widget_wrapper" ), QVariantMap( { { QStringLiteral(
"value_hints" ), formats } } ) }
269 addParameter( formatParam.release() );
271 addParameter(
new QgsProcessingParameterEnum( QStringLiteral(
"FEATURE_TYPE" ), QObject::tr(
"Feature type" ), { QObject::tr(
"Waypoints" ), QObject::tr(
"Routes" ), QObject::tr(
"Tracks" ) },
false, 0 ) );
278QIcon QgsConvertGpsDataAlgorithm::icon()
const
283QString QgsConvertGpsDataAlgorithm::svgIconPath()
const
288QString QgsConvertGpsDataAlgorithm::shortHelpString()
const
290 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." );
293QString QgsConvertGpsDataAlgorithm::shortDescription()
const
295 return QObject::tr(
"Converts a GPS data file from a range of formats to the GPX standard format." );
298QgsConvertGpsDataAlgorithm *QgsConvertGpsDataAlgorithm::createInstance()
const
300 return new QgsConvertGpsDataAlgorithm();
305 const QString inputPath = parameterAsString( parameters, QStringLiteral(
"INPUT" ), context );
306 const QString outputPath = parameterAsString( parameters, QStringLiteral(
"OUTPUT" ), context );
311 if ( babelPath.isEmpty() )
312 babelPath = QStringLiteral(
"gpsbabel" );
314 const QString formatName = parameterAsString( parameters, QStringLiteral(
"FORMAT" ), context );
325 switch ( featureType )
330 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting waypoints." )
331 .arg( formatName ) );
338 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting routes." )
339 .arg( formatName ) );
346 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting tracks." )
347 .arg( formatName ) );
355 const QStringList processCommand = format->
importCommand( babelPath, featureType, inputPath, outputPath );
356 feedback->
pushCommandInfo( QObject::tr(
"Conversion command: " ) + logCommand.join(
' ' ) );
358 QgsBlockingProcess babelProcess( processCommand.value( 0 ), processCommand.mid( 1 ) );
359 babelProcess.setStdErrHandler( [feedback](
const QByteArray &ba ) {
362 babelProcess.setStdOutHandler( [feedback](
const QByteArray &ba ) {
366 const int res = babelProcess.run( feedback );
369 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) );
371 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
377 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
379 else if ( babelProcess.processError() == QProcess::FailedToStart )
381 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 ) );
388 std::unique_ptr<QgsVectorLayer> layer;
391 switch ( featureType )
394 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=waypoint", layerName, QStringLiteral(
"gpx" ) );
397 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=route", layerName, QStringLiteral(
"gpx" ) );
400 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=track", layerName, QStringLiteral(
"gpx" ) );
405 if ( !layer->isValid() )
407 feedback->
reportError( QObject::tr(
"Resulting file is not a valid GPX layer" ) );
411 const QString layerId = layer->id();
412 outputs.insert( QStringLiteral(
"OUTPUT_LAYER" ), layerId );
418 outputs.insert( QStringLiteral(
"OUTPUT" ), outputPath );
426QString QgsDownloadGpsDataAlgorithm::name()
const
428 return QStringLiteral(
"downloadgpsdata" );
431QString QgsDownloadGpsDataAlgorithm::displayName()
const
433 return QObject::tr(
"Download GPS data from device" );
436QStringList QgsDownloadGpsDataAlgorithm::tags()
const
438 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes,gpx,import,export,export,device,serial" ).split(
',' );
441QString QgsDownloadGpsDataAlgorithm::group()
const
443 return QObject::tr(
"GPS" );
446QString QgsDownloadGpsDataAlgorithm::groupId()
const
448 return QStringLiteral(
"gps" );
451void QgsDownloadGpsDataAlgorithm::initAlgorithm(
const QVariantMap & )
453 auto deviceParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"DEVICE" ), QObject::tr(
"Device" ) );
456 std::sort( deviceNames.begin(), deviceNames.end(), [](
const QString &a,
const QString &b ) {
457 return a.compare( b, Qt::CaseInsensitive ) < 0;
460 deviceParam->setMetadata( { { QStringLiteral(
"widget_wrapper" ), QVariantMap( { { QStringLiteral(
"value_hints" ), deviceNames } } ) }
462 addParameter( deviceParam.release() );
465 const QList<QPair<QString, QString>> devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
466 auto portParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"PORT" ), QObject::tr(
"Port" ) );
469 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++it )
471 std::sort( ports.begin(), ports.end(), [](
const QString &a,
const QString &b ) {
472 return a.compare( b, Qt::CaseInsensitive ) < 0;
475 portParam->setMetadata( { { QStringLiteral(
"widget_wrapper" ), QVariantMap( { { QStringLiteral(
"value_hints" ), ports } } ) }
477 addParameter( portParam.release() );
479 addParameter(
new QgsProcessingParameterEnum( QStringLiteral(
"FEATURE_TYPE" ), QObject::tr(
"Feature type" ), { QObject::tr(
"Waypoints" ), QObject::tr(
"Routes" ), QObject::tr(
"Tracks" ) },
false, 0 ) );
486QIcon QgsDownloadGpsDataAlgorithm::icon()
const
491QString QgsDownloadGpsDataAlgorithm::svgIconPath()
const
496QString QgsDownloadGpsDataAlgorithm::shortHelpString()
const
498 return QObject::tr(
"This algorithm uses the GPSBabel tool to download data from a GPS device into the GPX standard format." );
501QString QgsDownloadGpsDataAlgorithm::shortDescription()
const
503 return QObject::tr(
"Downloads data from a GPS device into the GPX standard format." );
506QgsDownloadGpsDataAlgorithm *QgsDownloadGpsDataAlgorithm::createInstance()
const
508 return new QgsDownloadGpsDataAlgorithm();
513 const QString outputPath = parameterAsString( parameters, QStringLiteral(
"OUTPUT" ), context );
517 if ( babelPath.isEmpty() )
518 babelPath = QStringLiteral(
"gpsbabel" );
520 const QString deviceName = parameterAsString( parameters, QStringLiteral(
"DEVICE" ), context );
528 const QString portName = parameterAsString( parameters, QStringLiteral(
"PORT" ), context );
530 const QList<QPair<QString, QString>> devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
531 QStringList validPorts;
532 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++it )
534 if ( it->first.compare( portName, Qt::CaseInsensitive ) == 0 || it->second.compare( portName, Qt::CaseInsensitive ) == 0 )
536 inputPort = it->first;
538 validPorts << it->first;
540 if ( inputPort.isEmpty() )
543 .arg( portName, validPorts.join( QLatin1String(
", " ) ) ) );
546 switch ( featureType )
551 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting waypoints." )
552 .arg( deviceName ) );
559 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting routes." )
560 .arg( deviceName ) );
567 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting tracks." )
568 .arg( deviceName ) );
576 const QStringList processCommand = format->
importCommand( babelPath, featureType, inputPort, outputPath );
577 feedback->
pushCommandInfo( QObject::tr(
"Download command: " ) + logCommand.join(
' ' ) );
579 QgsBlockingProcess babelProcess( processCommand.value( 0 ), processCommand.mid( 1 ) );
580 babelProcess.setStdErrHandler( [feedback](
const QByteArray &ba ) {
583 babelProcess.setStdOutHandler( [feedback](
const QByteArray &ba ) {
587 const int res = babelProcess.run( feedback );
590 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) );
592 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
598 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
600 else if ( babelProcess.processError() == QProcess::FailedToStart )
602 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 ) );
609 std::unique_ptr<QgsVectorLayer> layer;
612 switch ( featureType )
615 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=waypoint", layerName, QStringLiteral(
"gpx" ) );
618 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=route", layerName, QStringLiteral(
"gpx" ) );
621 layer = std::make_unique<QgsVectorLayer>( outputPath +
"?type=track", layerName, QStringLiteral(
"gpx" ) );
626 if ( !layer->isValid() )
628 feedback->
reportError( QObject::tr(
"Resulting file is not a valid GPX layer" ) );
632 const QString layerId = layer->id();
633 outputs.insert( QStringLiteral(
"OUTPUT_LAYER" ), layerId );
639 outputs.insert( QStringLiteral(
"OUTPUT" ), outputPath );
648QString QgsUploadGpsDataAlgorithm::name()
const
650 return QStringLiteral(
"uploadgpsdata" );
653QString QgsUploadGpsDataAlgorithm::displayName()
const
655 return QObject::tr(
"Upload GPS data to device" );
658QStringList QgsUploadGpsDataAlgorithm::tags()
const
660 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes,gpx,import,export,export,device,serial" ).split(
',' );
663QString QgsUploadGpsDataAlgorithm::group()
const
665 return QObject::tr(
"GPS" );
668QString QgsUploadGpsDataAlgorithm::groupId()
const
670 return QStringLiteral(
"gps" );
673void QgsUploadGpsDataAlgorithm::initAlgorithm(
const QVariantMap & )
677 auto deviceParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"DEVICE" ), QObject::tr(
"Device" ) );
680 std::sort( deviceNames.begin(), deviceNames.end(), [](
const QString &a,
const QString &b ) {
681 return a.compare( b, Qt::CaseInsensitive ) < 0;
684 deviceParam->setMetadata( { { QStringLiteral(
"widget_wrapper" ), QVariantMap( { { QStringLiteral(
"value_hints" ), deviceNames } } ) }
686 addParameter( deviceParam.release() );
688 const QList<QPair<QString, QString>> devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
689 auto portParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"PORT" ), QObject::tr(
"Port" ) );
692 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++it )
694 std::sort( ports.begin(), ports.end(), [](
const QString &a,
const QString &b ) {
695 return a.compare( b, Qt::CaseInsensitive ) < 0;
698 portParam->setMetadata( { { QStringLiteral(
"widget_wrapper" ), QVariantMap( { { QStringLiteral(
"value_hints" ), ports } } ) }
700 addParameter( portParam.release() );
702 addParameter(
new QgsProcessingParameterEnum( QStringLiteral(
"FEATURE_TYPE" ), QObject::tr(
"Feature type" ), { QObject::tr(
"Waypoints" ), QObject::tr(
"Routes" ), QObject::tr(
"Tracks" ) },
false, 0 ) );
705QIcon QgsUploadGpsDataAlgorithm::icon()
const
710QString QgsUploadGpsDataAlgorithm::svgIconPath()
const
715QString QgsUploadGpsDataAlgorithm::shortHelpString()
const
717 return QObject::tr(
"This algorithm uses the GPSBabel tool to upload data to a GPS device from the GPX standard format." );
720QString QgsUploadGpsDataAlgorithm::shortDescription()
const
722 return QObject::tr(
"Uploads data to a GPS device from the GPX standard format." );
725QgsUploadGpsDataAlgorithm *QgsUploadGpsDataAlgorithm::createInstance()
const
727 return new QgsUploadGpsDataAlgorithm();
732 const QString inputPath = parameterAsString( parameters, QStringLiteral(
"INPUT" ), context );
736 if ( babelPath.isEmpty() )
737 babelPath = QStringLiteral(
"gpsbabel" );
739 const QString deviceName = parameterAsString( parameters, QStringLiteral(
"DEVICE" ), context );
747 const QString portName = parameterAsString( parameters, QStringLiteral(
"PORT" ), context );
749 const QList<QPair<QString, QString>> devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
750 QStringList validPorts;
751 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++it )
753 if ( it->first.compare( portName, Qt::CaseInsensitive ) == 0 || it->second.compare( portName, Qt::CaseInsensitive ) == 0 )
755 outputPort = it->first;
757 validPorts << it->first;
759 if ( outputPort.isEmpty() )
762 .arg( portName, validPorts.join( QLatin1String(
", " ) ) ) );
766 switch ( featureType )
772 .arg( deviceName ) );
780 .arg( deviceName ) );
788 .arg( deviceName ) );
796 const QStringList processCommand = format->
exportCommand( babelPath, featureType, inputPath, outputPort );
797 feedback->
pushCommandInfo( QObject::tr(
"Upload command: " ) + logCommand.join(
' ' ) );
799 QgsBlockingProcess babelProcess( processCommand.value( 0 ), processCommand.mid( 1 ) );
800 babelProcess.setStdErrHandler( [feedback](
const QByteArray &ba ) {
803 babelProcess.setStdOutHandler( [feedback](
const QByteArray &ba ) {
807 const int res = babelProcess.run( feedback );
810 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) );
812 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
818 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
820 else if ( babelProcess.processError() == QProcess::FailedToStart )
822 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.
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.
static const QgsSettingsEntryString * settingsGpsBabelPath
Settings entry path to GPSBabel executable.