QCAD
Open Source 2D CAD
RDimDiametricData.h
Go to the documentation of this file.
1 
20 #ifndef RDIMDIAMETRICDATA_H
21 #define RDIMDIAMETRICDATA_H
22 
23 #include "entity_global.h"
24 
25 #include "RDocument.h"
26 #include "RDimensionData.h"
27 #include "RVector.h"
28 
37  friend class RDimDiametricEntity;
38 
39 protected:
41 
42 public:
44  RDimDiametricData(const RDimensionData& dimData,
45  const RVector& choordPoint);
46 
47  virtual bool isValid() const;
48 
49  void setChordPoint(const RVector& p) {
50  chordPoint = p;
51  }
52 
54  return chordPoint;
55  }
56 
57  void setFarChordPoint(const RVector& p) {
59  }
60 
62  return getDefinitionPoint();
63  }
64 
65  virtual QList<RRefPoint> getReferencePoints(RS::ProjectionRenderingHint hint = RS::RenderTop) const;
66 
67  virtual bool moveReferencePoint(const RVector& referencePoint,
68  const RVector& targetPoint);
69 
70  virtual bool move(const RVector& offset);
71  virtual bool rotate(double rotation, const RVector& center);
72  virtual bool scale(const RVector& scaleFactors, const RVector& center);
73  virtual bool mirror(const RLine& axis);
74 
75  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = false) const;
76  virtual double getMeasuredValue() const;
77  virtual QString getAutoLabel() const;
78  virtual void updateTextData() const;
79 
80 private:
83 };
84 
89 
90 #endif
Represents a box e.g.
Definition: RBox.h:43
virtual bool isValid() const
Definition: RDimensionData.cpp:103
virtual bool scale(const RVector &scaleFactors, const RVector &center)
Definition: RDimensionData.cpp:188
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
#define RDEFAULT_RBOX
Definition: RBox.h:32
virtual QString getAutoLabel() const
Definition: RDimensionData.h:179
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
RVector getChordPoint() const
Definition: RDimDiametricData.h:53
RVector getDefinitionPoint() const
Definition: RDimensionData.h:65
virtual void setDefinitionPoint(const RVector &p)
Definition: RDimensionData.h:60
virtual QList< RRefPoint > getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const
Definition: RDimensionData.cpp:128
virtual bool move(const RVector &offset)
Moves this entity by the given offset.
Definition: RDimensionData.cpp:167
void setFarChordPoint(const RVector &p)
Definition: RDimDiametricData.h:57
virtual bool moveReferencePoint(const RVector &referencePoint, const RVector &targetPoint)
Moves the given reference point to the given target point or does nothing if this entity has no refer...
Definition: RDimensionData.cpp:139
virtual bool rotate(double rotation, const RVector &center)
Definition: RDimensionData.cpp:177
void setChordPoint(const RVector &p)
Definition: RDimDiametricData.h:49
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition: RS.h:129
virtual double getMeasuredValue() const
Definition: RDimensionData.h:178
RDimDiametricData data
Definition: RDimDiametricEntity.h:135
Copyright (c) 2011-2016 by Andrew Mustun.
Definition: RDimDiametricData.h:36
A graphics document contains and owns entities, layers, user coordinate systems, variables, block definitions, etc.
Definition: RDocument.h:67
Q_DECLARE_METATYPE(RMath *)
Copyright (c) 2011-2016 by Andrew Mustun.
Definition: RDimensionData.h:38
RVector getFarChordPoint() const
Definition: RDimDiametricData.h:61
virtual void updateTextData() const
Definition: RDimensionData.cpp:559
RVector chordPoint
Chord point.
Definition: RDimDiametricData.h:82
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false) const
Definition: REntityData.h:89
virtual bool mirror(const RLine &axis)
Definition: RDimensionData.cpp:205
Low-level mathematical representation of a line.
Definition: RLine.h:42
Definition: RS.h:130
Aligned dimension entity class.
Definition: RDimDiametricEntity.h:38
RDocument * document
Definition: RObject.h:267