summaryrefslogtreecommitdiffstats
path: root/kalzium/src/spectrum.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/spectrum.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/spectrum.cpp')
-rw-r--r--kalzium/src/spectrum.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kalzium/src/spectrum.cpp b/kalzium/src/spectrum.cpp
index 4b74eadb..dc8abb01 100644
--- a/kalzium/src/spectrum.cpp
+++ b/kalzium/src/spectrum.cpp
@@ -28,8 +28,8 @@
double Spectrum::minBand()
{
double value = ( *m_bandlist.begin() ).wavelength;
- QValueList<band>::const_iterator it = m_bandlist.begin();
- const QValueList<band>::const_iterator itEnd = m_bandlist.end();
+ TQValueList<band>::const_iterator it = m_bandlist.begin();
+ const TQValueList<band>::const_iterator itEnd = m_bandlist.end();
for (;it!=itEnd;++it)
{
if ( value > ( *it ).wavelength )
@@ -41,8 +41,8 @@ double Spectrum::minBand()
double Spectrum::maxBand()
{
double value = ( *m_bandlist.begin() ).wavelength;
- QValueList<band>::const_iterator it = m_bandlist.begin();
- const QValueList<band>::const_iterator itEnd = m_bandlist.end();
+ TQValueList<band>::const_iterator it = m_bandlist.begin();
+ const TQValueList<band>::const_iterator itEnd = m_bandlist.end();
for (;it!=itEnd;++it)
{
if ( value < ( *it ).wavelength )
@@ -56,8 +56,8 @@ Spectrum* Spectrum::adjustToWavelength( double min, double max )
{
Spectrum *spec = new Spectrum();
- QValueList<band>::const_iterator it = m_bandlist.begin();
- const QValueList<band>::const_iterator itEnd = m_bandlist.end();
+ TQValueList<band>::const_iterator it = m_bandlist.begin();
+ const TQValueList<band>::const_iterator itEnd = m_bandlist.end();
for ( ; it != itEnd; ++it )
{
@@ -75,8 +75,8 @@ Spectrum* Spectrum::adjustToWavelength( double min, double max )
void Spectrum::adjustIntensities()
{
int maxInt = 0;
- QValueList<band>::Iterator it = m_bandlist.begin();
- const QValueList<band>::Iterator itEnd = m_bandlist.end();
+ TQValueList<band>::Iterator it = m_bandlist.begin();
+ const TQValueList<band>::Iterator itEnd = m_bandlist.end();
//find the highest intensity
for ( ; it != itEnd; ++it )
@@ -101,12 +101,12 @@ void Spectrum::adjustIntensities()
}
}
-QValueList<double> Spectrum::wavelengths( double min, double max )
+TQValueList<double> Spectrum::wavelengths( double min, double max )
{
- QValueList<double> list;
+ TQValueList<double> list;
- QValueList<band>::const_iterator it = m_bandlist.begin();
- const QValueList<band>::const_iterator itEnd = m_bandlist.end();
+ TQValueList<band>::const_iterator it = m_bandlist.begin();
+ const TQValueList<band>::const_iterator itEnd = m_bandlist.end();
for ( ; it != itEnd; ++it )
{
@@ -119,17 +119,17 @@ QValueList<double> Spectrum::wavelengths( double min, double max )
return list;
}
-QString Spectrum::bandsAsHtml()
+TQString Spectrum::bandsAsHtml()
{
- QString html = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head><title>Chemical data</title>i<body>";
+ TQString html = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head><title>Chemical data</title>i<body>";
html += "<table>";
- QValueList<band>::const_iterator it = m_bandlist.begin();
- const QValueList<band>::const_iterator itEnd = m_bandlist.end();
+ TQValueList<band>::const_iterator it = m_bandlist.begin();
+ const TQValueList<band>::const_iterator itEnd = m_bandlist.end();
for (;it!=itEnd;++it)
{
- html += QString( "<tr>" )
+ html += TQString( "<tr>" )
+ "<td>" + i18n( "Wavelength: %1 nm" ).arg( ( *it ).wavelength ) + "</td>"
+ "<td>" + i18n( "Intensity: %1" ).arg( ( *it ).intensity ) + "</td>"
+ "<td>" + i18n( "Probability: %1 10<sup>8</sup>s<sup>-1</sup>" ).arg( ( *it ).aki ) + "</td>"