QCAD
Open Source 2D CAD
RDimAlignedData.h
Go to the documentation of this file.
1 
20 #ifndef RDIMALIGNEDDATA_H
21 #define RDIMALIGNEDDATA_H
22 
23 #include "entity_global.h"
24 
25 #include "RDocument.h"
26 #include "RDimLinearData.h"
27 #include "RVector.h"
28 
37  friend class RDimAlignedEntity;
38 
39 protected:
41 
42 public:
44  RDimAlignedData(const RDimensionData& dimData,
45  const RVector& extensionPoint1,
46  const RVector& extensionPoint2);
47 
48  virtual RS::EntityType getType() const {
49  return RS::EntityDimAligned;
50  }
51  virtual RBox getBoundingBox(bool ignoreEmpty=false) const;
52 
53  virtual QList<RRefPoint> getReferencePoints(RS::ProjectionRenderingHint hint = RS::RenderTop) const;
54 
55  virtual bool moveReferencePoint(const RVector& referencePoint,
56  const RVector& targetPoint);
57 
58  virtual void recomputeDefinitionPoint(
59  const RVector& oldExtPoint1, const RVector& oldExtPoint2,
60  const RVector& newExtPoint1, const RVector& newExtPoint2);
61 
62  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = false, bool segment = false) const;
63  virtual double getMeasuredValue() const;
64  virtual QString getAutoLabel() const;
65 
66 private:
67  // for caching only:
70 };
71 
75 Q_DECLARE_METATYPE(QSharedPointer<RDimAlignedData>)
76 
77 #endif
Represents a box e.g.
Definition: RBox.h:43
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
virtual RS::EntityType getType() const
Definition: RDimAlignedData.h:48
#define RDEFAULT_RBOX
Definition: RBox.h:32
virtual QString getAutoLabel() const
Definition: RDimensionData.h:185
EntityType
Entity types used for property handling / filtering.
Definition: RS.h:76
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
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: RDimLinearData.cpp:62
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
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RDimAlignedData.h:36
RVector refDefinitionPoint1
Definition: RDimAlignedData.h:68
Linear aligned Dimension.
Definition: RS.h:110
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition: RS.h:131
RDimAlignedData data
Definition: RDimAlignedEntity.h:132
virtual double getMeasuredValue() const
Definition: RDimensionData.h:184
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 void recomputeDefinitionPoint(const RVector &oldExtPoint1, const RVector &oldExtPoint2, const RVector &newExtPoint1, const RVector &newExtPoint2)
Definition: RDimLinearData.h:76
Definition: RS.h:132
virtual RBox getBoundingBox(bool ignoreEmpty=false) const
Definition: RDimensionData.cpp:93
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RDimLinearData.h:36
Aligned dimension entity class.
Definition: RDimAlignedEntity.h:38
RVector refDefinitionPoint2
Definition: RDimAlignedData.h:69
RDocument * document
Definition: RObject.h:271