Updraft  1.0
Open source glider flight visualisation tool.
tasklayer.h
Go to the documentation of this file.
00001 #ifndef UPDRAFT_SRC_PLUGINS_TASKDECL_TASKLAYER_H_
00002 #define UPDRAFT_SRC_PLUGINS_TASKDECL_TASKLAYER_H_
00003 
00004 #include <QWidget>
00005 #include "taskfile.h"
00006 #include "util/location.h"
00007 
00008 namespace osg {
00009   class Node;
00010   class Group;
00011   class Geode;
00012 }
00013 
00014 namespace osgEarth {
00015 namespace Util {
00016   class ObjectPlacer;
00017 }
00018 }
00019 
00020 namespace Updraft {
00021 
00022 class MapLayerInterface;
00023 class TabInterface;
00024 class TaskDeclaration;
00025 class TaskDeclPanel;
00026 struct TurnPoint;
00027 
00029 class TaskLayer : public QObject {
00030   Q_OBJECT
00031 
00032  public:
00033   TaskLayer(bool displayed_, TaskDeclaration *plugin_,
00034     TaskFile *file_, int _newTaskIndex);
00035 
00036   virtual ~TaskLayer();
00037 
00039   osg::Node* getNode() const;
00040 
00042   bool isDisplayed();
00043 
00046   void display(bool displayed_);
00047 
00051   QString getTitle() const;
00052 
00054   TaskFile::StorageState getStorageState() const;
00055 
00057   int getNewTaskIndex() const;
00058 
00060   TaskFile* getTaskFile();
00061 
00063   TaskDeclPanel* getTaskDeclPanel();
00064 
00066   bool isTabSelected();
00067 
00069   void newTaskPoint(const TurnPoint* tp);
00070 
00072   void newTaskPoint(const Util::Location& loc);
00073 
00076   bool save();
00077 
00079   void undo();
00080 
00082   void redo();
00083 
00086   bool saveAs();
00087 
00088  public slots:
00089   void mapLayerDisplayed(bool value, MapLayerInterface* sender);
00090 
00092   void tryCloseLayer();
00093 
00095   void tabSelected();
00096 
00098   void tabDeselected();
00099 
00101   void taskDataChanged();
00102 
00105   void taskStorageStateChanged();
00106 
00107  private:
00111   void DrawLines(osg::Geode *geode);
00112 
00114   TaskDeclaration *plugin;
00115 
00117   Updraft::MapLayerInterface* mapLayer;
00118 
00120   osg::Group* group;
00121 
00123   TabInterface* tab;
00124 
00126   TaskFile *file;
00127 
00129   TaskDeclPanel* panel;
00130 
00132   bool displayed;
00133 
00135   bool tabSelectedState;
00136 
00138   int newTaskIndex;
00139 };
00140 
00141 }  // End namespace Updraft
00142 
00143 #endif  // UPDRAFT_SRC_PLUGINS_TASKDECL_TASKLAYER_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines