summaryrefslogtreecommitdiffstats
path: root/kalarm/functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/functions.cpp')
-rw-r--r--kalarm/functions.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp
index d7a6383f2..0221ea86b 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.
*/
-UpdatetqStatus addEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool useEventID, bool allowKOrgUpdate)
+UpdateStatus addEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool useEventID, bool allowKOrgUpdate)
{
kdDebug(5950) << "KAlarm::addEvent(): " << event.id() << endl;
- UpdatetqStatus status = UPDATE_OK;
+ UpdateStatus 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::uidtqStatus(event.id()) == KAEvent::ACTIVE);
+ bool archiving = (KAEvent::uidStatus(event.id()) == KAEvent::ACTIVE);
if (archiving)
- event.setSaveDateTime(TQDateTime::tqcurrentDateTime()); // time stamp to control purging
+ event.setSaveDateTime(TQDateTime::currentDateTime()); // 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.
*/
-UpdatetqStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent)
+UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent)
{
kdDebug(5950) << "KAlarm::addTemplate(): " << event.id() << endl;
- UpdatetqStatus status = UPDATE_OK;
+ UpdateStatus status = UPDATE_OK;
// Add the template to the calendar file
AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen();
@@ -206,7 +206,7 @@ UpdatetqStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWi
status = SAVE_FAILED;
else
{
- cal->emitEmptytqStatus();
+ cal->emitEmptyStatus();
// Update the window lists
TemplateListView::addEvent(event, selectionView);
@@ -225,11 +225,11 @@ UpdatetqStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWi
* If 'selectionView' is non-null, the selection highlight is moved to the
* modified event in that listView instance.
*/
-UpdatetqStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent)
+UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent)
{
kdDebug(5950) << "KAlarm::modifyEvent(): '" << oldEvent.id() << endl;
- UpdatetqStatus status = UPDATE_OK;
+ UpdateStatus status = UPDATE_OK;
if (!newEvent.valid())
{
deleteEvent(oldEvent, true);
@@ -280,7 +280,7 @@ UpdatetqStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmList
* The event is not updated in KOrganizer, since this function is called when an
* existing alarm is rescheduled (due to recurrence or deferral).
*/
-UpdatetqStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool archiveOnDelete, bool incRevision)
+UpdateStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool archiveOnDelete, bool incRevision)
{
kdDebug(5950) << "KAlarm::updateEvent(): " << event.id() << endl;
@@ -311,9 +311,9 @@ UpdatetqStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidge
* If 'selectionView' is non-null, the selection highlight is moved to the
* updated event in that listView instance.
*/
-UpdatetqStatus updateTemplate(const KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent)
+UpdateStatus updateTemplate(const KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent)
{
- UpdatetqStatus status = UPDATE_OK;
+ UpdateStatus status = UPDATE_OK;
AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen();
if (!cal)
status = UPDATE_FAILED;
@@ -338,7 +338,7 @@ UpdatetqStatus updateTemplate(const KAEvent& event, TemplateListView* selectionV
* 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.
*/
-UpdatetqStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent)
+UpdateStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent)
{
TQString id = event.id();
kdDebug(5950) << "KAlarm::deleteEvent(): " << id << endl;
@@ -346,11 +346,11 @@ UpdatetqStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent)
// Update the window lists
AlarmListView::deleteEvent(id);
- UpdatetqStatus status = UPDATE_OK;
+ UpdateStatus status = UPDATE_OK;
AlarmCalendar* cal;
// Delete the event from the calendar file
- if (KAEvent::uidtqStatus(id) == KAEvent::EXPIRED)
+ if (KAEvent::uidStatus(id) == KAEvent::EXPIRED)
{
cal = AlarmCalendar::expiredCalendarOpen();
if (!cal)
@@ -383,7 +383,7 @@ UpdatetqStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent)
/******************************************************************************
* Delete a template from the calendar file and from every template list view.
*/
-UpdatetqStatus deleteTemplate(const KAEvent& event)
+UpdateStatus deleteTemplate(const KAEvent& event)
{
TQString id = event.id();
@@ -393,7 +393,7 @@ UpdatetqStatus deleteTemplate(const KAEvent& event)
return UPDATE_FAILED;
if (!cal->deleteEvent(id, true)) // save calendar after deleting
return SAVE_FAILED;
- cal->emitEmptytqStatus();
+ cal->emitEmptyStatus();
// Update the window lists
TemplateListView::deleteEvent(id);
@@ -407,7 +407,7 @@ void deleteDisplayEvent(const TQString& eventID)
{
kdDebug(5950) << "KAlarm::deleteDisplayEvent(" << eventID << ")\n";
- if (KAEvent::uidtqStatus(eventID) == KAEvent::DISPLAYING)
+ if (KAEvent::uidStatus(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.
*/
-UpdatetqStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, bool useEventID)
+UpdateStatus 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::uidtqStatus(id) == KAEvent::EXPIRED)
+ if (KAEvent::uidStatus(id) == KAEvent::EXPIRED)
{
- TQDateTime now = TQDateTime::tqcurrentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (event.occursAfter(now, true))
{
if (event.recurs() || event.repeatCount())
@@ -443,7 +443,7 @@ UpdatetqStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, boo
if (!cal->save())
return SAVE_FAILED;
- UpdatetqStatus status = UPDATE_OK;
+ UpdateStatus status = UPDATE_OK;
if (event.copyToKOrganizer())
{
if (!sendToKOrganizer(event)) // tell KOrganizer to show the event
@@ -468,7 +468,7 @@ UpdatetqStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, boo
* If 'selectionView' is non-null, the selection highlight is moved to the
* updated event in that listView instance.
*/
-UpdatetqStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool enable)
+UpdateStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool enable)
{
kdDebug(5950) << "KAlarm::enableEvent(" << enable << "): " << event.id() << endl;
@@ -498,7 +498,7 @@ UpdatetqStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool en
/******************************************************************************
* Display an error message about an error saving an event.
*/
-void displayUpdateError(TQWidget* parent, UpdatetqStatus, UpdateError code, int nAlarms)
+void displayUpdateError(TQWidget* parent, UpdateStatus, 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::uidtqStatus(eventID))
+ switch (KAEvent::uidStatus(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.").tqarg(KAMail::i18n_NeedFromEmailAddress()));
+ "%1\nPlease set it in the Preferences dialog.").arg(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::tqfromLatin1("EditEnableAlarms"))
+ TQString::fromLatin1("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)").tqarg(errmsg);
+ return i18n("Unable to start KMail\n(%1)").arg(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::tqfromLatin1(program), TQString(), &errorMessage, &dcopName))
+ if (KApplication::startServiceByDesktopName(TQString::fromLatin1(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::tqfromLatin1(window));
+ config->setGroup(TQString::fromLatin1(window));
TQWidget* desktop = TQT_TQWIDGET(KApplication::desktop());
- TQSize s = TQSize(config->readNumEntry(TQString::tqfromLatin1("Width %1").tqarg(desktop->width()), 0),
- config->readNumEntry(TQString::tqfromLatin1("Height %1").tqarg(desktop->height()), 0));
+ TQSize s = TQSize(config->readNumEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), 0),
+ config->readNumEntry(TQString::fromLatin1("Height %1").arg(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::tqfromLatin1(window));
+ config->setGroup(TQString::fromLatin1(window));
TQWidget* desktop = TQT_TQWIDGET(KApplication::desktop());
- config->writeEntry(TQString::tqfromLatin1("Width %1").tqarg(desktop->width()), size.width());
- config->writeEntry(TQString::tqfromLatin1("Height %1").tqarg(desktop->height()), size.height());
+ config->writeEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), size.width());
+ config->writeEntry(TQString::fromLatin1("Height %1").arg(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::tqfromLatin1("image/")))
+ if (mimetype.startsWith(TQString::fromLatin1("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::tqfromLatin1("application")))
+ if (mimetype.startsWith(TQString::fromLatin1("application")))
{
for (int i = 0; applicationTypes[i]; ++i)
if (!strcmp(typel, applicationTypes[i]))
return TextApplication;
}
- else if (mimetype.startsWith(TQString::tqfromLatin1("text")))
+ else if (mimetype.startsWith(TQString::fromLatin1("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.tqunicode();
+ TQChar *corig = (TQChar*)out.unicode();
TQChar *cout = corig;
TQChar *cin = cout;
while (len)