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;
109 cboLayerType->setCurrentIndex( idx );
122 for (
int i = 0; i < types.
count(); i++ )
128 for (
int i = 0; i < typesLine.
count(); i++ )
132 cboLayerType->addItem( name, typesLine[i] );
140 if ( stackedWidget->currentWidget() != pageDummy )
144 stackedWidget->removeWidget( stackedWidget->currentWidget() );
157 stackedWidget->addWidget( w );
158 stackedWidget->setCurrentWidget( w );
165 stackedWidget->setCurrentWidget( pageDummy );
173 QString newLayerType = cboLayerType->itemData( cboLayerType->currentIndex() ).toString();
174 if ( layer->
layerType() == newLayerType )
186 if ( newLayer == NULL )
QgsSymbolLayerV2AbstractMetadata * symbolLayerMetadata(QString name) const
return metadata for specified symbol layer. Returns NULL if not found
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)
QgsSymbolLayerV2Widget *(* QgsSymbolLayerV2WidgetFunc)(const QgsVectorLayer *)
const char * name() const
int count(const T &value) const
virtual QgsStringMap properties() const =0
virtual QString layerType() const =0
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.