summaryrefslogtreecommitdiffabout
path: root/libkcal/alarm.h
Side-by-side diff
Diffstat (limited to 'libkcal/alarm.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/alarm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/alarm.h b/libkcal/alarm.h
index 682b626..ac6ea0d 100644
--- a/libkcal/alarm.h
+++ b/libkcal/alarm.h
@@ -1,125 +1,126 @@
/*
This file is part of libkcal.
Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef KCAL_ALARM_H
#define KCAL_ALARM_H
#include <qstring.h>
#include <qvaluelist.h>
#include "customproperties.h"
#include "duration.h"
#include "person.h"
namespace KCal {
class Incidence;
/**
This class represents an alarm notification.
*/
class Alarm : public CustomProperties
{
public:
enum Type { Invalid, Display, Procedure, Email, Audio };
typedef QValueList<Alarm *> List;
/** Construct a new alarm with variables initialized to "sane" values. */
explicit Alarm(Incidence *parent);
/** Destruct Alarm object. */
~Alarm();
/** Compare this alarm with another one. */
bool operator==(const Alarm &) const;
bool operator!=(const Alarm &a) const { return !operator==(a); }
/** Set the type of the alarm.
If the specified type is different from the current type of the alarm,
the alarm's type-specific properties are initialised to null.
@param type type of alarm.
*/
void setType(Type type);
/** Return the type of the alarm */
Type type() const;
int offset();
+ QString offsetText();
/** Set the alarm to be a display alarm.
@param text text to display when the alarm is triggered.
*/
void setDisplayAlarm(const QString &text);
/** Set the text to be displayed when the alarm is triggered.
Ignored if the alarm is not a display alarm.
*/
void setText(const QString &text);
/** Return the text string that displays when the alarm is triggered. */
QString text() const;
/** Set the alarm to be an audio alarm.
@param audioFile optional file to play when the alarm is triggered.
*/
void setAudioAlarm(const QString &audioFile = QString::null);
/** Set the file to play when the audio alarm is triggered.
Ignored if the alarm is not an audio alarm.
*/
void setAudioFile(const QString &audioFile);
/** Return the name of the audio file for the alarm.
@return The audio file for the alarm, or QString::null if not an audio alarm.
*/
QString audioFile() const;
/** Set the alarm to be a procedure alarm.
@param programFile program to execute when the alarm is triggered.
@param arguments arguments to supply to programFile.
*/
void setProcedureAlarm(const QString &programFile, const QString &arguments = QString::null);
/** Set the program file to execute when the alarm is triggered.
Ignored if the alarm is not a procedure alarm.
*/
void setProgramFile(const QString &programFile);
/** Return the name of the program file to execute when the alarm is triggered.
@return the program file name, or QString::null if not a procedure alarm.
*/
QString programFile() const;
/** Set the arguments to the program to execute when the alarm is triggered.
Ignored if the alarm is not a procedure alarm.
*/
void setProgramArguments(const QString &arguments);
/** Return the arguments to the program to run when the alarm is triggered.
@return the program arguments, or QString::null if not a procedure alarm.
*/
QString programArguments() const;
/** Set the alarm to be an email alarm.
@param subject subject line of email.
@param text body of email.
@param addressees email addresses of recipient(s).
@param attachments optional names of files to attach to the email.
*/
void setEmailAlarm(const QString &subject, const QString &text, const QValueList<Person> &addressees,
const QStringList &attachments = QStringList());
/** Send mail to this address when the alarm is triggered.
Ignored if the alarm is not an email alarm.
*/
void setMailAddress(const Person &mailAlarmAddress);
/** Send mail to these addresses when the alarm is triggered.
Ignored if the alarm is not an email alarm.
*/
void setMailAddresses(const QValueList<Person> &mailAlarmAddresses);
/** Add this address to the list of addresses to send mail to when the alarm is triggered.