Salome HOME
#1109 Sketch entities preview red lines stayed in the viewer after Sketch is applyed.
[modules/shaper.git] / src / ModuleBase / ModuleBase_IntSpinBox.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:      ModuleBase_IntSpinBox.h
4 // Author:    Natalia ERMOLAEVA
5 //
6 #ifndef MODULEBASE_INT_SPINBOX_H_
7 #define MODULEBASE_INT_SPINBOX_H_
8
9 #include "ModuleBase.h"
10
11 #include <QSpinBox>
12
13 class QWidget;
14 class QKeyEvent;
15
16 /**
17   * \ingroup GUI
18   * Enhanced version of the Qt's int spin box.
19   * It allows to store modified state
20 */
21 class MODULEBASE_EXPORT ModuleBase_IntSpinBox : public QSpinBox
22 {
23 Q_OBJECT
24
25 public:
26   explicit ModuleBase_IntSpinBox(QWidget* theParent = 0);
27   virtual ~ModuleBase_IntSpinBox() {};
28
29   /// Returns true if the current value is modified by has not been applyed yet
30   //virtual bool isModified() const;
31
32   /// Clears modified state
33   //void clearModified();
34
35 protected slots:
36   /// Called on value changed
37   //void onValueChanged(const QString& theValue);
38
39 protected:
40   /// Called on key press event
41   virtual void keyPressEvent(QKeyEvent* theEvent);
42
43 private:
44   /// Boolean value whether the spin box content is modified
45   //bool myIsModified;
46 };
47
48 #endif