diff --git a/python/gui/qgisinterface.sip b/python/gui/qgisinterface.sip index b4548191b48..fede434fb39 100644 --- a/python/gui/qgisinterface.sip +++ b/python/gui/qgisinterface.sip @@ -82,8 +82,8 @@ class QgisInterface : QObject /** Remove action from the plugins menu */ virtual void removePluginMenu(QString name, QAction* action)=0; - /** Return a pointer to the toolbox (where additional pages can be inserted) */ - virtual QToolBox* getToolBox()=0; + /** Add a dock widget to the main window */ + virtual void addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget );=0; /** refresh legend of a layer */ virtual void refreshLegend( QgsMapLayer * layer )=0; diff --git a/src/app/qgisappinterface.cpp b/src/app/qgisappinterface.cpp index 235fde1e90c..30424f6ab9a 100644 --- a/src/app/qgisappinterface.cpp +++ b/src/app/qgisappinterface.cpp @@ -141,9 +141,9 @@ QWidget * QgisAppInterface::getMainWindow() return qgis; } -QToolBox* QgisAppInterface::getToolBox() +void QgisAppInterface::addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget ) { - return NULL; + qgis->addDockWidget ( area, dockwidget ); } void QgisAppInterface::refreshLegend(QgsMapLayer *l) diff --git a/src/app/qgisappinterface.h b/src/app/qgisappinterface.h index d5620dff58e..65f17846693 100644 --- a/src/app/qgisappinterface.h +++ b/src/app/qgisappinterface.h @@ -101,8 +101,8 @@ class QgisAppInterface : public QgisInterface /** Remove action from the plugins menu */ void removePluginMenu(QString name, QAction* action); - /** Return a pointer to the toolbox (where additional pages can be inserted) */ - virtual QToolBox* getToolBox(); + /** Add a dock widget to the main window */ + void addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget ); virtual void refreshLegend(QgsMapLayer *l); diff --git a/src/gui/qgisinterface.h b/src/gui/qgisinterface.h index 86b547c022d..5d913d2937b 100644 --- a/src/gui/qgisinterface.h +++ b/src/gui/qgisinterface.h @@ -22,7 +22,7 @@ class QAction; class QMenu; class QToolBar; -class QToolBox; +class QDockWidget; class QWidget; #include @@ -115,8 +115,8 @@ class GUI_EXPORT QgisInterface : public QObject /** Remove action from the plugins menu */ virtual void removePluginMenu(QString name, QAction* action)=0; - /** Return a pointer to the toolbox (where additional pages can be inserted) */ - virtual QToolBox* getToolBox()=0; + /** Add a dock widget to the main window */ + virtual void addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget )=0; /** refresh the legend of a layer */ virtual void refreshLegend(QgsMapLayer *l)=0;