Updraft
1.0
Open source glider flight visualisation tool.
|
Base class for plugins. More...
#include <pluginbase.h>
Public Member Functions | |
PluginBase () | |
virtual | ~PluginBase () |
virtual void | initialize (CoreInterface *coreInterface)=0 |
Called after the plugin is loaded. | |
virtual void | deinitialize ()=0 |
Called before the plugin is unloaded. | |
virtual void | fillContextMenu (MapObject *obj, MenuInterface *menu) |
Called when a MapObject is right-clicked on a map. | |
virtual bool | wantsToHandleClick (MapObject *obj) |
Tells whether this plugin wants to handle a mouse click event. | |
virtual void | handleClick (MapObject *obj, const EventInfo *evt) |
Handles the left mouse click event. | |
virtual bool | fileOpen (const QString &filename, int roleId) |
Callback to open a file. | |
virtual QString | getName ()=0 |
Plugin metadata. | |
virtual unsigned | getPluginApiVersion () |
Plugin's API version. | |
Private Member Functions | |
PluginBase (const PluginBase &other) | |
Disallow copying. |
Base class for plugins.
All mehtods of this class must be pure virtual or inline!
Updraft::PluginBase::PluginBase | ( | ) | [inline] |
virtual Updraft::PluginBase::~PluginBase | ( | ) | [inline, virtual] |
Updraft::PluginBase::PluginBase | ( | const PluginBase & | other | ) | [inline, private] |
Disallow copying.
virtual void Updraft::PluginBase::deinitialize | ( | ) | [pure virtual] |
Called before the plugin is unloaded.
Implemented in Updraft::IgcViewer::IgcViewer, Updraft::TurnPoints, Updraft::Airspaces::Airspaces, and Updraft::TaskDeclaration.
virtual bool Updraft::PluginBase::fileOpen | ( | const QString & | filename, |
int | roleId | ||
) | [inline, virtual] |
Callback to open a file.
filename | full path to a file |
roleId | identification of role being opened |
Reimplemented in Updraft::IgcViewer::IgcViewer, Updraft::Airspaces::Airspaces, Updraft::TurnPoints, and Updraft::TaskDeclaration.
virtual void Updraft::PluginBase::fillContextMenu | ( | MapObject * | obj, |
MenuInterface * | menu | ||
) | [inline, virtual] |
Called when a MapObject is right-clicked on a map.
Reimplemented in Updraft::TurnPoints.
virtual QString Updraft::PluginBase::getName | ( | ) | [pure virtual] |
Plugin metadata.
Implemented in Updraft::IgcViewer::IgcViewer, Updraft::TurnPoints, Updraft::TaskDeclaration, and Updraft::Airspaces::Airspaces.
virtual unsigned Updraft::PluginBase::getPluginApiVersion | ( | ) | [inline, virtual] |
Plugin's API version.
virtual void Updraft::PluginBase::handleClick | ( | MapObject * | obj, |
const EventInfo * | evt | ||
) | [inline, virtual] |
Handles the left mouse click event.
Reimplemented in Updraft::IgcViewer::IgcViewer, Updraft::TurnPoints, and Updraft::TaskDeclaration.
virtual void Updraft::PluginBase::initialize | ( | CoreInterface * | coreInterface | ) | [pure virtual] |
Called after the plugin is loaded.
coreInterface | pointer to assigned CoreInterface Plugin should store this value in g_core. |
Implemented in Updraft::IgcViewer::IgcViewer, Updraft::TurnPoints, Updraft::TaskDeclaration, and Updraft::Airspaces::Airspaces.
virtual bool Updraft::PluginBase::wantsToHandleClick | ( | MapObject * | obj | ) | [inline, virtual] |
Tells whether this plugin wants to handle a mouse click event.
Reimplemented in Updraft::IgcViewer::IgcViewer, Updraft::TurnPoints, and Updraft::TaskDeclaration.