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

This class creates and stores TaskData objects. More...

#include <datahistory.h>

List of all members.

Public Member Functions

 DataHistory ()
 Creates DataHistory object with one default data entry.
virtual ~DataHistory ()
TaskDatagetCurrent ()
const TaskDatagetCurrent () const
 Same as non-const getCurrent()
bool isFirst () const
bool isLast () const
bool isMarked () const
bool moveForward ()
 Ascends to the next item in the DataHistory.
bool moveBack ()
 Steps back to the previous item in the DataHistory.
void storeState ()
 Removes all newer items than current.
void setMark ()
 Set mark to the current item. Only one item at once is marked.

Private Types

typedef QLinkedList< TaskData * > DataContainer
typedef DataContainer::iterator DataIterator

Private Attributes

DataContainer dataContainer
 Container storing data history.
DataIterator currentItem
 Iterator to current item in dataContainer.
DataIterator markedItem
 Iterator to marked item in dataContainer.

Detailed Description

This class creates and stores TaskData objects.

It manages undo and redo actions. For proper editing first call add() to create copy of the current item, then call getCurrent() and do changes.


Member Typedef Documentation

typedef QLinkedList<TaskData*> Updraft::DataHistory::DataContainer [private]
typedef DataContainer::iterator Updraft::DataHistory::DataIterator [private]

Constructor & Destructor Documentation

Creates DataHistory object with one default data entry.


Member Function Documentation

Returns:
Current item

Same as non-const getCurrent()

Returns:
true if the current item is the first in the DataHistory
Returns:
true if the current item is the last in the DataHistory
Returns:
true if the current item is marked

Steps back to the previous item in the DataHistory.

Returns:
true if the current iterator has been moved.

Ascends to the next item in the DataHistory.

Returns:
true if the current iterator has been moved.

Set mark to the current item. Only one item at once is marked.

Removes all newer items than current.

Creates copy of the current item, appends it to the DataHistory and sets it as a new current item.


Member Data Documentation

Iterator to current item in dataContainer.

Container storing data history.

Iterator to marked item in dataContainer.


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