diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:39:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:39:55 +0000 |
commit | 0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch) | |
tree | 2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /kstars/kstars/ksmoon.cpp | |
parent | 83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff) | |
download | tdeedu-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 'kstars/kstars/ksmoon.cpp')
-rw-r--r-- | kstars/kstars/ksmoon.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/kstars/kstars/ksmoon.cpp b/kstars/kstars/ksmoon.cpp index d63cc319..86c6fcd0 100644 --- a/kstars/kstars/ksmoon.cpp +++ b/kstars/kstars/ksmoon.cpp @@ -18,7 +18,7 @@ #include <stdlib.h> #include <math.h> -#include <qfile.h> +#include <tqfile.h> #include "ksnumbers.h" #include "ksutils.h" @@ -36,22 +36,22 @@ KSMoon::~KSMoon() { } bool KSMoon::data_loaded = false; -QPtrList<KSMoon::MoonLRData> KSMoon::LRData; -QPtrList<KSMoon::MoonBData> KSMoon::BData; +TQPtrList<KSMoon::MoonLRData> KSMoon::LRData; +TQPtrList<KSMoon::MoonBData> KSMoon::BData; bool KSMoon::loadData() { if (data_loaded) return true; - QString line; - QFile f; + TQString line; + TQFile f; int nd, nm, nm1, nf; double Li, Ri, Bi; //coefficients of the sums if ( KSUtils::openDataFile( f, "moonLR.dat" ) ) { - QTextStream stream( &f ); + TQTextStream stream( &f ); while ( !stream.eof() ) { line = stream.readLine(); - QTextIStream instream( &line ); + TQTextIStream instream( &line ); instream >> nd >> nm >> nm1 >> nf >> Li >> Ri; LRData.append(new MoonLRData(nd, nm, nm1, nf, Li, Ri)); } @@ -61,10 +61,10 @@ bool KSMoon::loadData() { if ( KSUtils::openDataFile( f, "moonB.dat" ) ) { - QTextStream stream( &f ); + TQTextStream stream( &f ); while ( !stream.eof() ) { line = stream.readLine(); - QTextIStream instream( &line ); + TQTextIStream instream( &line ); instream >> nd >> nm >> nm1 >> nf >> Bi; BData.append(new MoonBData(nd, nm, nm1, nf, Bi)); } @@ -78,8 +78,8 @@ bool KSMoon::loadData() { bool KSMoon::findGeocentricPosition( const KSNumbers *num, const KSPlanetBase* ) { //Algorithms in this subroutine are taken from Chapter 45 of "Astronomical Algorithms" //by Jean Meeus (1991, Willmann-Bell, Inc. ISBN 0-943396-35-2. http://www.willbell.com/math/mc1.htm) - QString fname, snum, line; - QFile f; + TQString fname, snum, line; + TQFile f; double DegtoRad; double T, L, D, M, M1, F, E, A1, A2, A3; double sumL, sumR, sumB; @@ -182,11 +182,11 @@ void KSMoon::findPhase( const KSSun *Sun ) { Phase.setD( Phase.reduce().Degrees() ); int iPhase = int( 0.1*Phase.Degrees()+0.5 ); if (iPhase==36) iPhase = 0; - QString sPhase; + TQString sPhase; sPhase = sPhase.sprintf( "%02d", iPhase ); - QString imName = "moon" + sPhase + ".png"; + TQString imName = "moon" + sPhase + ".png"; - QFile imFile; + TQFile imFile; if ( KSUtils::openDataFile( imFile, imName ) ) { imFile.close(); image0()->load( imFile.name() ); @@ -195,7 +195,7 @@ void KSMoon::findPhase( const KSSun *Sun ) { } } -QString KSMoon::phaseName() const { +TQString KSMoon::phaseName() const { double f = illum(); double p = phase().Degrees(); |