add inputfield to property editor for PropertyQuantity and PropertyQuantityConstraint
This commit is contained in:
@@ -46,7 +46,8 @@ using namespace Base;
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
const PropertyQuantityConstraint::Constraints LengthStandart = {0.0,(double)INT_MAX,1.0};
|
||||
const PropertyQuantityConstraint::Constraints AngleStandart = {-360,360,1.0};
|
||||
|
||||
//**************************************************************************
|
||||
//**************************************************************************
|
||||
@@ -62,7 +63,7 @@ Base::Quantity PropertyQuantity::getQuantityValue(void) const
|
||||
|
||||
const char* PropertyQuantity::getEditorName(void) const
|
||||
{
|
||||
return "Gui::PropertyEditor::PropertyUnitItem";
|
||||
return "Gui::PropertyEditor::PropertyUnitItem";
|
||||
}
|
||||
|
||||
PyObject *PropertyQuantity::getPyObject(void)
|
||||
@@ -127,6 +128,12 @@ void PropertyQuantityConstraint::setConstraints(const Constraints* sConstrain)
|
||||
_ConstStruct = sConstrain;
|
||||
}
|
||||
|
||||
const char* PropertyQuantityConstraint::getEditorName(void) const
|
||||
{
|
||||
return "Gui::PropertyEditor::PropertyUnitConstraintItem";
|
||||
}
|
||||
|
||||
|
||||
const PropertyQuantityConstraint::Constraints* PropertyQuantityConstraint::getConstraints(void) const
|
||||
{
|
||||
return _ConstStruct;
|
||||
@@ -198,11 +205,12 @@ PropertyAcceleration::PropertyAcceleration()
|
||||
// PropertyLength
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
TYPESYSTEM_SOURCE(App::PropertyLength, App::PropertyQuantity);
|
||||
TYPESYSTEM_SOURCE(App::PropertyLength, App::PropertyQuantityConstraint);
|
||||
|
||||
PropertyLength::PropertyLength()
|
||||
{
|
||||
setUnit(Base::Unit::Length);
|
||||
setConstraints( &LengthStandart );
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
@@ -215,6 +223,7 @@ TYPESYSTEM_SOURCE(App::PropertyAngle, App::PropertyQuantityConstraint);
|
||||
PropertyAngle::PropertyAngle()
|
||||
{
|
||||
setUnit(Base::Unit::Angle);
|
||||
setConstraints( &AngleStandart );
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user