X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetDoubleValue.cpp;h=6b1f52ed35d161e778ccf891a49872adacddc8fb;hb=a2982d2108f929cf9e7f996cfd590c4ce59dc21c;hp=6d470dbbd14567860f40444e50068f7f1ce2b6e6;hpb=b2a34ee4bab2fe2d97f900cbdafcaf122344c46c;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp index 6d470dbbd..6b1f52ed3 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp @@ -1,9 +1,12 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModuleBase_Widgets.h // Created: 04 June 2014 // Author: Vitaly Smetannikov #include #include +#include #include #include @@ -18,7 +21,6 @@ #include #include #include -#include #include #include @@ -37,7 +39,7 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent, { myContainer = new QWidget(theParent); QHBoxLayout* aControlLay = new QHBoxLayout(myContainer); - aControlLay->setContentsMargins(0, 0, 0, 0); + ModuleBase_Tools::adjustMargins(aControlLay); QString aLabelText = QString::fromStdString(theData->widgetLabel()); QString aLabelIcon = QString::fromStdString(theData->widgetIcon()); @@ -77,7 +79,7 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent, mySpinBox->setSingleStep(aStepVal); } - aProp = theData->getProperty(DOUBLE_WDG_DEFAULT); + aProp = theData->getProperty(ATTR_DEFAULT); double aDefVal = QString::fromStdString(aProp).toDouble(&isOk); if (isOk) { mySpinBox->setValue(aDefVal); @@ -92,8 +94,6 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent, aControlLay->setStretch(1, 1); connect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged())); - - mySpinBox->installEventFilter(this); } ModuleBase_WidgetDoubleValue::~ModuleBase_WidgetDoubleValue() @@ -124,7 +124,6 @@ bool ModuleBase_WidgetDoubleValue::restoreValue() QList ModuleBase_WidgetDoubleValue::getControls() const { QList aList; - aList.append(myLabel); aList.append(mySpinBox); return aList; }