22#include <QRegularExpression>
189 qDeleteAll( mImporters );
190 qDeleteAll( mDevices );
195 return mImporters.keys();
200 return mImporters.value( name );
205 for (
auto it = mImporters.constBegin(); it != mImporters.constEnd(); ++it )
207 if ( it.value()->description().compare( description, Qt::CaseInsensitive ) == 0 )
211 const QString descriptionSquareBrackets = it.value()->
description().replace(
'(',
'[' ).replace(
')',
']' );
212 if ( descriptionSquareBrackets.compare( description, Qt::CaseInsensitive ) == 0 )
221 QMap< QString, QString > descriptionToString;
222 for (
auto it = mImporters.constBegin(); it != mImporters.constEnd(); ++it )
224 const QStringList extensions = it.value()->extensions();
226 if ( !extensions.empty() )
229 for (
const QString &extension : extensions )
230 fileFilter.append( QStringLiteral(
"*.%1" ).arg( extension ) );
231 fileFilter.append(
')' );
235 fileFilter = QStringLiteral(
"(*.*)" );
239 const QString description = it.value()->description().replace(
'(',
'[' ).replace(
')',
']' );
241 descriptionToString.insert( description.toLower(), QStringLiteral(
"%1 %2" ).arg( description, fileFilter ) );
245 for (
auto it = descriptionToString.constBegin(); it != descriptionToString.constEnd(); ++it )
248 return res.join( QLatin1String(
";;" ) );
253 return mDevices.keys();
258 return mDevices.value( name );
268 qDeleteAll( mDevices );
271 mDevices[QStringLiteral(
"Garmin serial" )] =
273 QStringLiteral(
"%babel -w -i gpx -o garmin %in %out" ),
274 QStringLiteral(
"%babel -r -i garmin -o gpx %in %out" ),
275 QStringLiteral(
"%babel -r -i gpx -o garmin %in %out" ),
276 QStringLiteral(
"%babel -t -i garmin -o gpx %in %out" ),
277 QStringLiteral(
"%babel -t -i gpx -o garmin %in %out" ) );
282 delete mDevices.value( device );
@ Tracks
Format supports tracks.
@ Waypoints
Format supports waypoints.
@ Routes
Format supports routes.
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
QStringList items(const QStringList &parentsNamedItems=QStringList()) const SIP_THROW(QgsSettingsException)
Returns the list of items.