Engauge Digitizer 2
Loading...
Searching...
No Matches
DocumentModelGuideline.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2019 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_GUIDELINE_H
8#define DOCUMENT_MODEL_GUIDELINE_H
9
10#include "ColorPalette.h"
12#include "GuidelineValues.h"
13
14class Document;
15class QTextStream;
16
22{
23public:
26
28 DocumentModelGuideline(const Document &document);
29
32
35
37 double creationCircleRadius () const;
38
40 ColorPalette lineColor() const;
41
43 double lineWidthActive () const;
44
46 double lineWidthInactive () const;
47
48 virtual void loadXml(QXmlStreamReader &reader);
49
51 void printStream (QString indentation,
52 QTextStream &str) const;
53
54 virtual void saveXml(QXmlStreamWriter &writer) const;
55
57 void setCreationCircleRadius (double radius);
58
61
63 void setLineWidthActive (double lineWidth);
64
66 void setLineWidthInactive (double lineWidth);
67
70
73
75 GuidelineValues valuesX () const;
76
78 GuidelineValues valuesY () const;
79
80private:
81
82 void loadXmlVector (QXmlStreamReader &reader,
83 const QString &tokenEnd,
84 GuidelineValues &guidelineValues) const;
85 void saveXmlVector (QXmlStreamWriter &writer,
86 const QString &tokenAll,
87 const GuidelineValues &values) const;
88
89 GuidelineValues m_valuesX;
90 GuidelineValues m_valuesY;
91 double m_creationCircleRadius;
92 ColorPalette m_lineColor;
93 double m_lineWidthActive;
94 double m_lineWidthInactive;
95};
96
97#endif // DOCUMENT_MODEL_GUIDELINE_H
ColorPalette
QMap< QString, double > GuidelineValues
DocumentModelAbstractBase()
Single constructor.
void setLineColor(ColorPalette lineColor)
Set method for line color.
void setLineWidthInactive(double lineWidth)
Set method for line width when inactive.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setCreationCircleRadius(double radius)
Set method for creation circle radius in pixels.
DocumentModelGuideline()
Default constructor.
DocumentModelGuideline & operator=(const DocumentModelGuideline &other)
Assignment constructor.
void setLineWidthActive(double lineWidth)
Set method for line width when active.
GuidelineValues valuesY() const
Get method for y/r values.
double lineWidthInactive() const
Get method for line width when inactive.
double creationCircleRadius() const
Get method for creation circle radius in pixels.
GuidelineValues valuesX() const
Get method for x/t values.
void setValuesY(const GuidelineValues &valuesY)
Set method for y/r values.
ColorPalette lineColor() const
Get method for line color.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setValuesX(const GuidelineValues &valuesX)
Set method for x/t values.
double lineWidthActive() const
Get method for line width when active.
Storage of one imported image and the data attached to that image.
Definition Document.h:44