QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
gps
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"
21
#include "
qgssettingsentryimpl.h
"
22
#include "
qgssettingstree.h
"
23
24
#include <QString>
25
26
using namespace
Qt::StringLiterals;
27
28
class
QgsBabelSimpleImportFormat
;
29
class
QgsBabelGpsDeviceFormat
;
30
41
class
CORE_EXPORT
QgsBabelFormatRegistry
42
{
43
public
:
44
#ifndef SIP_RUN
45
46
static
inline
QgsSettingsTreeNamedListNode
*
sTreeBabelDevices
=
QgsSettingsTree::sTreeGps
->createNamedListNode( u
"babel-devices"
_s );
47
48
static
const
QgsSettingsEntryString
*
settingsBabelWptDownload
;
49
static
const
QgsSettingsEntryString
*
settingsBabelWptUpload
;
50
static
const
QgsSettingsEntryString
*
settingsBabelRteDownload
;
51
static
const
QgsSettingsEntryString
*
settingsBabelRteUpload
;
52
static
const
QgsSettingsEntryString
*
settingsBabelTrkDownload
;
53
static
const
QgsSettingsEntryString
*
settingsBabelTrkUpload
;
54
#endif
55
62
QgsBabelFormatRegistry
();
63
~QgsBabelFormatRegistry
();
64
65
QgsBabelFormatRegistry
(
const
QgsBabelFormatRegistry
&rh ) =
delete
;
66
QgsBabelFormatRegistry
&
operator=
(
const
QgsBabelFormatRegistry
&rh ) =
delete
;
67
71
QStringList
importFormatNames
()
const
;
72
79
QgsBabelSimpleImportFormat
*
importFormat
(
const
QString &name );
80
86
QgsBabelSimpleImportFormat
*
importFormatByDescription
(
const
QString &description );
87
91
QString
importFileFilter
()
const
;
92
96
QStringList
deviceNames
()
const
;
97
103
QgsBabelGpsDeviceFormat
*
deviceFormat
(
const
QString &name );
104
111
QMap< QString, QgsBabelGpsDeviceFormat * >
devices
()
const
;
112
116
void
reloadFromSettings
();
117
118
private
:
119
#ifdef SIP_RUN
120
QgsBabelFormatRegistry
(
const
QgsBabelFormatRegistry
&rh );
121
#endif
122
124
QMap< QString, QgsBabelSimpleImportFormat *> mImporters;
126
QMap< QString, QgsBabelGpsDeviceFormat *> mDevices;
127
};
128
129
130
#endif
// QGSBABELFORMATREGISTRY_H
QgsBabelFormatRegistry::reloadFromSettings
void reloadFromSettings()
Reloads the registry's members from the currently stored configuration.
Definition
qgsbabelformatregistry.cpp:304
QgsBabelFormatRegistry::importFormatByDescription
QgsBabelSimpleImportFormat * importFormatByDescription(const QString &description)
Returns a registered import format by description.
Definition
qgsbabelformatregistry.cpp:241
QgsBabelFormatRegistry::settingsBabelWptDownload
static const QgsSettingsEntryString * settingsBabelWptDownload
Definition
qgsbabelformatregistry.h:48
QgsBabelFormatRegistry::settingsBabelRteUpload
static const QgsSettingsEntryString * settingsBabelRteUpload
Definition
qgsbabelformatregistry.h:51
QgsBabelFormatRegistry::settingsBabelTrkDownload
static const QgsSettingsEntryString * settingsBabelTrkDownload
Definition
qgsbabelformatregistry.h:52
QgsBabelFormatRegistry::devices
QMap< QString, QgsBabelGpsDeviceFormat * > devices() const
Returns a map of device name to device format.
Definition
qgsbabelformatregistry.cpp:299
QgsBabelFormatRegistry::settingsBabelWptUpload
static const QgsSettingsEntryString * settingsBabelWptUpload
Definition
qgsbabelformatregistry.h:49
QgsBabelFormatRegistry::importFormatNames
QStringList importFormatNames() const
Returns a list of the names of all registered import formats.
Definition
qgsbabelformatregistry.cpp:231
QgsBabelFormatRegistry::settingsBabelTrkUpload
static const QgsSettingsEntryString * settingsBabelTrkUpload
Definition
qgsbabelformatregistry.h:53
QgsBabelFormatRegistry::deviceNames
QStringList deviceNames() const
Returns a list of the names of all registered devices.
Definition
qgsbabelformatregistry.cpp:289
QgsBabelFormatRegistry::operator=
QgsBabelFormatRegistry & operator=(const QgsBabelFormatRegistry &rh)=delete
QgsBabelFormatRegistry::sTreeBabelDevices
static QgsSettingsTreeNamedListNode * sTreeBabelDevices
Definition
qgsbabelformatregistry.h:46
QgsBabelFormatRegistry::QgsBabelFormatRegistry
QgsBabelFormatRegistry()
Constructor for QgsBabelFormatRegistry.
Definition
qgsbabelformatregistry.cpp:42
QgsBabelFormatRegistry::QgsBabelFormatRegistry
QgsBabelFormatRegistry(const QgsBabelFormatRegistry &rh)=delete
QgsBabelFormatRegistry::importFileFilter
QString importFileFilter() const
Returns a file filter string representing all registered import formats.
Definition
qgsbabelformatregistry.cpp:256
QgsBabelFormatRegistry::settingsBabelRteDownload
static const QgsSettingsEntryString * settingsBabelRteDownload
Definition
qgsbabelformatregistry.h:50
QgsBabelFormatRegistry::importFormat
QgsBabelSimpleImportFormat * importFormat(const QString &name)
Returns a registered import format by name.
Definition
qgsbabelformatregistry.cpp:236
QgsBabelFormatRegistry::deviceFormat
QgsBabelGpsDeviceFormat * deviceFormat(const QString &name)
Returns a registered device format by name.
Definition
qgsbabelformatregistry.cpp:294
QgsBabelGpsDeviceFormat
A babel format capable of interacting directly with a GPS device.
Definition
qgsbabelgpsdevice.h:36
QgsBabelSimpleImportFormat
A babel format capable of converting input files to GPX files.
Definition
qgsbabelformat.h:101
QgsSettingsEntryString
A string settings entry.
Definition
qgssettingsentryimpl.h:123
QgsSettingsTreeNamedListNode
A named list tree node for the settings tree to help organizing and introspecting the tree.
Definition
qgssettingstreenode.h:201
QgsSettingsTree::sTreeGps
static QgsSettingsTreeNode * sTreeGps
Definition
qgssettingstree.h:59
qgis.h
qgssettingsentryimpl.h
qgssettingstree.h
Generated on
for QGIS API Documentation by
1.17.0