00001
00002
00003 #ifndef ARROW_H
00004 #define ARROW_H
00005
00006 #include <qcolor.h>
00007 #include <qpainter.h>
00008 #include <qstringlist.h>
00009 #include "Point.h"
00010
00011 class Arrow
00012 {
00013 public:
00014 Arrow(bool l=0,bool e=false,double le=0.1,double a=30,bool f=true,
00015 QColor fc=QColor("blue"));
00016 QStringList Info();
00017 void save(QTextStream *t);
00018 void open(QTextStream *t,int version);
00019 bool Location() { return location; }
00020 void setLocation(bool l) { location=l; }
00021 bool Enabled() { return enabled; }
00022 void setEnabled(bool b=true) { enabled=b; }
00023 double Length() { return length; }
00024 void setLength(double l) { length=l; }
00025 double Angle() { return angle; }
00026 void setAngle(double a) { angle=a; }
00027 bool Filled() { return filled; }
00028 void setFilled(bool f=true) { filled=f; }
00029 QColor fillColor() { return fillcolor; }
00030 void setFillColor(QColor c) { fillcolor=c;}
00031 void setFillColor(QString c) { fillcolor=QColor(c);}
00032 void draw(QPainter *p, Point start, Point end, int X, int Y);
00033
00034 protected:
00035 bool location;
00036 bool enabled;
00037 double length;
00038 double angle;
00039 bool filled;
00040 QColor fillcolor;
00041 };
00042
00043 #endif //ARROW_H