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 DOCUMENT_MODEL_SEGMENTS_H 00008 #define DOCUMENT_MODEL_SEGMENTS_H 00009 00010 #include "ColorPalette.h" 00011 #include "DocumentModelAbstractBase.h" 00012 00013 class Document; 00014 class QTextStream; 00015 00017 class DocumentModelSegments : public DocumentModelAbstractBase 00018 { 00019 public: 00021 DocumentModelSegments(); 00022 00024 DocumentModelSegments(const Document &document); 00025 00027 DocumentModelSegments(const DocumentModelSegments &other); 00028 00030 DocumentModelSegments &operator=(const DocumentModelSegments &other); 00031 00033 bool fillCorners () const; 00034 00036 ColorPalette lineColor() const; 00037 00039 double lineWidth() const; 00040 00041 virtual void loadXml(QXmlStreamReader &reader); 00042 00044 double minLength() const; 00045 00047 double pointSeparation() const; 00048 00050 void printStream (QString indentation, 00051 QTextStream &str) const; 00052 00053 virtual void saveXml(QXmlStreamWriter &writer) const; 00054 00056 void setFillCorners (bool fillCorners); 00057 00059 void setLineColor(ColorPalette lineColor); 00060 00062 void setLineWidth (double lineWidth); 00063 00065 void setMinLength(double minLength); 00066 00068 void setPointSeparation(double pointSeparation); 00069 00070 private: 00071 00072 double m_pointSeparation; 00073 double m_minLength; 00074 bool m_fillCorners; 00075 double m_lineWidth; 00076 ColorPalette m_lineColor; 00077 }; 00078 00079 #endif // DOCUMENT_MODEL_SEGMENTS_H