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 & )
63 QObject::tr(
"GPX files" ) + QStringLiteral(
" (*.gpx *.GPX)" ) ) );
67 QObject::tr(
"Waypoints from a Route" ),
68 QObject::tr(
"Waypoints from a Track" ),
69 QObject::tr(
"Route from Waypoints" ),
70 QObject::tr(
"Track from Waypoints" )
78QIcon QgsConvertGpxFeatureTypeAlgorithm::icon()
const
83QString QgsConvertGpxFeatureTypeAlgorithm::svgIconPath()
const
88QString QgsConvertGpxFeatureTypeAlgorithm::shortHelpString()
const
90 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)." );
93QgsConvertGpxFeatureTypeAlgorithm *QgsConvertGpxFeatureTypeAlgorithm::createInstance()
const
95 return new QgsConvertGpxFeatureTypeAlgorithm();
101 const QString inputPath = parameterAsString( parameters, QStringLiteral(
"INPUT" ), context );
102 const QString outputPath = parameterAsString( parameters, QStringLiteral(
"OUTPUT" ), context );
104 const ConversionType convertType =
static_cast< ConversionType
>( parameterAsEnum( parameters, QStringLiteral(
"CONVERSION" ), context ) );
107 if ( babelPath.isEmpty() )
108 babelPath = QStringLiteral(
"gpsbabel" );
110 QStringList processArgs;
112 createArgumentLists( inputPath, outputPath, convertType, processArgs, logArgs );
113 feedback->
pushCommandInfo( QObject::tr(
"Conversion command: " ) + babelPath +
' ' + logArgs.join(
' ' ) );
115 QgsBlockingProcess babelProcess( babelPath, processArgs );
116 babelProcess.setStdErrHandler( [ = ](
const QByteArray & ba )
120 babelProcess.setStdOutHandler( [ = ](
const QByteArray & ba )
125 const int res = babelProcess.run( feedback );
128 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) ) ;
130 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
136 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
138 else if ( babelProcess.processError() == QProcess::FailedToStart )
140 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 ) );
147 std::unique_ptr< QgsVectorLayer > layer;
150 switch ( convertType )
152 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromRoute:
153 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromTrack:
154 layer = std::make_unique< QgsVectorLayer >( outputPath +
"?type=waypoint", layerName, QStringLiteral(
"gpx" ) );
156 case QgsConvertGpxFeatureTypeAlgorithm::RouteFromWaypoints:
157 layer = std::make_unique< QgsVectorLayer >( outputPath +
"?type=route", layerName, QStringLiteral(
"gpx" ) );
159 case QgsConvertGpxFeatureTypeAlgorithm::TrackFromWaypoints:
160 layer = std::make_unique< QgsVectorLayer >( outputPath +
"?type=track", layerName, QStringLiteral(
"gpx" ) );
165 if ( !layer->isValid() )
167 feedback->
reportError( QObject::tr(
"Resulting file is not a valid GPX layer" ) );
171 const QString layerId = layer->id();
172 outputs.insert( QStringLiteral(
"OUTPUT_LAYER" ), layerId );
178 outputs.insert( QStringLiteral(
"OUTPUT" ), outputPath );
182void QgsConvertGpxFeatureTypeAlgorithm::createArgumentLists(
const QString &inputPath,
const QString &outputPath, ConversionType conversion, QStringList &processArgs, QStringList &logArgs )
184 logArgs.reserve( 10 );
185 processArgs.reserve( 10 );
186 for (
const QString &arg : { QStringLiteral(
"-i" ), QStringLiteral(
"gpx" ), QStringLiteral(
"-f" ) } )
193 logArgs << QStringLiteral(
"\"%1\"" ).arg( inputPath );
194 processArgs << inputPath;
196 QStringList convertStrings;
197 switch ( conversion )
199 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromRoute:
200 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,wpt=rte,del" );
202 case QgsConvertGpxFeatureTypeAlgorithm::WaypointsFromTrack:
203 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,wpt=trk,del" );
205 case QgsConvertGpxFeatureTypeAlgorithm::RouteFromWaypoints:
206 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,rte=wpt,del" );
208 case QgsConvertGpxFeatureTypeAlgorithm::TrackFromWaypoints:
209 convertStrings << QStringLiteral(
"-x" ) << QStringLiteral(
"transform,trk=wpt,del" );
212 logArgs << convertStrings;
213 processArgs << convertStrings;
215 for (
const QString &arg : { QStringLiteral(
"-o" ), QStringLiteral(
"gpx" ), QStringLiteral(
"-F" ) } )
221 logArgs << QStringLiteral(
"\"%1\"" ).arg( outputPath );
222 processArgs << outputPath;
231QString QgsConvertGpsDataAlgorithm::name()
const
233 return QStringLiteral(
"convertgpsdata" );
236QString QgsConvertGpsDataAlgorithm::displayName()
const
238 return QObject::tr(
"Convert GPS data" );
241QStringList QgsConvertGpsDataAlgorithm::tags()
const
243 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes,gpx,import,export" ).split(
',' );
246QString QgsConvertGpsDataAlgorithm::group()
const
248 return QObject::tr(
"GPS" );
251QString QgsConvertGpsDataAlgorithm::groupId()
const
253 return QStringLiteral(
"gps" );
256void QgsConvertGpsDataAlgorithm::initAlgorithm(
const QVariantMap & )
261 std::unique_ptr< QgsProcessingParameterString > formatParam = std::make_unique< QgsProcessingParameterString >( QStringLiteral(
"FORMAT" ), QObject::tr(
"Format" ) );
265 for (
const QString &format : formatNames )
266 formats <<
QgsApplication::gpsBabelFormatRegistry()->importFormat( format )->description();
268 std::sort( formats.begin(), formats.end(), [](
const QString & a,
const QString & b )
270 return a.compare( b, Qt::CaseInsensitive ) < 0;
273 formatParam->setMetadata( {{
274 QStringLiteral(
"widget_wrapper" ), QVariantMap(
275 {{QStringLiteral(
"value_hints" ), formats }}
279 addParameter( formatParam.release() );
283 QObject::tr(
"Waypoints" ),
284 QObject::tr(
"Routes" ),
285 QObject::tr(
"Tracks" )
293QIcon QgsConvertGpsDataAlgorithm::icon()
const
298QString QgsConvertGpsDataAlgorithm::svgIconPath()
const
303QString QgsConvertGpsDataAlgorithm::shortHelpString()
const
305 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." );
308QgsConvertGpsDataAlgorithm *QgsConvertGpsDataAlgorithm::createInstance()
const
310 return new QgsConvertGpsDataAlgorithm();
315 const QString inputPath = parameterAsString( parameters, QStringLiteral(
"INPUT" ), context );
316 const QString outputPath = parameterAsString( parameters, QStringLiteral(
"OUTPUT" ), context );
321 if ( babelPath.isEmpty() )
322 babelPath = QStringLiteral(
"gpsbabel" );
324 const QString formatName = parameterAsString( parameters, QStringLiteral(
"FORMAT" ), context );
336 switch ( featureType )
341 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting waypoints." )
342 .arg( formatName ) );
349 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting routes." )
350 .arg( formatName ) );
357 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting tracks." )
358 .arg( formatName ) );
366 const QStringList processCommand = format->
importCommand( babelPath, featureType, inputPath, outputPath );
367 feedback->
pushCommandInfo( QObject::tr(
"Conversion command: " ) + logCommand.join(
' ' ) );
369 QgsBlockingProcess babelProcess( processCommand.value( 0 ), processCommand.mid( 1 ) );
370 babelProcess.setStdErrHandler( [ = ](
const QByteArray & ba )
374 babelProcess.setStdOutHandler( [ = ](
const QByteArray & ba )
379 const int res = babelProcess.run( feedback );
382 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) ) ;
384 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
390 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
392 else if ( babelProcess.processError() == QProcess::FailedToStart )
394 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 ) );
401 std::unique_ptr< QgsVectorLayer > layer;
404 switch ( featureType )
407 layer = std::make_unique< QgsVectorLayer >( outputPath +
"?type=waypoint", layerName, QStringLiteral(
"gpx" ) );
410 layer = std::make_unique< QgsVectorLayer >( outputPath +
"?type=route", layerName, QStringLiteral(
"gpx" ) );
413 layer = std::make_unique< QgsVectorLayer >( outputPath +
"?type=track", layerName, QStringLiteral(
"gpx" ) );
418 if ( !layer->isValid() )
420 feedback->
reportError( QObject::tr(
"Resulting file is not a valid GPX layer" ) );
424 const QString layerId = layer->id();
425 outputs.insert( QStringLiteral(
"OUTPUT_LAYER" ), layerId );
431 outputs.insert( QStringLiteral(
"OUTPUT" ), outputPath );
439QString QgsDownloadGpsDataAlgorithm::name()
const
441 return QStringLiteral(
"downloadgpsdata" );
444QString QgsDownloadGpsDataAlgorithm::displayName()
const
446 return QObject::tr(
"Download GPS data from device" );
449QStringList QgsDownloadGpsDataAlgorithm::tags()
const
451 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes,gpx,import,export,export,device,serial" ).split(
',' );
454QString QgsDownloadGpsDataAlgorithm::group()
const
456 return QObject::tr(
"GPS" );
459QString QgsDownloadGpsDataAlgorithm::groupId()
const
461 return QStringLiteral(
"gps" );
464void QgsDownloadGpsDataAlgorithm::initAlgorithm(
const QVariantMap & )
466 std::unique_ptr< QgsProcessingParameterString > deviceParam = std::make_unique< QgsProcessingParameterString >( QStringLiteral(
"DEVICE" ), QObject::tr(
"Device" ) );
469 std::sort( deviceNames.begin(), deviceNames.end(), [](
const QString & a,
const QString & b )
471 return a.compare( b, Qt::CaseInsensitive ) < 0;
474 deviceParam->setMetadata( {{
475 QStringLiteral(
"widget_wrapper" ), QVariantMap(
476 {{QStringLiteral(
"value_hints" ), deviceNames }}
480 addParameter( deviceParam.release() );
483 const QList< QPair<QString, QString> > devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
484 std::unique_ptr< QgsProcessingParameterString > portParam = std::make_unique< QgsProcessingParameterString >( QStringLiteral(
"PORT" ), QObject::tr(
"Port" ) );
487 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++ it )
489 std::sort( ports.begin(), ports.end(), [](
const QString & a,
const QString & b )
491 return a.compare( b, Qt::CaseInsensitive ) < 0;
494 portParam->setMetadata( {{
495 QStringLiteral(
"widget_wrapper" ), QVariantMap(
496 {{QStringLiteral(
"value_hints" ), ports }}
500 addParameter( portParam.release() );
504 QObject::tr(
"Waypoints" ),
505 QObject::tr(
"Routes" ),
506 QObject::tr(
"Tracks" )
514QIcon QgsDownloadGpsDataAlgorithm::icon()
const
519QString QgsDownloadGpsDataAlgorithm::svgIconPath()
const
524QString QgsDownloadGpsDataAlgorithm::shortHelpString()
const
526 return QObject::tr(
"This algorithm uses the GPSBabel tool to download data from a GPS device into the GPX standard format." );
529QgsDownloadGpsDataAlgorithm *QgsDownloadGpsDataAlgorithm::createInstance()
const
531 return new QgsDownloadGpsDataAlgorithm();
536 const QString outputPath = parameterAsString( parameters, QStringLiteral(
"OUTPUT" ), context );
540 if ( babelPath.isEmpty() )
541 babelPath = QStringLiteral(
"gpsbabel" );
543 const QString deviceName = parameterAsString( parameters, QStringLiteral(
"DEVICE" ), context );
552 const QString portName = parameterAsString( parameters, QStringLiteral(
"PORT" ), context );
554 const QList< QPair<QString, QString> > devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
555 QStringList validPorts;
556 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++it )
558 if ( it->first.compare( portName, Qt::CaseInsensitive ) == 0 || it->second.compare( portName, Qt::CaseInsensitive ) == 0 )
560 inputPort = it->first;
562 validPorts << it->first;
564 if ( inputPort.isEmpty() )
568 validPorts.join( QLatin1String(
", " ) ) ) );
571 switch ( featureType )
576 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting waypoints." )
577 .arg( deviceName ) );
584 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting routes." )
585 .arg( deviceName ) );
592 throw QgsProcessingException( QObject::tr(
"The GPSBabel format “%1” does not support converting tracks." )
593 .arg( deviceName ) );
601 const QStringList processCommand = format->
importCommand( babelPath, featureType, inputPort, outputPath );
602 feedback->
pushCommandInfo( QObject::tr(
"Download command: " ) + logCommand.join(
' ' ) );
604 QgsBlockingProcess babelProcess( processCommand.value( 0 ), processCommand.mid( 1 ) );
605 babelProcess.setStdErrHandler( [ = ](
const QByteArray & ba )
609 babelProcess.setStdOutHandler( [ = ](
const QByteArray & ba )
614 const int res = babelProcess.run( feedback );
617 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) ) ;
619 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
625 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
627 else if ( babelProcess.processError() == QProcess::FailedToStart )
629 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 ) );
636 std::unique_ptr< QgsVectorLayer > layer;
639 switch ( featureType )
642 layer = std::make_unique< QgsVectorLayer >( outputPath +
"?type=waypoint", layerName, QStringLiteral(
"gpx" ) );
645 layer = std::make_unique< QgsVectorLayer >( outputPath +
"?type=route", layerName, QStringLiteral(
"gpx" ) );
648 layer = std::make_unique< QgsVectorLayer >( outputPath +
"?type=track", layerName, QStringLiteral(
"gpx" ) );
653 if ( !layer->isValid() )
655 feedback->
reportError( QObject::tr(
"Resulting file is not a valid GPX layer" ) );
659 const QString layerId = layer->id();
660 outputs.insert( QStringLiteral(
"OUTPUT_LAYER" ), layerId );
666 outputs.insert( QStringLiteral(
"OUTPUT" ), outputPath );
675QString QgsUploadGpsDataAlgorithm::name()
const
677 return QStringLiteral(
"uploadgpsdata" );
680QString QgsUploadGpsDataAlgorithm::displayName()
const
682 return QObject::tr(
"Upload GPS data to device" );
685QStringList QgsUploadGpsDataAlgorithm::tags()
const
687 return QObject::tr(
"gps,tools,babel,tracks,waypoints,routes,gpx,import,export,export,device,serial" ).split(
',' );
690QString QgsUploadGpsDataAlgorithm::group()
const
692 return QObject::tr(
"GPS" );
695QString QgsUploadGpsDataAlgorithm::groupId()
const
697 return QStringLiteral(
"gps" );
700void QgsUploadGpsDataAlgorithm::initAlgorithm(
const QVariantMap & )
703 QObject::tr(
"GPX files" ) + QStringLiteral(
" (*.gpx *.GPX)" ) ) );
705 std::unique_ptr< QgsProcessingParameterString > deviceParam = std::make_unique< QgsProcessingParameterString >( QStringLiteral(
"DEVICE" ), QObject::tr(
"Device" ) );
708 std::sort( deviceNames.begin(), deviceNames.end(), [](
const QString & a,
const QString & b )
710 return a.compare( b, Qt::CaseInsensitive ) < 0;
713 deviceParam->setMetadata( {{
714 QStringLiteral(
"widget_wrapper" ), QVariantMap(
715 {{QStringLiteral(
"value_hints" ), deviceNames }}
719 addParameter( deviceParam.release() );
721 const QList< QPair<QString, QString> > devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
722 std::unique_ptr< QgsProcessingParameterString > portParam = std::make_unique< QgsProcessingParameterString >( QStringLiteral(
"PORT" ), QObject::tr(
"Port" ) );
725 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++ it )
727 std::sort( ports.begin(), ports.end(), [](
const QString & a,
const QString & b )
729 return a.compare( b, Qt::CaseInsensitive ) < 0;
732 portParam->setMetadata( {{
733 QStringLiteral(
"widget_wrapper" ), QVariantMap(
734 {{QStringLiteral(
"value_hints" ), ports }}
738 addParameter( portParam.release() );
742 QObject::tr(
"Waypoints" ),
743 QObject::tr(
"Routes" ),
744 QObject::tr(
"Tracks" )
749QIcon QgsUploadGpsDataAlgorithm::icon()
const
754QString QgsUploadGpsDataAlgorithm::svgIconPath()
const
759QString QgsUploadGpsDataAlgorithm::shortHelpString()
const
761 return QObject::tr(
"This algorithm uses the GPSBabel tool to upload data to a GPS device from the GPX standard format." );
764QgsUploadGpsDataAlgorithm *QgsUploadGpsDataAlgorithm::createInstance()
const
766 return new QgsUploadGpsDataAlgorithm();
771 const QString inputPath = parameterAsString( parameters, QStringLiteral(
"INPUT" ), context );
775 if ( babelPath.isEmpty() )
776 babelPath = QStringLiteral(
"gpsbabel" );
778 const QString deviceName = parameterAsString( parameters, QStringLiteral(
"DEVICE" ), context );
787 const QString portName = parameterAsString( parameters, QStringLiteral(
"PORT" ), context );
789 const QList< QPair<QString, QString> > devices =
QgsGpsDetector::availablePorts() << QPair<QString, QString>( QStringLiteral(
"usb:" ), QStringLiteral(
"usb:" ) );
790 QStringList validPorts;
791 for (
auto it = devices.constBegin(); it != devices.constEnd(); ++it )
793 if ( it->first.compare( portName, Qt::CaseInsensitive ) == 0 || it->second.compare( portName, Qt::CaseInsensitive ) == 0 )
795 outputPort = it->first;
797 validPorts << it->first;
799 if ( outputPort.isEmpty() )
803 validPorts.join( QLatin1String(
", " ) ) ) );
807 switch ( featureType )
813 .arg( deviceName ) );
821 .arg( deviceName ) );
829 .arg( deviceName ) );
837 const QStringList processCommand = format->
exportCommand( babelPath, featureType, inputPath, outputPort );
838 feedback->
pushCommandInfo( QObject::tr(
"Upload command: " ) + logCommand.join(
' ' ) );
840 QgsBlockingProcess babelProcess( processCommand.value( 0 ), processCommand.mid( 1 ) );
841 babelProcess.setStdErrHandler( [ = ](
const QByteArray & ba )
845 babelProcess.setStdOutHandler( [ = ](
const QByteArray & ba )
850 const int res = babelProcess.run( feedback );
853 feedback->
pushInfo( QObject::tr(
"Process was canceled and did not complete" ) ) ;
855 else if ( !feedback->
isCanceled() && babelProcess.exitStatus() == QProcess::CrashExit )
861 feedback->
pushInfo( QObject::tr(
"Process completed successfully" ) );
863 else if ( babelProcess.processError() == QProcess::FailedToStart )
865 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 ) );
@ QuoteFilePaths
File paths should be enclosed in quotations and escaped.
GpsFeatureType
Babel command flags.
@ 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.
@ File
Parameter is a single file.
@ 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.