X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetEditor.cpp;h=ee5bc67f476ba024490da025fc8dbea9f5f87b10;hb=8f56432d03ce0cbce36d2190c0afc83f3f781f72;hp=16d4c52cbc60bc9dbdf0de0e2ae3a5389695e69f;hpb=5d3cd989dcae90a9981d0d874e6fd75676db03d8;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetEditor.cpp b/src/ModuleBase/ModuleBase_WidgetEditor.cpp index 16d4c52cb..ee5bc67f4 100644 --- a/src/ModuleBase/ModuleBase_WidgetEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetEditor.cpp @@ -3,6 +3,8 @@ // Author: Natalia ERMOLAEVA #include +#include +#include #include #include @@ -22,20 +24,14 @@ #include #include #include -#include ModuleBase_WidgetEditor::ModuleBase_WidgetEditor(QWidget* theParent, - const Config_WidgetAPI* theData) -: ModuleBase_WidgetDoubleValue(theParent, theData) + const Config_WidgetAPI* theData, + const std::string& theParentId) + : ModuleBase_WidgetDoubleValue(theParent, theData, theParentId) { } -ModuleBase_WidgetEditor::ModuleBase_WidgetEditor(QWidget* theParent, const std::string& theAttribute) -: ModuleBase_WidgetDoubleValue(theParent, 0) -{ - setAttributeID(theAttribute); -} - ModuleBase_WidgetEditor::~ModuleBase_WidgetEditor() { } @@ -45,7 +41,7 @@ double editedValue(double theValue, bool& isDone) QDialog aDlg; aDlg.setWindowFlags(Qt::FramelessWindowHint); QHBoxLayout* aLay = new QHBoxLayout(&aDlg); - aLay->setContentsMargins(0,0,0,0); + ModuleBase_Tools::zeroMargins(aLay); QLineEdit* aEditor = new QLineEdit(QString::number(theValue), &aDlg); aEditor->setValidator(new QDoubleValidator(aEditor)); @@ -79,7 +75,8 @@ bool ModuleBase_WidgetEditor::focusTo() return false; } -void ModuleBase_WidgetEditor::editFeatureValue(FeaturePtr theFeature, const std::string theAttribute) +void ModuleBase_WidgetEditor::editFeatureValue(FeaturePtr theFeature, + const std::string theAttribute) { DataPtr aData = theFeature->data(); AttributeDoublePtr aRef = aData->real(theAttribute);