From fc9081b66cab34c9be8bf393fb4b4c02a8490c3f Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 21 Nov 2008 16:54:35 +0000 Subject: [PATCH] Add signal in the spinbox. --- src/SalomeApp/SalomeApp_DoubleSpinBox.cxx | 3 +++ src/SalomeApp/SalomeApp_DoubleSpinBox.h | 5 ++++- src/SalomeApp/SalomeApp_IntSpinBox.cxx | 3 +++ src/SalomeApp/SalomeApp_IntSpinBox.h | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx b/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx index d6b45f772..991035e2a 100644 --- a/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx +++ b/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx @@ -117,6 +117,9 @@ void SalomeApp_DoubleSpinBox::connectSignalsAndSlots() connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); + + connect( lineEdit(), SIGNAL( textChanged( const QString& )), + this, SIGNAL( textChanged( const QString& ) ) ); } /*! diff --git a/src/SalomeApp/SalomeApp_DoubleSpinBox.h b/src/SalomeApp/SalomeApp_DoubleSpinBox.h index ad9a1895a..dcb4e37c0 100644 --- a/src/SalomeApp/SalomeApp_DoubleSpinBox.h +++ b/src/SalomeApp/SalomeApp_DoubleSpinBox.h @@ -54,6 +54,9 @@ public: virtual void setText(const QString& ); +signals: + void textChanged( const QString& ); + protected: State isValid( const QString&, double& ) const; @@ -62,7 +65,7 @@ protected: bool findVariable( const QString&, double& ) const; -protected: + protected: virtual void showEvent( QShowEvent* ); protected slots: diff --git a/src/SalomeApp/SalomeApp_IntSpinBox.cxx b/src/SalomeApp/SalomeApp_IntSpinBox.cxx index 7ee3391d6..27b91b6da 100644 --- a/src/SalomeApp/SalomeApp_IntSpinBox.cxx +++ b/src/SalomeApp/SalomeApp_IntSpinBox.cxx @@ -87,6 +87,9 @@ void SalomeApp_IntSpinBox::connectSignalsAndSlots() connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); + + connect( lineEdit(), SIGNAL( textChanged( const QString& )), + this, SIGNAL( textChanged( const QString& ) ) ); } /*! diff --git a/src/SalomeApp/SalomeApp_IntSpinBox.h b/src/SalomeApp/SalomeApp_IntSpinBox.h index 47de2da9f..6eb189736 100644 --- a/src/SalomeApp/SalomeApp_IntSpinBox.h +++ b/src/SalomeApp/SalomeApp_IntSpinBox.h @@ -52,6 +52,9 @@ public: virtual void setText(const QString& ); +signals: + void textChanged( const QString& ); + protected: State isValid( const QString&, int& ) const; -- 2.39.2