changes to support maplayer plugins

git-svn-id: http://svn.osgeo.org/qgis/trunk@240 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
gsherman 2003-08-15 02:42:52 +00:00
parent 8198aaa1f1
commit b92e79d467
3 changed files with 10 additions and 0 deletions

View File

@ -33,6 +33,7 @@
#include "qgspolygonsymbol.h"
#include "qgslinesymbol.h"
#include "qgsmapcanvas.h"
#include "qgsmaplayerinterface.h"
QgsMapCanvas::QgsMapCanvas(QWidget * parent, const char *name)
:QWidget(parent, name)
@ -61,6 +62,10 @@ void QgsMapCanvas::setLegend(QgsLegend * legend)
void QgsMapCanvas::setDirty(bool _dirty){
dirty = _dirty;
}
void QgsMapCanvas::addLayer(QgsMapLayerInterface * lyr){
// add a maplayer interface to a layer type defined in a plugin
}
void QgsMapCanvas::addLayer(QgsMapLayer * lyr)
{
// give the layer a default symbol

View File

@ -28,6 +28,7 @@
class QRect;
class QgsCoordinateTransform;
class QgsMapLayer;
class QgsMapLayerInterface;
class QMouseEvent;
class QgsLegend;
class QColor;
@ -50,6 +51,7 @@ public:
* @param lyr Pointer to a layer derived from QgsMapLayer
*/
void addLayer(QgsMapLayer *lyr);
void addLayer(QgsMapLayerInterface *lyr);
/*! Draw the map using the symbology set for each layer
*/
void render();

View File

@ -28,7 +28,10 @@ virtual void setQgisMainWindow(QMainWindow *qgis) = 0;
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