KAlarm Library
#include <repetition.h>
Public Member Functions | |
Repetition () | |
Repetition (const KCalCore::Duration &interval, int count) | |
Repetition (const Repetition &other) | |
int | count () const |
KCalCore::Duration | duration () const |
KCalCore::Duration | duration (int count) const |
KCalCore::Duration | interval () const |
int | intervalDays () const |
int | intervalMinutes () const |
int | intervalSeconds () const |
bool | isDaily () const |
int | nextRepeatCount (const KDateTime &from, const KDateTime &preDateTime) const |
operator bool () const | |
bool | operator! () const |
bool | operator!= (const Repetition &r) const |
Repetition & | operator= (const Repetition &other) |
bool | operator== (const Repetition &r) const |
int | previousRepeatCount (const KDateTime &from, const KDateTime &afterDateTime) const |
void | set (const KCalCore::Duration &interval, int count) |
void | set (const KCalCore::Duration &interval) |
Detailed Description
Represents a sub-repetition, defined by interval and repeat count.
The Repetition class represents a sub-repetition, storing its interval and repeat count. The repeat count is the number of repetitions after the first occurrence.
Definition at line 47 of file repetition.h.
Constructor & Destructor Documentation
KAlarmCal::Repetition::Repetition | ( | ) |
KAlarmCal::Repetition::Repetition | ( | const KCalCore::Duration & | interval, |
int | count | ||
) |
Constructor.
Initialises with the specified interval
and count
.
Definition at line 58 of file repetition.cpp.
Member Function Documentation
int KAlarmCal::Repetition::count | ( | ) | const |
Return the number of repetitions.
Definition at line 114 of file repetition.cpp.
Duration KAlarmCal::Repetition::duration | ( | ) | const |
Return the overall duration of the repetition.
Definition at line 124 of file repetition.cpp.
Duration KAlarmCal::Repetition::duration | ( | int | count | ) | const |
Return the overall duration of a specified number of repetitions.
- Parameters
-
count the number of repetitions to find the duration of.
Definition at line 129 of file repetition.cpp.
Duration KAlarmCal::Repetition::interval | ( | ) | const |
Return the interval between repetitions.
Definition at line 119 of file repetition.cpp.
int KAlarmCal::Repetition::intervalDays | ( | ) | const |
Return the repetition interval in terms of days.
If necessary, the interval is rounded down to a whole number of days.
Definition at line 139 of file repetition.cpp.
int KAlarmCal::Repetition::intervalMinutes | ( | ) | const |
Return the repetition interval in terms of minutes.
If necessary, the interval is rounded down to a whole number of minutes.
Definition at line 144 of file repetition.cpp.
int KAlarmCal::Repetition::intervalSeconds | ( | ) | const |
Return the repetition interval in terms of seconds.
Definition at line 149 of file repetition.cpp.
bool KAlarmCal::Repetition::isDaily | ( | ) | const |
Check whether the repetition interval is in terms of days (as opposed to minutes).
Definition at line 134 of file repetition.cpp.
int KAlarmCal::Repetition::nextRepeatCount | ( | const KDateTime & | from, |
const KDateTime & | preDateTime | ||
) | const |
Find the repetition count for the next repetition after a specified time.
- Parameters
-
from repetition start time, which should not be a date-only value preDateTime time after which the desired repetition occurs
Definition at line 154 of file repetition.cpp.
KAlarmCal::Repetition::operator bool | ( | ) | const |
Returns whether a repetition is defined.
- Returns
- true if a repetition is defined, false if not.
Definition at line 104 of file repetition.cpp.
|
inline |
Returns whether no repetition is defined.
- Returns
- false if a repetition is defined, true if not.
Definition at line 103 of file repetition.h.
int KAlarmCal::Repetition::previousRepeatCount | ( | const KDateTime & | from, |
const KDateTime & | afterDateTime | ||
) | const |
Find the repetition count for the last repetition before a specified time.
- Parameters
-
from repetition start time, which should not be a date-only value afterDateTime time after which the desired repetition occurs
Definition at line 161 of file repetition.cpp.
void KAlarmCal::Repetition::set | ( | const KCalCore::Duration & | interval, |
int | count | ||
) |
Initialises the instance with the specified interval
and count
.
Definition at line 80 of file repetition.cpp.
void KAlarmCal::Repetition::set | ( | const KCalCore::Duration & | interval | ) |
Sets the interval
.
The repetition count is unchanged unless The repetition count is set to zero if interval
is zero; otherwise the repetition count is unchanged.
Definition at line 94 of file repetition.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.