KAlarmCal::Repetition

KAlarmCal::Repetition Class Reference

#include <repetition.h>

Public Member Functions

 Repetition ()
 
 Repetition (const KCalendarCore::Duration &interval, int count)
 
 Repetition (const Repetition &other)
 
int count () const
 
KCalendarCore::Duration duration () const
 
KCalendarCore::Duration duration (int count) const
 
KCalendarCore::Duration interval () const
 
int intervalDays () const
 
int intervalMinutes () const
 
int intervalSeconds () const
 
bool isDaily () const
 
int nextRepeatCount (const KADateTime &from, const KADateTime &preDateTime) const
 
 operator bool () const
 
bool operator! () const
 
bool operator!= (const Repetition &r) const
 
Repetitionoperator= (const Repetition &other)
 
bool operator== (const Repetition &r) const
 
int previousRepeatCount (const KADateTime &from, const KADateTime &afterDateTime) const
 
void set (const KCalendarCore::Duration &interval, int count)
 
void set (const KCalendarCore::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.

Author
David Jarvie djarv[email protected][email protected][email protected]de.or[email protected]g

Definition at line 30 of file repetition.h.

Constructor & Destructor Documentation

KAlarmCal::Repetition::Repetition ( )

Default constructor.

Initialises to no repetition.

Definition at line 34 of file repetition.cpp.

KAlarmCal::Repetition::Repetition ( const KCalendarCore::Duration interval,
int  count 
)

Constructor.

Initialises with the specified interval and count.

Definition at line 39 of file repetition.cpp.

Member Function Documentation

int KAlarmCal::Repetition::count ( ) const

Return the number of repetitions.

Definition at line 93 of file repetition.cpp.

Duration KAlarmCal::Repetition::duration ( ) const

Return the overall duration of the repetition.

Definition at line 103 of file repetition.cpp.

Duration KAlarmCal::Repetition::duration ( int  count) const

Return the overall duration of a specified number of repetitions.

Parameters
countthe number of repetitions to find the duration of.

Definition at line 108 of file repetition.cpp.

Duration KAlarmCal::Repetition::interval ( ) const

Return the interval between repetitions.

Definition at line 98 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 118 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 123 of file repetition.cpp.

int KAlarmCal::Repetition::intervalSeconds ( ) const

Return the repetition interval in terms of seconds.

Definition at line 128 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 113 of file repetition.cpp.

int KAlarmCal::Repetition::nextRepeatCount ( const KADateTime from,
const KADateTime preDateTime 
) const

Find the repetition count for the next repetition after a specified time.

Parameters
fromrepetition start time, which should not be a date-only value
preDateTimetime after which the desired repetition occurs

Definition at line 133 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 83 of file repetition.cpp.

bool KAlarmCal::Repetition::operator! ( ) const
inline

Returns whether no repetition is defined.

Returns
false if a repetition is defined, true if not.

Definition at line 65 of file repetition.h.

int KAlarmCal::Repetition::previousRepeatCount ( const KADateTime from,
const KADateTime afterDateTime 
) const

Find the repetition count for the last repetition before a specified time.

Parameters
fromrepetition start time, which should not be a date-only value
afterDateTimetime after which the desired repetition occurs

Definition at line 140 of file repetition.cpp.

void KAlarmCal::Repetition::set ( const KCalendarCore::Duration interval,
int  count 
)

Initialises the instance with the specified interval and count.

Definition at line 62 of file repetition.cpp.

void KAlarmCal::Repetition::set ( const KCalendarCore::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 73 of file repetition.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Sep 21 2020 23:10:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.