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

Top level object of the turnpoints plugin. More...

#include <turnpoints.h>

Inheritance diagram for Updraft::TurnPoints:
Collaboration diagram for Updraft::TurnPoints:

List of all members.

Public Slots

void mapLayerDisplayed (bool value, MapLayerInterface *sender)

Public Member Functions

 TurnPoints ()
virtual ~TurnPoints ()
QString getName ()
 Plugin metadata.
void initialize (CoreInterface *coreInterface)
 Called after the plugin is loaded.
void deinitialize ()
 Called before the plugin is unloaded.
bool fileOpen (const QString &filename, int roleId)
 Callback to open a file.
void fileIdentification (QStringList *roles, QString *importDirectory, const QString &filename)
void fillContextMenu (MapObject *obj, MenuInterface *menu)
 Called when a MapObject is right-clicked on a map.
bool wantsToHandleClick (MapObject *obj)
 Tells whether this plugin wants to handle a mouse click event.
void handleClick (MapObject *obj, const EventInfo *evt)
 Handles the left mouse click event.

Private Types

enum  FileRoles { IMPORT_CUP_FILE = 1 }

Private Slots

void contextMenuRequested (QPoint pos, MapLayerInterface *sender)
void deleteTpLayer ()
 Slot to delete additional data that belonged to the turn points layer deleted from the context menu.

Private Member Functions

void loadImportedFiles ()
 Loads all files in import directories used by this plugin.
void unloadFiles ()
 Removes instances of all loaded files.
void addLayer (TPFile *file)
 Creates new layer item, adds item to the left pane.

Private Attributes

MapLayerInterfacelayerToDelete
 Layer to delete if the delete action in context menu is chosen.
TTPLayerMap layers
 List of imported files.
MapLayerGroupInterfacemapLayerGroup
 Turn-points map layer group.
FileRegistration cupTPsReg
 Registration for loading turn-points from cup file.
QVector< SettingInterface * > settings
 TP settings to be stored in settings array.

Detailed Description

Top level object of the turnpoints plugin.


Member Enumeration Documentation

Enumerator:
IMPORT_CUP_FILE 

Constructor & Destructor Documentation


Member Function Documentation

void Updraft::TurnPoints::addLayer ( TPFile file) [private]

Creates new layer item, adds item to the left pane.

Parameters:
fileassociated data file (is deleted on layer destruction)
void Updraft::TurnPoints::contextMenuRequested ( QPoint  pos,
MapLayerInterface sender 
) [private, slot]

Called before the plugin is unloaded.

Implements Updraft::PluginBase.

void Updraft::TurnPoints::deleteTpLayer ( ) [private, slot]

Slot to delete additional data that belonged to the turn points layer deleted from the context menu.

void Updraft::TurnPoints::fileIdentification ( QStringList *  roles,
QString *  importDirectory,
const QString &  filename 
)
bool Updraft::TurnPoints::fileOpen ( const QString &  filename,
int  roleId 
) [virtual]

Callback to open a file.

Returns:
Was opening successful?
Parameters:
filenamefull path to a file
roleIdidentification of role being opened

Reimplemented from Updraft::PluginBase.

void Updraft::TurnPoints::fillContextMenu ( MapObject obj,
MenuInterface menu 
) [virtual]

Called when a MapObject is right-clicked on a map.

Reimplemented from Updraft::PluginBase.

QString Updraft::TurnPoints::getName ( ) [virtual]

Plugin metadata.

Implements Updraft::PluginBase.

void Updraft::TurnPoints::handleClick ( MapObject obj,
const EventInfo evt 
) [virtual]

Handles the left mouse click event.

Reimplemented from Updraft::PluginBase.

void Updraft::TurnPoints::initialize ( CoreInterface coreInterface) [virtual]

Called after the plugin is loaded.

Parameters:
coreInterfacepointer to assigned CoreInterface Plugin should store this value in g_core.

Implements Updraft::PluginBase.

Loads all files in import directories used by this plugin.

void Updraft::TurnPoints::mapLayerDisplayed ( bool  value,
MapLayerInterface sender 
) [slot]

Removes instances of all loaded files.

Tells whether this plugin wants to handle a mouse click event.

Reimplemented from Updraft::PluginBase.


Member Data Documentation

Registration for loading turn-points from cup file.

List of imported files.

Layer to delete if the delete action in context menu is chosen.

Turn-points map layer group.

TP settings to be stored in settings array.


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