diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 297d9c4c0..372f18902 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -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(); diff --git a/src/App/PropertyUnits.cpp b/src/App/PropertyUnits.cpp index 72c9626ab..cb6eeb12f 100644 --- a/src/App/PropertyUnits.cpp +++ b/src/App/PropertyUnits.cpp @@ -232,6 +232,19 @@ PropertyLength::PropertyLength() setConstraints(&LengthStandard); } +//************************************************************************** +//************************************************************************** +// PropertyArea +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +TYPESYSTEM_SOURCE(App::PropertyArea, App::PropertyQuantityConstraint); + +PropertyArea::PropertyArea() +{ + setUnit(Base::Unit::Area); + setConstraints(&LengthStandard); +} + //************************************************************************** //************************************************************************** // PropertyAngle diff --git a/src/App/PropertyUnits.h b/src/App/PropertyUnits.h index 771cc175d..a739f9f48 100644 --- a/src/App/PropertyUnits.h +++ b/src/App/PropertyUnits.h @@ -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.