17 #ifndef QGSLEGENDINTERFACE_H
18 #define QGSLEGENDINTERFACE_H
22 #include <QStringList>
23 #include <QModelIndex>
26 class QTreeWidgetItem;
53 virtual QStringList groups() = 0;
61 virtual QList<QgsMapLayer *> selectedLayers(
bool inDrawOrder =
false )
const = 0;
64 virtual QList< QgsMapLayer * > layers()
const = 0;
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;
82 virtual void addLegendLayerAction( QAction* action, QString menu, QString
id,
88 virtual void addLegendLayerActionForLayer( QAction* action,
QgsMapLayer* layer ) = 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();
111 void itemAdded( QModelIndex
index );
124 virtual int addGroup( QString name,
bool expand =
true, QTreeWidgetItem* parent = 0 ) = 0;
128 virtual int addGroup( 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;