00001 /****************************************************************************************************** 00002 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released * 00003 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file * 00004 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. * 00005 ******************************************************************************************************/ 00006 00007 #ifndef CURVE_STYLE_H 00008 #define CURVE_STYLE_H 00009 00010 #include "LineStyle.h" 00011 #include "PointStyle.h" 00012 00013 class QTextStream; 00014 class QXmlStreamReader; 00015 class QXmlStreamWriter; 00016 00018 class CurveStyle 00019 { 00020 public: 00022 CurveStyle(); 00023 00025 CurveStyle (const LineStyle &lineStyle, 00026 const PointStyle &pointStyle); 00027 00029 LineStyle lineStyle() const; 00030 00032 QString loadXml (QXmlStreamReader &reader); 00033 00035 PointStyle pointStyle() const; 00036 00038 void printStream (QString indentation, 00039 QTextStream &str) const; 00040 00042 void saveXml(QXmlStreamWriter &writer, 00043 const QString &curveName) const; 00044 00046 void setLineColor (ColorPalette lineColor); 00047 00049 void setLineConnectAs (CurveConnectAs curveConnectAs); 00050 00052 void setLineStyle (const LineStyle &lineStyle); 00053 00055 void setLineWidth (int width); 00056 00058 void setPointColor (ColorPalette curveColor); 00059 00061 void setPointLineWidth (int width); 00062 00064 void setPointRadius (int radius); 00065 00067 void setPointShape (PointShape shape); 00068 00070 void setPointStyle (const PointStyle &pointStyle); 00071 00072 private: 00073 00074 PointStyle m_pointStyle; 00075 LineStyle m_lineStyle; 00076 }; 00077 00078 #endif // CURVE_STYLE_H