QCAD
Open Source 2D CAD
RDimRadialData.h
Go to the documentation of this file.
1 
20 #ifndef RDIMRADIALDATA_H
21 #define RDIMRADIALDATA_H
22 
23 #include "entity_global.h"
24 
25 #include "RDocument.h"
26 #include "RDimensionData.h"
27 #include "RVector.h"
28 
37  friend class RDimRadialEntity;
38 
39 protected:
41 
42 public:
44  RDimRadialData(const RDimensionData& dimData,
45  const RVector& chordPoint);
46 
47  virtual bool isValid() const;
48 
49  void setCenter(const RVector& p) {
51  }
52 
53  RVector getCenter() const {
54  return getDefinitionPoint();
55  }
56 
57  void setChordPoint(const RVector& p) {
58  chordPoint = p;
59  }
60 
62  return chordPoint;
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 
79 private:
82 };
83 
87 Q_DECLARE_METATYPE(QSharedPointer<RDimRadialData>)
88 
89 #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
RVector getCenter() const
Definition: RDimRadialData.h:53
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
#define RDEFAULT_RBOX
Definition: RBox.h:32
void setChordPoint(const RVector &p)
Definition: RDimRadialData.h:57
virtual QString getAutoLabel() const
Definition: RDimensionData.h:179
RVector getChordPoint() const
Definition: RDimRadialData.h:61
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
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
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
RDimRadialData data
Definition: RDimRadialEntity.h:126
Copyright (c) 2011-2016 by Andrew Mustun.
Definition: RDimRadialData.h:36
virtual bool rotate(double rotation, const RVector &center)
Definition: RDimensionData.cpp:177
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition: RS.h:128
virtual double getMeasuredValue() const
Definition: RDimensionData.h:178
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
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
RVector chordPoint
Chord point.
Definition: RDimRadialData.h:81
Definition: RS.h:129
Aligned dimension entity class.
Definition: RDimRadialEntity.h:38
void setCenter(const RVector &p)
Definition: RDimRadialData.h:49
RDocument * document
Definition: RObject.h:267