Engauge Digitizer  2
DocumentModelSegments.h
Go to the documentation of this file.
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef DOCUMENT_MODEL_SEGMENTS_H
8 #define DOCUMENT_MODEL_SEGMENTS_H
9 
10 #include "ColorPalette.h"
12 
13 class Document;
14 class QTextStream;
15 
18 {
19 public:
22 
24  DocumentModelSegments(const Document &document);
25 
28 
31 
33  bool fillCorners () const;
34 
36  ColorPalette lineColor() const;
37 
39  double lineWidth() const;
40 
41  virtual void loadXml(QXmlStreamReader &reader);
42 
44  double minLength() const;
45 
47  double pointSeparation() const;
48 
50  void printStream (QString indentation,
51  QTextStream &str) const;
52 
53  virtual void saveXml(QXmlStreamWriter &writer) const;
54 
56  void setFillCorners (bool fillCorners);
57 
60 
62  void setLineWidth (double lineWidth);
63 
65  void setMinLength(double minLength);
66 
69 
70 private:
71 
72  double m_pointSeparation;
73  double m_minLength;
74  bool m_fillCorners;
75  double m_lineWidth;
76  ColorPalette m_lineColor;
77 };
78 
79 #endif // DOCUMENT_MODEL_SEGMENTS_H
DocumentModelSegments::lineColor
ColorPalette lineColor() const
Get method for line color.
Definition: DocumentModelSegments.cpp:63
DocumentModelAbstractBase.h
DocumentModelSegments::fillCorners
bool fillCorners() const
Get method for fill corners.
Definition: DocumentModelSegments.cpp:58
DocumentModelSegments::setLineColor
void setLineColor(ColorPalette lineColor)
Set method for line color.
Definition: DocumentModelSegments.cpp:139
ColorPalette
ColorPalette
Definition: ColorPalette.h:11
Document
Storage of one imported image and the data attached to that image.
Definition: Document.h:40
DocumentModelSegments::operator=
DocumentModelSegments & operator=(const DocumentModelSegments &other)
Assignment constructor.
Definition: DocumentModelSegments.cpp:47
DocumentModelSegments::loadXml
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Definition: DocumentModelSegments.cpp:73
DocumentModelSegments::minLength
double minLength() const
Get method for min length.
Definition: DocumentModelSegments.cpp:94
DocumentModelSegments::DocumentModelSegments
DocumentModelSegments()
Default constructor.
Definition: DocumentModelSegments.cpp:20
DocumentModelSegments::setMinLength
void setMinLength(double minLength)
Set method for min length.
Definition: DocumentModelSegments.cpp:149
DocumentModelAbstractBase
Abstract base class for document models. This class enforces a common interface for the leaf subclass...
Definition: DocumentModelAbstractBase.h:15
DocumentModelSegments
Model for DlgSettingsSegments and CmdSettingsSegments.
Definition: DocumentModelSegments.h:16
DocumentModelSegments::pointSeparation
double pointSeparation() const
Get method for point separation.
Definition: DocumentModelSegments.cpp:99
DocumentModelSegments::setFillCorners
void setFillCorners(bool fillCorners)
Set method for fill corners.
Definition: DocumentModelSegments.cpp:134
DocumentModelSegments::setLineWidth
void setLineWidth(double lineWidth)
Set method for line width.
Definition: DocumentModelSegments.cpp:144
DocumentModelSegments::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: DocumentModelSegments.cpp:104
DocumentModelSegments::setPointSeparation
void setPointSeparation(double pointSeparation)
Set method for point separation.
Definition: DocumentModelSegments.cpp:154
DocumentModelSegments::lineWidth
double lineWidth() const
Get method for line width.
Definition: DocumentModelSegments.cpp:68
DocumentModelSegments::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Definition: DocumentModelSegments.cpp:118
ColorPalette.h