KAlarmCal::KAAlarm

#include <kaevent.h>

Public Types

enum  Action {
  MESSAGE, FILE, COMMAND, EMAIL,
  AUDIO
}
 
enum  Type {
  INVALID_ALARM = 0, MAIN_ALARM = 1, REMINDER_ALARM = 0x02, DEFERRED_ALARM = 0x04,
  DEFERRED_REMINDER_ALARM = REMINDER_ALARM | DEFERRED_ALARM, AT_LOGIN_ALARM = 0x10, DISPLAYING_ALARM = 0x20
}
 

Public Member Functions

 KAAlarm ()
 
 KAAlarm (const KAAlarm &other)
 
 ~KAAlarm ()
 
Action action () const
 
QDate date () const
 
DateTime dateTime (bool withRepeats=false) const
 
bool deferred () const
 
bool isReminder () const
 
bool isValid () const
 
KAAlarmoperator= (const KAAlarm &other)
 
bool repeatAtLogin () const
 
void setTime (const DateTime &dt)
 
void setTime (const KADateTime &dt)
 
QTime time () const
 
bool timedDeferral () const
 
Type type () const
 

Static Public Member Functions

static const char * debugType (Type)
 

Detailed Description

KAAlarm represents individual alarms within a KAEvent.

The KAAlarm class represents one of the main or subsidiary alarms in a KAEvent instance. It contains the alarm's type and trigger time.

Note that valid KAAlarm instances can only be created by the KAEvent class.

See also
KAEvent::alarm(), KAEvent::firstAlarm(), KAEvent::nextAlarm().
Author
David Jarvie djarv[email protected][email protected][email protected]de.or[email protected]g

Definition at line 54 of file kaevent.h.

Member Enumeration Documentation

The basic KAAlarm action types.

Enumerator
MESSAGE 

KCal::Alarm::Display type: display a text message.

FILE 

KCal::Alarm::Display type: display a file (URL given by the alarm text)

COMMAND 

KCal::Alarm::Procedure type: execute a shell command.

EMAIL 

KCal::Alarm::Email type: send an email.

AUDIO 

KCal::Alarm::Audio type: play a sound file.

Definition at line 58 of file kaevent.h.

Alarm types.

KAAlarm's of different types may be contained in a KAEvent, each KAAlarm defining a different component of the overall alarm.

Enumerator
INVALID_ALARM 

Not an alarm.

MAIN_ALARM 

THE real alarm. Must be the first in the enumeration.

REMINDER_ALARM 

Reminder in advance of/after the main alarm.

DEFERRED_ALARM 

Deferred alarm.

DEFERRED_REMINDER_ALARM 

Deferred reminder alarm.

AT_LOGIN_ALARM 

Additional repeat-at-login trigger.

DISPLAYING_ALARM 

Copy of the alarm currently being displayed.

Definition at line 70 of file kaevent.h.

Constructor & Destructor Documentation

KAlarmCal::KAAlarm::KAAlarm ( )

Default constructor, which creates an invalid instance.

Definition at line 5788 of file kaevent.cpp.

KAlarmCal::KAAlarm::KAAlarm ( const KAAlarm other)

Copy constructor.

Definition at line 5797 of file kaevent.cpp.

KAlarmCal::KAAlarm::~KAAlarm ( )

Destructor.

Definition at line 5802 of file kaevent.cpp.

Member Function Documentation

KAAlarm::Action KAlarmCal::KAAlarm::action ( ) const

Return the action type for the alarm.

Definition at line 5815 of file kaevent.cpp.

QDate KAlarmCal::KAAlarm::date ( ) const

Return the trigger date for the alarm.

Sub-repetitions are ignored: if a sub-repetition is due next, the last main recurrence will be returned instead.

Definition at line 5837 of file kaevent.cpp.

DateTime KAlarmCal::KAAlarm::dateTime ( bool  withRepeats = false) const

Return the trigger time for the alarm.

Sub-repetitions can optionally be ignored; in this case, if a sub-repetition is due next, the last main recurrence will be returned instead.

Parameters
withRepeatsif true, returns the next sub-repetition time where appropriate; if false, ignores sub-repetitions.

Definition at line 5830 of file kaevent.cpp.

const char * KAlarmCal::KAAlarm::debugType ( Type  type)
static

Return an alarm type as a string.

Returns
alarm type string, or the empty string if debug output is disabled.

Definition at line 5883 of file kaevent.cpp.

bool KAlarmCal::KAAlarm::deferred ( ) const

Return whether this is a deferred alarm.

Definition at line 5857 of file kaevent.cpp.

bool KAlarmCal::KAAlarm::isReminder ( ) const

Return whether this is a reminder alarm.

Definition at line 5852 of file kaevent.cpp.

bool KAlarmCal::KAAlarm::isValid ( ) const

Return whether the alarm is valid, i.e.

whether it contains any alarm data.

Definition at line 5820 of file kaevent.cpp.

KAAlarm & KAlarmCal::KAAlarm::operator= ( const KAAlarm other)

Assignment operator.

Definition at line 5807 of file kaevent.cpp.

bool KAlarmCal::KAAlarm::repeatAtLogin ( ) const

Return whether this is a repeat-at-login alarm.

Definition at line 5847 of file kaevent.cpp.

void KAlarmCal::KAAlarm::setTime ( const DateTime dt)

Set the alarm's trigger time.

Definition at line 5867 of file kaevent.cpp.

void KAlarmCal::KAAlarm::setTime ( const KADateTime dt)

Set the alarm's trigger time.

Definition at line 5872 of file kaevent.cpp.

QTime KAlarmCal::KAAlarm::time ( ) const

Return the trigger time-of-day for the alarm.

Sub-repetitions are ignored: if a sub-repetition is due next, the last main recurrence will be returned instead.

Returns
trigger time-of-day. If the alarm is date-only, this will be the user-defined start-of-day time.

Definition at line 5842 of file kaevent.cpp.

bool KAlarmCal::KAAlarm::timedDeferral ( ) const

Return whether in the case of a deferred alarm, it is timed (as opposed to date-only).

Returns
true if a timed deferral alarm, false if date-only or not a deferred alarm.

Definition at line 5862 of file kaevent.cpp.

KAAlarm::Type KAlarmCal::KAAlarm::type ( ) const

Return the alarm's type (main, reminder, etc.).

Definition at line 5825 of file kaevent.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 Thu Sep 24 2020 23:10:50 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.