summaryrefslogtreecommitdiffstats
path: root/kalzium/src/somwidget_impl.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
commit0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch)
tree2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /kalzium/src/somwidget_impl.cpp
parent83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff)
downloadtdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz
tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalzium/src/somwidget_impl.cpp')
-rw-r--r--kalzium/src/somwidget_impl.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/kalzium/src/somwidget_impl.cpp b/kalzium/src/somwidget_impl.cpp
index ae1c19d8..6e3f4b71 100644
--- a/kalzium/src/somwidget_impl.cpp
+++ b/kalzium/src/somwidget_impl.cpp
@@ -13,11 +13,11 @@
#include "somwidget_impl.h"
-#include <qlabel.h>
-#include <qpair.h>
-#include <qslider.h>
-#include <qtextedit.h>
-#include <qvaluelist.h>
+#include <tqlabel.h>
+#include <tqpair.h>
+#include <tqslider.h>
+#include <tqtextedit.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <knuminput.h>
@@ -30,7 +30,7 @@
#include "prefs.h"
#include "tempunit.h"
-SOMWidgetIMPL::SOMWidgetIMPL( QWidget *parent, const char* name )
+SOMWidgetIMPL::SOMWidgetIMPL( TQWidget *parent, const char* name )
: SOMWidget( parent,name )
{
m_list = KalziumDataObject::instance()->ElementList;
@@ -39,18 +39,18 @@ SOMWidgetIMPL::SOMWidgetIMPL( QWidget *parent, const char* name )
text->setTextFormat( Qt::RichText );
text->setReadOnly( true );
text->setPaletteBackgroundColor( paletteBackgroundColor() );
- text->setFrameStyle( QFrame::NoFrame );
+ text->setFrameStyle( TQFrame::NoFrame );
m_htmlBegin = "<qt>";
m_htmlEnd = "</qt>";
m_prevUnit = Prefs::temperature();
- connect( Number1, SIGNAL( valueChanged( double ) ),
- this, SLOT( spinValueChanged( double ) ) );
- connect( temp_slider, SIGNAL( valueChanged( int ) ),
- this, SLOT( sliderValueChanged( int ) ) );
- connect( Number1, SIGNAL( valueChanged( double ) ),
- this, SLOT( setNewTemp( double ) ) );
+ 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 ) ) );
reloadUnits();
}
@@ -71,40 +71,40 @@ kdDebug() << "min: " << Number1->minValue() << " - max: " << Number1->maxValue()
void SOMWidgetIMPL::sliderValueChanged( int temp )
{
// TODO check if in Qt4 the RangeControl emits the signal again
- disconnect( Number1, SIGNAL( valueChanged( double ) ),
- this, SLOT( spinValueChanged( double ) ) );
- disconnect( temp_slider, SIGNAL( valueChanged( int ) ),
- this, SLOT( sliderValueChanged( int ) ) );
- disconnect( Number1, SIGNAL( valueChanged( double ) ),
- this, SLOT( setNewTemp( double ) ) );
+ 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 ) ) );
double newvalue = TempUnit::convert( (double)temp, (int)TempUnit::Kelvin, Prefs::temperature() );
Number1->setValue( newvalue );
setNewTemp( newvalue );
- connect( Number1, SIGNAL( valueChanged( double ) ),
- this, SLOT( spinValueChanged( double ) ) );
- connect( temp_slider, SIGNAL( valueChanged( int ) ),
- this, SLOT( sliderValueChanged( int ) ) );
- connect( Number1, SIGNAL( valueChanged( double ) ),
- this, SLOT( setNewTemp( double ) ) );
+ 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 ) ) );
}
void SOMWidgetIMPL::spinValueChanged( double temp )
{
- disconnect( Number1, SIGNAL( valueChanged( double ) ),
- this, SLOT( spinValueChanged( double ) ) );
- disconnect( temp_slider, SIGNAL( valueChanged( int ) ),
- this, SLOT( sliderValueChanged( int ) ) );
- disconnect( Number1, SIGNAL( valueChanged( double ) ),
- this, SLOT( setNewTemp( double ) ) );
+ 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 ) ) );
int newvalue = (int)TempUnit::convert( temp, Prefs::temperature(), (int)TempUnit::Kelvin );
temp_slider->setValue( newvalue );
setNewTemp( temp );
- connect( Number1, SIGNAL( valueChanged( double ) ),
- this, SLOT( spinValueChanged( double ) ) );
- connect( temp_slider, SIGNAL( valueChanged( int ) ),
- this, SLOT( sliderValueChanged( int ) ) );
- connect( Number1, SIGNAL( valueChanged( double ) ),
- this, SLOT( setNewTemp( double ) ) );
+ 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 ) ) );
}
void SOMWidgetIMPL::setNewTemp( double newtemp )
@@ -113,13 +113,13 @@ void SOMWidgetIMPL::setNewTemp( double newtemp )
double temp = TempUnit::convert( newtemp, Prefs::temperature(), (int)TempUnit::Kelvin );
- QValueList<Element*>::ConstIterator it = m_list.begin();
- const QValueList<Element*>::ConstIterator itEnd = m_list.end();
+ TQValueList<Element*>::ConstIterator it = m_list.begin();
+ const TQValueList<Element*>::ConstIterator itEnd = m_list.end();
- QStringList listMeltingPoint;
- QStringList listBoilingPoint;
- QStringList listBoilingPointValue;
- QStringList listMeltingPointValue;
+ TQStringList listMeltingPoint;
+ TQStringList listBoilingPoint;
+ TQStringList listBoilingPointValue;
+ TQStringList listMeltingPointValue;
for ( ; it != itEnd; ++it )
{
if ( ( ( *it )->melting() > 0.0 ) && fabs( ( *it )->melting() - temp ) <= threshold )
@@ -133,7 +133,7 @@ void SOMWidgetIMPL::setNewTemp( double newtemp )
listBoilingPointValue << ( *it )->adjustUnits( Element::BOILINGPOINT );
}
}
- QString htmlcode;
+ TQString htmlcode;
if ( listMeltingPoint.count() > 0 )
{
htmlcode += i18n( "Elements with melting point around this temperature:" ) + "<br>";