diff --git a/python/gui/qgisinterface.sip b/python/gui/qgisinterface.sip index 262a2d28069..6e0adc72173 100644 --- a/python/gui/qgisinterface.sip +++ b/python/gui/qgisinterface.sip @@ -87,6 +87,9 @@ class QgisInterface : QObject /** Add a dock widget to the main window */ virtual void addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget )=0; + /** Remove specified dock widget from main window (doesn't delete it). Added in QGIS 1.1. */ + virtual void removeDockWidget ( 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 56041887866..4619258f7d9 100644 --- a/src/app/qgisappinterface.cpp +++ b/src/app/qgisappinterface.cpp @@ -162,6 +162,11 @@ void QgisAppInterface::addDockWidget( Qt::DockWidgetArea area, QDockWidget * doc qgis->addDockWidget( area, dockwidget ); } +void QgisAppInterface::removeDockWidget( QDockWidget * dockwidget ) +{ + qgis->removeDockWidget( dockwidget ); +} + void QgisAppInterface::refreshLegend( QgsMapLayer *l ) { if ( l && qgis && qgis->legend() ) diff --git a/src/app/qgisappinterface.h b/src/app/qgisappinterface.h index f1b8d0beba9..abe7d3eb5c4 100644 --- a/src/app/qgisappinterface.h +++ b/src/app/qgisappinterface.h @@ -102,6 +102,9 @@ class QgisAppInterface : public QgisInterface /** Add a dock widget to the main window */ void addDockWidget( Qt::DockWidgetArea area, QDockWidget * dockwidget ); + /** Remove specified dock widget from main window (doesn't delete it). Added in QGIS 1.1. */ + void removeDockWidget ( QDockWidget * dockwidget ); + virtual void refreshLegend( QgsMapLayer *l ); /** Add window to Window menu. The action title is the window title diff --git a/src/gui/qgisinterface.h b/src/gui/qgisinterface.h index a3b31c1ca65..49eef003ba0 100644 --- a/src/gui/qgisinterface.h +++ b/src/gui/qgisinterface.h @@ -118,6 +118,9 @@ class GUI_EXPORT QgisInterface : public QObject /** Add a dock widget to the main window */ virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget * dockwidget ) = 0; + /** Remove specified dock widget from main window (doesn't delete it). Added in QGIS 1.1. */ + virtual void removeDockWidget ( QDockWidget * dockwidget )=0; + /** refresh the legend of a layer */ virtual void refreshLegend( QgsMapLayer *l ) = 0;