mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-02 00:04:53 -04:00
Run clang-tidy modernize-use-override to remove all the redundant virtual keywords from overridden methods, and add some missing overrides. Another benefit is that this has also added the overrides on destructors, which will cause a build failure if a base class is missing a virtual destructor.
141 lines
3.8 KiB
Plaintext
141 lines
3.8 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/layertree/qgslayertreelayer.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
class QgsLayerTreeLayer : QgsLayerTreeNode
|
|
{
|
|
%Docstring
|
|
Layer tree node points to a map layer.
|
|
|
|
The node can exist also without a valid instance of a layer (just ID). That
|
|
means the referenced layer does not need to be loaded in order to use it
|
|
in layer tree. In such case, resolveReferences() method can be called
|
|
once the layer is loaded.
|
|
|
|
A map layer is supposed to be present in one layer tree just once. It is
|
|
however possible that temporarily a layer exists in one tree more than just
|
|
once, e.g. while reordering items with drag and drop.
|
|
|
|
.. versionadded:: 2.4
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgslayertreelayer.h"
|
|
%End
|
|
public:
|
|
explicit QgsLayerTreeLayer( QgsMapLayer *layer );
|
|
|
|
|
|
explicit QgsLayerTreeLayer( const QString &layerId, const QString &name = QString(), const QString &source = QString(), const QString &provider = QString() );
|
|
%Docstring
|
|
Constructor for QgsLayerTreeLayer using weak references to layer ID, ``name``, public ``source``, and ``provider`` key.
|
|
%End
|
|
|
|
QString layerId() const;
|
|
%Docstring
|
|
|
|
:rtype: str
|
|
%End
|
|
|
|
QgsMapLayer *layer() const;
|
|
%Docstring
|
|
|
|
:rtype: QgsMapLayer
|
|
%End
|
|
|
|
virtual QString name() const;
|
|
|
|
%Docstring
|
|
Returns the layer's name.
|
|
|
|
:rtype: str
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
virtual void setName( const QString &n );
|
|
|
|
%Docstring
|
|
Sets the layer's name.
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
static QgsLayerTreeLayer *readXml( QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
|
|
%Docstring
|
|
Read layer node from XML. Returns new instance.
|
|
Does not resolve textual references to layers. Call resolveReferences() afterwards to do it.
|
|
|
|
:rtype: QgsLayerTreeLayer
|
|
%End
|
|
|
|
static QgsLayerTreeLayer *readXml( QDomElement &element, const QgsProject *project, const QgsReadWriteContext &context ) /Factory/;
|
|
%Docstring
|
|
Read layer node from XML. Returns new instance.
|
|
Also resolves textual references to layers from the project (calls resolveReferences() internally).
|
|
|
|
:rtype: QgsLayerTreeLayer
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
virtual void writeXml( QDomElement &parentElement, const QgsReadWriteContext &context );
|
|
|
|
|
|
virtual QString dump() const;
|
|
|
|
|
|
virtual QgsLayerTreeLayer *clone() const /Factory/;
|
|
|
|
|
|
virtual void resolveReferences( const QgsProject *project, bool looseMatching = false );
|
|
|
|
%Docstring
|
|
Resolves reference to layer from stored layer ID (if it has not been resolved already)
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
signals:
|
|
|
|
void layerLoaded();
|
|
%Docstring
|
|
Emitted when a previously unavailable layer got loaded.
|
|
%End
|
|
|
|
void layerWillBeUnloaded();
|
|
%Docstring
|
|
Emitted when a previously available layer got unloaded (from layer registry).
|
|
|
|
.. versionadded:: 2.6
|
|
%End
|
|
|
|
protected:
|
|
void attachToLayer();
|
|
|
|
|
|
private:
|
|
|
|
QgsLayerTreeLayer( const QgsLayerTreeLayer &other );
|
|
%Docstring
|
|
Copies are not allowed
|
|
%End
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/layertree/qgslayertreelayer.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|