summaryrefslogtreecommitdiffstats
path: root/kalarm/kalarmd/alarmdaemon.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kalarm/kalarmd/alarmdaemon.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/kalarmd/alarmdaemon.cpp')
-rw-r--r--kalarm/kalarmd/alarmdaemon.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kalarm/kalarmd/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp
index 4b6495728..c14a1bf5b 100644
--- a/kalarm/kalarmd/alarmdaemon.cpp
+++ b/kalarm/kalarmd/alarmdaemon.cpp
@@ -58,9 +58,9 @@ static const TQString START_OF_DAY(TQString::tqfromLatin1("StartOfDay"));
static const TQString AUTOSTART_TRAY(TQString::tqfromLatin1("AutostartTray"));
-AlarmDaemon::AlarmDaemon(bool autostart, TQObject *parent, const char *name)
+AlarmDaemon::AlarmDaemon(bool autostart, TQObject *tqparent, const char *name)
: DCOPObject(name),
- TQObject(parent, name),
+ TQObject(tqparent, name),
mAlarmTimer(0)
{
kdDebug(5900) << "AlarmDaemon::AlarmDaemon()" << endl;
@@ -138,7 +138,7 @@ void AlarmDaemon::startMonitoring()
// Set up the alarm timer
mAlarmTimer = new TQTimer(this);
connect(mAlarmTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAlarmsSlot()));
- setTimerStatus();
+ setTimertqStatus();
// Start monitoring calendar files.
// They are monitored until their client application registers, upon which
@@ -156,7 +156,7 @@ void AlarmDaemon::enableCal(const TQString& urlString, bool enable)
if (cal)
{
cal->setEnabled(enable);
- notifyCalStatus(cal); // notify KAlarm
+ notifyCaltqStatus(cal); // notify KAlarm
}
}
@@ -196,8 +196,8 @@ void AlarmDaemon::calendarLoaded(ADCalendar* cal, bool success)
{
if (success)
kdDebug(5900) << "Calendar reloaded" << endl;
- notifyCalStatus(cal); // notify KAlarm
- setTimerStatus();
+ notifyCaltqStatus(cal); // notify KAlarm
+ setTimertqStatus();
checkAlarms(cal);
}
@@ -262,8 +262,8 @@ void AlarmDaemon::registerApp(const TQCString& appName, const TQString& appTitle
ADConfigData::writeClient(appName, client);
ADConfigData::enableAutoStart(true);
- setTimerStatus();
- notifyCalStatus(client->calendar());
+ setTimertqStatus();
+ notifyCaltqStatus(client->calendar());
result = KAlarmd::SUCCESS;
}
@@ -373,8 +373,8 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
TQValueList<KCal::Event*> eventsDone;
for (TQValueList<KCal::Alarm*>::ConstIterator it = alarms.begin(); it != alarms.end(); ++it)
{
- KCal::Event* event = dynamic_cast<KCal::Event*>((*it)->parent());
- if (!event || eventsDone.find(event) != eventsDone.end())
+ KCal::Event* event = dynamic_cast<KCal::Event*>((*it)->tqparent());
+ if (!event || eventsDone.tqfind(event) != eventsDone.end())
continue; // either not an event, or the event has already been processed
eventsDone += event;
const TQString& eventID = event->uid();
@@ -385,7 +385,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
// The times for non-due alarms are set invalid in 'alarmtimes'.
bool recurs = event->doesRecur();
const TQStringList cats = event->categories();
- bool floats = (cats.find(TQString::tqfromLatin1("DATE")) != cats.end());
+ bool floats = (cats.tqfind(TQString::tqfromLatin1("DATE")) != cats.end());
TQDateTime nextDateTime = event->dtStart();
if (recurs)
{
@@ -487,7 +487,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const TQString& eventID)
{
// It's running, but check if it has created our DCOP interface yet
QCStringList objects = kapp->dcopClient()->remoteObjects(appname);
- if (objects.find(client->dcopObject()) == objects.end())
+ if (objects.tqfind(client->dcopObject()) == objects.end())
ready = false;
}
if (!ready)
@@ -531,7 +531,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const TQString& eventID)
/******************************************************************************
* Starts or stops the alarm timer as necessary after a calendar is enabled/disabled.
*/
-void AlarmDaemon::setTimerStatus()
+void AlarmDaemon::setTimertqStatus()
{
#ifdef AUTOSTART_KALARM
if (!mAlarmTimer)
@@ -569,7 +569,7 @@ void AlarmDaemon::setTimerStatus()
* Send a DCOP message to to the client which owns the specified calendar,
* notifying it of a change in calendar status.
*/
-void AlarmDaemon::notifyCalStatus(const ADCalendar* cal)
+void AlarmDaemon::notifyCaltqStatus(const ADCalendar* cal)
{
ClientInfo* client = ClientInfo::get(cal);
if (!client)
@@ -577,13 +577,13 @@ void AlarmDaemon::notifyCalStatus(const ADCalendar* cal)
TQCString appname = client->appName();
if (kapp->dcopClient()->isApplicationRegistered(static_cast<const char*>(appname)))
{
- KAlarmd::CalendarStatus change = cal->available() ? (cal->enabled() ? KAlarmd::CALENDAR_ENABLED : KAlarmd::CALENDAR_DISABLED)
+ KAlarmd::CalendartqStatus change = cal->available() ? (cal->enabled() ? KAlarmd::CALENDAR_ENABLED : KAlarmd::CALENDAR_DISABLED)
: KAlarmd::CALENDAR_UNAVAILABLE;
- kdDebug(5900) << "AlarmDaemon::notifyCalStatus() sending:" << appname << " -> " << change << endl;
+ kdDebug(5900) << "AlarmDaemon::notifyCaltqStatus() sending:" << appname << " -> " << change << endl;
AlarmGuiIface_stub stub(appname, client->dcopObject());
stub.alarmDaemonUpdate(change, cal->urlString());
if (!stub.ok())
- kdError(5900) << "AlarmDaemon::notifyCalStatus(): dcop send failed:" << appname << endl;
+ kdError(5900) << "AlarmDaemon::notifyCaltqStatus(): dcop send failed:" << appname << endl;
}
}