From 845281400a4c6124e2cf8ab28174e9c3f0bc2895 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 13 Jan 2024 11:49:24 +0900 Subject: Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines Signed-off-by: Michele Calgaro (cherry picked from commit 69e4de2f4cee257151ca13b207dc677b2d958fed) --- kalzium/src/somwidget_impl.cpp | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'kalzium/src/somwidget_impl.cpp') diff --git a/kalzium/src/somwidget_impl.cpp b/kalzium/src/somwidget_impl.cpp index 93ae5838..dd6ac6bc 100644 --- a/kalzium/src/somwidget_impl.cpp +++ b/kalzium/src/somwidget_impl.cpp @@ -45,12 +45,12 @@ SOMWidgetIMPL::SOMWidgetIMPL( TQWidget *parent, const char* name ) m_htmlEnd = ""; m_prevUnit = Prefs::temperature(); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( spinValueChanged( double ) ) ); - connect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( sliderValueChanged( int ) ) ); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( setNewTemp( double ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( spinValueChanged( double ) ) ); + connect( temp_slider, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( sliderValueChanged( int ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( setNewTemp( double ) ) ); reloadUnits(); } @@ -71,40 +71,40 @@ kdDebug() << "min: " << Number1->minValue() << " - max: " << Number1->maxValue() void SOMWidgetIMPL::sliderValueChanged( int temp ) { // TODO check if in TQt4 the RangeControl emits the signal again - disconnect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( spinValueChanged( double ) ) ); - disconnect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( sliderValueChanged( int ) ) ); - disconnect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( setNewTemp( double ) ) ); + disconnect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( spinValueChanged( double ) ) ); + disconnect( temp_slider, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( sliderValueChanged( int ) ) ); + disconnect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( setNewTemp( double ) ) ); double newvalue = TempUnit::convert( (double)temp, (int)TempUnit::Kelvin, Prefs::temperature() ); Number1->setValue( newvalue ); setNewTemp( newvalue ); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( spinValueChanged( double ) ) ); - connect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( sliderValueChanged( int ) ) ); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( setNewTemp( double ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( spinValueChanged( double ) ) ); + connect( temp_slider, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( sliderValueChanged( int ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( setNewTemp( double ) ) ); } void SOMWidgetIMPL::spinValueChanged( double temp ) { - disconnect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( spinValueChanged( double ) ) ); - disconnect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( sliderValueChanged( int ) ) ); - disconnect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( setNewTemp( double ) ) ); + disconnect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( spinValueChanged( double ) ) ); + disconnect( temp_slider, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( sliderValueChanged( int ) ) ); + disconnect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( setNewTemp( double ) ) ); int newvalue = (int)TempUnit::convert( temp, Prefs::temperature(), (int)TempUnit::Kelvin ); temp_slider->setValue( newvalue ); setNewTemp( temp ); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( spinValueChanged( double ) ) ); - connect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( sliderValueChanged( int ) ) ); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( setNewTemp( double ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( spinValueChanged( double ) ) ); + connect( temp_slider, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( sliderValueChanged( int ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( setNewTemp( double ) ) ); } void SOMWidgetIMPL::setNewTemp( double newtemp ) -- cgit v1.2.1