17 #ifndef QGSLEGENDINTERFACE_H 18 #define QGSLEGENDINTERFACE_H 22 #include <QStringList> 23 #include <QModelIndex> 67 virtual bool groupExists(
int groupIndex ) = 0;
70 virtual bool isGroupExpanded(
int groupIndex ) = 0;
73 virtual bool isGroupVisible(
int groupIndex ) = 0;
76 virtual bool isLayerExpanded(
QgsMapLayer * ml ) = 0;
79 virtual bool isLayerVisible(
QgsMapLayer * ml ) = 0;
91 virtual bool removeLegendLayerAction(
QAction* action ) = 0;
100 virtual bool setCurrentLayer(
QgsMapLayer *layer ) = 0;
105 void groupIndexChanged(
int oldIndex,
int newIndex );
108 void groupRelationsChanged();
128 virtual int addGroup(
const QString& name,
bool expand,
int parentIndex ) = 0;
131 virtual void removeGroup(
int groupIndex ) = 0;
134 virtual void moveLayer(
QgsMapLayer * ml,
int groupIndex ) = 0;
137 virtual void setGroupExpanded(
int groupIndex,
bool expand ) = 0;
140 virtual void setLayerExpanded(
QgsMapLayer * ml,
bool expand ) = 0;
143 virtual void setGroupVisible(
int groupIndex,
bool visible ) = 0;
146 virtual void setLayerVisible(
QgsMapLayer * ml,
bool visible ) = 0;
149 virtual void refreshLayerSymbology(
QgsMapLayer *ml ) = 0;
QgsLegendInterface Abstract base class to make QgsLegend available to plugins.
Base class for all map layer types.
LayerType
Layers enum defining the types of layers that can be added to a map.
virtual QList< GroupLayerInfo > groupLayerRelationship()
Return the relationship between groups and layers in the legend.
QPair< QString, QList< QString > > GroupLayerInfo