16 #ifndef QGSLAYERTREEVIEW_H
17 #define QGSLAYERTREEVIEW_H
56 if ( sipCpp->inherits(
"QgsLayerTreeView" ) )
57 sipType = sipType_QgsLayerTreeView;
72 void setModel( QAbstractItemModel *model )
override;
98 void setLayerVisible(
QgsMapLayer *layer,
bool visible );
124 QList<QgsLayerTreeNode *> selectedNodes(
bool skipInternal =
false )
const;
126 QList<QgsLayerTreeLayer *> selectedLayerNodes()
const;
129 QList<QgsMapLayer *> selectedLayers()
const;
137 QList<QgsMapLayer *> selectedLayersRecursive()
const;
165 QList<QgsLayerTreeViewIndicator *> indicators(
QgsLayerTreeNode *node )
const;
185 static QStringList viewOnlyCustomProperties()
SIP_SKIP;
190 void refreshLayerSymbology( const QString &layerId );
196 void expandAllNodes();
202 void collapseAllNodes();
209 void setLayerMarkWidth(
int width ) { mLayerMarkWidth = width; }
222 void contextMenuEvent( QContextMenuEvent *event )
override;
226 QgsMapLayer *layerForIndex(
const QModelIndex &index )
const;
228 void mouseReleaseEvent( QMouseEvent *event )
override;
229 void keyPressEvent( QKeyEvent *event )
override;
231 void dropEvent( QDropEvent *event )
override;
233 void resizeEvent( QResizeEvent *event )
override;
237 void modelRowsInserted(
const QModelIndex &index,
int start,
int end );
238 void modelRowsRemoved();
240 void updateExpandedStateToNode(
const QModelIndex &index );
242 void onCurrentChanged();
249 void onHorizontalScroll(
int value );
259 QHash< QgsLayerTreeNode *, QList<QgsLayerTreeViewIndicator *> >
mIndicators;
270 friend class QgsLayerTreeViewItemDelegate;
288 virtual QMenu *createContextMenu() = 0
SIP_FACTORY;
292 #endif // QGSLAYERTREEVIEW_H