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<RVector> getReferencePoints(
67 
68  virtual bool moveReferencePoint(const RVector& referencePoint,
69  const RVector& targetPoint);
70 
71  virtual bool move(const RVector& offset);
72  virtual bool rotate(double rotation, const RVector& center);
73  virtual bool scale(const RVector& scaleFactors, const RVector& center);
74  virtual bool mirror(const RLine& axis);
75 
76  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = false) const;
77  virtual double getMeasuredValue() const;
78  virtual QString getAutoLabel() const;
79  virtual void updateTextData() const;
80 
81 private:
84 };
85 
90 
91 #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:201
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:170
#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 bool move(const RVector &offset)
Moves this entity by the given offset.
Definition: RDimensionData.cpp:180
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:141
virtual bool rotate(double rotation, const RVector &center)
Definition: RDimensionData.cpp:190
void setChordPoint(const RVector &p)
Definition: RDimDiametricData.h:49
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition: RS.h:118
virtual double getMeasuredValue() const
Definition: RDimensionData.h:169
RDimDiametricData data
Definition: RDimDiametricEntity.h:134
Copyright (c) 2011-2015 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:63
Q_DECLARE_METATYPE(RMath *)
virtual QList< RVector > getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const
Definition: RDimensionData.cpp:128
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RDimensionData.h:38
RVector getFarChordPoint() const
Definition: RDimDiametricData.h:61
virtual void updateTextData() const
Definition: RDimensionData.cpp:549
RVector chordPoint
Chord point.
Definition: RDimDiametricData.h:83
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false) const
Definition: REntityData.h:88
virtual bool mirror(const RLine &axis)
Definition: RDimensionData.cpp:211
Low-level mathematical representation of a line.
Definition: RLine.h:42
Definition: RS.h:119
Aligned dimension entity class.
Definition: RDimDiametricEntity.h:38
RDocument * document
Definition: RObject.h:251