Updraft
1.0
Open source glider flight visualisation tool.
|
Top level object of the turnpoints plugin. More...
#include <turnpoints.h>
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 | |
MapLayerInterface * | layerToDelete |
Layer to delete if the delete action in context menu is chosen. | |
TTPLayerMap | layers |
List of imported files. | |
MapLayerGroupInterface * | mapLayerGroup |
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. |
Top level object of the turnpoints plugin.
enum Updraft::TurnPoints::FileRoles [private] |
Updraft::TurnPoints::~TurnPoints | ( | ) | [virtual] |
void Updraft::TurnPoints::addLayer | ( | TPFile * | file | ) | [private] |
Creates new layer item, adds item to the left pane.
file | associated data file (is deleted on layer destruction) |
void Updraft::TurnPoints::contextMenuRequested | ( | QPoint | pos, |
MapLayerInterface * | sender | ||
) | [private, slot] |
void Updraft::TurnPoints::deinitialize | ( | ) | [virtual] |
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.
filename | full path to a file |
roleId | identification 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.
coreInterface | pointer to assigned CoreInterface Plugin should store this value in g_core. |
Implements Updraft::PluginBase.
void Updraft::TurnPoints::loadImportedFiles | ( | ) | [private] |
Loads all files in import directories used by this plugin.
void Updraft::TurnPoints::mapLayerDisplayed | ( | bool | value, |
MapLayerInterface * | sender | ||
) | [slot] |
void Updraft::TurnPoints::unloadFiles | ( | ) | [private] |
Removes instances of all loaded files.
bool Updraft::TurnPoints::wantsToHandleClick | ( | MapObject * | obj | ) | [virtual] |
Tells whether this plugin wants to handle a mouse click event.
Reimplemented from Updraft::PluginBase.
Registration for loading turn-points from cup file.
TTPLayerMap Updraft::TurnPoints::layers [private] |
List of imported files.
Layer to delete if the delete action in context menu is chosen.
Turn-points map layer group.
QVector<SettingInterface*> Updraft::TurnPoints::settings [private] |
TP settings to be stored in settings array.