83 void setLayerName(
const QString & name );
88 const QString & name()
const;
93 void setTitle(
const QString& title ) { mTitle = title; }
94 const QString&
title()
const {
return mTitle; }
96 void setAbstract(
const QString&
abstract ) { mAbstract =
abstract; }
97 const QString&
abstract()
const {
return mAbstract; }
103 void setDataUrl(
const QString& dataUrl ) { mDataUrl = dataUrl; }
104 const QString&
dataUrl()
const {
return mDataUrl; }
123 void setBlendMode(
const QPainter::CompositionMode &blendMode );
125 QPainter::CompositionMode blendMode()
const;
162 QString publicSource()
const;
165 const QString &source()
const;
171 virtual QStringList subLayers()
const;
177 virtual void setLayerOrder(
const QStringList &layers );
180 virtual void setSubLayerVisibility( QString name,
bool vis );
183 virtual bool isEditable()
const;
199 bool readLayerXML(
const QDomElement& layerElement );
218 bool writeLayerXML( QDomElement& layerElement, QDomDocument& document, QString relativeBasePath = QString::null );
225 static QDomDocument asLayerDefinition( QList<QgsMapLayer*> layers, QString relativeBasePath = QString::null );
229 static QList<QgsMapLayer*> fromLayerDefinition( QDomDocument& document );
230 static QList<QgsMapLayer*> fromLayerDefinitionFile(
const QString &qlrfile );
233 void setCustomProperty(
const QString& key,
const QVariant& value );
235 QVariant customProperty(
const QString& value,
const QVariant& defaultValue = QVariant() )
const;
237 void removeCustomProperty(
const QString& key );
241 Q_DECL_DEPRECATED
virtual QString lastErrorTitle();
244 Q_DECL_DEPRECATED
virtual QString lastError();
261 static QString capitaliseLayerName(
const QString& name );
269 virtual QString styleURI();
279 virtual QString loadDefaultStyle(
bool & theResultFlag );
294 virtual QString loadNamedStyle(
const QString &theURI,
bool &theResultFlag );
296 virtual bool loadNamedStyleFromDb(
const QString &db,
const QString &theURI, QString &qml );
306 virtual bool importNamedStyle( QDomDocument& doc, QString &errorMsg );
314 virtual void exportNamedStyle( QDomDocument &doc, QString &errorMsg );
323 virtual void exportSldStyle( QDomDocument &doc, QString &errorMsg );
333 virtual QString saveDefaultStyle(
bool & theResultFlag );
348 virtual QString saveNamedStyle(
const QString &theURI,
bool &theResultFlag );
350 virtual QString saveSldStyle(
const QString &theURI,
bool &theResultFlag );
351 virtual QString loadSldStyle(
const QString &theURI,
bool &theResultFlag );
353 virtual bool readSld(
const QDomNode &node, QString &errorMessage )
354 { Q_UNUSED( node ); errorMessage = QString(
"Layer type %1 not supported" ).arg( type() );
return false; }
362 virtual bool readSymbology(
const QDomNode& node, QString& errorMessage ) = 0;
370 virtual bool writeSymbology( QDomNode &node, QDomDocument& doc, QString& errorMessage )
const = 0;
373 QUndoStack *undoStack();
376 void setLegendUrl(
const QString& legendUrl ) { mLegendUrl = legendUrl; }
384 Q_DECL_DEPRECATED
void setCacheImage( QImage * );
413 float minimumScale()
const;
422 float maximumScale()
const;
430 bool hasScaleBasedVisibility()
const;
435 virtual void invalidTransformInput();
444 void setMinimumScale(
const float theMinScale );
453 void setMaximumScale(
const float theMaxScale );
461 void setScaleBasedVisibility(
const bool enabled );
466 Q_DECL_DEPRECATED
void toggleScaleBasedVisibility(
bool theVisibilityFlag );
470 Q_DECL_DEPRECATED
void clearCacheImage();
478 void triggerRepaint();
481 virtual QString metadata();
484 virtual QDateTime
timestamp()
const {
return QDateTime() ; }
489 void drawingProgress(
int theProgress,
int theTotalSteps );
492 void statusChanged( QString theStatus );
495 void layerNameChanged();
498 void layerCrsChanged();
503 void repaintRequested();
506 void screenUpdateRequested();
509 void recalculateExtents();
515 void blendModeChanged(
const QPainter::CompositionMode &blendMode );
518 void rendererChanged();
524 void legendChanged();
531 void setValid(
bool valid );
536 virtual bool readXml(
const QDomNode& layer_node );
541 virtual bool writeXml( QDomNode & layer_node, QDomDocument & document );
547 void readCustomProperties(
const QDomNode& layerNode,
const QString& keyStartsWith =
"" );
550 void writeCustomProperties( QDomNode & layerNode, QDomDocument & doc )
const;
553 void readStyleManager(
const QDomNode& layerNode );
555 void writeStyleManager( QDomNode& layerNode, QDomDocument& doc )
const;
559 void connectNotify(
const char * signal )
override;
627 QPainter::CompositionMode mBlendMode;
637 bool mScaleBasedVisibility;
640 QUndoStack mUndoStack;