00001 //LabPlot : Symbol.h 00002 00003 #ifndef SYMBOL_H 00004 #define SYMBOL_H 00005 00006 #include <qcolor.h> 00007 #include "defs.h" 00008 00009 class Symbol { 00010 public: 00011 Symbol(SType t=SNONE, QColor c="blue", int s=5, FType f=FNONE, QColor fc="red", int b=1); 00012 void save(QTextStream *t); 00013 void open(QTextStream *t,int version); 00014 void draw(QPainter *p,int X, int Y); 00015 SType Type() { return type; } 00016 void setType(int t) { type = (SType) t; } 00017 QColor Color() { return color; } 00018 void setColor(QString c) {color = QColor(c); } 00019 int Size() { return size; } 00020 void setSize(int s) { size = s; } 00021 FType Fill() { return fill; } 00022 void setFill(FType f) { fill = f; } 00023 QColor FillColor() { return fillcolor; } 00024 void setFillColor(QString fc) { fillcolor = QColor(fc); } 00025 int Brush() { return brush;} 00026 void setBrush(int b) { brush = b; } 00027 private: 00028 SType type; 00029 QColor color; 00030 int size; 00031 FType fill; 00032 QColor fillcolor; 00033 int brush; 00034 }; 00035 00036 #endif //SYMBOL_H