15#ifndef QGSRENDERERREGISTRY_H
16#define QGSRENDERERREGISTRY_H
53 All = PointLayer | LineLayer | PolygonLayer,
66 , mVisibleName( visibleName )
75 QString
name()
const {
return mName; }
87 QIcon
icon()
const {
return mIcon; }
93 void setIcon(
const QIcon &icon ) { mIcon = icon; }
114 { Q_UNUSED( layer ) Q_UNUSED( style ); Q_UNUSED( oldRenderer );
return nullptr; }
120 { Q_UNUSED( elem ) Q_UNUSED( geomType );
return nullptr; }
152 const QString &visibleName,
154 const QIcon &icon = QIcon(),
158 , mCreateFunc( pfCreate )
159 , mWidgetFunc( pfWidget )
160 , mCreateFromSldFunc(
nullptr )
161 , mLayerTypes( layerTypes )
166 const QString &visibleName,
169 const QIcon &icon = QIcon(),
173 , mCreateFunc( pfCreate )
174 , mWidgetFunc( pfWidget )
175 , mCreateFromSldFunc( pfCreateFromSld )
176 , mLayerTypes( layerTypes )
180 {
return mCreateFunc ? mCreateFunc( elem, context ) :
nullptr; }
182 {
return mWidgetFunc ? mWidgetFunc( layer, style, renderer ) :
nullptr; }
184 {
return mCreateFromSldFunc ? mCreateFromSldFunc( elem, geomType ) :
nullptr; }
251 bool removeRenderer(
const QString &rendererName );
277 QMap<QString, QgsRendererAbstractMetadata *> mRenderers;
280 QStringList mRenderersOrder;
The Qgis class provides global constants for use throughout the application.
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
The class is used as a container of context for various read/write operations on other objects.
QgsRendererRegistry & operator=(const QgsRendererRegistry &rh)=delete
QgsRendererRegistry cannot be copied.
QgsRendererRegistry(const QgsRendererRegistry &rh)=delete
QgsRendererRegistry cannot be copied.
Represents a vector layer which manages a vector based data sets.
#define SIP_ENUM_BASETYPE(type)
QgsFeatureRenderer *(* QgsRendererCreateFromSldFunc)(QDomElement &, Qgis::GeometryType geomType)
QgsRendererWidget *(* QgsRendererWidgetFunc)(QgsVectorLayer *, QgsStyle *, QgsFeatureRenderer *)
QgsFeatureRenderer *(* QgsRendererCreateFunc)(QDomElement &, const QgsReadWriteContext &)
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)