19 #include <QStandardItem>
21 #include <QMessageBox>
40 if ( abstractMetadata == NULL )
42 QgsDebugMsg(
"Failed to find symbol layer's entry in registry: " + name );
46 if ( metadata == NULL )
48 QgsDebugMsg(
"Failed to cast symbol layer's metadata: " + name );
57 static bool initialized =
false;
85 , mPresetExpressionContext( 0 )
111 cboLayerType->setCurrentIndex( idx );
130 mPresetExpressionContext = context;
141 for (
int i = 0; i < types.
count(); i++ )
147 for (
int i = 0; i < typesLine.
count(); i++ )
151 cboLayerType->addItem( name, typesLine[i] );
159 if ( stackedWidget->currentWidget() != pageDummy )
163 stackedWidget->removeWidget( stackedWidget->currentWidget() );
179 stackedWidget->addWidget( w );
180 stackedWidget->setCurrentWidget( w );
187 stackedWidget->setCurrentWidget( pageDummy );
195 QString newLayerType = cboLayerType->itemData( cboLayerType->currentIndex() ).toString();
196 if ( layer->
layerType() == newLayerType )
208 if ( newLayer == NULL )
static QgsSymbolLayerV2Registry * instance()
return the single instance of this class (instantiate it if not exists)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
QString tr(const char *sourceText, const char *disambiguation, int n)
Map canvas is a class for displaying all GIS data types on a canvas.
const char * name() const
The output shall be in millimeters.
int count(const T &value) const
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
virtual QgsStringMap properties() const =0
QgsSymbolLayerV2AbstractMetadata * symbolLayerMetadata(const QString &name) const
return metadata for specified symbol layer. Returns NULL if not found
virtual QString layerType() const =0
QgsSymbolLayerV2Widget *(* QgsSymbolLayerV2WidgetFunc)(const QgsVectorLayer *)
QStringList symbolLayersForType(QgsSymbolV2::SymbolType type)
return a list of available symbol layers for a specified symbol type
static QPicture symbolLayerPreviewPicture(QgsSymbolLayerV2 *layer, QgsSymbolV2::OutputUnit units, QSize size, const QgsMapUnitScale &scale=QgsMapUnitScale())
Draws a symbol layer preview to a QPicture.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Represents a vector layer which manages a vector based data sets.
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
Registry of available symbol layer classes.
QgsPaintEffect * paintEffect() const
Returns the current paint effect for the layer.