00001 00007 #ifndef SELECTION_H 00008 #define SELECTION_H 00009 00010 #include <vector> 00011 #include <iosfwd> 00012 #include "defs.h" 00013 00014 class Shape; 00015 class Image; 00016 class QPainter; 00017 00025 class Selection 00026 { 00027 public: 00030 Selection(); 00031 virtual ~Selection(); 00032 00033 private: 00036 Shape* m_shape; 00037 00038 public: 00039 00046 Shape* AllocateShape(SHAPE_TYPE type); 00047 00051 void HandleNewShape(Shape* s); 00052 00056 Shape* GetShape(); 00057 00064 void Draw(QPainter* p, int fact); 00065 00069 double SumValues(Image* pData); 00070 00074 double GetSurface(); 00075 00081 bool Save(std::ofstream& of); 00082 00089 bool Read(std::ifstream& ifs); 00090 }; 00091 00092 00093 #endif // SELECTION_H