Salome HOME
Issue #2602: Check selection with validators before its using.
[modules/shaper.git] / src / ModuleBase / ModuleBase_IntSpinBox.h
index 2e6d959a48ce12c0ed40457685251b7eb401adc2..839cdeef8021ae3c757a706bd89169af8df6cb62 100755 (executable)
@@ -1,8 +1,23 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:      ModuleBase_IntSpinBox.h
-// Author:    Natalia ERMOLAEVA
+// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 //
+
 #ifndef MODULEBASE_INT_SPINBOX_H_
 #define MODULEBASE_INT_SPINBOX_H_
 
@@ -23,22 +38,14 @@ class MODULEBASE_EXPORT ModuleBase_IntSpinBox : public QSpinBox
 Q_OBJECT
 
 public:
+  /// Constructor
+  /// \param theParent a parent widget
   explicit ModuleBase_IntSpinBox(QWidget* theParent = 0);
   virtual ~ModuleBase_IntSpinBox() {};
 
-  /// Returns true if the current value is modified by has not been applyed yet
-  virtual bool isModified() const;
-
-  /// Clears modified state
-  void clearModified();
-
-protected slots:
-  /// Called on value changed
-  void onValueChanged(const QString& theValue);
-
- private:
-  /// Boolean value whether the spin box content is modified
-  bool myIsModified;
+protected:
+  /// Called on key press event
+  virtual void keyPressEvent(QKeyEvent* theEvent);
 };
 
 #endif