QGIS API Documentation  3.6.0-Noosa (5873452)
Signals | Public Member Functions | List of all members
QgsLayerTreeViewIndicator Class Reference

Indicator that can be used in a layer tree view to display icons next to items of the layer tree. More...

#include <qgslayertreeviewindicator.h>

Inheritance diagram for QgsLayerTreeViewIndicator:
Inheritance graph
[legend]

Signals

void clicked (const QModelIndex &index)
 Signal that is emitted when user clicks on the indicator. More...
 

Public Member Functions

 QgsLayerTreeViewIndicator (QObject *parent=nullptr)
 Constructs an indicator, optionally transferring ownership to a parent QObject. More...
 
QIcon icon () const
 Indicator icon that will be displayed in the layer tree view. More...
 
void setIcon (const QIcon &icon)
 Sets indicator icon that will be displayed in the layer tree view. More...
 
void setToolTip (const QString &tip)
 Sets tool tip text. More...
 
QString toolTip () const
 Returns tool tip text that will be shown when user hovers mouse over the indicator. More...
 

Detailed Description

Indicator that can be used in a layer tree view to display icons next to items of the layer tree.

They add extra context to the item and interactivity (using clicked() signal).

Indicators can be added/removed to individual layer tree items using QgsLayerTreeView::addIndicator() and QgsLayerTreeView::removeIndicator() calls.

Since
QGIS 3.2

Definition at line 35 of file qgslayertreeviewindicator.h.

Constructor & Destructor Documentation

◆ QgsLayerTreeViewIndicator()

QgsLayerTreeViewIndicator::QgsLayerTreeViewIndicator ( QObject *  parent = nullptr)
explicit

Constructs an indicator, optionally transferring ownership to a parent QObject.

Definition at line 18 of file qgslayertreeviewindicator.cpp.

Member Function Documentation

◆ clicked

void QgsLayerTreeViewIndicator::clicked ( const QModelIndex &  index)
signal

Signal that is emitted when user clicks on the indicator.

◆ icon()

QIcon QgsLayerTreeViewIndicator::icon ( ) const
inline

Indicator icon that will be displayed in the layer tree view.

Definition at line 43 of file qgslayertreeviewindicator.h.

◆ setIcon()

void QgsLayerTreeViewIndicator::setIcon ( const QIcon &  icon)
inline

Sets indicator icon that will be displayed in the layer tree view.

Definition at line 45 of file qgslayertreeviewindicator.h.

◆ setToolTip()

void QgsLayerTreeViewIndicator::setToolTip ( const QString &  tip)
inline

Sets tool tip text.

Definition at line 50 of file qgslayertreeviewindicator.h.

◆ toolTip()

QString QgsLayerTreeViewIndicator::toolTip ( ) const
inline

Returns tool tip text that will be shown when user hovers mouse over the indicator.

Definition at line 48 of file qgslayertreeviewindicator.h.


The documentation for this class was generated from the following files: