18#ifndef QGSSYMBOLCONVERTER_H
19#define QGSSYMBOLCONVERTER_H
55 QStringList
errors()
const {
return mErrors; }
63 void pushError(
const QString &error ) { mErrors << error; }
71 QStringList
warnings()
const {
return mWarnings; }
79 void pushWarning(
const QString &warning ) { mWarnings << warning; }
104 QStringList mWarnings;
138 virtual QString
name()
const = 0;
QFlags< SymbolConverterCapability > SymbolConverterCapabilities
Symbol converter capabilities.
An abstract base class for converting between QgsSymbol objects and QVariant representations.
virtual ~QgsAbstractSymbolConverter()
virtual Qgis::SymbolConverterCapabilities capabilities() const =0
Returns the capabilities of the converter.
virtual QString name() const =0
Returns the unique name for the converter.
virtual QString formatName() const =0
Returns a translated, user-friendly name for the converter's data format.
virtual QVariant toVariant(const QgsSymbol *symbol, QgsSymbolConverterContext &context) const =0
Converts a symbol into a QVariant representation.
virtual std::unique_ptr< QgsSymbol > createSymbol(const QVariant &variant, QgsSymbolConverterContext &context) const =0
Creates a new QgsSymbol from a QVariant representation.
Custom exception class which is raised when an operation is not supported.
A container for the context for various read/write operations on objects.
Represents the context in which a QgsSymbolConverter conversion occurs.
Qgis::SymbolType typeHint() const
Returns the symbol type hint, or Qgis::SymbolType::Hybrid if unknown.
QgsSymbolConverterContext(QgsReadWriteContext &rwContext)
Constructor for QgsSymbolConverterContext.
void setTypeHint(Qgis::SymbolType hint)
Sets the symbol type hint.
QStringList warnings() const
Returns a list of warnings which occurred during the conversion.
void pushWarning(const QString &warning)
Pushes a warning message generated during the conversion.
QgsReadWriteContext & readWriteContext()
Returns the read-write context associated with the context.
void pushError(const QString &error)
Pushes a error message generated during the conversion.
QStringList errors() const
Returns a list of errors which occurred during the conversion.
Abstract base class for all rendered symbols.
#define SIP_THROW(name,...)