00001 //LabPlot : Style.cc 00002 00003 #include <qcolor.h> 00004 00005 class Style 00006 { 00007 public: 00008 Style(int t=0, QColor c="blue", bool f=0, QColor fc="green", int w=1,int p=1, int b=1 ); 00009 void save(QTextStream *t); 00010 int open(QTextStream *t,int version); // returns graph type 00011 int Type() { return type; } 00012 void setType(int t) { type = t; } 00013 QColor Color() { return color; } 00014 void setColor(QString c) { color = QColor(c); } 00015 int getWidth() { return width; } 00016 void setWidth(int w) { width = w; } 00017 int getPenStyle() { return penStyle; } 00018 void setPenStyle(int p) { penStyle = p; } 00019 int getBrush() { return brush; } 00020 void setBrush (int b) { brush = b; } 00021 bool isFilled() { return fill; } 00022 void setFilled(int f) { fill = f; } 00023 QColor FillColor() { return fillcolor; } 00024 void setFillColor(QString c) { fillcolor = QColor(c); } 00025 private: 00026 int type; // type : line,noline,steps,boxes,impulses 00027 QColor color; // line color 00028 int width; // line width 00029 bool fill; // filled to baseline 00030 QColor fillcolor; // fill color 00031 int penStyle; // pen style :NoPen, SolidLine, DashLine, DotLine, DashDotLine, DashDotDotLine 00032 int brush; // fill brush : NoBrush, Solid, Dense1, Dense2, Dense3, Dense4, Dense5, 00033 // Dense6, Dense7, Horizontal, Vertical, Cross, BDiag, FDiag, DiagCross 00034 };