summaryrefslogtreecommitdiffstats
path: root/kalarm/lib/synchtimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/lib/synchtimer.h')
-rw-r--r--kalarm/lib/synchtimer.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/kalarm/lib/synchtimer.h b/kalarm/lib/synchtimer.h
index 551fd168..1860815e 100644
--- a/kalarm/lib/synchtimer.h
+++ b/kalarm/lib/synchtimer.h
@@ -23,10 +23,10 @@
/* @file synchtimer.h - timers which synchronise to time boundaries */
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
class QTimer;
/** SynchTimer is a virtual base class for application-wide timers synchronised
@@ -43,29 +43,29 @@ class SynchTimer : public QObject
struct Connection
{
Connection() { }
- Connection(QObject* r, const char* s) : receiver(r), slot(s) { }
+ Connection(TQObject* r, const char* s) : receiver(r), slot(s) { }
bool operator==(const Connection& c) const { return receiver == c.receiver && slot == c.slot; }
- QObject* receiver;
- const QCString slot;
+ TQObject* receiver;
+ const TQCString slot;
};
protected:
SynchTimer();
virtual void start() = 0;
- void connecT(QObject* receiver, const char* member);
- void disconnecT(QObject* receiver, const char* member = 0);
+ void connecT(TQObject* receiver, const char* member);
+ void disconnecT(TQObject* receiver, const char* member = 0);
bool hasConnections() const { return !mConnections.isEmpty(); }
- QTimer* mTimer;
+ TQTimer* mTimer;
protected slots:
virtual void slotTimer() = 0;
private slots:
- void slotReceiverGone(QObject* r) { disconnecT(r); }
+ void slotReceiverGone(TQObject* r) { disconnecT(r); }
private:
SynchTimer(const SynchTimer&); // prohibit copying
- QValueList<Connection> mConnections; // list of current clients
+ TQValueList<Connection> mConnections; // list of current clients
};
@@ -82,14 +82,14 @@ class MinuteTimer : public SynchTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(QObject* receiver, const char* member)
+ static void connect(TQObject* receiver, const char* member)
{ instance()->connecT(receiver, member); }
/** Disconnect from the timer signal.
* @param receiver Receiving object.
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(QObject* receiver, const char* member = 0)
+ static void disconnect(TQObject* receiver, const char* member = 0)
{ if (mInstance) mInstance->disconnecT(receiver, member); }
protected:
@@ -123,7 +123,7 @@ class DailyTimer : public SynchTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(const QTime& timeOfDay, QObject* receiver, const char* member)
+ static void connect(const TQTime& timeOfDay, TQObject* receiver, const char* member)
{ fixedInstance(timeOfDay)->connecT(receiver, member); }
/** 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.
@@ -132,16 +132,16 @@ class DailyTimer : public SynchTimer
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(const QTime& timeOfDay, QObject* receiver, const char* member = 0);
+ static void disconnect(const TQTime& timeOfDay, TQObject* receiver, const char* member = 0);
/** Change the time at which this variable timer triggers.
* @param newTimeOfDay New time at which the timer should trigger.
* @param triggerMissed If true, and if @p newTimeOfDay < @p oldTimeOfDay, and if the current
* time is between @p newTimeOfDay and @p oldTimeOfDay, the timer will be
* triggered immediately so as to avoid missing today's trigger.
*/
- void changeTime(const QTime& newTimeOfDay, bool triggerMissed = true);
+ void changeTime(const TQTime& newTimeOfDay, bool triggerMissed = true);
/** Return the current time of day at which this variable timer triggers. */
- QTime timeOfDay() const { return mTime; }
+ TQTime timeOfDay() const { return mTime; }
protected:
/** Construct an instance.
@@ -149,7 +149,7 @@ class DailyTimer : public SynchTimer
* can construct instances. This ensures that multiple timers are not created for the same
* use.
*/
- DailyTimer(const QTime&, bool fixed);
+ DailyTimer(const TQTime&, bool fixed);
/** Return the instance which triggers at the specified fixed time of day,
* optionally creating a new instance if necessary.
* @param timeOfDay Time at which the timer triggers.
@@ -157,16 +157,16 @@ class DailyTimer : public SynchTimer
* for @p timeOfDay.
* @return The instance for @p timeOfDay, or 0 if it does not exist.
*/
- static DailyTimer* fixedInstance(const QTime& timeOfDay, bool create = true);
+ static DailyTimer* fixedInstance(const TQTime& timeOfDay, bool create = true);
virtual void start();
protected slots:
virtual void slotTimer();
private:
- static QValueList<DailyTimer*> mFixedTimers; // list of timers whose trigger time is fixed
- QTime mTime;
- QDate mLastDate; // the date on which the timer was last triggered
+ static TQValueList<DailyTimer*> mFixedTimers; // list of timers whose trigger time is fixed
+ TQTime mTime;
+ TQDate mLastDate; // the date on which the timer was last triggered
bool mFixed; // the time at which the timer triggers cannot be changed
};
@@ -182,15 +182,15 @@ class MidnightTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(QObject* receiver, const char* member)
- { DailyTimer::connect(QTime(0,0), receiver, member); }
+ static void connect(TQObject* receiver, const char* member)
+ { DailyTimer::connect(TQTime(0,0), receiver, member); }
/** Disconnect from the timer signal.
* @param receiver Receiving object.
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(QObject* receiver, const char* member = 0)
- { DailyTimer::disconnect(QTime(0,0), receiver, member); }
+ static void disconnect(TQObject* receiver, const char* member = 0)
+ { DailyTimer::disconnect(TQTime(0,0), receiver, member); }
};