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) |
void | set (const KCalCore::Duration &interval, int count) |
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
◆ Repetition() [1/3]
KAlarmCal::Repetition::Repetition | ( | ) |
◆ Repetition() [2/3]
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.
◆ Repetition() [3/3]
KAlarmCal::Repetition::Repetition | ( | const Repetition & | other | ) |
Definition at line 63 of file repetition.cpp.
◆ ~Repetition()
KAlarmCal::Repetition::~Repetition | ( | ) |
Definition at line 68 of file repetition.cpp.
Member Function Documentation
◆ count()
int KAlarmCal::Repetition::count | ( | ) | const |
Return the number of repetitions.
Definition at line 114 of file repetition.cpp.
◆ duration() [1/2]
Duration KAlarmCal::Repetition::duration | ( | ) | const |
Return the overall duration of the repetition.
Definition at line 124 of file repetition.cpp.
◆ duration() [2/2]
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.
◆ interval()
Duration KAlarmCal::Repetition::interval | ( | ) | const |
Return the interval between repetitions.
Definition at line 119 of file repetition.cpp.
◆ intervalDays()
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.
◆ intervalMinutes()
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.
◆ intervalSeconds()
int KAlarmCal::Repetition::intervalSeconds | ( | ) | const |
Return the repetition interval in terms of seconds.
Definition at line 149 of file repetition.cpp.
◆ isDaily()
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.
◆ nextRepeatCount()
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.
◆ operator bool()
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.
◆ operator!()
|
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.
◆ operator!=()
|
inline |
Definition at line 106 of file repetition.h.
◆ operator=()
Repetition & KAlarmCal::Repetition::operator= | ( | const Repetition & | other | ) |
Definition at line 73 of file repetition.cpp.
◆ operator==()
bool KAlarmCal::Repetition::operator== | ( | const Repetition & | r | ) | const |
Definition at line 109 of file repetition.cpp.
◆ previousRepeatCount()
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.
◆ set() [1/2]
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.
◆ set() [2/2]
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.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.