00001
00002
00003 #ifndef ELLIPSE_H
00004 #define ELLIPSE_H
00005
00006 #include <qcolor.h>
00007 #include <qpainter.h>
00008 #include <qstringlist.h>
00009 #include "Point.h"
00010
00011 class Ellipse
00012 {
00013 public:
00014 Ellipse(Point s=0,Point e=0,QColor c="black",int w=1,bool f=true, QColor fi="white");
00015 QStringList Info();
00016 void save(QTextStream *t);
00017 void open(QTextStream *t,int version);
00018 Point startPoint() { return start; }
00019 Point endPoint() { return end; }
00020 void setStartPoint(double x, double y) { start=Point(x,y);}
00021 void setEndPoint(double x, double y) { end=Point(x,y);}
00022 int getWidth() { return width; }
00023 QColor getColor() { return color; }
00024 QColor getFillColor() { return fill; }
00025 void draw(QPainter *p, double w, double h);
00026 bool isFilled() { return filled; }
00027 bool inside(int x, int y, int w, int h);
00028 protected:
00029 Point start, end;
00030 QColor color;
00031 int width;
00032 bool filled;
00033 QColor fill;
00034 };
00035
00036 #endif //ELLIPSE_H