diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /libkcal/alarm.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcal/alarm.cpp')
-rw-r--r-- | libkcal/alarm.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp index c4416fb7e..b5b9b515a 100644 --- a/libkcal/alarm.cpp +++ b/libkcal/alarm.cpp @@ -122,14 +122,14 @@ Alarm::Type Alarm::type() const return mType; } -void Alarm::setAudioAlarm(const QString &audioFile) +void Alarm::setAudioAlarm(const TQString &audioFile) { mType = Audio; mFile = audioFile; if ( mParent ) mParent->updated(); } -void Alarm::setAudioFile(const QString &audioFile) +void Alarm::setAudioFile(const TQString &audioFile) { if (mType == Audio) { mFile = audioFile; @@ -137,12 +137,12 @@ void Alarm::setAudioFile(const QString &audioFile) } } -QString Alarm::audioFile() const +TQString Alarm::audioFile() const { - return (mType == Audio) ? mFile : QString::null; + return (mType == Audio) ? mFile : TQString::null; } -void Alarm::setProcedureAlarm(const QString &programFile, const QString &arguments) +void Alarm::setProcedureAlarm(const TQString &programFile, const TQString &arguments) { mType = Procedure; mFile = programFile; @@ -150,7 +150,7 @@ void Alarm::setProcedureAlarm(const QString &programFile, const QString &argumen if ( mParent ) mParent->updated(); } -void Alarm::setProgramFile(const QString &programFile) +void Alarm::setProgramFile(const TQString &programFile) { if (mType == Procedure) { mFile = programFile; @@ -158,12 +158,12 @@ void Alarm::setProgramFile(const QString &programFile) } } -QString Alarm::programFile() const +TQString Alarm::programFile() const { - return (mType == Procedure) ? mFile : QString::null; + return (mType == Procedure) ? mFile : TQString::null; } -void Alarm::setProgramArguments(const QString &arguments) +void Alarm::setProgramArguments(const TQString &arguments) { if (mType == Procedure) { mDescription = arguments; @@ -171,13 +171,13 @@ void Alarm::setProgramArguments(const QString &arguments) } } -QString Alarm::programArguments() const +TQString Alarm::programArguments() const { - return (mType == Procedure) ? mDescription : QString::null; + return (mType == Procedure) ? mDescription : TQString::null; } -void Alarm::setEmailAlarm(const QString &subject, const QString &text, - const QValueList<Person> &addressees, const QStringList &attachments) +void Alarm::setEmailAlarm(const TQString &subject, const TQString &text, + const TQValueList<Person> &addressees, const TQStringList &attachments) { mType = Email; mMailSubject = subject; @@ -196,7 +196,7 @@ void Alarm::setMailAddress(const Person &mailAddress) } } -void Alarm::setMailAddresses(const QValueList<Person> &mailAddresses) +void Alarm::setMailAddresses(const TQValueList<Person> &mailAddresses) { if (mType == Email) { mMailAddresses = mailAddresses; @@ -212,12 +212,12 @@ void Alarm::addMailAddress(const Person &mailAddress) } } -QValueList<Person> Alarm::mailAddresses() const +TQValueList<Person> Alarm::mailAddresses() const { - return (mType == Email) ? mMailAddresses : QValueList<Person>(); + return (mType == Email) ? mMailAddresses : TQValueList<Person>(); } -void Alarm::setMailSubject(const QString &mailAlarmSubject) +void Alarm::setMailSubject(const TQString &mailAlarmSubject) { if (mType == Email) { mMailSubject = mailAlarmSubject; @@ -225,12 +225,12 @@ void Alarm::setMailSubject(const QString &mailAlarmSubject) } } -QString Alarm::mailSubject() const +TQString Alarm::mailSubject() const { - return (mType == Email) ? mMailSubject : QString::null; + return (mType == Email) ? mMailSubject : TQString::null; } -void Alarm::setMailAttachment(const QString &mailAttachFile) +void Alarm::setMailAttachment(const TQString &mailAttachFile) { if (mType == Email) { mMailAttachFiles.clear(); @@ -239,7 +239,7 @@ void Alarm::setMailAttachment(const QString &mailAttachFile) } } -void Alarm::setMailAttachments(const QStringList &mailAttachFiles) +void Alarm::setMailAttachments(const TQStringList &mailAttachFiles) { if (mType == Email) { mMailAttachFiles = mailAttachFiles; @@ -247,7 +247,7 @@ void Alarm::setMailAttachments(const QStringList &mailAttachFiles) } } -void Alarm::addMailAttachment(const QString &mailAttachFile) +void Alarm::addMailAttachment(const TQString &mailAttachFile) { if (mType == Email) { mMailAttachFiles += mailAttachFile; @@ -255,12 +255,12 @@ void Alarm::addMailAttachment(const QString &mailAttachFile) } } -QStringList Alarm::mailAttachments() const +TQStringList Alarm::mailAttachments() const { - return (mType == Email) ? mMailAttachFiles : QStringList(); + return (mType == Email) ? mMailAttachFiles : TQStringList(); } -void Alarm::setMailText(const QString &text) +void Alarm::setMailText(const TQString &text) { if (mType == Email) { mDescription = text; @@ -268,12 +268,12 @@ void Alarm::setMailText(const QString &text) } } -QString Alarm::mailText() const +TQString Alarm::mailText() const { - return (mType == Email) ? mDescription : QString::null; + return (mType == Email) ? mDescription : TQString::null; } -void Alarm::setDisplayAlarm(const QString &text) +void Alarm::setDisplayAlarm(const TQString &text) { mType = Display; if ( !text.isNull() ) @@ -281,7 +281,7 @@ void Alarm::setDisplayAlarm(const QString &text) if ( mParent ) mParent->updated(); } -void Alarm::setText(const QString &text) +void Alarm::setText(const TQString &text) { if (mType == Display) { mDescription = text; @@ -289,12 +289,12 @@ void Alarm::setText(const QString &text) } } -QString Alarm::text() const +TQString Alarm::text() const { - return (mType == Display) ? mDescription : QString::null; + return (mType == Display) ? mDescription : TQString::null; } -void Alarm::setTime(const QDateTime &alarmTime) +void Alarm::setTime(const TQDateTime &alarmTime) { mAlarmTime = alarmTime; mHasTime = true; @@ -302,7 +302,7 @@ void Alarm::setTime(const QDateTime &alarmTime) if ( mParent ) mParent->updated(); } -QDateTime Alarm::time() const +TQDateTime Alarm::time() const { if ( hasTime() ) return mAlarmTime; @@ -316,7 +316,7 @@ QDateTime Alarm::time() const } else { return mOffset.end( mParent->dtStart() ); } - } else return QDateTime(); + } else return TQDateTime(); } bool Alarm::hasTime() const @@ -353,41 +353,41 @@ int Alarm::duration() const return mAlarmRepeatCount * mAlarmSnoozeTime * 60; } -QDateTime Alarm::nextRepetition(const QDateTime& preTime) const +TQDateTime Alarm::nextRepetition(const TQDateTime& preTime) const { // This method is coded to avoid 32-bit integer overflow using - // QDateTime::secsTo(), which occurs with time spans > 68 years. - QDateTime at = time(); + // TQDateTime::secsTo(), which occurs with time spans > 68 years. + TQDateTime at = time(); if (at > preTime) return at; if (!mAlarmRepeatCount) - return QDateTime(); // there isn't an occurrence after the specified time + return TQDateTime(); // there isn't an occurrence after the specified time int snoozeSecs = mAlarmSnoozeTime * 60; - QDateTime lastRepetition = at.addSecs(mAlarmRepeatCount * snoozeSecs); + TQDateTime lastRepetition = at.addSecs(mAlarmRepeatCount * snoozeSecs); if (lastRepetition <= preTime) - return QDateTime(); // all repetitions have finished before the specified time + return TQDateTime(); // all repetitions have finished before the specified time int repetition = (at.secsTo(preTime) + snoozeSecs) / snoozeSecs; return at.addSecs(repetition * snoozeSecs); } -QDateTime Alarm::previousRepetition(const QDateTime& afterTime) const +TQDateTime Alarm::previousRepetition(const TQDateTime& afterTime) const { // This method is coded to avoid 32-bit integer overflow using - // QDateTime::secsTo(), which occurs with time spans > 68 years. - QDateTime at = time(); + // TQDateTime::secsTo(), which occurs with time spans > 68 years. + TQDateTime at = time(); if (at >= afterTime) - return QDateTime(); // alarm's first/only time is at/after the specified time + return TQDateTime(); // alarm's first/only time is at/after the specified time if (!mAlarmRepeatCount) return at; int snoozeSecs = mAlarmSnoozeTime * 60; - QDateTime lastRepetition = at.addSecs(mAlarmRepeatCount * snoozeSecs); + TQDateTime lastRepetition = at.addSecs(mAlarmRepeatCount * snoozeSecs); if (lastRepetition < afterTime) return lastRepetition; // all repetitions have finished before the specified time int repetition = (at.secsTo(afterTime) - 1) / snoozeSecs; return at.addSecs(repetition * snoozeSecs); } -QDateTime Alarm::endTime() const +TQDateTime Alarm::endTime() const { if (mAlarmRepeatCount) return time().addSecs(mAlarmRepeatCount * mAlarmSnoozeTime * 60); |