00001
00002
00003
00004
00005
00006
00007 #ifndef POINT_STYLE_H
00008 #define POINT_STYLE_H
00009
00010 #include "ColorPalette.h"
00011 #include "PointShape.h"
00012 #include <QColor>
00013 #include <QPolygonF>
00014
00015 class QTextStream;
00016 class QXmlStreamReader;
00017 class QXmlStreamWriter;
00018
00020 class PointStyle
00021 {
00022 public:
00024 PointStyle ();
00025
00027 PointStyle(PointShape pointShape,
00028 unsigned int radius,
00029 int lineWidth,
00030 ColorPalette paletteColor);
00031
00033 PointStyle (const PointStyle &other);
00034
00036 PointStyle &operator=(const PointStyle &other);
00037
00039 static PointStyle defaultAxesCurve ();
00040
00042 static PointStyle defaultGraphCurve (int index);
00043
00045 bool isCircle () const;
00046
00048 int lineWidth () const;
00049
00051 void loadXml(QXmlStreamReader &reader);
00052
00054 ColorPalette paletteColor () const;
00055
00057 QPolygonF polygon () const;
00058
00060 void printStream (QString indentation,
00061 QTextStream &str) const;
00062
00064 int radius () const;
00065
00067 void saveXml(QXmlStreamWriter &writer) const;
00068
00070 void setLineWidth (int width);
00071
00073 void setPaletteColor (ColorPalette paletteColor);
00074
00076 void setRadius (int radius);
00077
00079 void setShape (PointShape shape);
00080
00082 PointShape shape () const;
00083
00084 private:
00085
00086 PointShape m_shape;
00087 unsigned int m_radius;
00088 int m_lineWidth;
00089 ColorPalette m_paletteColor;
00090 };
00091
00092 #endif // POINT_STYLE_H