Skip to content

Commit

Permalink
Applied patch from Andrej Krutak - added removeDockWidget() to interf…
Browse files Browse the repository at this point in the history
…ace.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10286 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Mar 16, 2009
1 parent 66e2ae6 commit 8962a73
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/gui/qgisinterface.sip
Expand Up @@ -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;

Expand Down
5 changes: 5 additions & 0 deletions src/app/qgisappinterface.cpp
Expand Up @@ -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() )
Expand Down
3 changes: 3 additions & 0 deletions src/app/qgisappinterface.h
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgisinterface.h
Expand Up @@ -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;

Expand Down

0 comments on commit 8962a73

Please sign in to comment.