/usr/include/qgis/qgisplugin.h is in libqgis-dev 2.8.6+dfsg-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | /***************************************************************************
qgisplugin.h
--------------------------------------
Date : Sun Sep 16 12:12:31 AKDT 2007
Copyright : (C) 2007 by Gary E. Sherman
Email : sherman at mrcc dot 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. *
* *
***************************************************************************/
/*! QGIS - 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
* </ul>
*
* All QGis plugins must inherit from the abstract base class QgisPlugin.
* 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.
*/
#ifndef QGISPLUGIN_H
#define QGISPLUGIN_H
#include <QString>
class QgisInterface;
//#include "qgisplugingui.h"
/*! \class QgisPlugin
* \brief Abstract base class from which all plugins must inherit
*
*/
class QgisPlugin
{
public:
//! Interface to gui element collection object
//virtual QgisPluginGui *gui()=0;
//! Element types that can be added to the interface
#if 0
enum ELEMENTS
{
MENU,
MENU_ITEM,
TOOLBAR,
TOOLBAR_BUTTON,
};
@todo XXX this may be a hint that there should be subclasses
#endif
enum PLUGINTYPE
{
UI = 1, /* user interface plug-in */
MAPLAYER, /* map layer plug-in */
RENDERER, /*a plugin for a new renderer class*/
};
QgisPlugin( QString const & name = "",
QString const & description = "",
QString const & category = "",
QString const & version = "",
PLUGINTYPE const & type = MAPLAYER )
: mName( name )
, mDescription( description )
, mCategory( category )
, mVersion( version )
, mType( type )
{}
virtual ~QgisPlugin()
{}
//! Get the name of the plugin
QString const & name() const
{
return mName;
}
QString & name()
{
return mName;
}
//! Version of the plugin
QString const & version() const
{
return mVersion;
}
//! Version of the plugin
QString & version()
{
return mVersion;
}
//! A brief description of the plugin
QString const & description() const
{
return mDescription;
}
//! A brief description of the plugin
QString & description()
{
return mDescription;
}
//! Plugin category
QString const & category() const
{
return mCategory;
}
//! Plugin category
QString & category()
{
return mCategory;
}
//! Plugin type, either UI or map layer
QgisPlugin::PLUGINTYPE const & type() const
{
return mType;
}
//! Plugin type, either UI or map layer
QgisPlugin::PLUGINTYPE & type()
{
return mType;
}
/// function to initialize connection to GUI
virtual void initGui() = 0;
//! Unload the plugin and cleanup the GUI
virtual void unload() = 0;
private:
/// plug-in name
QString mName;
/// description
QString mDescription;
/// category
QString mCategory;
/// version
QString mVersion;
/// UI or MAPLAYER plug-in
/**
@todo Really, might be indicative that this needs to split into
maplayer vs. ui plug-in vs. other kind of plug-in
*/
PLUGINTYPE mType;
}; // class QgisPlugin
// Typedefs used by qgis main app
//! Typedef for the function that returns a generic pointer to a plugin object
typedef QgisPlugin *create_t( QgisInterface * );
//! Typedef for the function to unload a plugin and free its resources
typedef void unload_t( QgisPlugin * );
//! Typedef for getting the name of the plugin without instantiating it
typedef QString name_t();
//! Typedef for getting the description without instantiating the plugin
typedef QString description_t();
//! Typedef for getting the category without instantiating the plugin
typedef QString category_t();
//! Typedef for getting the plugin type without instantiating the plugin
typedef int type_t();
//! Typedef for getting the plugin version without instantiating the plugin
typedef QString version_t();
//! Typedef for getting the plugin icon file name without instantiating the plugin
typedef QString icon_t();
//! Typedef for getting the experimental status without instantiating the plugin
typedef QString experimental_t();
#endif // QGISPLUGIN_H
|