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

Style.h

Go to the documentation of this file.
00001 //LabPlot : Style.h
00002 
00003 #ifndef STYLE_H
00004 #define STYLE_H
00005 
00006 #include <qcolor.h>
00007 #include <qdom.h>
00008 
00009 #include "styles.h"
00010 
00011 class Style
00012 {
00013 public:
00014         Style(StylesType t=LINESTYLE, QColor c="blue", bool f=0, QColor fc="green", int w=1,int p=1, int b=1 );
00015         void save(QTextStream *t);
00016         int open(QTextStream *t,int version);           // returns graph type
00017         QDomElement saveXML(QDomDocument doc);
00018         void openXML(QDomNode node);
00019         StylesType Type() { return type; }
00020         void setType(StylesType t) { type = t; }
00021         QColor Color() { return color; }
00022         void setColor(QString c) { color = QColor(c); }
00023         void setColor(QColor c) { color = c; }
00024         int Width() { return width; }
00025         void setWidth(int w) { width = w; }
00026         int PenStyle() { return penStyle; }
00027         void setPenStyle(int p) { penStyle = p; }
00028         int Brush() { return brush; }
00029         void setBrush (int b) { brush = b; }
00030         bool isFilled() { return fill; }
00031         void setFilled(int f) { fill = f; }
00032         QColor FillColor() { return fillcolor; }
00033         void setFillColor(QString c) { fillcolor = QColor(c); }
00034         void setFillColor(QColor c) { fillcolor = c; }
00035         int BoxWidth() { return boxwidth; }
00036         void setBoxWidth(int b) { boxwidth = b; }
00037         bool AutoBoxWidth() { return autoboxwidth; }
00038         void setAutoBoxWidth(bool b=true) { autoboxwidth = b; }
00039         bool PointsSortingEnabled() { return sort_points; }     
00040         void setPointsSorting(bool e=true) { sort_points = e; }
00041 private:
00042         StylesType type;
00043         QColor color;           // line color
00044         int width;              // line width
00045         bool fill;              // filled to baseline
00046         QColor fillcolor;       // fill color
00047         int penStyle;           // pen style :NoPen, SolidLine, DashLine, DotLine, DashDotLine, DashDotDotLine
00048         int brush;              // fill brush : NoBrush, Solid, Dense1, Dense2, Dense3, Dense4, Dense5,
00049                                 //       Dense6, Dense7, Horizontal, Vertical, Cross, BDiag, FDiag, DiagCross
00050         int boxwidth;           // width for type boxes
00051         bool autoboxwidth;      // automatic box width
00052         bool sort_points;       // sort points before plotting ?
00053 };
00054 
00055 #endif // STYLE_H

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