82 void setLayerName(
const QString & name );
87 const QString & name()
const;
92 void setTitle(
const QString& title ) { mTitle = title; }
93 const QString&
title()
const {
return mTitle; }
95 void setAbstract(
const QString&
abstract ) { mAbstract =
abstract; }
96 const QString&
abstract()
const {
return mAbstract; }
102 void setDataUrl(
const QString& dataUrl ) { mDataUrl = dataUrl; }
103 const QString&
dataUrl()
const {
return mDataUrl; }
122 void setBlendMode(
const QPainter::CompositionMode &blendMode );
124 QPainter::CompositionMode blendMode()
const;
161 QString publicSource()
const;
164 const QString &source()
const;
170 virtual QStringList subLayers()
const;
176 virtual void setLayerOrder(
const QStringList &layers );
179 virtual void setSubLayerVisibility( QString name,
bool vis );
182 virtual bool isEditable()
const;
198 bool readLayerXML(
const QDomElement& layerElement );
217 bool writeLayerXML( QDomElement& layerElement, QDomDocument& document, QString relativeBasePath = QString::null );
224 static QDomDocument asLayerDefinition( QList<QgsMapLayer*> layers, QString relativeBasePath = QString::null );
228 static QList<QgsMapLayer*> fromLayerDefinition( QDomDocument& document );
229 static QList<QgsMapLayer*> fromLayerDefinitionFile(
const QString qlrfile );
232 void setCustomProperty(
const QString& key,
const QVariant& value );
234 QVariant customProperty(
const QString& value,
const QVariant& defaultValue = QVariant() )
const;
236 void removeCustomProperty(
const QString& key );
240 Q_DECL_DEPRECATED
virtual QString lastErrorTitle();
243 Q_DECL_DEPRECATED
virtual QString lastError();
260 static QString capitaliseLayerName(
const QString& name );
268 virtual QString styleURI();
278 virtual QString loadDefaultStyle(
bool & theResultFlag );
293 virtual QString loadNamedStyle(
const QString &theURI,
bool &theResultFlag );
295 virtual bool loadNamedStyleFromDb(
const QString &db,
const QString &theURI, QString &qml );
304 virtual void exportNamedStyle( QDomDocument &doc, QString &errorMsg );
313 virtual void exportSldStyle( QDomDocument &doc, QString &errorMsg );
323 virtual QString saveDefaultStyle(
bool & theResultFlag );
338 virtual QString saveNamedStyle(
const QString &theURI,
bool &theResultFlag );
340 virtual QString saveSldStyle(
const QString &theURI,
bool &theResultFlag );
341 virtual QString loadSldStyle(
const QString &theURI,
bool &theResultFlag );
343 virtual bool readSld(
const QDomNode &node, QString &errorMessage )
344 { Q_UNUSED( node ); errorMessage = QString(
"Layer type %1 not supported" ).arg( type() );
return false; }
352 virtual bool readSymbology(
const QDomNode& node, QString& errorMessage ) = 0;
360 virtual bool writeSymbology( QDomNode &node, QDomDocument& doc, QString& errorMessage )
const = 0;
363 QUndoStack *undoStack();
366 void setLegendUrl(
const QString& legendUrl ) { mLegendUrl = legendUrl; }
374 Q_DECL_DEPRECATED
void setCacheImage( QImage * );
393 virtual void invalidTransformInput();
396 void setMinimumScale(
float theMinScale );
397 float minimumScale()
const;
400 void setMaximumScale(
float theMaxScale );
401 float maximumScale()
const;
404 void toggleScaleBasedVisibility(
bool theVisibilityFlag );
405 bool hasScaleBasedVisibility()
const;
409 Q_DECL_DEPRECATED
void clearCacheImage();
417 void triggerRepaint();
420 virtual QString metadata();
423 virtual QDateTime
timestamp()
const {
return QDateTime() ; }
428 void drawingProgress(
int theProgress,
int theTotalSteps );
431 void statusChanged( QString theStatus );
434 void layerNameChanged();
437 void layerCrsChanged();
442 void repaintRequested();
445 void screenUpdateRequested();
448 void recalculateExtents();
454 void blendModeChanged(
const QPainter::CompositionMode &blendMode );
457 void rendererChanged();
463 void legendChanged();
470 void setValid(
bool valid );
475 virtual bool readXml(
const QDomNode& layer_node );
480 virtual bool writeXml( QDomNode & layer_node, QDomDocument & document );
486 void readCustomProperties(
const QDomNode& layerNode,
const QString& keyStartsWith =
"" );
489 void writeCustomProperties( QDomNode & layerNode, QDomDocument & doc )
const;
492 void connectNotify(
const char * signal );
559 QPainter::CompositionMode mBlendMode;
569 bool mScaleBasedVisibility;
572 QUndoStack mUndoStack;