X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetEditor.cpp;h=6f32c7606bba64efe3d4c8b9685bd751c90e83d3;hb=2ca8be5b9d184c33cbfd78b1259638f340eeb017;hp=1e00eb180ea7e65e3ce0d5edad56e11130403f59;hpb=86e416114aeb0adc0750a37f6fea394f253c6ebe;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetEditor.cpp b/src/ModuleBase/ModuleBase_WidgetEditor.cpp index 1e00eb180..6f32c7606 100644 --- a/src/ModuleBase/ModuleBase_WidgetEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetEditor.cpp @@ -3,12 +3,13 @@ // Author: Natalia ERMOLAEVA #include +#include #include #include #include -#include +#include #include #include @@ -22,20 +23,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 +40,7 @@ double editedValue(double theValue, bool& isDone) QDialog aDlg; aDlg.setWindowFlags(Qt::FramelessWindowHint); QHBoxLayout* aLay = new QHBoxLayout(&aDlg); - aLay->setContentsMargins(0,0,0,0); + aLay->setContentsMargins(0, 0, 0, 0); QLineEdit* aEditor = new QLineEdit(QString::number(theValue), &aDlg); aEditor->setValidator(new QDoubleValidator(aEditor)); @@ -79,7 +74,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);