QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
Indicator that can be used in a layer tree view to display icons next to items of the layer tree. More...
#include <qgslayertreeviewindicator.h>
Signals | |
void | changed () |
Emitted when the indicator changes state (e.g. | |
void | clicked (const QModelIndex &index) |
Emitted when user clicks on the indicator. | |
Public Member Functions | |
QgsLayerTreeViewIndicator (QObject *parent=nullptr) | |
Constructs an indicator, optionally transferring ownership to a parent QObject. | |
QIcon | icon () const |
Indicator icon that will be displayed in the layer tree view. | |
void | setIcon (const QIcon &icon) |
Sets indicator icon that will be displayed in the layer tree view. | |
void | setToolTip (const QString &tip) |
Sets tool tip text. | |
QString | toolTip () const |
Returns tool tip text that will be shown when user hovers mouse over the indicator. | |
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.
Definition at line 35 of file qgslayertreeviewindicator.h.
|
explicit |
Constructs an indicator, optionally transferring ownership to a parent QObject.
Definition at line 19 of file qgslayertreeviewindicator.cpp.
|
signal |
Emitted when the indicator changes state (e.g.
icon).
|
signal |
Emitted when user clicks on the indicator.
|
inline |
Indicator icon that will be displayed in the layer tree view.
Definition at line 43 of file qgslayertreeviewindicator.h.
|
inline |
Sets indicator icon that will be displayed in the layer tree view.
Definition at line 45 of file qgslayertreeviewindicator.h.
|
inline |
Sets tool tip text.
Definition at line 50 of file qgslayertreeviewindicator.h.
|
inline |
Returns tool tip text that will be shown when user hovers mouse over the indicator.
Definition at line 48 of file qgslayertreeviewindicator.h.