QGIS API Documentation
3.6.0-Noosa (5873452)
|
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 | 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... | |
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 18 of file qgslayertreeviewindicator.cpp.
|
signal |
Signal that is 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.