diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /libkholidays/lunarphase.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkholidays/lunarphase.cpp')
-rw-r--r-- | libkholidays/lunarphase.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libkholidays/lunarphase.cpp b/libkholidays/lunarphase.cpp index 56f5fbe51..3dace7bc1 100644 --- a/libkholidays/lunarphase.cpp +++ b/libkholidays/lunarphase.cpp @@ -58,12 +58,12 @@ LunarPhase::Hemisphere LunarPhase::hemisphere() const return( mHemisphere ); } -QString LunarPhase::hemisphereStr() const +TQString LunarPhase::hemisphereStr() const { return hemisphereName( mHemisphere ); } -QString LunarPhase::hemisphereName( LunarPhase::Hemisphere hemisphere ) +TQString LunarPhase::hemisphereName( LunarPhase::Hemisphere hemisphere ) { switch( hemisphere ) { case Northern: @@ -76,12 +76,12 @@ QString LunarPhase::hemisphereName( LunarPhase::Hemisphere hemisphere ) } } -QString LunarPhase::phaseStr( const QDate &date ) const +TQString LunarPhase::phaseStr( const TQDate &date ) const { return phaseName( phase( date ) ); } -QString LunarPhase::phaseName( LunarPhase::Phase phase ) +TQString LunarPhase::phaseName( LunarPhase::Phase phase ) { switch ( phase ) { case New: @@ -98,20 +98,20 @@ QString LunarPhase::phaseName( LunarPhase::Phase phase ) break; default: case None: - return( QString::null ); + return( TQString::null ); break; } } -LunarPhase::Phase LunarPhase::phase( const QDate &date ) const +LunarPhase::Phase LunarPhase::phase( const TQDate &date ) const { Phase retPhase = None; // compute percent-full for the middle of today and yesterday. - QTime noontime( 12, 0, 0 ); - QDateTime today( date, noontime ); + TQTime noontime( 12, 0, 0 ); + TQDateTime today( date, noontime ); double todayPer = percentFull( today.toTime_t() ); - QDateTime yesterday( date.addDays(-1), noontime ); + TQDateTime yesterday( date.addDays(-1), noontime ); double yesterdayPer = percentFull( yesterday.toTime_t() ); if ( ( todayPer < 0.50 ) && ( yesterdayPer > 0.50 ) ) { @@ -120,12 +120,12 @@ LunarPhase::Phase LunarPhase::phase( const QDate &date ) const retPhase = Full; } else { // compute percent-full for the start of today. - QTime sqt( 0, 0, 0 ); - QDateTime start( date, sqt ); + TQTime sqt( 0, 0, 0 ); + TQDateTime start( date, sqt ); double startPer = percentFull( start.toTime_t() ); // compute percent-full for the end of today. - QTime eqt( 23, 59, 59 ); - QDateTime end( date, eqt ); + TQTime eqt( 23, 59, 59 ); + TQDateTime end( date, eqt ); double endPer = percentFull( end.toTime_t() ); if ( ( startPer <= 50 ) && ( endPer > 50 ) ) { |