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 RS::EntityType getType() const {
49  }
50  virtual bool isValid() const;
51  virtual bool isSane() const;
52 
53  void setChordPoint(const RVector& p) {
54  chordPoint = p;
55  }
56 
58  return chordPoint;
59  }
60 
61  void setFarChordPoint(const RVector& p) {
63  }
64 
66  return getDefinitionPoint();
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  virtual void updateTextData() const;
83 
84 private:
87 };
88 
93 
94 #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
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:184
EntityType
Entity types used for property handling / filtering.
Definition: RS.h:76
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
RVector getChordPoint() const
Definition: RDimDiametricData.h:57
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
void setFarChordPoint(const RVector &p)
Definition: RDimDiametricData.h:61
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
virtual bool rotate(double rotation, const RVector &center)
Definition: RDimensionData.cpp:181
void setChordPoint(const RVector &p)
Definition: RDimDiametricData.h:53
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
RDimDiametricData data
Definition: RDimDiametricEntity.h:131
Copyright (c) 2011-2017 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-2017 by Andrew Mustun.
Definition: RDimensionData.h:38
RVector getFarChordPoint() const
Definition: RDimDiametricData.h:65
virtual void updateTextData() const
Definition: RDimensionData.cpp:565
RVector chordPoint
Chord point.
Definition: RDimDiametricData.h:86
virtual bool mirror(const RLine &axis)
Definition: RDimensionData.cpp:209
Low-level mathematical representation of a line.
Definition: RLine.h:41
Definition: RS.h:132
Diametric Dimension.
Definition: RS.h:113
Aligned dimension entity class.
Definition: RDimDiametricEntity.h:38
virtual RS::EntityType getType() const
Definition: RDimDiametricData.h:47
RDocument * document
Definition: RObject.h:271