Updraft  1.0
Open source glider flight visualisation tool.
datahistory.h
Go to the documentation of this file.
00001 #ifndef UPDRAFT_SRC_PLUGINS_TASKDECL_DATAHISTORY_H_
00002 #define UPDRAFT_SRC_PLUGINS_TASKDECL_DATAHISTORY_H_
00003 
00004 #include <QLinkedList>
00005 
00006 namespace Updraft {
00007 
00008 class TaskData;
00009 
00014 class DataHistory {
00015  public:
00017   explicit DataHistory();
00018 
00019   virtual ~DataHistory();
00020 
00022   TaskData* getCurrent();
00023 
00025   const TaskData* getCurrent() const;
00026 
00028   bool isFirst() const;
00029 
00031   bool isLast() const;
00032 
00034   bool isMarked() const;
00035 
00038   bool moveForward();
00039 
00042   bool moveBack();
00043 
00047   void storeState();
00048 
00050   void setMark();
00051 
00052  private:
00053   typedef QLinkedList<TaskData*> DataContainer;
00054   typedef DataContainer::iterator DataIterator;
00055 
00057   DataContainer dataContainer;
00058 
00060   DataIterator currentItem;
00061 
00063   DataIterator markedItem;
00064 };
00065 
00066 }  // End namespace Updraft
00067 
00068 #endif  // UPDRAFT_SRC_PLUGINS_TASKDECL_DATAHISTORY_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines