diff options
Diffstat (limited to 'kalarm/functions.cpp')
-rw-r--r-- | kalarm/functions.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp index 0221ea86b..d7a6383f2 100644 --- a/kalarm/functions.cpp +++ b/kalarm/functions.cpp @@ -129,10 +129,10 @@ TemplateMenuAction* createNewFromTemplateAction(const TQString& label, TQObject* * event in that listView instance. * 'event' is updated with the actual event ID. */ -UpdateStatus addEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool useEventID, bool allowKOrgUpdate) +UpdatetqStatus addEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool useEventID, bool allowKOrgUpdate) { kdDebug(5950) << "KAlarm::addEvent(): " << event.id() << endl; - UpdateStatus status = UPDATE_OK; + UpdatetqStatus status = UPDATE_OK; if (!theApp()->checkCalendarDaemon()) // ensure calendar is open and daemon started return UPDATE_FAILED; else @@ -172,9 +172,9 @@ bool addExpiredEvent(KAEvent& event) AlarmCalendar* cal = AlarmCalendar::expiredCalendarOpen(); if (!cal) return false; - bool archiving = (KAEvent::uidStatus(event.id()) == KAEvent::ACTIVE); + bool archiving = (KAEvent::uidtqStatus(event.id()) == KAEvent::ACTIVE); if (archiving) - event.setSaveDateTime(TQDateTime::currentDateTime()); // time stamp to control purging + event.setSaveDateTime(TQDateTime::tqcurrentDateTime()); // time stamp to control purging KCal::Event* kcalEvent = cal->addEvent(event); cal->save(); @@ -193,10 +193,10 @@ bool addExpiredEvent(KAEvent& event) * event in that listView instance. * 'event' is updated with the actual event ID. */ -UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent) +UpdatetqStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent) { kdDebug(5950) << "KAlarm::addTemplate(): " << event.id() << endl; - UpdateStatus status = UPDATE_OK; + UpdatetqStatus status = UPDATE_OK; // Add the template to the calendar file AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen(); @@ -206,7 +206,7 @@ UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWidg status = SAVE_FAILED; else { - cal->emitEmptyStatus(); + cal->emitEmptytqStatus(); // Update the window lists TemplateListView::addEvent(event, selectionView); @@ -225,11 +225,11 @@ UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWidg * If 'selectionView' is non-null, the selection highlight is moved to the * modified event in that listView instance. */ -UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent) +UpdatetqStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent) { kdDebug(5950) << "KAlarm::modifyEvent(): '" << oldEvent.id() << endl; - UpdateStatus status = UPDATE_OK; + UpdatetqStatus status = UPDATE_OK; if (!newEvent.valid()) { deleteEvent(oldEvent, true); @@ -280,7 +280,7 @@ UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListVi * The event is not updated in KOrganizer, since this function is called when an * existing alarm is rescheduled (due to recurrence or deferral). */ -UpdateStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool archiveOnDelete, bool incRevision) +UpdatetqStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool archiveOnDelete, bool incRevision) { kdDebug(5950) << "KAlarm::updateEvent(): " << event.id() << endl; @@ -311,9 +311,9 @@ UpdateStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* * If 'selectionView' is non-null, the selection highlight is moved to the * updated event in that listView instance. */ -UpdateStatus updateTemplate(const KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent) +UpdatetqStatus updateTemplate(const KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent) { - UpdateStatus status = UPDATE_OK; + UpdatetqStatus status = UPDATE_OK; AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen(); if (!cal) status = UPDATE_FAILED; @@ -338,7 +338,7 @@ UpdateStatus updateTemplate(const KAEvent& event, TemplateListView* selectionVie * Delete an alarm from the calendar file and from every main window instance. * If the event is archived, the event's ID is changed to an expired ID if necessary. */ -UpdateStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent) +UpdatetqStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent) { TQString id = event.id(); kdDebug(5950) << "KAlarm::deleteEvent(): " << id << endl; @@ -346,11 +346,11 @@ UpdateStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent) // Update the window lists AlarmListView::deleteEvent(id); - UpdateStatus status = UPDATE_OK; + UpdatetqStatus status = UPDATE_OK; AlarmCalendar* cal; // Delete the event from the calendar file - if (KAEvent::uidStatus(id) == KAEvent::EXPIRED) + if (KAEvent::uidtqStatus(id) == KAEvent::EXPIRED) { cal = AlarmCalendar::expiredCalendarOpen(); if (!cal) @@ -383,7 +383,7 @@ UpdateStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent) /****************************************************************************** * Delete a template from the calendar file and from every template list view. */ -UpdateStatus deleteTemplate(const KAEvent& event) +UpdatetqStatus deleteTemplate(const KAEvent& event) { TQString id = event.id(); @@ -393,7 +393,7 @@ UpdateStatus deleteTemplate(const KAEvent& event) return UPDATE_FAILED; if (!cal->deleteEvent(id, true)) // save calendar after deleting return SAVE_FAILED; - cal->emitEmptyStatus(); + cal->emitEmptytqStatus(); // Update the window lists TemplateListView::deleteEvent(id); @@ -407,7 +407,7 @@ void deleteDisplayEvent(const TQString& eventID) { kdDebug(5950) << "KAlarm::deleteDisplayEvent(" << eventID << ")\n"; - if (KAEvent::uidStatus(eventID) == KAEvent::DISPLAYING) + if (KAEvent::uidtqStatus(eventID) == KAEvent::DISPLAYING) { AlarmCalendar* cal = AlarmCalendar::displayCalendarOpen(); if (cal) @@ -421,15 +421,15 @@ void deleteDisplayEvent(const TQString& eventID) * If 'selectionView' is non-null, the selection highlight is moved to the * restored event in that listView instance. */ -UpdateStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, bool useEventID) +UpdatetqStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, bool useEventID) { TQString id = event.id(); kdDebug(5950) << "KAlarm::reactivateEvent(): " << id << endl; // Delete the event from the expired calendar file - if (KAEvent::uidStatus(id) == KAEvent::EXPIRED) + if (KAEvent::uidtqStatus(id) == KAEvent::EXPIRED) { - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); if (event.occursAfter(now, true)) { if (event.recurs() || event.repeatCount()) @@ -443,7 +443,7 @@ UpdateStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, bool if (!cal->save()) return SAVE_FAILED; - UpdateStatus status = UPDATE_OK; + UpdatetqStatus status = UPDATE_OK; if (event.copyToKOrganizer()) { if (!sendToKOrganizer(event)) // tell KOrganizer to show the event @@ -468,7 +468,7 @@ UpdateStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, bool * If 'selectionView' is non-null, the selection highlight is moved to the * updated event in that listView instance. */ -UpdateStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool enable) +UpdatetqStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool enable) { kdDebug(5950) << "KAlarm::enableEvent(" << enable << "): " << event.id() << endl; @@ -498,7 +498,7 @@ UpdateStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool enab /****************************************************************************** * Display an error message about an error saving an event. */ -void displayUpdateError(TQWidget* parent, UpdateStatus, UpdateError code, int nAlarms) +void displayUpdateError(TQWidget* parent, UpdatetqStatus, UpdateError code, int nAlarms) { TQString errmsg; switch (code) @@ -551,7 +551,7 @@ void displayKOrgUpdateError(TQWidget* parent, KOrgUpdateError code, int nAlarms) bool edit(const TQString& eventID) { AlarmCalendar* cal; - switch (KAEvent::uidStatus(eventID)) + switch (KAEvent::uidtqStatus(eventID)) { case KAEvent::ACTIVE: cal = AlarmCalendar::activeCalendar(); @@ -633,13 +633,13 @@ void outputAlarmWarnings(TQWidget* parent, const KAEvent* event) if (event && event->action() == KAEvent::EMAIL && Preferences::emailAddress().isEmpty()) KMessageBox::information(parent, i18n("Please set the 'From' email address...", - "%1\nPlease set it in the Preferences dialog.").arg(KAMail::i18n_NeedFromEmailAddress())); + "%1\nPlease set it in the Preferences dialog.").tqarg(KAMail::i18n_NeedFromEmailAddress())); if (!Daemon::monitoringAlarms()) { if (KMessageBox::warningYesNo(parent, i18n("Alarms are currently disabled.\nDo you want to enable alarms now?"), TQString(), i18n("Enable"), i18n("Keep Disabled"), - TQString::fromLatin1("EditEnableAlarms")) + TQString::tqfromLatin1("EditEnableAlarms")) == KMessageBox::Yes) Daemon::setAlarmsEnabled(); } @@ -705,7 +705,7 @@ TQString runKMail(bool minimise) TQCString dcopName; TQString errmsg; if (!runProgram("kmail", (minimise ? KMAIL_DCOP_WINDOW : ""), dcopName, errmsg)) - return i18n("Unable to start KMail\n(%1)").arg(errmsg); + return i18n("Unable to start KMail\n(%1)").tqarg(errmsg); return TQString(); } @@ -721,7 +721,7 @@ bool runProgram(const TQCString& program, const TQCString& windowName, TQCString if (!kapp->dcopClient()->isApplicationRegistered(program)) { // KOrganizer is not already running, so start it - if (KApplication::startServiceByDesktopName(TQString::fromLatin1(program), TQString(), &errorMessage, &dcopName)) + if (KApplication::startServiceByDesktopName(TQString::tqfromLatin1(program), TQString(), &errorMessage, &dcopName)) { kdError(5950) << "runProgram(): couldn't start " << program << " (" << errorMessage << ")\n"; return false; @@ -746,10 +746,10 @@ bool runProgram(const TQCString& program, const TQCString& windowName, TQCString bool readConfigWindowSize(const char* window, TQSize& result) { KConfig* config = KGlobal::config(); - config->setGroup(TQString::fromLatin1(window)); + config->setGroup(TQString::tqfromLatin1(window)); TQWidget* desktop = TQT_TQWIDGET(KApplication::desktop()); - TQSize s = TQSize(config->readNumEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), 0), - config->readNumEntry(TQString::fromLatin1("Height %1").arg(desktop->height()), 0)); + TQSize s = TQSize(config->readNumEntry(TQString::tqfromLatin1("Width %1").tqarg(desktop->width()), 0), + config->readNumEntry(TQString::tqfromLatin1("Height %1").tqarg(desktop->height()), 0)); if (s.isEmpty()) return false; result = s; @@ -763,10 +763,10 @@ bool readConfigWindowSize(const char* window, TQSize& result) void writeConfigWindowSize(const char* window, const TQSize& size) { KConfig* config = KGlobal::config(); - config->setGroup(TQString::fromLatin1(window)); + config->setGroup(TQString::tqfromLatin1(window)); TQWidget* desktop = TQT_TQWIDGET(KApplication::desktop()); - config->writeEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), size.width()); - config->writeEntry(TQString::fromLatin1("Height %1").arg(desktop->height()), size.height()); + config->writeEntry(TQString::tqfromLatin1("Width %1").tqarg(desktop->width()), size.width()); + config->writeEntry(TQString::tqfromLatin1("Height %1").tqarg(desktop->height()), size.height()); config->sync(); } @@ -834,20 +834,20 @@ FileType fileType(const TQString& mimetype) static const char* formattedTextTypes[] = { "html", "xml", 0 }; - if (mimetype.startsWith(TQString::fromLatin1("image/"))) + if (mimetype.startsWith(TQString::tqfromLatin1("image/"))) return Image; int slash = mimetype.find('/'); if (slash < 0) return Unknown; TQString type = mimetype.mid(slash + 1); const char* typel = type.latin1(); - if (mimetype.startsWith(TQString::fromLatin1("application"))) + if (mimetype.startsWith(TQString::tqfromLatin1("application"))) { for (int i = 0; applicationTypes[i]; ++i) if (!strcmp(typel, applicationTypes[i])) return TextApplication; } - else if (mimetype.startsWith(TQString::fromLatin1("text"))) + else if (mimetype.startsWith(TQString::tqfromLatin1("text"))) { for (int i = 0; formattedTextTypes[i]; ++i) if (!strcmp(typel, formattedTextTypes[i])) @@ -905,7 +905,7 @@ TQString stripAccel(const TQString& text) { unsigned len = text.length(); TQString out = TQDeepCopy<TQString>(text); - TQChar *corig = (TQChar*)out.unicode(); + TQChar *corig = (TQChar*)out.tqunicode(); TQChar *cout = corig; TQChar *cin = cout; while (len) |