[QGIS Commit] r8774 - in trunk/qgis: python/gui src/app src/gui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Jul 14 16:19:52 EDT 2008


Author: timlinux
Date: 2008-07-14 16:19:52 -0400 (Mon, 14 Jul 2008)
New Revision: 8774

Modified:
   trunk/qgis/python/gui/qgisinterface.sip
   trunk/qgis/src/app/qgisappinterface.cpp
   trunk/qgis/src/app/qgisappinterface.h
   trunk/qgis/src/gui/qgisinterface.h
Log:
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.

Modified: trunk/qgis/python/gui/qgisinterface.sip
===================================================================
--- trunk/qgis/python/gui/qgisinterface.sip	2008-07-14 20:04:28 UTC (rev 8773)
+++ trunk/qgis/python/gui/qgisinterface.sip	2008-07-14 20:19:52 UTC (rev 8774)
@@ -82,8 +82,8 @@
     /** 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;

Modified: trunk/qgis/src/app/qgisappinterface.cpp
===================================================================
--- trunk/qgis/src/app/qgisappinterface.cpp	2008-07-14 20:04:28 UTC (rev 8773)
+++ trunk/qgis/src/app/qgisappinterface.cpp	2008-07-14 20:19:52 UTC (rev 8774)
@@ -141,9 +141,9 @@
   return qgis;
 }
 
-QToolBox* QgisAppInterface::getToolBox()
+void QgisAppInterface::addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget )
 {
-  return NULL;
+  qgis->addDockWidget (  area, dockwidget );
 }
 
 void QgisAppInterface::refreshLegend(QgsMapLayer *l)

Modified: trunk/qgis/src/app/qgisappinterface.h
===================================================================
--- trunk/qgis/src/app/qgisappinterface.h	2008-07-14 20:04:28 UTC (rev 8773)
+++ trunk/qgis/src/app/qgisappinterface.h	2008-07-14 20:19:52 UTC (rev 8774)
@@ -101,8 +101,8 @@
         /** 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);
 

Modified: trunk/qgis/src/gui/qgisinterface.h
===================================================================
--- trunk/qgis/src/gui/qgisinterface.h	2008-07-14 20:04:28 UTC (rev 8773)
+++ trunk/qgis/src/gui/qgisinterface.h	2008-07-14 20:19:52 UTC (rev 8774)
@@ -22,7 +22,7 @@
 class QAction;
 class QMenu;
 class QToolBar;
-class QToolBox;
+class QDockWidget;
 class QWidget;
 #include <QObject>
 
@@ -115,8 +115,8 @@
     /** 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;



More information about the QGIS-commit mailing list