OpenIndy-Core  0.2.0.43
point.h
Go to the documentation of this file.
1 #ifndef POINT_H
2 #define POINT_H
3 
4 #include <QObject>
5 #include <QtXml>
6 
7 #include "geometry.h"
8 #include "position.h"
9 
10 namespace oi{
11 
16 {
17  friend class Station;
18  Q_OBJECT
19 
20 public:
21  Point(const bool &isNominal, QObject *parent = 0);
22  Point(const bool &isNominal, const Position &xyz, QObject *parent = 0);
23 
24  Point(const Point &copy, QObject *parent = 0);
25 
26  Point &operator=(const Point &copy);
27 
28  ~Point();
29 
30  //########################################
31  //order of unknown parameters (Qxx-matrix)
32  //########################################
33 
35  unknownCenterX = 0,
37  unknownCenterZ
38  };
39 
40  //###################################################################
41  //check wether this geometry has a direction, a position and a radius
42  //###################################################################
43 
44  bool hasPosition() const;
45 
46  //###########################
47  //get or set point parameters
48  //###########################
49 
50  const Position &getPosition() const;
51 
52  void setPoint(const Position &xyz);
53 
54  //#############################
55  //get or set unknown parameters
56  //#############################
57 
58  virtual QMap<GeometryParameters, QString> getUnknownParameters(const QMap<DimensionType, UnitType> &displayUnits,
59  const QMap<DimensionType, int> &displayDigits) const;
60  virtual void setUnknownParameters(const QMap<GeometryParameters, double> &parameters);
61 
62  //###########################
63  //reexecute the function list
64  //###########################
65 
66  void recalc();
67 
68  //#################
69  //save and load XML
70  //#################
71 
72  QDomElement toOpenIndyXML(QDomDocument &xmlDoc) const;
73  bool fromOpenIndyXML(QDomElement &xmlElem);
74 
75  //###############
76  //display methods
77  //###############
78 
79  QString getDisplayX(const UnitType &type, const int &digits, const bool &showDiff = false) const;
80  QString getDisplayY(const UnitType &type, const int &digits, const bool &showDiff = false) const;
81  QString getDisplayZ(const UnitType &type, const int &digits, const bool &showDiff = false) const;
82 
83 private:
84 
85  //################
86  //point attributes
87  //################
88 
89  Position xyz; //position
90 
91 };
92 
93 }
94 
95 #endif // POINT_H
The Position class.
Definition: position.h:16
Definition: coordinatesystem.h:15
PointUnknowns
Definition: point.h:34
Definition: point.h:36
The Station class.
Definition: station.h:23
The Geometry class.
Definition: geometry.h:26
UnitType
Definition: types.h:354
#define OI_CORE_EXPORT
Definition: types.h:11
The Point class.
Definition: point.h:15