Added App::PropertyArea (same as PropertyLength but uses Area units)
This commit is contained in:
@@ -1096,6 +1096,7 @@ void Application::initTypes(void)
|
||||
App ::PropertyAngle ::init();
|
||||
App ::PropertyDistance ::init();
|
||||
App ::PropertyLength ::init();
|
||||
App ::PropertyArea ::init();
|
||||
App ::PropertySpeed ::init();
|
||||
App ::PropertyAcceleration ::init();
|
||||
App ::PropertyForce ::init();
|
||||
|
||||
@@ -232,6 +232,19 @@ PropertyLength::PropertyLength()
|
||||
setConstraints(&LengthStandard);
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
//**************************************************************************
|
||||
// PropertyArea
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
TYPESYSTEM_SOURCE(App::PropertyArea, App::PropertyQuantityConstraint);
|
||||
|
||||
PropertyArea::PropertyArea()
|
||||
{
|
||||
setUnit(Base::Unit::Area);
|
||||
setConstraints(&LengthStandard);
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
//**************************************************************************
|
||||
// PropertyAngle
|
||||
|
||||
@@ -138,6 +138,18 @@ public:
|
||||
virtual ~PropertyLength(){}
|
||||
};
|
||||
|
||||
/** Area property
|
||||
* This is a property for representing areas. It is basically a float
|
||||
* property which must not be negative. On the Gui it has a quantity like m^2 or mm^2.
|
||||
*/
|
||||
class AppExport PropertyArea : public PropertyQuantityConstraint
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
public:
|
||||
PropertyArea(void);
|
||||
virtual ~PropertyArea(){}
|
||||
};
|
||||
|
||||
/** Angle property
|
||||
* This is a property for representing angles. It basicly a float
|
||||
* property. On the Gui it has a quantity like RAD.
|
||||
|
||||
Reference in New Issue
Block a user