Updraft
1.0
Open source glider flight visualisation tool.
|
This class creates and stores TaskData objects. More...
#include <datahistory.h>
Public Member Functions | |
DataHistory () | |
Creates DataHistory object with one default data entry. | |
virtual | ~DataHistory () |
TaskData * | getCurrent () |
const TaskData * | getCurrent () 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. |
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.
typedef QLinkedList<TaskData*> Updraft::DataHistory::DataContainer [private] |
typedef DataContainer::iterator Updraft::DataHistory::DataIterator [private] |
Updraft::DataHistory::DataHistory | ( | ) | [explicit] |
Creates DataHistory object with one default data entry.
Updraft::DataHistory::~DataHistory | ( | ) | [virtual] |
const TaskData * Updraft::DataHistory::getCurrent | ( | ) | const |
Same as non-const getCurrent()
bool Updraft::DataHistory::isFirst | ( | ) | const |
bool Updraft::DataHistory::isLast | ( | ) | const |
bool Updraft::DataHistory::isMarked | ( | ) | const |
bool Updraft::DataHistory::moveBack | ( | ) |
Steps back to the previous item in the DataHistory.
bool Updraft::DataHistory::moveForward | ( | ) |
Ascends to the next item in the DataHistory.
void Updraft::DataHistory::setMark | ( | ) |
Set mark to the current item. Only one item at once is marked.
void Updraft::DataHistory::storeState | ( | ) |
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.
Iterator to current item in dataContainer.
Container storing data history.
DataIterator Updraft::DataHistory::markedItem [private] |
Iterator to marked item in dataContainer.