Updraft  1.0
Open source glider flight visualisation tool.
Updraft::PluginBase Class Reference

Base class for plugins. More...

#include <pluginbase.h>

Inheritance diagram for Updraft::PluginBase:

List of all members.

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.

Detailed Description

Base class for plugins.

All mehtods of this class must be pure virtual or inline!


Constructor & Destructor Documentation

virtual Updraft::PluginBase::~PluginBase ( ) [inline, virtual]
Updraft::PluginBase::PluginBase ( const PluginBase other) [inline, private]

Disallow copying.


Member Function Documentation

virtual void Updraft::PluginBase::deinitialize ( ) [pure virtual]
virtual bool Updraft::PluginBase::fileOpen ( const QString &  filename,
int  roleId 
) [inline, virtual]

Callback to open a file.

Returns:
Was opening successful?
Parameters:
filenamefull path to a file
roleIdidentification 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 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.

Parameters:
coreInterfacepointer 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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines