QGIS API Documentation 4.1.0-Master (3b8ef1f72a3)
Loading...
Searching...
No Matches
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
30
41class CORE_EXPORT QgsSymbolConverterRegistry : public QObject
42{
43 Q_OBJECT
44
45 public:
52 QgsSymbolConverterRegistry( QObject *parent = nullptr );
53
55
60 void populate() SIP_SKIP;
61
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
An abstract base class for converting between QgsSymbol objects and QVariant representations.
bool addConverter(QgsAbstractSymbolConverter *converter)
Adds a converter to the registry.
QgsSymbolConverterRegistry(QObject *parent=nullptr)
Creates a new empty symbol converter registry.
QStringList converterNames() const
Returns a list of the registered converter names (IDs).
QgsAbstractSymbolConverter * converter(const QString &name) const
Returns the converter with matching name, or nullptr if no matching converter is registered.
bool removeConverter(const QString &name)
Removes the converter with matching name.
void populate()
Adds the default symbol converters to the registry.
#define SIP_SKIP
Definition qgis_sip.h:133
#define SIP_TRANSFER
Definition qgis_sip.h:35