summaryrefslogtreecommitdiffstats
path: root/kalarm/lib/synchtimer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kalarm/lib/synchtimer.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-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 'kalarm/lib/synchtimer.cpp')
-rw-r--r--kalarm/lib/synchtimer.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kalarm/lib/synchtimer.cpp b/kalarm/lib/synchtimer.cpp
index 1b681d6eb..eecef7d4b 100644
--- a/kalarm/lib/synchtimer.cpp
+++ b/kalarm/lib/synchtimer.cpp
@@ -19,7 +19,7 @@
*/
#include "kalarm.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include "synchtimer.moc"
@@ -31,7 +31,7 @@
SynchTimer::SynchTimer()
{
- mTimer = new QTimer(this, "mTimer");
+ mTimer = new TQTimer(this, "mTimer");
}
SynchTimer::~SynchTimer()
@@ -43,16 +43,16 @@ SynchTimer::~SynchTimer()
/******************************************************************************
* Connect to the timer. The timer is started if necessary.
*/
-void SynchTimer::connecT(QObject* receiver, const char* member)
+void SynchTimer::connecT(TQObject* receiver, const char* member)
{
Connection connection(receiver, member);
if (mConnections.find(connection) != mConnections.end())
return; // the slot is already connected, so ignore request
- connect(mTimer, SIGNAL(timeout()), receiver, member);
+ connect(mTimer, TQT_SIGNAL(timeout()), receiver, member);
mConnections.append(connection);
if (!mTimer->isActive())
{
- connect(mTimer, SIGNAL(timeout()), this, SLOT(slotTimer()));
+ connect(mTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimer()));
start();
}
}
@@ -60,7 +60,7 @@ void SynchTimer::connecT(QObject* receiver, const char* member)
/******************************************************************************
* Disconnect from the timer. The timer is stopped if no longer needed.
*/
-void SynchTimer::disconnecT(QObject* receiver, const char* member)
+void SynchTimer::disconnecT(TQObject* receiver, const char* member)
{
if (mTimer)
{
@@ -69,7 +69,7 @@ void SynchTimer::disconnecT(QObject* receiver, const char* member)
mConnections.remove(Connection(receiver, member));
else
{
- for (QValueList<Connection>::Iterator it = mConnections.begin(); it != mConnections.end(); )
+ for (TQValueList<Connection>::Iterator it = mConnections.begin(); it != mConnections.end(); )
{
if ((*it).receiver == receiver)
it = mConnections.remove(it);
@@ -109,7 +109,7 @@ MinuteTimer* MinuteTimer::instance()
void MinuteTimer::slotTimer()
{
kdDebug(5950) << "MinuteTimer::slotTimer()" << endl;
- int interval = 62 - QTime::currentTime().second();
+ int interval = 62 - TQTime::currentTime().second();
mTimer->start(interval * 1000, true); // execute a single shot
}
@@ -119,9 +119,9 @@ void MinuteTimer::slotTimer()
= Application-wide timer synchronised to midnight.
=============================================================================*/
-QValueList<DailyTimer*> DailyTimer::mFixedTimers;
+TQValueList<DailyTimer*> DailyTimer::mFixedTimers;
-DailyTimer::DailyTimer(const QTime& timeOfDay, bool fixed)
+DailyTimer::DailyTimer(const TQTime& timeOfDay, bool fixed)
: mTime(timeOfDay),
mFixed(fixed)
{
@@ -135,9 +135,9 @@ DailyTimer::~DailyTimer()
mFixedTimers.remove(this);
}
-DailyTimer* DailyTimer::fixedInstance(const QTime& timeOfDay, bool create)
+DailyTimer* DailyTimer::fixedInstance(const TQTime& timeOfDay, bool create)
{
- for (QValueList<DailyTimer*>::Iterator it = mFixedTimers.begin(); it != mFixedTimers.end(); ++it)
+ for (TQValueList<DailyTimer*>::Iterator it = mFixedTimers.begin(); it != mFixedTimers.end(); ++it)
if ((*it)->mTime == timeOfDay)
return *it;
return create ? new DailyTimer(timeOfDay, true) : 0;
@@ -147,7 +147,7 @@ DailyTimer* DailyTimer::fixedInstance(const QTime& timeOfDay, bool create)
* Disconnect from the timer signal which triggers at the given fixed time of day.
* If there are no remaining connections to that timer, it is destroyed.
*/
-void DailyTimer::disconnect(const QTime& timeOfDay, QObject* receiver, const char* member)
+void DailyTimer::disconnect(const TQTime& timeOfDay, TQObject* receiver, const char* member)
{
DailyTimer* timer = fixedInstance(timeOfDay, false);
if (!timer)
@@ -160,7 +160,7 @@ void DailyTimer::disconnect(const QTime& timeOfDay, QObject* receiver, const cha
/******************************************************************************
* Change the time at which the variable timer triggers.
*/
-void DailyTimer::changeTime(const QTime& newTimeOfDay, bool triggerMissed)
+void DailyTimer::changeTime(const TQTime& newTimeOfDay, bool triggerMissed)
{
if (mFixed)
return;
@@ -170,7 +170,7 @@ void DailyTimer::changeTime(const QTime& newTimeOfDay, bool triggerMissed)
bool triggerNow = false;
if (triggerMissed)
{
- QTime now = QTime::currentTime();
+ TQTime now = TQTime::currentTime();
if (now >= newTimeOfDay && now < mTime)
{
// The trigger time is now earlier and it has already arrived today.
@@ -196,7 +196,7 @@ void DailyTimer::changeTime(const QTime& newTimeOfDay, bool triggerMissed)
void DailyTimer::start()
{
// TIMEZONE = local time
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
// Find out whether to trigger today or tomorrow.
// In preference, use the last trigger date to determine this, since
// that will avoid possible errors due to daylight savings time changes.
@@ -205,11 +205,11 @@ void DailyTimer::start()
today = (mLastDate < now.date());
else
today = (now.time() < mTime);
- QDateTime next;
+ TQDateTime next;
if (today)
- next = QDateTime(now.date(), mTime);
+ next = TQDateTime(now.date(), mTime);
else
- next = QDateTime(now.date().addDays(1), mTime);
+ next = TQDateTime(now.date().addDays(1), mTime);
uint interval = next.toTime_t() - now.toTime_t();
mTimer->start(interval * 1000, true); // execute a single shot
kdDebug(5950) << "DailyTimer::start(at " << mTime.hour() << ":" << mTime.minute() << "): interval = " << interval/3600 << ":" << (interval/60)%60 << ":" << interval%60 << endl;
@@ -224,9 +224,9 @@ void DailyTimer::start()
void DailyTimer::slotTimer()
{
// TIMEZONE = local time
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
mLastDate = now.date();
- QDateTime next = QDateTime(mLastDate.addDays(1), mTime);
+ TQDateTime next = TQDateTime(mLastDate.addDays(1), mTime);
uint interval = next.toTime_t() - now.toTime_t();
mTimer->start(interval * 1000, true); // execute a single shot
kdDebug(5950) << "DailyTimer::slotTimer(at " << mTime.hour() << ":" << mTime.minute() << "): interval = " << interval/3600 << ":" << (interval/60)%60 << ":" << interval%60 << endl;