diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-08-07 17:06:29 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-08-07 17:06:29 +0900 |
commit | c036d97d35d25c4511d9569d40c1de07dab96bb6 (patch) | |
tree | abb9a42ff29a9c144450b6b6a5aafb851cbdc69c /kalarm/alarmevent.h | |
parent | 74a91e13153f0696bb62baa78dac119f3a2e9fca (diff) | |
download | tdepim-c036d97d35d25c4511d9569d40c1de07dab96bb6.tar.gz tdepim-c036d97d35d25c4511d9569d40c1de07dab96bb6.zip |
Fixed KAlarm building warnings. Minor style patch up. Fixed possible error in treating deferred evens (see kalarm/alarmevent.cpp:1739).
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kalarm/alarmevent.h')
-rw-r--r-- | kalarm/alarmevent.h | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/kalarm/alarmevent.h b/kalarm/alarmevent.h index 20f870b64..6bda36d95 100644 --- a/kalarm/alarmevent.h +++ b/kalarm/alarmevent.h @@ -61,32 +61,32 @@ class KAAlarmEventBase TQString message() const { return (mActionType == T_MESSAGE || mActionType == T_EMAIL) ? mText : TQString(); } TQString fileName() const { return (mActionType == T_FILE) ? mText : TQString(); } TQString command() const { return (mActionType == T_COMMAND) ? mText : TQString(); } - uint emailFromId() const { return mEmailFromIdentity; } - const EmailAddressList& emailAddresses() const { return mEmailAddresses; } + uint emailFromId() const { return mEmailFromIdentity; } + const EmailAddressList& emailAddresses() const { return mEmailAddresses; } TQString emailAddresses(const TQString& sep) const { return mEmailAddresses.join(sep); } const TQString& emailSubject() const { return mEmailSubject; } const TQStringList& emailAttachments() const { return mEmailAttachments; } TQString emailAttachments(const TQString& sep) const { return mEmailAttachments.join(sep); } - bool emailBcc() const { return mEmailBcc; } + bool emailBcc() const { return mEmailBcc; } const TQColor& bgColour() const { return mBgColour; } const TQColor& fgColour() const { return mFgColour; } - bool defaultFont() const { return mDefaultFont; } + bool defaultFont() const { return mDefaultFont; } const TQFont& font() const; - int lateCancel() const { return mLateCancel; } - bool autoClose() const { return mAutoClose; } - bool commandScript() const { return mCommandScript; } - bool confirmAck() const { return mConfirmAck; } - bool repeatAtLogin() const { return mRepeatAtLogin; } - int repeatCount() const { return mRepeatCount; } - int repeatInterval() const { return mRepeatInterval; } - bool displaying() const { return mDisplaying; } - bool beep() const { return mBeep; } - bool speak() const { return (mActionType == T_MESSAGE) && mSpeak; } - int flags() const; + int lateCancel() const { return mLateCancel; } + bool autoClose() const { return mAutoClose; } + bool commandScript() const { return mCommandScript; } + bool confirmAck() const { return mConfirmAck; } + bool repeatAtLogin() const { return mRepeatAtLogin; } + int repeatCount() const { return mRepeatCount; } + int repeatInterval() const { return mRepeatInterval; } + bool displaying() const { return mDisplaying; } + bool beep() const { return mBeep; } + bool speak() const { return (mActionType == T_MESSAGE) && mSpeak; } + int flags() const; #ifdef NDEBUG - void dumpDebug() const { } + void dumpDebug() const { } #else - void dumpDebug() const; + void dumpDebug() const; #endif protected: @@ -99,16 +99,16 @@ class KAAlarmEventBase void copy(const KAAlarmEventBase&); void set(int flags); - TQString mEventID; // UID: KCal::Event unique ID - TQString mText; // message text, file URL, command, email body [or audio file for KAAlarm] + TQString mEventID; // UID: KCal::Event unique ID + TQString mText; // message text, file URL, command, email body [or audio file for KAAlarm] DateTime mNextMainDateTime; // next time to display the alarm, excluding repetitions - TQColor mBgColour; // background colour of alarm message - TQColor mFgColour; // foreground colour of alarm message, or invalid for default - TQFont mFont; // font of alarm message (ignored if mDefaultFont true) + TQColor mBgColour; // background colour of alarm message + TQColor mFgColour; // foreground colour of alarm message, or invalid for default + TQFont mFont; // font of alarm message (ignored if mDefaultFont true) uint mEmailFromIdentity;// KMail identity for email 'From' field, or empty EmailAddressList mEmailAddresses; // ATTENDEE: addresses to send email to - TQString mEmailSubject; // SUMMARY: subject line of email - TQStringList mEmailAttachments; // ATTACH: email attachment file names + TQString mEmailSubject; // SUMMARY: subject line of email + TQStringList mEmailAttachments; // ATTACH: email attachment file names float mSoundVolume; // volume for sound file, or < 0 for unspecified float mFadeVolume; // initial volume for sound file, or < 0 for no fade int mFadeSeconds; // fade time for sound file, or 0 if none @@ -194,13 +194,13 @@ class KAAlarm : public KAAlarmEventBase bool valid() const { return mType != INVALID__ALARM; } Type type() const { return static_cast<Type>(mType & ~TIMED_DEFERRAL_FLAG); } SubType subType() const { return mType; } - const TQString& eventID() const { return mEventID; } + const TQString& eventID() const { return mEventID; } DateTime dateTime(bool withRepeats = false) const { return (withRepeats && mNextRepeat && mRepeatInterval) ? mNextMainDateTime.addSecs(mNextRepeat * mRepeatInterval * 60) : mNextMainDateTime; } - TQDate date() const { return mNextMainDateTime.date(); } - TQTime time() const { return mNextMainDateTime.time(); } - TQString audioFile() const { return (mActionType == T_AUDIO) && !mBeep ? mText : TQString(); } + TQDate date() const { return mNextMainDateTime.date(); } + TQTime time() const { return mNextMainDateTime.time(); } + TQString audioFile() const { return (mActionType == T_AUDIO) && !mBeep ? mText : TQString(); } float soundVolume() const { return (mActionType == T_AUDIO) && !mBeep && !mText.isEmpty() ? mSoundVolume : -1; } float fadeVolume() const { return (mActionType == T_AUDIO) && mSoundVolume >= 0 && mFadeSeconds && !mBeep && !mText.isEmpty() ? mFadeVolume : -1; } int fadeSeconds() const { return (mActionType == T_AUDIO) && mSoundVolume >= 0 && mFadeVolume >= 0 && !mBeep && !mText.isEmpty() ? mFadeSeconds : 0; } @@ -324,10 +324,10 @@ class KAEvent : public KAAlarmEventBase void setActions(const TQString& pre, const TQString& post) { mPreAction = pre; mPostAction = post; mUpdated = true; } OccurType setNextOccurrence(const TQDateTime& preDateTime); void setFirstRecurrence(); - void setEventID(const TQString& id) { mEventID = id; mUpdated = true; } - void setDate(const TQDate& d) { mNextMainDateTime.set(d); mUpdated = true; } - void setTime(const TQDateTime& dt) { mNextMainDateTime.set(dt); mUpdated = true; } - void setSaveDateTime(const TQDateTime& dt) { mSaveDateTime = dt; mUpdated = true; } + void setEventID(const TQString& id) { mEventID = id; mUpdated = true; } + void setDate(const TQDate& d) { mNextMainDateTime.set(d); mUpdated = true; } + void setTime(const TQDateTime& dt) { mNextMainDateTime.set(dt); mUpdated = true; } + void setSaveDateTime(const TQDateTime& dt) { mSaveDateTime = dt; mUpdated = true; } void setLateCancel(int lc) { mLateCancel = lc; mUpdated = true; } void setAutoClose(bool ac) { mAutoClose = ac; mUpdated = true; } void setRepeatAtLogin(bool rl) { mRepeatAtLogin = rl; mUpdated = true; } @@ -350,7 +350,7 @@ class KAEvent : public KAAlarmEventBase KCal::Event* event() const; // convert to new Event bool isTemplate() const { return !mTemplateName.isEmpty(); } - const TQString& templateName() const { return mTemplateName; } + const TQString& templateName() const { return mTemplateName; } bool usingDefaultTime() const { return mTemplateAfterTime == 0; } int templateAfterTime() const { return mTemplateAfterTime; } KAAlarm alarm(KAAlarm::Type) const; @@ -361,15 +361,15 @@ class KAEvent : public KAAlarmEventBase bool updateKCalEvent(KCal::Event&, bool checkUid = true, bool original = false, bool cancelCancelledDefer = false) const; Action action() const { return (Action)mActionType; } bool displayAction() const { return mActionType == T_MESSAGE || mActionType == T_FILE; } - const TQString& id() const { return mEventID; } + const TQString& id() const { return mEventID; } bool valid() const { return mAlarmCount && (mAlarmCount != 1 || !mRepeatAtLogin); } int alarmCount() const { return mAlarmCount; } const DateTime& startDateTime() const { return mStartDateTime; } DateTime mainDateTime(bool withRepeats = false) const { return (withRepeats && mNextRepeat && mRepeatInterval) ? mNextMainDateTime.addSecs(mNextRepeat * mRepeatInterval * 60) : mNextMainDateTime; } - TQDate mainDate() const { return mNextMainDateTime.date(); } - TQTime mainTime() const { return mNextMainDateTime.time(); } + TQDate mainDate() const { return mNextMainDateTime.date(); } + TQTime mainTime() const { return mNextMainDateTime.time(); } DateTime mainEndRepeatTime() const { return (mRepeatCount > 0 && mRepeatInterval) ? mNextMainDateTime.addSecs(mRepeatCount * mRepeatInterval * 60) : mNextMainDateTime; } int reminder() const { return mReminderMinutes; } @@ -380,25 +380,25 @@ class KAEvent : public KAAlarmEventBase DateTime deferralLimit(DeferLimitType* = 0) const; int deferDefaultMinutes() const { return mDeferDefaultMinutes; } DateTime displayDateTime() const; - const TQString& messageFileOrCommand() const { return mText; } - TQString logFile() const { return mLogFile; } + const TQString& messageFileOrCommand() const { return mText; } + TQString logFile() const { return mLogFile; } bool commandXterm() const { return mCommandXterm; } unsigned long kmailSerialNumber() const { return mKMailSerialNumber; } bool copyToKOrganizer() const { return mCopyToKOrganizer; } - const TQString& audioFile() const { return mAudioFile; } + const TQString& audioFile() const { return mAudioFile; } float soundVolume() const { return !mAudioFile.isEmpty() ? mSoundVolume : -1; } float fadeVolume() const { return !mAudioFile.isEmpty() && mSoundVolume >= 0 && mFadeSeconds ? mFadeVolume : -1; } int fadeSeconds() const { return !mAudioFile.isEmpty() && mSoundVolume >= 0 && mFadeVolume >= 0 ? mFadeSeconds : 0; } bool repeatSound() const { return mRepeatSound && !mAudioFile.isEmpty(); } - const TQString& preAction() const { return mPreAction; } - const TQString& postAction() const { return mPostAction; } + const TQString& preAction() const { return mPreAction; } + const TQString& postAction() const { return mPostAction; } bool recurs() const { return checkRecur() != KARecurrence::NO_RECUR; } KARecurrence::Type recurType() const { return checkRecur(); } KARecurrence* recurrence() const { return mRecurrence; } int recurInterval() const; // recurrence period in units of the recurrence period type (minutes, days, etc) int longestRecurrenceInterval() const { return mRecurrence ? mRecurrence->longestInterval() : 0; } - TQString recurrenceText(bool brief = false) const; - TQString repetitionText(bool brief = false) const; + TQString recurrenceText(bool brief = false) const; + TQString repetitionText(bool brief = false) const; bool occursAfter(const TQDateTime& preDateTime, bool includeRepetitions) const; OccurType nextOccurrence(const TQDateTime& preDateTime, DateTime& result, OccurOption = IGNORE_REPETITION) const; OccurType previousOccurrence(const TQDateTime& afterDateTime, DateTime& result, bool includeRepetitions = false) const; @@ -408,10 +408,10 @@ class KAEvent : public KAAlarmEventBase bool enabled() const { return mEnabled; } bool updated() const { return mUpdated; } bool mainExpired() const { return mMainExpired; } - bool expired() const { return mDisplaying && mMainExpired || uidStatus(mEventID) == EXPIRED; } + bool expired() const { return (mDisplaying && mMainExpired) || uidStatus(mEventID) == EXPIRED; } Status uidStatus() const { return uidStatus(mEventID); } static Status uidStatus(const TQString& uid); - static TQString uid(const TQString& id, Status); + static TQString uid(const TQString& id, Status); static KAEvent findTemplateName(AlarmCalendar&, const TQString& name); struct MonthPos @@ -437,7 +437,7 @@ class KAEvent : public KAAlarmEventBase void dumpDebug() const; #endif static int calVersion(); - static TQString calVersionString(); + static TQString calVersionString(); static bool adjustStartOfDay(const KCal::Event::List&); static void convertKCalEvents(KCal::Calendar&, int version, bool adjustSummerTime); static void convertRepetitions(KCal::CalendarLocal&); @@ -467,13 +467,13 @@ class KAEvent : public KAAlarmEventBase inline void set_reminder(int minutes); inline void set_archiveReminder(); - TQString mTemplateName; // alarm template's name, or null if normal event - TQString mAudioFile; // ATTACH: audio file to play - TQString mPreAction; // command to execute before alarm is displayed - TQString mPostAction; // command to execute after alarm window is closed + TQString mTemplateName; // alarm template's name, or null if normal event + TQString mAudioFile; // ATTACH: audio file to play + TQString mPreAction; // command to execute before alarm is displayed + TQString mPostAction; // command to execute after alarm window is closed DateTime mStartDateTime; // DTSTART and DTEND: start and end time for event - TQDateTime mSaveDateTime; // CREATED: date event was created, or saved in expired calendar - TQDateTime mAtLoginDateTime; // repeat-at-login time + TQDateTime mSaveDateTime; // CREATED: date event was created, or saved in expired calendar + TQDateTime mAtLoginDateTime; // repeat-at-login time DateTime mDeferralTime; // extra time to trigger alarm (if alarm or reminder deferred) DateTime mDisplayingTime; // date/time shown in the alarm currently being displayed int mDisplayingFlags; // type of alarm which is currently being displayed @@ -486,7 +486,7 @@ class KAEvent : public KAAlarmEventBase DeferType mDeferral; // whether the alarm is an extra deferred/deferred-reminder alarm unsigned long mKMailSerialNumber;// if email text, message's KMail serial number int mTemplateAfterTime;// time not specified: use n minutes after default time, or -1 (applies to templates only) - TQString mLogFile; // alarm output is to be logged to this URL + TQString mLogFile; // alarm output is to be logged to this URL bool mCommandXterm; // command alarm is to be executed in a terminal window bool mCopyToKOrganizer; // KOrganizer should hold a copy of the event bool mReminderOnceOnly; // the reminder is output only for the first recurrence |