box.h

Go to the documentation of this file.
00001 #ifndef IIS_BOX_H
00002 #define IIS_BOX_H
00003 #include "value.h"
00004 #include "point.h"
00005 #include "image-dialog.h"
00006 
00007 class BoxValue: public Value
00008 {
00009  public:
00010   PointValue tl;
00011   PointValue br;
00012   PointValue tr;
00013   PointValue bl;
00014   virtual QString toString();
00015   virtual bool equals_same_type(Value * other);
00016   BoxValue()
00017     {
00018     }
00019   BoxValue(Token data) : 
00020     tl((Token)data["tl"]),
00021     br((Token)data["br"]),
00022     tr((Token)data["tr"]),
00023     bl((Token)data["bl"])
00024      {
00025      }
00026   virtual Data getSaveDescription(QString prefix) 
00027     {
00028       Token r;
00029       r["type"]=Symbol("box");
00030       r["tl"]=tl.getSaveDescription(prefix);
00031       r["tr"]=tr.getSaveDescription(prefix);
00032       r["bl"]=bl.getSaveDescription(prefix);
00033       r["br"]=br.getSaveDescription(prefix);
00034       return r;
00035     };
00036 };
00037 
00038 class BoxPicker: public ImagePicker
00039 {
00040     BoxValue box;
00041     int nr;
00042  public:
00043     BoxPicker(ImageValue * I): ImagePicker(I) {nr=0;};
00044     virtual Value * value() {return new BoxValue(box);};
00045     virtual void nextPoint(PointValue point, bool right);
00046 };
00047 
00048 #endif
00049 

Generated on Mon Jun 5 22:08:41 2006 for iis by  doxygen 1.4.6