]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_IntSpinBox.cpp
Salome HOME
Enter processing on integer field.
[modules/shaper.git] / src / ModuleBase / ModuleBase_IntSpinBox.cpp
diff --git a/src/ModuleBase/ModuleBase_IntSpinBox.cpp b/src/ModuleBase/ModuleBase_IntSpinBox.cpp
new file mode 100755 (executable)
index 0000000..933cc84
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:      ModuleBase_IntSpinBox.cxx
+// Author:    Natalia ERMOLAEVA
+//
+#include "ModuleBase_IntSpinBox.h"
+
+#include <QKeyEvent>
+
+ModuleBase_IntSpinBox::ModuleBase_IntSpinBox(QWidget* theParent)
+: QSpinBox(theParent),
+  myIsModified(false)
+{
+  connect(this, SIGNAL(valueChanged(const QString&)), this, SLOT(onValueChanged(const QString&)));
+}
+
+void ModuleBase_IntSpinBox::onValueChanged(const QString& theValue)
+{
+  myIsModified = true;
+}
+
+bool ModuleBase_IntSpinBox::isModified() const
+{
+  return myIsModified;
+}
+
+void ModuleBase_IntSpinBox::clearModified()
+{
+  myIsModified = false;
+}