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

Task declaration plugin top level object. More...

#include <taskdeclaration.h>

Inheritance diagram for Updraft::TaskDeclaration:
Collaboration diagram for Updraft::TaskDeclaration:

List of all members.

Public Slots

void createTask ()
 Creates empty task.
void saveTask ()
void saveTaskAs ()

Public Member Functions

 TaskDeclaration ()
virtual ~TaskDeclaration ()
QString getName ()
 Plugin metadata.
void initialize (CoreInterface *coreInterface)
 Called after the plugin is loaded.
void deinitialize ()
 Called before the plugin is unloaded.
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.
bool fileOpen (const QString &filename, int roleId)
 Callback to open a file.
void fileIdentification (QStringList *roles, QString *importDirectory, const QString &filename)

Private Types

enum  FileRoles { OPEN_TASK_FILE = 1 }

Private Member Functions

TaskLayergetActiveLayer ()
void unloadFiles ()
 Removes instances of all loaded files.
void addLayer (TaskFile *file)
 Creates new layer item, adds item to the left pane.
int getIndexForNewTask ()

Private Attributes

TTaskLayerList layers
 List of opened files.
MapLayerGroupInterfacemapLayerGroup
 Tasks map layer group.

Friends

class TaskLayer

Detailed Description

Task declaration plugin top level object.


Member Enumeration Documentation

Enumerator:
OPEN_TASK_FILE 

Constructor & Destructor Documentation


Member Function Documentation

void Updraft::TaskDeclaration::addLayer ( TaskFile file) [private]

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

Parameters:
fileassociated data file (is deleted on layer destruction)

Creates empty task.

Called before the plugin is unloaded.

Implements Updraft::PluginBase.

void Updraft::TaskDeclaration::fileIdentification ( QStringList *  roles,
QString *  importDirectory,
const QString &  filename 
)
bool Updraft::TaskDeclaration::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.

Returns:
The currently active file (in terms of selected tab)
Returns:
Number which is displayed in title of new task
QString Updraft::TaskDeclaration::getName ( ) [virtual]

Plugin metadata.

Implements Updraft::PluginBase.

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

Handles the left mouse click event.

Reimplemented from Updraft::PluginBase.

void Updraft::TaskDeclaration::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.

Removes instances of all loaded files.

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

Reimplemented from Updraft::PluginBase.


Friends And Related Function Documentation

friend class TaskLayer [friend]

Member Data Documentation

List of opened files.


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