X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetEditor.cpp;h=6f32c7606bba64efe3d4c8b9685bd751c90e83d3;hb=2ca8be5b9d184c33cbfd78b1259638f340eeb017;hp=9774a52bbb86c664001846b2e9cf190a42ad1fe3;hpb=871d21cd6e0ab86c79867145cb90a7e9dd7cd830;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetEditor.cpp b/src/ModuleBase/ModuleBase_WidgetEditor.cpp index 9774a52bb..6f32c7606 100644 --- a/src/ModuleBase/ModuleBase_WidgetEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetEditor.cpp @@ -3,6 +3,7 @@ // Author: Natalia ERMOLAEVA #include +#include #include #include @@ -22,21 +23,14 @@ #include #include #include -#include ModuleBase_WidgetEditor::ModuleBase_WidgetEditor(QWidget* theParent, - const Config_WidgetAPI* theData, + const Config_WidgetAPI* theData, const std::string& theParentId) -: ModuleBase_WidgetDoubleValue(theParent, theData, 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() { } @@ -46,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)); @@ -80,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);