From f4fae92b6768541e2952173c3d4b09040f95bf7e Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 16 Feb 2011 20:17:18 +0000 Subject: Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kalarm/alarmevent.cpp | 96 +++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'kalarm/alarmevent.cpp') diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp index 34ce46a29..52206342b 100644 --- a/kalarm/alarmevent.cpp +++ b/kalarm/alarmevent.cpp @@ -44,7 +44,7 @@ const TQCString APPNAME("KALARM"); // KAlarm version which first used the current calendar/event format. // If this changes, KAEvent::convertKCalEvents() must be changed correspondingly. // The string version is the KAlarm version string used in the calendar file. -TQString KAEvent::calVersionString() { return TQString::fromLatin1("1.5.0"); } +TQString KAEvent::calVersionString() { return TQString::tqfromLatin1("1.5.0"); } int KAEvent::calVersion() { return KAlarm::Version(1,5,0); } // Custom calendar properties. @@ -54,16 +54,16 @@ static const TQCString NEXT_RECUR_PROPERTY("NEXTRECUR"); // X-KDE-KALARM-NEX static const TQCString REPEAT_PROPERTY("REPEAT"); // X-KDE-KALARM-REPEAT property // - General alarm properties static const TQCString TYPE_PROPERTY("TYPE"); // X-KDE-KALARM-TYPE property -static const TQString FILE_TYPE = TQString::fromLatin1("FILE"); -static const TQString AT_LOGIN_TYPE = TQString::fromLatin1("LOGIN"); -static const TQString REMINDER_TYPE = TQString::fromLatin1("REMINDER"); -static const TQString REMINDER_ONCE_TYPE = TQString::fromLatin1("REMINDER_ONCE"); -static const TQString ARCHIVE_REMINDER_ONCE_TYPE = TQString::fromLatin1("ONCE"); -static const TQString TIME_DEFERRAL_TYPE = TQString::fromLatin1("DEFERRAL"); -static const TQString DATE_DEFERRAL_TYPE = TQString::fromLatin1("DATE_DEFERRAL"); -static const TQString DISPLAYING_TYPE = TQString::fromLatin1("DISPLAYING"); // used only in displaying calendar -static const TQString PRE_ACTION_TYPE = TQString::fromLatin1("PRE"); -static const TQString POST_ACTION_TYPE = TQString::fromLatin1("POST"); +static const TQString FILE_TYPE = TQString::tqfromLatin1("FILE"); +static const TQString AT_LOGIN_TYPE = TQString::tqfromLatin1("LOGIN"); +static const TQString REMINDER_TYPE = TQString::tqfromLatin1("REMINDER"); +static const TQString REMINDER_ONCE_TYPE = TQString::tqfromLatin1("REMINDER_ONCE"); +static const TQString ARCHIVE_REMINDER_ONCE_TYPE = TQString::tqfromLatin1("ONCE"); +static const TQString TIME_DEFERRAL_TYPE = TQString::tqfromLatin1("DEFERRAL"); +static const TQString DATE_DEFERRAL_TYPE = TQString::tqfromLatin1("DATE_DEFERRAL"); +static const TQString DISPLAYING_TYPE = TQString::tqfromLatin1("DISPLAYING"); // used only in displaying calendar +static const TQString PRE_ACTION_TYPE = TQString::tqfromLatin1("PRE"); +static const TQString POST_ACTION_TYPE = TQString::tqfromLatin1("POST"); static const TQCString NEXT_REPEAT_PROPERTY("NEXTREPEAT"); // X-KDE-KALARM-NEXTREPEAT property // - Display alarm properties static const TQCString FONT_COLOUR_PROPERTY("FONTCOLOR"); // X-KDE-KALARM-FONTCOLOR property @@ -74,27 +74,27 @@ static const TQCString VOLUME_PROPERTY("VOLUME"); // X-KDE-KALARM-VOL static const TQCString SPEAK_PROPERTY("SPEAK"); // X-KDE-KALARM-SPEAK property // Event categories -static const TQString DATE_ONLY_CATEGORY = TQString::fromLatin1("DATE"); -static const TQString EMAIL_BCC_CATEGORY = TQString::fromLatin1("BCC"); -static const TQString CONFIRM_ACK_CATEGORY = TQString::fromLatin1("ACKCONF"); -static const TQString LATE_CANCEL_CATEGORY = TQString::fromLatin1("LATECANCEL;"); -static const TQString AUTO_CLOSE_CATEGORY = TQString::fromLatin1("LATECLOSE;"); -static const TQString TEMPL_AFTER_TIME_CATEGORY = TQString::fromLatin1("TMPLAFTTIME;"); -static const TQString KMAIL_SERNUM_CATEGORY = TQString::fromLatin1("KMAIL:"); -static const TQString KORGANIZER_CATEGORY = TQString::fromLatin1("KORG"); -static const TQString DEFER_CATEGORY = TQString::fromLatin1("DEFER;"); -static const TQString ARCHIVE_CATEGORY = TQString::fromLatin1("SAVE"); -static const TQString ARCHIVE_CATEGORIES = TQString::fromLatin1("SAVE:"); -static const TQString LOG_CATEGORY = TQString::fromLatin1("LOG:"); -static const TQString xtermURL = TQString::fromLatin1("xterm:"); +static const TQString DATE_ONLY_CATEGORY = TQString::tqfromLatin1("DATE"); +static const TQString EMAIL_BCC_CATEGORY = TQString::tqfromLatin1("BCC"); +static const TQString CONFIRM_ACK_CATEGORY = TQString::tqfromLatin1("ACKCONF"); +static const TQString LATE_CANCEL_CATEGORY = TQString::tqfromLatin1("LATECANCEL;"); +static const TQString AUTO_CLOSE_CATEGORY = TQString::tqfromLatin1("LATECLOSE;"); +static const TQString TEMPL_AFTER_TIME_CATEGORY = TQString::tqfromLatin1("TMPLAFTTIME;"); +static const TQString KMAIL_SERNUM_CATEGORY = TQString::tqfromLatin1("KMAIL:"); +static const TQString KORGANIZER_CATEGORY = TQString::tqfromLatin1("KORG"); +static const TQString DEFER_CATEGORY = TQString::tqfromLatin1("DEFER;"); +static const TQString ARCHIVE_CATEGORY = TQString::tqfromLatin1("SAVE"); +static const TQString ARCHIVE_CATEGORIES = TQString::tqfromLatin1("SAVE:"); +static const TQString LOG_CATEGORY = TQString::tqfromLatin1("LOG:"); +static const TQString xtermURL = TQString::tqfromLatin1("xterm:"); // Event status strings -static const TQString DISABLED_STATUS = TQString::fromLatin1("DISABLED"); +static const TQString DISABLED_STATUS = TQString::tqfromLatin1("DISABLED"); -static const TQString EXPIRED_UID = TQString::fromLatin1("-exp-"); -static const TQString DISPLAYING_UID = TQString::fromLatin1("-disp-"); -static const TQString TEMPLATE_UID = TQString::fromLatin1("-tmpl-"); -static const TQString KORGANIZER_UID = TQString::fromLatin1("-korg-"); +static const TQString EXPIRED_UID = TQString::tqfromLatin1("-exp-"); +static const TQString DISPLAYING_UID = TQString::tqfromLatin1("-disp-"); +static const TQString TEMPLATE_UID = TQString::tqfromLatin1("-tmpl-"); +static const TQString KORGANIZER_UID = TQString::tqfromLatin1("-korg-"); struct AlarmData { @@ -927,7 +927,7 @@ TQString KAEvent::uid(const TQString& id, Status status) case TEMPLATE: part = TEMPLATE_UID; break; case KORGANIZER: part = KORGANIZER_UID; break; } - result.replace(i, len, part); + result.tqreplace(i, len, part); } return result; } @@ -1039,7 +1039,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc if (params.count() > 0) { TQString cat = ARCHIVE_CATEGORIES; - cat += params.join(TQString::fromLatin1(";")); + cat += params.join(TQString::tqfromLatin1(";")); cats.append(cat); } else @@ -1097,9 +1097,9 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc else if (mAtLoginDateTime.isValid()) dtl = mAtLoginDateTime; else if (mStartDateTime.isDateOnly()) - dtl = TQDate::currentDate().addDays(-1); + dtl = TQDate::tqcurrentDate().addDays(-1); else - dtl = TQDateTime::currentDateTime(); + dtl = TQDateTime::tqcurrentDateTime(); initKCalAlarm(ev, dtl, AT_LOGIN_TYPE); if (!ancillaryType && dtl.isValid()) { @@ -1243,7 +1243,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL case KAAlarm::AUDIO_ALARM: alarm->setAudioAlarm(mAudioFile); // empty for a beep or for speaking if (mSpeak) - alarm->setCustomProperty(APPNAME, SPEAK_PROPERTY, TQString::fromLatin1("Y")); + alarm->setCustomProperty(APPNAME, SPEAK_PROPERTY, TQString::tqfromLatin1("Y")); if (mRepeatSound) { alarm->setRepeatCount(-1); @@ -1251,7 +1251,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL } if (!mAudioFile.isEmpty() && mSoundVolume >= 0) alarm->setCustomProperty(APPNAME, VOLUME_PROPERTY, - TQString::fromLatin1("%1;%2;%3").arg(TQString::number(mSoundVolume, 'f', 2)) + TQString::tqfromLatin1("%1;%2;%3").arg(TQString::number(mSoundVolume, 'f', 2)) .arg(TQString::number(mFadeVolume, 'f', 2)) .arg(mFadeSeconds)); break; @@ -1277,7 +1277,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL case T_MESSAGE: alarm->setDisplayAlarm(AlarmText::toCalendarText(mText)); alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY, - TQString::fromLatin1("%1;%2;%3").arg(mBgColour.name()) + TQString::tqfromLatin1("%1;%2;%3").arg(mBgColour.name()) .arg(mFgColour.name()) .arg(mDefaultFont ? TQString::null : mFont.toString())); break; @@ -1601,7 +1601,7 @@ bool KAEvent::defer(const DateTime& dateTime, bool reminder, bool adjustRecurren set_deferral(NORMAL_DEFERRAL); if (adjustRecurrence) { - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); if (mainEndRepeatTime() < now) { // The last repetition (if any) of the current recurrence has already passed. @@ -1641,7 +1641,7 @@ void KAEvent::cancelDefer() // Set the deferral time to be the same as the next recurrence/repetition. // This prevents an immediate retriggering of the alarm. if (mMainExpired - || nextOccurrence(TQDateTime::currentDateTime(), mDeferralTime, RETURN_REPETITION) == NO_OCCURRENCE) + || nextOccurrence(TQDateTime::tqcurrentDateTime(), mDeferralTime, RETURN_REPETITION) == NO_OCCURRENCE) { // The main alarm has expired, so simply delete the deferral mDeferralTime = DateTime(); @@ -1678,7 +1678,7 @@ DateTime KAEvent::deferralLimit(KAEvent::DeferLimitType* limitType) const // It's a repeated alarm. Don't allow it to be deferred past its // next occurrence or repetition. DateTime reminderTime; - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); OccurType type = nextOccurrence(now, endTime, RETURN_REPETITION); if (type & OCCURRENCE_REPEAT) ltype = LIMIT_REPETITION; @@ -1695,7 +1695,7 @@ DateTime KAEvent::deferralLimit(KAEvent::DeferLimitType* limitType) const ltype = LIMIT_RECURRENCE; } else if ((mReminderMinutes || mDeferral == REMINDER_DEFERRAL || mArchiveReminderMinutes) - && TQDateTime::currentDateTime() < mNextMainDateTime.dateTime()) + && TQDateTime::tqcurrentDateTime() < mNextMainDateTime.dateTime()) { // It's an reminder alarm. Don't allow it to be deferred past its main alarm time. endTime = mNextMainDateTime; @@ -2633,21 +2633,21 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju static const TQChar LATE_CANCEL_CODE = 'C'; static const TQChar AT_LOGIN_CODE = 'L'; // subsidiary alarm at every login static const TQChar DEFERRAL_CODE = 'D'; // extra deferred alarm - static const TQString TEXT_PREFIX = TQString::fromLatin1("TEXT:"); - static const TQString FILE_PREFIX = TQString::fromLatin1("FILE:"); - static const TQString COMMAND_PREFIX = TQString::fromLatin1("CMD:"); + static const TQString TEXT_PREFIX = TQString::tqfromLatin1("TEXT:"); + static const TQString FILE_PREFIX = TQString::tqfromLatin1("FILE:"); + static const TQString COMMAND_PREFIX = TQString::tqfromLatin1("CMD:"); // KAlarm pre-0.9.2 codes held in the event's CATEGORY property - static const TQString BEEP_CATEGORY = TQString::fromLatin1("BEEP"); + static const TQString BEEP_CATEGORY = TQString::tqfromLatin1("BEEP"); // KAlarm pre-1.1.1 LATECANCEL category with no parameter - static const TQString LATE_CANCEL_CAT = TQString::fromLatin1("LATECANCEL"); + static const TQString LATE_CANCEL_CAT = TQString::tqfromLatin1("LATECANCEL"); // KAlarm pre-1.3.0 TMPLDEFTIME category with no parameter - static const TQString TEMPL_DEF_TIME_CAT = TQString::fromLatin1("TMPLDEFTIME"); + static const TQString TEMPL_DEF_TIME_CAT = TQString::tqfromLatin1("TMPLDEFTIME"); // KAlarm pre-1.3.1 XTERM category - static const TQString EXEC_IN_XTERM_CAT = TQString::fromLatin1("XTERM"); + static const TQString EXEC_IN_XTERM_CAT = TQString::tqfromLatin1("XTERM"); // KAlarm pre-1.4.22 properties static const TQCString KMAIL_ID_PROPERTY("KMAILID"); // X-KDE-KALARM-KMAILID property @@ -2844,7 +2844,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju Alarm* alarm = *alit; if (alarm->type() == Alarm::Display) alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY, - TQString::fromLatin1("%1;;").arg(cats[0])); + TQString::tqfromLatin1("%1;;").arg(cats[0])); } cats.remove(cats.begin()); } -- cgit v1.2.1