mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@140 c8812cc2-4d05-0410-92ff-de0c093fc19c
59 lines
1.6 KiB
C++
59 lines
1.6 KiB
C++
/*! \mainpage Quantum GIS - Plugin API
|
|
*
|
|
* \section about About QGis Plugins
|
|
* Plugins provide additional functionality to QGis. Plugins must
|
|
* implement several required methods in order to be registered with
|
|
* QGis. These methods include:
|
|
* <ul>name
|
|
* <li>version
|
|
* <li>description
|
|
* <li>guiElements
|
|
* </ul>
|
|
*
|
|
* All QGis plugins must inherit from the abstract base class QgisPlugin. A
|
|
* This list will grow as the API is expanded.
|
|
*
|
|
* In addition, a plugin must implement the classFactory and unload
|
|
* functions. Note that these functions must be declared as extern "C" in
|
|
* order to be resolved properly and prevent C++ name mangling.
|
|
*/
|
|
#include <qstring.h>
|
|
#ifndef qgisplugin_h
|
|
#define qgisplugin_h
|
|
#include <qstring.h>
|
|
#include "qgisplugingui.h"
|
|
|
|
/*! \class QgisPlugin
|
|
* \brief Abstract base class from which all plugins must inherit
|
|
*
|
|
*/
|
|
class QgisPlugin{
|
|
public:
|
|
//! Get the name of the plugin
|
|
virtual QString name() = 0;
|
|
//! Version of the plugin
|
|
virtual QString version() =0;
|
|
//! A brief description of the plugin
|
|
virtual QString description() = 0;
|
|
//! Interface to gui element collection object
|
|
virtual QgisPluginGui *gui()=0;
|
|
//! Element types that can be added to the interface
|
|
enum ELEMENTS {
|
|
MENU,
|
|
MENU_ITEM,
|
|
TOOLBAR,
|
|
TOOLBAR_BUTTON,
|
|
};
|
|
};
|
|
|
|
// Typedefs
|
|
|
|
//! Typedef for function that returns a generic pointer to a plugin object
|
|
typedef QgisPlugin* create_t();
|
|
//! Typedef for the function to unload a plugin and free its resources
|
|
typedef void unload_t(QgisPlugin *);
|
|
//! Element type corresponding to one of the values in the ELEMENTS enum
|
|
typedef int QGIS_GUI_TYPE;
|
|
|
|
#endif //qgisplugin_h
|