]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Dump Python extension TG_DumpPython_Extension_3
authorouv <ouv@opencascade.com>
Mon, 1 Dec 2008 11:56:56 +0000 (11:56 +0000)
committerouv <ouv@opencascade.com>
Mon, 1 Dec 2008 11:56:56 +0000 (11:56 +0000)
src/SalomeApp/SalomeApp_DoubleSpinBox.cxx
src/SalomeApp/SalomeApp_DoubleSpinBox.h
src/SalomeApp/SalomeApp_IntSpinBox.cxx
src/SalomeApp/SalomeApp_IntSpinBox.h

index 991035e2ad1c70ab816a33a1c37628ac44b8c17c..b40231f23cd04f8d0734cf0595041ed787f54fbe 100644 (file)
@@ -28,6 +28,7 @@
 #include "SALOMEDSClient_ClientFactory.hxx" 
 #include CORBA_SERVER_HEADER(SALOMEDS)
 
+#include <QKeyEvent>
 #include <QLineEdit>
 
 /*!
@@ -321,6 +322,17 @@ bool SalomeApp_DoubleSpinBox::findVariable( const QString& name, double& value )
   return false;
 }
 
+/*!
+  \brief This function is called when the spinbox recieves key press event.
+*/
+void SalomeApp_DoubleSpinBox::keyPressEvent( QKeyEvent* e )
+{
+  if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter )
+    QWidget::keyPressEvent( e );
+  else
+    QtxDoubleSpinBox::keyPressEvent( e );
+}
+
 /*!
   \brief This function is called when the spinbox recieves show event.
 */
index dcb4e37c0b660329df9f5b0b0ec795bf6c49e523..1bb25964dda1320664bc6ebdc339d95832b1b0e3 100644 (file)
@@ -65,7 +65,8 @@ protected:
 
   bool                      findVariable( const QString&, double& ) const;
 
- protected:
+protected:
+  virtual void              keyPressEvent( QKeyEvent* );
   virtual void              showEvent( QShowEvent* );
 
 protected slots:
index 27b91b6dacb168dc702e431102b79053c0319f6e..c950062f694cfdf11617aae941ef2c05ba808732 100644 (file)
@@ -28,6 +28,7 @@
 #include "SALOMEDSClient_ClientFactory.hxx" 
 #include CORBA_SERVER_HEADER(SALOMEDS)
 
+#include <QKeyEvent>
 #include <QLineEdit>
 
 /*!
@@ -274,6 +275,17 @@ bool SalomeApp_IntSpinBox::findVariable( const QString& name, int& value ) const
   return false;
 }
 
+/*!
+  \brief This function is called when the spinbox recieves key press event.
+*/
+void SalomeApp_IntSpinBox::keyPressEvent( QKeyEvent* e )
+{
+  if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter )
+    QWidget::keyPressEvent( e );
+  else
+    QtxIntSpinBox::keyPressEvent( e );
+}
+
 /*!
   \brief This function is called when the spinbox recieves show event.
 */
index 6eb189736a72c0f35cfb8b859176a30044c81c3a..82508d83b1c7a0ae42e4487d80045a8e88e7a5c4 100644 (file)
@@ -64,6 +64,7 @@ protected:
   bool                      findVariable( const QString&, int& ) const;
 
 protected:
+  virtual void              keyPressEvent( QKeyEvent* );
   virtual void              showEvent( QShowEvent* );
 
 protected slots: