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

Class storing a task layer. More...

#include <tasklayer.h>

Collaboration diagram for Updraft::TaskLayer:

List of all members.

Public Slots

void mapLayerDisplayed (bool value, MapLayerInterface *sender)
void tryCloseLayer ()
 Slot that gets called when the layer is about to close.
void tabSelected ()
 Slot that should be called when the layer's tab is selected.
void tabDeselected ()
 Slot that should be called when the layer's tab is selected.
void taskDataChanged ()
 Slot catching signal on task update. It updates osg scene.
void taskStorageStateChanged ()
 Slot catching signal on task storage state change.

Public Member Functions

 TaskLayer (bool displayed_, TaskDeclaration *plugin_, TaskFile *file_, int _newTaskIndex)
virtual ~TaskLayer ()
osg::Node * getNode () const
bool isDisplayed ()
void display (bool displayed_)
 Changes display state.
QString getTitle () const
 Creates layer title with respect to file existence and save flag (star).
TaskFile::StorageState getStorageState () const
int getNewTaskIndex () const
TaskFilegetTaskFile ()
TaskDeclPanelgetTaskDeclPanel ()
bool isTabSelected ()
void newTaskPoint (const TurnPoint *tp)
 Creates a new task point from a turn-point.
void newTaskPoint (const Util::Location &loc)
 Creates a new task point on the map.
bool save ()
 Saves file.
void undo ()
 Moves forward in file history.
void redo ()
 Moves back in file history.
bool saveAs ()
 Invokes save as dialog and saves file.

Private Member Functions

void DrawLines (osg::Geode *geode)
 Draws task lines.

Private Attributes

TaskDeclarationplugin
 TaskDeclaration plugin.
Updraft::MapLayerInterfacemapLayer
 MapLayer object associated with task.
osg::Group * group
 osg Node representing this task layer
TabInterfacetab
 Tab in bottom pane.
TaskFilefile
 Task data object.
TaskDeclPanelpanel
 Task GUI panel.
bool displayed
 Display state of task graphics.
bool tabSelectedState
 Selection state of the task's GUI tab.
int newTaskIndex
 Number which is displayed in title of new task.

Detailed Description

Class storing a task layer.


Constructor & Destructor Documentation

Updraft::TaskLayer::TaskLayer ( bool  displayed_,
TaskDeclaration plugin_,
TaskFile file_,
int  _newTaskIndex 
)

Member Function Documentation

void Updraft::TaskLayer::display ( bool  displayed_)

Changes display state.

Parameters:
displayed_new value of a display state
void Updraft::TaskLayer::DrawLines ( osg::Geode *  geode) [private]

Draws task lines.

Parameters:
geodetarget geode object. Lines are added as drawables into geode.
Returns:
Index displayed in new task title
osg::Node * Updraft::TaskLayer::getNode ( ) const
Returns:
osgNode associated with the layer.
Returns:
State of task file storage
Returns:
Task declaration GUI panel.
Returns:
TaskFile object for this task
QString Updraft::TaskLayer::getTitle ( ) const

Creates layer title with respect to file existence and save flag (star).

Returns:
Layer title
Returns:
Display state
Returns:
Whether this layer's tab is selected.
void Updraft::TaskLayer::mapLayerDisplayed ( bool  value,
MapLayerInterface sender 
) [slot]

Creates a new task point from a turn-point.

Creates a new task point on the map.

Moves back in file history.

Saves file.

If the path is not set, file dialog is invoked.

Returns:
True on success. False on fail or cancell.

Invokes save as dialog and saves file.

Returns:
True on success. False on fail or cancell.

Slot that should be called when the layer's tab is selected.

Slot that should be called when the layer's tab is selected.

Slot catching signal on task update. It updates osg scene.

Slot catching signal on task storage state change.

It updates label in both bottom tab and left pane.

Slot that gets called when the layer is about to close.

Moves forward in file history.


Member Data Documentation

Display state of task graphics.

Task data object.

osg::Group* Updraft::TaskLayer::group [private]

osg Node representing this task layer

MapLayer object associated with task.

Number which is displayed in title of new task.

Task GUI panel.

Tab in bottom pane.

Selection state of the task's GUI tab.


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