QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
symbology
converters
qgssymbolconverterregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssymbolconverterregistry.h
3
-----------------
4
begin : February 2026
5
copyright : (C) 2026 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSSYMBOLCONVERTERREGISTRY_H
19
#define QGSSYMBOLCONVERTERREGISTRY_H
20
21
#include "
qgis.h
"
22
#include "qgis_core.h"
23
24
#include <QMap>
25
#include <QObject>
26
#include <QString>
27
#include <QStringList>
28
29
class
QgsAbstractSymbolConverter
;
30
41
class
CORE_EXPORT
QgsSymbolConverterRegistry
:
public
QObject
42
{
43
Q_OBJECT
44
45
public
:
52
QgsSymbolConverterRegistry
( QObject *parent =
nullptr
);
53
54
~QgsSymbolConverterRegistry
()
override
;
55
60
void
populate
()
SIP_SKIP
;
61
69
bool
addConverter
(
QgsAbstractSymbolConverter
*
converter
SIP_TRANSFER
);
70
75
QgsAbstractSymbolConverter
*
converter
(
const
QString &name )
const
;
76
84
bool
removeConverter
(
const
QString &name );
85
89
QStringList
converterNames
()
const
;
90
91
private
:
92
QMap<QString, QgsAbstractSymbolConverter *> mConverters;
93
};
94
95
#endif
//QGSSYMBOLCONVERTERREGISTRY_H
QgsAbstractSymbolConverter
An abstract base class for converting between QgsSymbol objects and QVariant representations.
Definition
qgssymbolconverter.h:122
QgsSymbolConverterRegistry::addConverter
bool addConverter(QgsAbstractSymbolConverter *converter)
Adds a converter to the registry.
Definition
qgssymbolconverterregistry.cpp:47
QgsSymbolConverterRegistry::QgsSymbolConverterRegistry
QgsSymbolConverterRegistry(QObject *parent=nullptr)
Creates a new empty symbol converter registry.
Definition
qgssymbolconverterregistry.cpp:29
QgsSymbolConverterRegistry::converterNames
QStringList converterNames() const
Returns a list of the registered converter names (IDs).
Definition
qgssymbolconverterregistry.cpp:73
QgsSymbolConverterRegistry::converter
QgsAbstractSymbolConverter * converter(const QString &name) const
Returns the converter with matching name, or nullptr if no matching converter is registered.
Definition
qgssymbolconverterregistry.cpp:59
QgsSymbolConverterRegistry::removeConverter
bool removeConverter(const QString &name)
Removes the converter with matching name.
Definition
qgssymbolconverterregistry.cpp:64
QgsSymbolConverterRegistry::populate
void populate()
Adds the default symbol converters to the registry.
Definition
qgssymbolconverterregistry.cpp:38
qgis.h
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
Generated on
for QGIS API Documentation by
1.17.0