diff options
Diffstat (limited to 'src/modules/my/idle.cpp')
-rw-r--r-- | src/modules/my/idle.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/modules/my/idle.cpp b/src/modules/my/idle.cpp index 56720c77..daa5c209 100644 --- a/src/modules/my/idle.cpp +++ b/src/modules/my/idle.cpp @@ -20,9 +20,9 @@ #include"idle.h" -#include<qcursor.h> -#include<qdatetime.h> -#include<qtimer.h> +#include<tqcursor.h> +#include<tqdatetime.h> +#include<tqtimer.h> static IdlePlatform *platform = 0; static int platform_ref = 0; @@ -45,7 +45,7 @@ Idle::Idle() if(platform) ++platform_ref; - connect(&d->checkTimer, SIGNAL(timeout()), SLOT(doCheck())); + connect(&d->checkTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doCheck())); } Idle::~Idle() @@ -72,12 +72,12 @@ bool Idle::usingPlatform() const void Idle::start() { - d->startTime = QDateTime::currentDateTime(); + d->startTime = TQDateTime::tqcurrentDateTime(); if(!platform) { // generic idle - d->lastMousePos = QCursor::pos(); - d->idleSince = QDateTime::currentDateTime(); + d->lastMousePos = TQCursor::pos(); + d->idleSince = TQDateTime::tqcurrentDateTime(); } // poll every second (use a lower value if you need more accuracy) @@ -95,8 +95,8 @@ int Idle::secondsIdle() if(platform) i = platform->secondsIdle(); else { - QPoint curMousePos = QCursor::pos(); - QDateTime curDateTime = QDateTime::currentDateTime(); + TQPoint curMousePos = TQCursor::pos(); + TQDateTime curDateTime = TQDateTime::tqcurrentDateTime(); if(d->lastMousePos != curMousePos) { d->lastMousePos = curMousePos; d->idleSince = curDateTime; @@ -105,7 +105,7 @@ int Idle::secondsIdle() } // set 'beginIdle' to the beginning of the idle time (by backtracking 'i' seconds from now) - QDateTime beginIdle = QDateTime::currentDateTime().addSecs(-i); + TQDateTime beginIdle = TQDateTime::tqcurrentDateTime().addSecs(-i); // set 't' to hold the number of seconds between 'beginIdle' and 'startTime' int t = beginIdle.secsTo(d->startTime); @@ -121,7 +121,7 @@ int Idle::secondsIdle() } // how long have we been idle? - int idleTime = d->startTime.secsTo(QDateTime::currentDateTime()); + int idleTime = d->startTime.secsTo(TQDateTime::tqcurrentDateTime()); return idleTime; } |