#include <qgslegendinterface.h>
Public Slots | |
| virtual int | addGroup (QString name, bool expand=true)=0 |
| Add a new group. | |
| virtual void | removeGroup (int groupIndex)=0 |
| Remove group on index. | |
| virtual void | moveLayer (QgsMapLayer *ml, int groupIndex)=0 |
| Move a layer to a group. | |
| virtual void | setGroupExpanded (int groupIndex, bool expand)=0 |
| Collapse or expand a group. | |
| virtual void | setGroupVisible (int groupIndex, bool visible)=0 |
| Set the visibility of a group. | |
| virtual void | setLayerVisible (QgsMapLayer *ml, bool visible)=0 |
| Set the visibility of a layer. | |
| virtual void | refreshLayerSymbology (QgsMapLayer *ml)=0 |
| Refresh layer symbology. | |
Signals | |
| void | groupIndexChanged (int oldIndex, int newIndex) |
| emitted when a group index has changed | |
Public Member Functions | |
| QgsLegendInterface () | |
| Constructor. | |
| virtual | ~QgsLegendInterface () |
| Virtual destructor. | |
| virtual QStringList | groups ()=0 |
| Return a string list of groups. | |
| virtual QList< GroupLayerInfo > | groupLayerRelationship () |
| Return the relationship between groups and layers in the legend. | |
| virtual QList< QgsMapLayer * > | layers () const =0 |
| Return all layers in the project in legend order. | |
| virtual bool | groupExists (int groupIndex)=0 |
| Check if a group exists. | |
| virtual bool | isGroupExpanded (int groupIndex)=0 |
| Check if a group is expanded. | |
| virtual bool | isGroupVisible (int groupIndex)=0 |
| Check if a group is visible. | |
| virtual bool | isLayerVisible (QgsMapLayer *ml)=0 |
| Check if a layer is visible. | |
Definition at line 38 of file qgslegendinterface.h.
| QgsLegendInterface::QgsLegendInterface | ( | ) |
| QgsLegendInterface::~QgsLegendInterface | ( | ) | [virtual] |
| virtual QStringList QgsLegendInterface::groups | ( | ) | [pure virtual] |
Return a string list of groups.
| virtual QList< GroupLayerInfo > QgsLegendInterface::groupLayerRelationship | ( | ) | [inline, virtual] |
Return the relationship between groups and layers in the legend.
Definition at line 54 of file qgslegendinterface.h.
| virtual QList< QgsMapLayer * > QgsLegendInterface::layers | ( | ) | const [pure virtual] |
Return all layers in the project in legend order.
| virtual bool QgsLegendInterface::groupExists | ( | int | groupIndex | ) | [pure virtual] |
Check if a group exists.
| virtual bool QgsLegendInterface::isGroupExpanded | ( | int | groupIndex | ) | [pure virtual] |
Check if a group is expanded.
| virtual bool QgsLegendInterface::isGroupVisible | ( | int | groupIndex | ) | [pure virtual] |
Check if a group is visible.
| virtual bool QgsLegendInterface::isLayerVisible | ( | QgsMapLayer * | ml | ) | [pure virtual] |
Check if a layer is visible.
| void QgsLegendInterface::groupIndexChanged | ( | int | oldIndex, | |
| int | newIndex | |||
| ) | [signal] |
emitted when a group index has changed
| virtual int QgsLegendInterface::addGroup | ( | QString | name, | |
| bool | expand = true | |||
| ) | [pure virtual, slot] |
Add a new group.
| virtual void QgsLegendInterface::removeGroup | ( | int | groupIndex | ) | [pure virtual, slot] |
Remove group on index.
| virtual void QgsLegendInterface::moveLayer | ( | QgsMapLayer * | ml, | |
| int | groupIndex | |||
| ) | [pure virtual, slot] |
Move a layer to a group.
| virtual void QgsLegendInterface::setGroupExpanded | ( | int | groupIndex, | |
| bool | expand | |||
| ) | [pure virtual, slot] |
Collapse or expand a group.
| virtual void QgsLegendInterface::setGroupVisible | ( | int | groupIndex, | |
| bool | visible | |||
| ) | [pure virtual, slot] |
Set the visibility of a group.
| virtual void QgsLegendInterface::setLayerVisible | ( | QgsMapLayer * | ml, | |
| bool | visible | |||
| ) | [pure virtual, slot] |
Set the visibility of a layer.
| virtual void QgsLegendInterface::refreshLayerSymbology | ( | QgsMapLayer * | ml | ) | [pure virtual, slot] |
Refresh layer symbology.
1.5.6