mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
Adds QgsLegendInterface class to GUI library to allow users to do some operations with groups. git-svn-id: http://svn.osgeo.org/qgis/trunk@12359 c8812cc2-4d05-0410-92ff-de0c093fc19c
38 lines
768 B
Plaintext
38 lines
768 B
Plaintext
/**
|
|
* \class QgsLegendInterface
|
|
* \brief Abstract base class to make QgsLegend available to plugins.
|
|
*/
|
|
class QgsLegendInterface : QObject
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgslegendinterface.h>
|
|
%End
|
|
|
|
public:
|
|
|
|
/** Constructor */
|
|
QgsLegendInterface();
|
|
|
|
/** Virtual destructor */
|
|
~QgsLegendInterface();
|
|
|
|
virtual QStringList groups() =0;
|
|
|
|
signals:
|
|
|
|
//! emitted when a group index has changed
|
|
void groupIndexChanged( int oldIndex, int newIndex );
|
|
|
|
public slots:
|
|
|
|
//! Add a new group
|
|
virtual int addGroup( QString name, bool expand = true ) =0;
|
|
|
|
//! Remove group on index
|
|
virtual void removeGroup( int groupIndex ) =0;
|
|
|
|
//! Move a layer to a group
|
|
virtual void moveLayer( QgsMapLayer * layer, int groupIndex ) =0;
|
|
};
|
|
|