Updraft
1.0
Open source glider flight visualisation tool.
|
00001 #ifndef UPDRAFT_SRC_PLUGINS_IGCVIEWER_COLORINGS_H_ 00002 #define UPDRAFT_SRC_PLUGINS_IGCVIEWER_COLORINGS_H_ 00003 00004 #include <QColor> 00005 00006 #include "util/util.h" 00007 00008 #include "igcinfo.h" 00009 00010 namespace Updraft { 00011 namespace IgcViewer { 00012 00014 class Coloring { 00015 public: 00016 virtual ~Coloring() {} 00017 00020 virtual QColor color(int i) = 0; 00021 }; 00022 00024 class DefaultColoring : public Coloring { 00025 public: 00026 DefaultColoring(const FixInfo *info, const Util::Gradient *gradient); 00027 QColor color(int i); 00028 00029 protected: 00030 const FixInfo *info; 00031 const Util::Gradient *gradient; 00032 }; 00033 00035 class SymmetricColoring : public DefaultColoring { 00036 public: 00037 SymmetricColoring(const FixInfo *info, const Util::Gradient *gradient); 00038 QColor color(int i); 00039 }; 00040 00042 class LocalColoring : public DefaultColoring { 00043 public: 00044 LocalColoring(const FixInfo *info, const Util::Gradient *gradient); 00045 QColor color(int i); 00046 }; 00047 00049 class ConstantColoring : public Coloring { 00050 public: 00051 explicit ConstantColoring(QColor color); 00052 QColor color(int i); 00053 00054 protected: 00055 QColor c; 00056 }; 00057 00058 } // End namespace IgcViewer 00059 } // End namespace Updraft 00060 00061 #endif // UPDRAFT_SRC_PLUGINS_IGCVIEWER_COLORINGS_H_ 00062