|
QGIS API Documentation 4.1.0-Master (3b8ef1f72a3)
|
A symbol converter for converting QgsSymbol objects to and from the OGR style string format. More...
#include <qgssymbolconverterogrstyle.h>

Public Member Functions | |
| Qgis::SymbolConverterCapabilities | capabilities () const override |
| Returns the capabilities of the converter. | |
| std::unique_ptr< QgsSymbol > | createSymbol (const QVariant &variant, QgsSymbolConverterContext &context) const override |
| Creates a new QgsSymbol from a QVariant representation. | |
| QString | formatName () const override |
| Returns a translated, user-friendly name for the converter's data format. | |
| QString | name () const override |
| Returns the unique name for the converter. | |
| QVariant | toVariant (const QgsSymbol *symbol, QgsSymbolConverterContext &context) const override |
| Converts a symbol into a QVariant representation. | |
| Public Member Functions inherited from QgsAbstractSymbolConverter | |
| virtual | ~QgsAbstractSymbolConverter () |
A symbol converter for converting QgsSymbol objects to and from the OGR style string format.
Definition at line 29 of file qgssymbolconverterogrstyle.h.
|
overridevirtual |
Returns the capabilities of the converter.
Implements QgsAbstractSymbolConverter.
Definition at line 28 of file qgssymbolconverterogrstyle.cpp.
|
overridevirtual |
Creates a new QgsSymbol from a QVariant representation.
| variant | The QVariant containing the serialized symbol data. |
| context | conversion context |
nullptr if the variant cannot be converted or parsed.| QgsNotSupportedException | if the converter does not support deserialization of symbols. |
Implements QgsAbstractSymbolConverter.
Definition at line 48 of file qgssymbolconverterogrstyle.cpp.
|
overridevirtual |
Returns a translated, user-friendly name for the converter's data format.
E.g. "Styled Layer Descriptor (SLD)" for a converter which handles the SLD format.
Implements QgsAbstractSymbolConverter.
Definition at line 38 of file qgssymbolconverterogrstyle.cpp.
|
overridevirtual |
Returns the unique name for the converter.
This should be an untranslated string identifying the converter.
Implements QgsAbstractSymbolConverter.
Definition at line 33 of file qgssymbolconverterogrstyle.cpp.
|
overridevirtual |
Converts a symbol into a QVariant representation.
The resulting QVariant may be a dictionary (QVariantMap), a JSON string, an XML representation of the symbol, or some binary QByteArray value, depending on the concrete implementation (e.g., SLD vs. Mapbox GL).
Returns an invalid variant if the symbol could not be converted, or if serialization of symbols is not supported for this converter.
| QgsNotSupportedException | if the converter does not support serialization of symbols. |
Implements QgsAbstractSymbolConverter.
Definition at line 43 of file qgssymbolconverterogrstyle.cpp.