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;
83 virtual void addLegendLayerAction( QAction* action, QString menu, QString
id,
89 virtual void addLegendLayerActionForLayer( QAction* action,
QgsMapLayer* layer ) = 0;
92 virtual bool removeLegendLayerAction( QAction* action ) = 0;
101 virtual bool setCurrentLayer(
QgsMapLayer *layer ) = 0;
106 void groupIndexChanged(
int oldIndex,
int newIndex );
109 void groupRelationsChanged();
112 void itemAdded( QModelIndex
index );
125 virtual int addGroup( QString name,
bool expand =
true, QTreeWidgetItem* parent = 0 ) = 0;
129 virtual int addGroup( QString name,
bool expand,
int parentIndex ) = 0;
132 virtual void removeGroup(
int groupIndex ) = 0;
135 virtual void moveLayer(
QgsMapLayer * ml,
int groupIndex ) = 0;
138 virtual void setGroupExpanded(
int groupIndex,
bool expand ) = 0;
141 virtual void setLayerExpanded(
QgsMapLayer * ml,
bool expand ) = 0;
144 virtual void setGroupVisible(
int groupIndex,
bool visible ) = 0;
147 virtual void setLayerVisible(
QgsMapLayer * ml,
bool visible ) = 0;
151 virtual void refreshLayerSymbology(
QgsMapLayer *ml ) = 0;