00001
00002
00003
00004
00005
00006
00007 #ifndef LINE_STYLE_H
00008 #define LINE_STYLE_H
00009
00010 #include "ColorPalette.h"
00011 #include "CurveConnectAs.h"
00012 #include <QColor>
00013
00014 class QTextStream;
00015 class QXmlStreamReader;
00016 class QXmlStreamWriter;
00017
00019 class LineStyle
00020 {
00021 public:
00023 LineStyle ();
00024
00026 LineStyle (unsigned int width,
00027 ColorPalette paletteColor,
00028 CurveConnectAs curveConnectAs);
00029
00031 LineStyle (const LineStyle &other);
00032
00034 LineStyle &operator= (const LineStyle &other);
00035
00037 CurveConnectAs curveConnectAs () const;
00038
00040 static LineStyle defaultAxesCurve ();
00041
00043 static LineStyle defaultGraphCurve (int index);
00044
00046 void loadXml(QXmlStreamReader &reader);
00047
00049 ColorPalette paletteColor() const;
00050
00052 void printStream (QString indentation,
00053 QTextStream &str) const;
00054
00056 void saveXml(QXmlStreamWriter &writer) const;
00057
00059 void setCurveConnectAs (CurveConnectAs curveConnectAs);
00060
00062 void setPaletteColor (ColorPalette paletteColor);
00063
00065 void setWidth (int width);
00066
00068 unsigned int width () const;
00069
00070 private:
00071
00072 unsigned int m_width;
00073 ColorPalette m_paletteColor;
00074 CurveConnectAs m_curveConnectAs;
00075 };
00076
00077 #endif // LINE_STYLE_H