Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

Ellipse.h

Go to the documentation of this file.
00001 //LabPlot : Ellipse.h
00002 
00003 #ifndef ELLIPSE_H
00004 #define ELLIPSE_H
00005 
00006 #include <qcolor.h>
00007 #include <qpainter.h>
00008 #include <qstringlist.h>
00009 #include <qdom.h>
00010 #include "Point.h"
00011 
00012 class Ellipse
00013 {
00014 public:
00015         Ellipse(Point s=0,Point e=0,QColor c="black",int w=1,bool f=true, QColor fi="white");
00016         QStringList Info();
00017         void save(QTextStream *t);
00018         void open(QTextStream *t,int version);
00019         QDomElement saveXML(QDomDocument doc);
00020         void openXML(QDomNode node);
00021         Point startPoint() { return start; }
00022         Point endPoint() { return end; }
00023         void setStartPoint(double x, double y) { start=Point(x,y);}
00024         void setEndPoint(double x, double y) { end=Point(x,y);}
00025         int Width() { return width; }
00026         void setWidth(int w) { width=w; }
00027         QColor Color() { return color; }
00028         void setColor(QColor c) { color=c; }
00029         void setColor(QString c) { color=QColor(c); }
00030         QColor FillColor() { return fillcolor; }
00031         void setFillColor(QColor c) { fillcolor=c; }
00032         void setFillColor(QString c) { fillcolor=QColor(c); }
00033         bool isFilled() { return filled; }
00034         void setFilled(bool f=true) { filled=f; }
00035         void draw(QPainter *p, int w, int h);
00036         bool inside(int x, int y, int w, int h);
00037 protected:
00038         Point start, end;       // start = left upper corner, end = (width,height)
00039         QColor color;
00040         int width;
00041         bool filled;
00042         QColor fillcolor;
00043 };
00044 
00045 #endif //ELLIPSE_H

Generated on Sat Oct 13 21:55:01 2007 for LabPlot by  doxygen 1.4.4