Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
DocumentModelCoords.h
1 #ifndef DOCUMENT_MODEL_COORDS_H
2 #define DOCUMENT_MODEL_COORDS_H
3 
4 #include "CoordScale.h"
5 #include "CoordsType.h"
6 #include "CoordUnitsNonPolarTheta.h"
7 #include "CoordUnitsPolarTheta.h"
8 #include "DocumentModelAbstractBase.h"
9 
10 class Document;
11 class QTextStream;
12 
15 {
16 public:
19 
21  DocumentModelCoords(const Document &document);
22 
25 
28 
30  CoordScale coordScaleXTheta () const;
31 
33  CoordScale coordScaleYRadius () const;
34 
36  CoordsType coordsType () const;
37 
39  CoordUnitsDate coordUnitsDate () const;
40 
42  CoordUnitsNonPolarTheta coordUnitsRadius () const;
43 
45  CoordUnitsPolarTheta coordUnitsTheta () const;
46 
48  CoordUnitsTime coordUnitsTime () const;
49 
51  CoordUnitsNonPolarTheta coordUnitsX () const;
52 
54  CoordUnitsNonPolarTheta coordUnitsY () const;
55 
56  virtual void loadXml(QXmlStreamReader &reader);
57 
59  double originRadius () const;
60 
62  void printStream (QString indentation,
63  QTextStream &str) const;
64 
65  virtual void saveXml(QXmlStreamWriter &writer) const;
66 
68  void setCoordScaleXTheta (CoordScale coordScale);
69 
71  void setCoordScaleYRadius (CoordScale coordScale);
72 
74  void setCoordsType (CoordsType coordsType);
75 
77  void setCoordUnitsDate (CoordUnitsDate coordUnits);
78 
80  void setCoordUnitsRadius (CoordUnitsNonPolarTheta coordUnits);
81 
83  void setCoordUnitsTheta (CoordUnitsPolarTheta coordUnits);
84 
86  void setCoordUnitsTime (CoordUnitsTime coordUnits);
87 
89  void setCoordUnitsX (CoordUnitsNonPolarTheta coordUnits);
90 
92  void setCoordUnitsY (CoordUnitsNonPolarTheta coordUnits);
93 
95  void setOriginRadius (double originRadius);
96 
98  double thetaPeriod () const;
99 
100 private:
101 
102  CoordsType m_coordsType;
103  double m_originRadius; // Applies to polar coordinates. Usually zero
104  CoordScale m_coordScaleXTheta;
105  CoordScale m_coordScaleYRadius;
106  CoordUnitsNonPolarTheta m_coordUnitsX; // Applies to x for cartesian coordinates
107  CoordUnitsNonPolarTheta m_coordUnitsY; // Applies to y for cartesian coordinates
108  CoordUnitsPolarTheta m_coordUnitsTheta; // Applies to theta for polar coordinates
109  CoordUnitsNonPolarTheta m_coordUnitsRadius; // Applies to radius for polar coordinates
110  CoordUnitsDate m_coordUnitsDate; // Applies to date/time coordinates
111  CoordUnitsTime m_coordUnitsTime;
112 };
113 
114 #endif // DOCUMENT_MODEL_COORDS_H
void setCoordUnitsTime(CoordUnitsTime coordUnits)
Set method for time units.
void setCoordUnitsDate(CoordUnitsDate coordUnits)
Set method for date units.
Abstract base class for document models. This class enforces a common interface for the leaf subclass...
void setCoordUnitsY(CoordUnitsNonPolarTheta coordUnits)
Set method for y units.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void setCoordUnitsX(CoordUnitsNonPolarTheta coordUnits)
Set method for x units.
CoordScale coordScaleYRadius() const
Get method for linear/log scale on y/radius.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
double originRadius() const
Get method for origin radius in polar mode.
void setCoordScaleYRadius(CoordScale coordScale)
Set method for linear/log scale on y/radius.
CoordUnitsNonPolarTheta coordUnitsRadius() const
Get method for radius units.
CoordUnitsTime coordUnitsTime() const
Get method for time format when used.
DocumentModelCoords & operator=(const DocumentModelCoords &other)
Assignment constructor.
DocumentModelCoords()
Default constructor.
double thetaPeriod() const
Return the period of the theta value for polar coordinates, consistent with CoordThetaUnits.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
CoordUnitsNonPolarTheta coordUnitsY() const
Get method for x units.
CoordScale coordScaleXTheta() const
Get method for linear/log scale on x/theta.
void setCoordUnitsTheta(CoordUnitsPolarTheta coordUnits)
Set method for theta units.
CoordsType coordsType() const
Get method for coordinates type.
CoordUnitsNonPolarTheta coordUnitsX() const
Get method for x units.
Model for DlgSettingsCoords and CmdSettingsCoords.
void setOriginRadius(double originRadius)
Set method for origin radius in polar mode.
Storage of one imported image and the data attached to that image.
Definition: Document.h:29
CoordUnitsDate coordUnitsDate() const
Get method for date format when used.
void setCoordUnitsRadius(CoordUnitsNonPolarTheta coordUnits)
Set method for radius units.
void setCoordScaleXTheta(CoordScale coordScale)
Set method for linear/log scale on x/theta.
CoordUnitsPolarTheta coordUnitsTheta() const
Get method for theta unit.
void setCoordsType(CoordsType coordsType)
Set method for coordinates type.