Added App::PropertyArea (same as PropertyLength but uses Area units)

This commit is contained in:
Yorik van Havre 2016-08-29 19:26:11 -03:00
parent 0d25df0c61
commit ab803c7b40
3 changed files with 26 additions and 0 deletions

View File

@ -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();

View File

@ -232,6 +232,19 @@ PropertyLength::PropertyLength()
setConstraints(&LengthStandard);
}
//**************************************************************************
//**************************************************************************
// PropertyArea
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TYPESYSTEM_SOURCE(App::PropertyArea, App::PropertyQuantityConstraint);
PropertyArea::PropertyArea()
{
setUnit(Base::Unit::Area);
setConstraints(&LengthStandard);
}
//**************************************************************************
//**************************************************************************
// PropertyAngle

View File

@ -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.