16 #ifndef QGSLAYERTREEVIEW_H 17 #define QGSLAYERTREEVIEW_H 53 if ( sipCpp->inherits(
"QgsLayerTreeView" ) )
54 sipType = sipType_QgsLayerTreeView;
69 void setModel( QAbstractItemModel *model )
override;
102 QList<QgsLayerTreeNode *> selectedNodes(
bool skipInternal =
false )
const;
104 QList<QgsLayerTreeLayer *> selectedLayerNodes()
const;
107 QList<QgsMapLayer *> selectedLayers()
const;
111 void refreshLayerSymbology(
const QString &layerId );
117 void expandAllNodes();
123 void collapseAllNodes();
130 void contextMenuEvent( QContextMenuEvent *event )
override;
134 QgsMapLayer *layerForIndex(
const QModelIndex &index )
const;
136 void mouseReleaseEvent( QMouseEvent *event )
override;
137 void keyPressEvent( QKeyEvent *event )
override;
139 void dropEvent( QDropEvent *event )
override;
144 void modelRowsInserted(
const QModelIndex &index,
int start,
int end );
145 void modelRowsRemoved();
147 void updateExpandedStateToNode(
const QModelIndex &index );
149 void onCurrentChanged();
177 virtual QMenu *createContextMenu() = 0
SIP_FACTORY;
181 #endif // QGSLAYERTREEVIEW_H Layer tree group node serves as a container for layers and further groups.
Base class for all map layer types.
The QgsLayerTreeView class extends QTreeView and provides some additional functionality when working ...
QString mCurrentLayerID
Keeps track of current layer ID (to check when to emit signal about change of current layer) ...
The QgsLayerTreeViewDefaultActions class serves as a factory of actions that can be used together wit...
The QgsLayerTreeModel class is model implementation for Qt item views framework.
This class is a base class for nodes in a layer tree.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
QgsLayerTreeViewMenuProvider * menuProvider() const
Return pointer to the context menu provider. May be null.
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...
Layer tree node points to a map layer.