Skip to content

Commit

Permalink
added an interface class for renderer plugins and a type QgisPlugin::…
Browse files Browse the repository at this point in the history
…RENDERER

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5310 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 19, 2006
1 parent 564e82d commit 6e88af2
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/gui/qgisapp.cpp
Expand Up @@ -3624,7 +3624,8 @@ void QgisApp::loadPlugin(QString name, QString description, QString theFullPathN

switch (pType())
{
case QgisPlugin::UI:
case QgisPlugin::RENDERER:
case QgisPlugin::UI:
{
// UI only -- doesn't use mapcanvas
create_ui *cf = (create_ui *) myLib->resolve("classFactory");
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/qgisplugin.h
Expand Up @@ -50,7 +50,8 @@ class QgisPlugin
typedef enum PLUGINTYPE
{
UI = 1, /* user interface plug-in */
MAPLAYER /* map layer plug-in */
MAPLAYER, /* map layer plug-in */
RENDERER /*a plugin for a new renderer class*/
};


Expand Down
38 changes: 38 additions & 0 deletions src/plugins/qgsrendererplugin.h
@@ -0,0 +1,38 @@
/***************************************************************************
qgsrendererplugin.h - description
-------------------
begin : April 2006
copyright : (C) 2006 by Marco Hugentobler
email : marco dot hugentobler at karto dot baug dot ethz dot ch
***************************************************************************/

/***************************************************************************
* *
* 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. *
* *
***************************************************************************/

#ifndef QGSRENDERERPLUGIN_H
#define QGSRENDERERPLUGIN_H

#include "qgisplugin.h"

class QgsRenderer;
class QDialog;
class QString;

/**Interface class for renderer plugins. This kind of plugins is of plugin type QgisPlugin::RENDERER
and is capable to return a pointer to a concrete renderer and a dialog which can be embedded into the
vector layer properties dialog in the main qgis application*/
class QgsRendererPlugin: public QgisPlugin
{
public:
QgsRendererPlugin(const QString& name, const QString& description, const QString& version): QgisPlugin(name, description, version, QgisPlugin::RENDERER) {}
virtual QDialog* rendererDialog() = 0;
virtual QgsRenderer* renderer() = 0;
};

#endif

0 comments on commit 6e88af2

Please sign in to comment.