Added new property type App::PropertyVolume

This commit is contained in:
Yorik van Havre 2016-10-04 16:02:30 -03:00
parent 5a88307e3e
commit 35811f7e3c
3 changed files with 26 additions and 0 deletions

View File

@ -1097,6 +1097,7 @@ void Application::initTypes(void)
App ::PropertyDistance ::init();
App ::PropertyLength ::init();
App ::PropertyArea ::init();
App ::PropertyVolume ::init();
App ::PropertySpeed ::init();
App ::PropertyAcceleration ::init();
App ::PropertyForce ::init();

View File

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

View File

@ -150,6 +150,18 @@ public:
virtual ~PropertyArea(){}
};
/** Volume property
* This is a property for representing volumes. It is basically a float
* property which must not be negative. On the Gui it has a quantity like m^3 or mm^3.
*/
class AppExport PropertyVolume : public PropertyQuantityConstraint
{
TYPESYSTEM_HEADER();
public:
PropertyVolume(void);
virtual ~PropertyVolume(){}
};
/** Angle property
* This is a property for representing angles. It basicly a float
* property. On the Gui it has a quantity like RAD.