[QGIS Commit] r9527 - in trunk/qgis/src: app gui plugins

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Oct 23 09:49:53 EDT 2008


Author: wonder
Date: 2008-10-23 09:49:53 -0400 (Thu, 23 Oct 2008)
New Revision: 9527

Removed:
   trunk/qgis/src/app/qgsmaplayerinterface.h
   trunk/qgis/src/plugins/maplayer/
Modified:
   trunk/qgis/src/app/qgisapp.cpp
   trunk/qgis/src/gui/qgsmapcanvas.h
Log:
Removed old legacy code regarding QgsMapLayerInterface


Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2008-10-23 13:39:22 UTC (rev 9526)
+++ trunk/qgis/src/app/qgisapp.cpp	2008-10-23 13:49:53 UTC (rev 9527)
@@ -189,7 +189,6 @@
 class QTreeWidgetItem;
 
 /* typedefs for plugins */
-typedef QgsMapLayerInterface *create_it();
 typedef QgisPlugin *create_ui( QgisInterface * qI );
 typedef QString name_t();
 typedef QString description_t();
@@ -4293,39 +4292,6 @@
 
         }
         break;
-/*
-        // TODO: to be removed completely
-        case QgisPlugin::MAPLAYER:
-        {
-          // Map layer - requires interaction with the canvas
-          create_it *cf = ( create_it * ) cast_to_fptr( myLib->resolve( "classFactory" ) );
-          if ( cf )
-          {
-            QgsMapLayerInterface *pl = cf();
-            if ( pl )
-            {
-              // set the main window pointer for the plugin
-              pl->setQgisMainWindow( this );
-              pl->initGui();
-              //add it to the qsettings file [ts]
-              settings.setValue( "/Plugins/" + name, true );
-
-            }
-            else
-            {
-              // something went wrong
-              QMessageBox::warning( this, tr( "Error Loading Plugin" ), tr( "There was an error loading %1." ) );
-              //add it to the qsettings file [ts]
-              settings.setValue( "/Plugins/" + name, false );
-            }
-          }
-          else
-          {
-            QgsDebugMsg( "Unable to find the class factory for " + theFullPathName );
-          }
-        }
-        break;
-*/
         default:
           // type is unknown
           QgsDebugMsg( "Plugin " + theFullPathName + " did not return a valid type and cannot be loaded" );

Deleted: trunk/qgis/src/app/qgsmaplayerinterface.h
===================================================================
--- trunk/qgis/src/app/qgsmaplayerinterface.h	2008-10-23 13:39:22 UTC (rev 9526)
+++ trunk/qgis/src/app/qgsmaplayerinterface.h	2008-10-23 13:49:53 UTC (rev 9527)
@@ -1,39 +0,0 @@
-/***************************************************************************
-    begin                : Jul 10 2003
-    copyright            : (C) 2003 by Gary E.Sherman
-    email                : sherman at mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-/* $Id$ */
-#ifndef QGSMAPLAYERINTERFACE_H
-#define QGSMAPLAYERINTERFACE_H
-/**
-* Interface class for map layer plugins
-*/
-#include <QObject>
-#include "qgisapp.h"
-
-class QgsMapLayerInterface: public QObject
-{
-    Q_OBJECT
-  public:
-    virtual void setQgisMainWindow( QgisApp *qgis ) = 0;
-// a test function to return an int
-    virtual int getInt() = 0;
-// setup the plugin's GUI
-    virtual void initGui() = 0;
-// unload the plugin
-    virtual void unload() = 0;
-// draw function
-    virtual void draw() = 0;
-
-};
-#endif // QGSMAPLAYERINTERFACE_H

Modified: trunk/qgis/src/gui/qgsmapcanvas.h
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.h	2008-10-23 13:39:22 UTC (rev 9526)
+++ trunk/qgis/src/gui/qgsmapcanvas.h	2008-10-23 13:49:53 UTC (rev 9527)
@@ -45,7 +45,6 @@
 
 class QgsMapToPixel;
 class QgsMapLayer;
-class QgsMapLayerInterface;
 class QgsLegend;
 class QgsLegendView;
 class QgsRubberBand;



More information about the QGIS-commit mailing list