27 #ifndef GEOMGUI_DIMENSIONPROPERTY_H
28 #define GEOMGUI_DIMENSIONPROPERTY_H
31 #include <AIS_DiameterDimension.hxx>
32 #include <AIS_LengthDimension.hxx>
33 #include <AIS_AngleDimension.hxx>
37 #include <QSharedPointer>
43 class SalomeApp_Study;
99 virtual void ToValues(std::vector<double>& theValues)
const = 0;
100 virtual void FromValues(
int& theIt,
const std::vector<double>& theValues) = 0;
112 Record( DimensionType_Length ),
113 FirstPoint( gp::Origin() ),
114 SecondPoint( gp::Origin() ),
117 TextHPos( Prs3d_DTHP_Fit ),
118 TextVPos( Prs3d_DTVP_Center ),
119 ArrowPos( Prs3d_DAO_Fit )
123 Record( DimensionType_Length ),
124 FirstPoint( theOther.FirstPoint ),
125 SecondPoint( theOther.SecondPoint ),
126 Plane( theOther.Plane ),
127 Flyout( theOther.Flyout ),
128 TextHPos( theOther.TextHPos ),
129 TextVPos( theOther.TextVPos ),
130 ArrowPos( theOther.ArrowPos )
140 void Init(
const Handle(AIS_LengthDimension)& theIO,
const gp_Ax3& theLCS );
147 void Update(
Handle(AIS_LengthDimension)& theIO,
const gp_Ax3& theLCS );
153 void ToValues(std::vector<double>& theValues)
const;
160 void FromValues(
int& theIt,
const std::vector<double>& theValues);
165 bool operator == (
const Length &theOther)
const;
166 bool operator != (
const Length &theOther)
const {
return !(operator == (theOther)); }
183 Record( DimensionType_Diameter ),
186 TextHPos( Prs3d_DTHP_Fit ),
187 TextVPos( Prs3d_DTVP_Center ),
188 ArrowPos( Prs3d_DAO_Fit )
192 Record( DimensionType_Diameter ),
193 Circle( theOther.Circle ),
194 Plane( theOther.Plane ),
195 Flyout( theOther.Flyout ),
196 TextHPos( theOther.TextHPos ),
197 TextVPos( theOther.TextVPos ),
198 ArrowPos( theOther.ArrowPos )
221 void ToValues(std::vector<double>& theValues)
const;
228 void FromValues(
int& theIt,
const std::vector<double>& theValues);
233 bool operator == (
const Diameter &theOther)
const;
234 bool operator != (
const Diameter &theOther)
const {
return !(operator == (theOther)); }
250 Record( DimensionType_Angle ),
251 FirstPoint( gp::Origin() ),
252 SecondPoint( gp::Origin() ),
253 CenterPoint( gp::Origin() ),
255 TextHPos( Prs3d_DTHP_Fit ),
256 TextVPos( Prs3d_DTVP_Center ),
257 ArrowPos( Prs3d_DAO_Fit )
261 Record( DimensionType_Angle ),
262 FirstPoint( theOther.FirstPoint ),
263 SecondPoint( theOther.SecondPoint ),
264 CenterPoint( theOther.CenterPoint ),
265 Flyout( theOther.Flyout ),
266 TextHPos( theOther.TextHPos ),
267 TextVPos( theOther.TextVPos ),
268 ArrowPos( theOther.ArrowPos )
291 void ToValues(std::vector<double>& theValues)
const;
298 void FromValues(
int& theIt,
const std::vector<double>& theValues);
303 bool operator == (
const Angle &theOther)
const;
304 bool operator != (
const Angle &theOther)
const {
return !(operator == (theOther)); }
347 operator QVariant()
const;
352 operator QString()
const;
379 void AddRecord(
const Handle(AIS_Dimension)& theIO,
const gp_Ax3& theLCS );
385 void AddRecord(
const RecordPtr& theRecord );
394 const Handle(AIS_Dimension)& theIO,
395 const gp_Ax3& theLCS );
402 void SetRecord(
const int theIndex,
const RecordPtr& theRecord );
408 const RecordPtr&
GetRecord(
const int theIndex )
const;
428 bool IsVisible(
const int theIndex )
const;
436 void SetVisible(
const int theIndex,
const bool theIsVisible );
443 QString
GetName(
const int theIndex )
const;
451 void SetName(
const int theIndex,
const QString& theName );
456 int GetType(
const int theIndex )
const;
465 void LoadFromAttribute( SalomeApp_Study* theStudy,
const std::string& theEntry );
472 void SaveToAttribute( SalomeApp_Study* theStudy,
const std::string& theEntry );