Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_WidgetEditor.cpp
diff --git
a/src/ModuleBase/ModuleBase_WidgetEditor.cpp
b/src/ModuleBase/ModuleBase_WidgetEditor.cpp
index 9774a52bbb86c664001846b2e9cf190a42ad1fe3..6f32c7606bba64efe3d4c8b9685bd751c90e83d3 100644
(file)
--- a/
src/ModuleBase/ModuleBase_WidgetEditor.cpp
+++ b/
src/ModuleBase/ModuleBase_WidgetEditor.cpp
@@
-3,6
+3,7
@@
// Author: Natalia ERMOLAEVA
#include <ModuleBase_WidgetEditor.h>
// Author: Natalia ERMOLAEVA
#include <ModuleBase_WidgetEditor.h>
+#include <ModuleBase_DoubleSpinBox.h>
#include <Config_Keywords.h>
#include <Config_WidgetAPI.h>
#include <Config_Keywords.h>
#include <Config_WidgetAPI.h>
@@
-22,21
+23,14
@@
#include <QTimer>
#include <QDialog>
#include <QLayout>
#include <QTimer>
#include <QDialog>
#include <QLayout>
-#include <QDoubleSpinBox>
ModuleBase_WidgetEditor::ModuleBase_WidgetEditor(QWidget* theParent,
ModuleBase_WidgetEditor::ModuleBase_WidgetEditor(QWidget* theParent,
- const Config_WidgetAPI* theData,
+ const Config_WidgetAPI* theData,
const std::string& theParentId)
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()
{
}
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);
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));
QLineEdit* aEditor = new QLineEdit(QString::number(theValue), &aDlg);
aEditor->setValidator(new QDoubleValidator(aEditor));
@@
-80,7
+74,8
@@
bool ModuleBase_WidgetEditor::focusTo()
return false;
}
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);
{
DataPtr aData = theFeature->data();
AttributeDoublePtr aRef = aData->real(theAttribute);