Salome HOME
ModuleBase_ViewerPrs is wrapped into shared_ptr: remove include of this class from...
[modules/shaper.git] / src / ModuleBase / ModuleBase_IntSpinBox.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:      ModuleBase_IntSpinBox.cxx
4 // Author:    Natalia ERMOLAEVA
5 //
6 #include "ModuleBase_IntSpinBox.h"
7
8 #include <QKeyEvent>
9
10 ModuleBase_IntSpinBox::ModuleBase_IntSpinBox(QWidget* theParent)
11 : QSpinBox(theParent)
12 {
13 }
14
15 void ModuleBase_IntSpinBox::keyPressEvent(QKeyEvent *theEvent)
16 {
17   switch (theEvent->key()) {
18     case Qt::Key_Enter:
19     case Qt::Key_Return: {
20       // do not react to the Enter key, the property panel processes it
21         return;
22     }
23     break;
24     default:
25       break;
26   }
27   QSpinBox::keyPressEvent(theEvent);
28 }
29