QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsbabelformatregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsbabelformatregistry.h
3 -------------------
4 begin : July 2021
5 copyright : (C) 2021 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSBABELFORMATREGISTRY_H
17#define QGSBABELFORMATREGISTRY_H
18
19#include "qgis.h"
20#include "qgis_core.h"
22#include "qgssettingstree.h"
23
26
37class CORE_EXPORT QgsBabelFormatRegistry
38{
39 public:
40
41#ifndef SIP_RUN
42
43 static inline QgsSettingsTreeNamedListNode *sTreeBabelDevices = QgsSettingsTree::sTreeGps->createNamedListNode( QStringLiteral( "babel-devices" ) );
44
51#endif
52
61
64
68 QStringList importFormatNames() const;
69
76 QgsBabelSimpleImportFormat *importFormat( const QString &name );
77
83 QgsBabelSimpleImportFormat *importFormatByDescription( const QString &description );
84
88 QString importFileFilter() const;
89
93 QStringList deviceNames() const;
94
100 QgsBabelGpsDeviceFormat *deviceFormat( const QString &name );
101
108 QMap< QString, QgsBabelGpsDeviceFormat * > devices() const;
109
113 void reloadFromSettings();
114
115 private:
116#ifdef SIP_RUN
118#endif
119
121 QMap< QString, QgsBabelSimpleImportFormat *> mImporters;
123 QMap< QString, QgsBabelGpsDeviceFormat *> mDevices;
124};
125
126
127#endif // QGSBABELFORMATREGISTRY_H
void reloadFromSettings()
Reloads the registry's members from the currently stored configuration.
QgsBabelSimpleImportFormat * importFormatByDescription(const QString &description)
Returns a registered import format by description.
static const QgsSettingsEntryString * settingsBabelWptDownload
static const QgsSettingsEntryString * settingsBabelRteUpload
static const QgsSettingsEntryString * settingsBabelTrkDownload
QMap< QString, QgsBabelGpsDeviceFormat * > devices() const
Returns a map of device name to device format.
static const QgsSettingsEntryString * settingsBabelWptUpload
QStringList importFormatNames() const
Returns a list of the names of all registered import formats.
static const QgsSettingsEntryString * settingsBabelTrkUpload
QStringList deviceNames() const
Returns a list of the names of all registered devices.
QgsBabelFormatRegistry & operator=(const QgsBabelFormatRegistry &rh)=delete
static QgsSettingsTreeNamedListNode * sTreeBabelDevices
QgsBabelFormatRegistry()
Constructor for QgsBabelFormatRegistry.
QgsBabelFormatRegistry(const QgsBabelFormatRegistry &rh)=delete
QString importFileFilter() const
Returns a file filter string representing all registered import formats.
static const QgsSettingsEntryString * settingsBabelRteDownload
QgsBabelSimpleImportFormat * importFormat(const QString &name)
Returns a registered import format by name.
QgsBabelGpsDeviceFormat * deviceFormat(const QString &name)
Returns a registered device format by name.
A babel format capable of interacting directly with a GPS device.
A babel format capable of converting input files to GPX files.
A string settings entry.
A named list tree node for the settings tree to help organizing and introspecting the tree.
static QgsSettingsTreeNode * sTreeGps