#include <ModuleBase_IViewWindow.h>
#include <ModuleBase_IViewer.h>
#include <ModuleBase_Tools.h>
+#include <ModuleBase_WidgetValidator.h>
#include <GeomAPI_Pnt2d.h>
#include <Config_WidgetAPI.h>
PartSet_WidgetPoint2dDistance::PartSet_WidgetPoint2dDistance(QWidget* theParent,
ModuleBase_IWorkshop* theWorkshop,
- const Config_WidgetAPI* theData,
- const std::string& theParentId)
-: ModuleBase_WidgetDoubleValue(theParent, theData, theParentId), myWorkshop(theWorkshop),
+ const Config_WidgetAPI* theData)
+: ModuleBase_WidgetDoubleValue(theParent, theData), myWorkshop(theWorkshop),
myValueIsCashed(false), myIsFeatureVisibleInCash(true), myValueInCash(0)
{
myFirstPntName = theData->getProperty("first_point");
+ myWidgetValidator = new ModuleBase_WidgetValidator(this, myWorkshop);
}
PartSet_WidgetPoint2dDistance::~PartSet_WidgetPoint2dDistance()
{
}
+bool PartSet_WidgetPoint2dDistance::isValidSelectionCustom(
+ const std::shared_ptr<ModuleBase_ViewerPrs>& theValue)
+{
+ return false;
+}
+
bool PartSet_WidgetPoint2dDistance::resetCustom()
{
bool aDone = false;
// if the restored value should be hidden, aDone = true to set
// reset state for the widget in the parent
aDone = restoreCurentValue();
+ emit objectUpdated();
}
else
aDone = ModuleBase_WidgetDoubleValue::resetCustom();
setPoint(feature(), aPnt);
// if the validator of the control returns false, focus should not be switched
- if (getError().isEmpty())
+ if (getError(false).isEmpty())
emit focusOutWidget(this);
}