OpenIndy-Core  0.2.0.43
scalarentitydistance.h
Go to the documentation of this file.
1 #ifndef SCALARENTITYDISTANCE_H
2 #define SCALARENTITYDISTANCE_H
3 
4 #include <QObject>
5 #include <QtXml>
6 
7 #include "geometry.h"
8 
9 namespace oi{
10 
15 {
16  Q_OBJECT
17 
18 public:
19  ScalarEntityDistance(const bool &isNominal, QObject *parent = 0);
20  ScalarEntityDistance(const bool &isNominal, const double &distance, QObject *parent = 0);
21 
22  ScalarEntityDistance(const ScalarEntityDistance &copy, QObject *parent = 0);
23 
24  ScalarEntityDistance &operator=(const ScalarEntityDistance &copy);
25 
27 
28  //########################################
29  //order of unknown parameters (Qxx-matrix)
30  //########################################
31 
33  unknownDistance = 0
34  };
35 
36  //##############################
37  //get or set distance parameters
38  //##############################
39 
40  const double &getDistance() const;
41 
42  void setDistance(const double &distance);
43 
44  //#############################
45  //get or set unknown parameters
46  //#############################
47 
48  virtual QMap<GeometryParameters, QString> getUnknownParameters(const QMap<DimensionType, UnitType> &displayUnits,
49  const QMap<DimensionType, int> &displayDigits) const;
50  virtual void setUnknownParameters(const QMap<GeometryParameters, double> &parameters);
51 
52  //###########################
53  //reexecute the function list
54  //###########################
55 
56  void recalc();
57 
58  //#################
59  //save and load XML
60  //#################
61 
62  QDomElement toOpenIndyXML(QDomDocument &xmlDoc) const;
63  bool fromOpenIndyXML(QDomElement &xmlElem);
64 
65  //###############
66  //display methods
67  //###############
68 
69  QString getDisplayDistance(const UnitType &type, const int &digits, const bool &showDiff = false) const;
70 
71 private:
72 
73  //###################
74  //distance attributes
75  //###################
76 
77  double distance;
78 
79 };
80 
81 }
82 
83 #endif // SCALARENTITYDISTANCE_H
Definition: coordinatesystem.h:15
The Geometry class.
Definition: geometry.h:26
The ScalarEntityDistance class.
Definition: scalarentitydistance.h:14
DistanceUnknowns
Definition: scalarentitydistance.h:32
UnitType
Definition: types.h:354
#define OI_CORE_EXPORT
Definition: types.h:11