QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
src
core
qgslocalizeddatapathregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslocalizeddatapathregistry.h
3
--------------------------------------
4
Date : May 2020
5
Copyright : (C) 2020 by Denis Rouzaud
6
Email : denis.rouzaud
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
17
#ifndef QGSLOCALIZEDDATAPATHREGISTRY_H
18
#define QGSLOCALIZEDDATAPATHREGISTRY_H
19
20
21
#include <QDir>
22
#include <QList>
23
#include <QReadWriteLock>
24
25
#include "qgis_core.h"
26
#include "
qgis_sip.h
"
27
#include "
qgssettingsentry.h
"
28
42
class
CORE_EXPORT
QgsLocalizedDataPathRegistry
43
{
44
public
:
45
QgsLocalizedDataPathRegistry
();
46
48
QString globalPath(
const
QString &localizedPath )
const
;
49
51
QString localizedPath(
const
QString &globalPath )
const
;
52
54
QStringList paths()
const
;
55
57
void
setPaths(
const
QStringList &paths )
SIP_SKIP
;
58
64
void
registerPath(
const
QString &path,
int
position = -1 );
65
67
void
unregisterPath(
const
QString &path );
68
69
#ifndef SIP_RUN
71
static
const
inline
QgsSettingsEntryStringList
settingsLocalizedDataPaths =
QgsSettingsEntryStringList
( QStringLiteral(
"/qgis/localized_data_paths"
),
QgsSettings::NoSection
, QStringList() );
72
#endif
73
74
private
:
75
#ifdef SIP_RUN
76
QgsLocalizedDataPathRegistry
(
const
QgsLocalizedDataPathRegistry
&other )
77
{}
78
#endif
79
80
void
readFromSettings();
81
void
writeToSettings();
82
83
QList<QDir> mPaths;
84
mutable
QReadWriteLock mLock;
85
};
86
87
#endif
// QGSLOCALIZEDDATAPATHREGISTRY_H
QgsLocalizedDataPathRegistry
A registry class to hold localized data paths which can be used for basemaps, logos,...
Definition:
qgslocalizeddatapathregistry.h:43
QgsSettingsEntryStringList
A string list settings entry.
Definition:
qgssettingsentry.h:454
QgsSettings::NoSection
@ NoSection
Definition:
qgssettings.h:69
qgis_sip.h
SIP_SKIP
#define SIP_SKIP
Definition:
qgis_sip.h:126
qgssettingsentry.h
Generated on Thu Feb 24 2022 10:41:09 for QGIS API Documentation by
1.9.1