Skip to content

Commit 928d63c

Browse files
author
timlinux
committed
Replaced QgisAppInterface::getToolBox() with QgisAppInterface::addDockWidget and updated dependent code & python bindings. Note you may need to do a clean build after this commit for python bindings to build ok. The toolbox was removed in 0.11.0 and so the old getToolBox call was broken - this provides a replacement for that functionality.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8774 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2503ea1 commit 928d63c

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

python/gui/qgisinterface.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class QgisInterface : QObject
8282
/** Remove action from the plugins menu */
8383
virtual void removePluginMenu(QString name, QAction* action)=0;
8484

85-
/** Return a pointer to the toolbox (where additional pages can be inserted) */
86-
virtual QToolBox* getToolBox()=0;
85+
/** Add a dock widget to the main window */
86+
virtual void addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget );=0;
8787

8888
/** refresh legend of a layer */
8989
virtual void refreshLegend( QgsMapLayer * layer )=0;

src/app/qgisappinterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ QWidget * QgisAppInterface::getMainWindow()
141141
return qgis;
142142
}
143143

144-
QToolBox* QgisAppInterface::getToolBox()
144+
void QgisAppInterface::addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget )
145145
{
146-
return NULL;
146+
qgis->addDockWidget ( area, dockwidget );
147147
}
148148

149149
void QgisAppInterface::refreshLegend(QgsMapLayer *l)

src/app/qgisappinterface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ class QgisAppInterface : public QgisInterface
101101
/** Remove action from the plugins menu */
102102
void removePluginMenu(QString name, QAction* action);
103103

104-
/** Return a pointer to the toolbox (where additional pages can be inserted) */
105-
virtual QToolBox* getToolBox();
104+
/** Add a dock widget to the main window */
105+
void addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget );
106106

107107
virtual void refreshLegend(QgsMapLayer *l);
108108

src/gui/qgisinterface.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
class QAction;
2323
class QMenu;
2424
class QToolBar;
25-
class QToolBox;
25+
class QDockWidget;
2626
class QWidget;
2727
#include <QObject>
2828

@@ -115,8 +115,8 @@ class GUI_EXPORT QgisInterface : public QObject
115115
/** Remove action from the plugins menu */
116116
virtual void removePluginMenu(QString name, QAction* action)=0;
117117

118-
/** Return a pointer to the toolbox (where additional pages can be inserted) */
119-
virtual QToolBox* getToolBox()=0;
118+
/** Add a dock widget to the main window */
119+
virtual void addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget )=0;
120120

121121
/** refresh the legend of a layer */
122122
virtual void refreshLegend(QgsMapLayer *l)=0;

0 commit comments

Comments
 (0)