|
void | layerLoaded () |
| emitted when a previously unavailable layer got loaded More...
|
|
void | layerWillBeUnloaded () |
| emitted when a previously available layer got unloaded (from layer registry) More...
|
|
void | addedChildren (QgsLayerTreeNode *node, int indexFrom, int indexTo) |
| Emitted when one or more nodes have been added to a node within the tree. More...
|
|
void | customPropertyChanged (QgsLayerTreeNode *node, const QString &key) |
| Emitted when a custom property of a node within the tree has been changed or removed. More...
|
|
void | expandedChanged (QgsLayerTreeNode *node, bool expanded) |
| Emitted when the collapsed/expanded state of a node within the tree has been changed. More...
|
|
void | nameChanged (QgsLayerTreeNode *node, QString name) |
| Emitted when the name of the node is changed. More...
|
|
void | removedChildren (QgsLayerTreeNode *node, int indexFrom, int indexTo) |
| Emitted when one or more nodes has been removed from a node within the tree. More...
|
|
void | visibilityChanged (QgsLayerTreeNode *node, Qt::CheckState state) |
| Emitted when check state of a node within the tree has been changed. More...
|
|
void | willAddChildren (QgsLayerTreeNode *node, int indexFrom, int indexTo) |
| Emitted when one or more nodes will be added to a node within the tree. More...
|
|
void | willRemoveChildren (QgsLayerTreeNode *node, int indexFrom, int indexTo) |
| Emitted when one or more nodes will be removed from a node within the tree. More...
|
|
|
| QgsLayerTreeLayer (QgsMapLayer *layer) |
|
| QgsLayerTreeLayer (const QgsLayerTreeLayer &other) |
|
| QgsLayerTreeLayer (const QString &layerId, const QString &name=QString()) |
|
void | attachToSource (const LayerMatchParams &source) |
| Attempts to attach this layer node to a layer with a matching QgsMapLayer::publicSource(). More...
|
|
virtual QgsLayerTreeLayer * | clone () const override |
| Create a copy of the node. Returns new instance. More...
|
|
virtual QString | dump () const override |
| Return string with layer tree structure. For debug purposes only. More...
|
|
Qt::CheckState | isVisible () const |
|
QgsMapLayer * | layer () const |
|
QString | layerId () const |
|
QString | layerName () const |
|
QString | name () const override |
| Get layer's name. More...
|
|
void | setLayerName (const QString &n) |
|
void | setName (const QString &n) override |
| Set layer's name. More...
|
|
void | setVisible (Qt::CheckState visible) |
|
virtual void | writeXML (QDomElement &parentElement) override |
| Write layer tree to XML. More...
|
|
| ~QgsLayerTreeNode () |
|
QList< QgsLayerTreeNode * > | children () |
| Get list of children of the node. Children are owned by the parent. More...
|
|
QStringList | customProperties () const |
| Return list of keys stored in custom properties. More...
|
|
QVariant | customProperty (const QString &key, const QVariant &defaultValue=QVariant()) const |
| Read a custom property from layer. More...
|
|
bool | isExpanded () const |
| Return whether the node should be shown as expanded or collapsed in GUI. More...
|
|
NodeType | nodeType () |
| Find out about type of the node. It is usually shorter to use convenience functions from QgsLayerTree namespace for that. More...
|
|
QgsLayerTreeNode * | parent () |
| Get pointer to the parent. If parent is a null pointer, the node is a root node. More...
|
|
void | removeCustomProperty (const QString &key) |
| Remove a custom property from layer. More...
|
|
void | setCustomProperty (const QString &key, const QVariant &value) |
| Set a custom property for the node. More...
|
|
void | setExpanded (bool expanded) |
| Set whether the node should be shown as expanded or collapsed in GUI. More...
|
|
bool | takeChild (QgsLayerTreeNode *node) |
| Remove a child from a node. More...
|
|
| QObject (QObject *parent) |
|
| QObject (QObject *parent, const char *name) |
|
virtual | ~QObject () |
|
bool | blockSignals (bool block) |
|
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
|
const QObjectList & | children () const |
|
const char * | className () const |
|
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
|
void | deleteLater () |
|
void | destroyed (QObject *obj) |
|
bool | disconnect (const QObject *receiver, const char *method) |
|
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
|
void | dumpObjectInfo () |
|
void | dumpObjectTree () |
|
QList< QByteArray > | dynamicPropertyNames () const |
|
virtual bool | event (QEvent *e) |
|
virtual bool | eventFilter (QObject *watched, QEvent *event) |
|
T | findChild (const QString &name) const |
|
QList< T > | findChildren (const QRegExp ®Exp) const |
|
QList< T > | findChildren (const QString &name) const |
|
bool | inherits (const char *className) const |
|
void | insertChild (QObject *object) |
|
void | installEventFilter (QObject *filterObj) |
|
bool | isA (const char *className) const |
|
bool | isWidgetType () const |
|
void | killTimer (int id) |
|
virtual const QMetaObject * | metaObject () const |
|
void | moveToThread (QThread *targetThread) |
|
const char * | name () const |
|
const char * | name (const char *defaultName) const |
|
QString | objectName () const |
|
QObject * | parent () const |
|
QVariant | property (const char *name) const |
|
void | removeChild (QObject *object) |
|
void | removeEventFilter (QObject *obj) |
|
void | setName (const char *name) |
|
void | setObjectName (const QString &name) |
|
void | setParent (QObject *parent) |
|
bool | setProperty (const char *name, const QVariant &value) |
|
bool | signalsBlocked () const |
|
int | startTimer (int interval) |
|
QThread * | thread () const |
|
|
static QgsLayerTreeLayer * | createLayerFromParams (const LayerMatchParams &source) |
| Creates a layer node which will attach to a layer with matching parameters. More...
|
|
static QgsLayerTreeLayer * | readXML (QDomElement &element, bool looseMatch=false) |
| Creates a new layer from an XML definition. More...
|
|
static QgsLayerTreeNode * | readXML (QDomElement &element, bool looseMatch=false) |
| Read layer tree from XML. More...
|
|
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
|
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
|
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
|
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
|
QString | tr (const char *sourceText, const char *disambiguation, int n) |
|
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
|
Layer tree node points to a map layer.
When using with existing QgsMapLayer instance, it is expected that the layer has been registered in QgsMapLayerRegistry earlier.
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, the node will start listening to map layer registry updates in expectation that the layer (identified by its ID) will be loaded later.
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.
- Note
- added in 2.4
Definition at line 41 of file qgslayertreelayer.h.