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 RS::EntityType getType() const {
48  return RS::EntityDimRadial;
49  }
50  virtual bool isValid() const;
51  virtual bool isSane() const;
52 
53  void setCenter(const RVector& p) {
55  }
56 
57  RVector getCenter() const {
58  return getDefinitionPoint();
59  }
60 
61  void setChordPoint(const RVector& p) {
62  chordPoint = p;
63  }
64 
66  return chordPoint;
67  }
68 
69  virtual QList<RRefPoint> getReferencePoints(RS::ProjectionRenderingHint hint = RS::RenderTop) const;
70 
71  virtual bool moveReferencePoint(const RVector& referencePoint,
72  const RVector& targetPoint);
73 
74  virtual bool move(const RVector& offset);
75  virtual bool rotate(double rotation, const RVector& center);
76  virtual bool scale(const RVector& scaleFactors, const RVector& center);
77  virtual bool mirror(const RLine& axis);
78 
79  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = false, bool segment = false) const;
80  virtual double getMeasuredValue() const;
81  virtual QString getAutoLabel() const;
82 
83 private:
86 };
87 
91 Q_DECLARE_METATYPE(QSharedPointer<RDimRadialData>)
92 
93 #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:192
RVector getCenter() const
Definition: RDimRadialData.h:57
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:61
virtual QString getAutoLabel() const
Definition: RDimensionData.h:184
EntityType
Entity types used for property handling / filtering.
Definition: RS.h:76
RVector getChordPoint() const
Definition: RDimRadialData.h:65
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
RVector getDefinitionPoint() const
Definition: RDimensionData.h:69
virtual void setDefinitionPoint(const RVector &p)
Definition: RDimensionData.h:64
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false) const
Definition: REntityData.h:104
virtual QList< RRefPoint > getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const
Definition: RDimensionData.cpp:132
virtual bool move(const RVector &offset)
Moves this entity by the given offset.
Definition: RDimensionData.cpp:171
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:143
RDimRadialData data
Definition: RDimRadialEntity.h:122
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RDimRadialData.h:36
virtual bool rotate(double rotation, const RVector &center)
Definition: RDimensionData.cpp:181
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition: RS.h:131
virtual double getMeasuredValue() const
Definition: RDimensionData.h:183
virtual bool isSane() const
Definition: RDimensionData.cpp:107
virtual RS::EntityType getType() const
Definition: RDimRadialData.h:47
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-2017 by Andrew Mustun.
Definition: RDimensionData.h:38
virtual bool mirror(const RLine &axis)
Definition: RDimensionData.cpp:209
Low-level mathematical representation of a line.
Definition: RLine.h:41
RVector chordPoint
Chord point.
Definition: RDimRadialData.h:85
Definition: RS.h:132
Radial Dimension.
Definition: RS.h:112
Aligned dimension entity class.
Definition: RDimRadialEntity.h:38
void setCenter(const RVector &p)
Definition: RDimRadialData.h:53
RDocument * document
Definition: RObject.h:271