+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: ModuleBase_Widgets.h
// Created: 04 June 2014
// Author: Vitaly Smetannikov
#include <ModuleBase_WidgetDoubleValue.h>
#include <ModuleBase_DoubleSpinBox.h>
+#include <ModuleBase_Tools.h>
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_Data.h>
#include <QLayout>
#include <QLabel>
#include <QEvent>
-#include <QKeyEvent>
#include <QTimer>
#include <math.h>
{
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());
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);
QList<QWidget*> ModuleBase_WidgetDoubleValue::getControls() const
{
QList<QWidget*> aList;
- aList.append(myLabel);
aList.append(mySpinBox);
return aList;
}