15#ifndef QGSRENDERERREGISTRY_H
16#define QGSRENDERERREGISTRY_H
54 All = PointLayer | LineLayer | PolygonLayer,
56 Q_DECLARE_FLAGS( LayerTypes, LayerType )
67 , mVisibleName( visibleName )
76 QString
name()
const {
return mName; }
88 QIcon
icon()
const {
return mIcon; }
94 void setIcon(
const QIcon &icon ) { mIcon = icon; }
116 { Q_UNUSED( layer ) Q_UNUSED( style ); Q_UNUSED( oldRenderer );
return nullptr; }
122 { Q_UNUSED( elem ) Q_UNUSED( geomType );
return nullptr; }
154 const QString &visibleName,
156 const QIcon &icon = QIcon(),
160 , mCreateFunc( pfCreate )
161 , mWidgetFunc( pfWidget )
162 , mCreateFromSldFunc(
nullptr )
163 , mLayerTypes( layerTypes )
168 const QString &visibleName,
171 const QIcon &icon = QIcon(),
175 , mCreateFunc( pfCreate )
176 , mWidgetFunc( pfWidget )
177 , mCreateFromSldFunc( pfCreateFromSld )
178 , mLayerTypes( layerTypes )
182 {
return mCreateFunc ? mCreateFunc( elem, context ) :
nullptr; }
184 {
return mWidgetFunc ? mWidgetFunc( layer, style, renderer ) :
nullptr; }
186 {
return mCreateFromSldFunc ? mCreateFromSldFunc( elem, geomType ) :
nullptr; }
213 QgsRendererAbstractMetadata::LayerTypes mLayerTypes;
253 bool removeRenderer(
const QString &rendererName );
280 QMap<QString, QgsRendererAbstractMetadata *> mRenderers;
283 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.
QgsFeatureRenderer *(* QgsRendererCreateFromSldFunc)(QDomElement &, Qgis::GeometryType geomType)
QgsRendererWidget *(* QgsRendererWidgetFunc)(QgsVectorLayer *, QgsStyle *, QgsFeatureRenderer *)
QgsFeatureRenderer *(* QgsRendererCreateFunc)(QDomElement &, const QgsReadWriteContext &)
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)