31 #ifndef KCALCORE_ALARM_H
32 #define KCALCORE_ALARM_H
34 #include "kcalcore_export.h"
39 #include <KDE/KDateTime>
41 #include <QtCore/QString>
42 #include <QtCore/QStringList>
43 #include <QtCore/QVector>
44 #include <QDataStream>
78 typedef QSharedPointer<Alarm>
Ptr;
114 bool operator==(
const Alarm &a)
const;
121 bool operator!=(
const Alarm &a)
const;
143 QString parentUid()
const;
154 void setType(
Type type);
172 void setDisplayAlarm(
const QString &text = QString());
182 void setText(
const QString &text);
190 QString text()
const;
201 void setAudioAlarm(
const QString &audioFile = QString());
212 void setAudioFile(
const QString &audioFile);
220 QString audioFile()
const;
233 void setProcedureAlarm(
const QString &programFile,
234 const QString &arguments = QString());
246 void setProgramFile(
const QString &programFile);
255 QString programFile()
const;
266 void setProgramArguments(
const QString &arguments);
275 QString programArguments()
const;
291 void setEmailAlarm(
const QString &subject,
const QString &text,
293 const QStringList &attachments = QStringList());
305 void setMailAddress(
const Person::Ptr &mailAlarmAddress);
317 void setMailAddresses(
const Person::List &mailAlarmAddresses);
329 void addMailAddress(
const Person::Ptr &mailAlarmAddress);
349 void setMailSubject(
const QString &mailAlarmSubject);
357 QString mailSubject()
const;
369 void setMailAttachment(
const QString &mailAttachFile);
381 void setMailAttachments(
const QStringList &mailAttachFiles);
392 void addMailAttachment(
const QString &mailAttachFile);
400 QStringList mailAttachments()
const;
412 void setMailText(
const QString &text);
420 QString mailText()
const;
429 void setTime(
const KDateTime &alarmTime);
436 KDateTime time()
const;
446 KDateTime nextTime(
const KDateTime &preTime,
bool ignoreRepetitions =
false)
const;
454 KDateTime endTime()
const;
459 bool hasTime()
const;
469 void setStartOffset(
const Duration &offset);
486 bool hasStartOffset()
const;
496 void setEndOffset(
const Duration &offset);
513 bool hasEndOffset()
const;
529 void shiftTimes(
const KDateTime::Spec &oldSpec,
530 const KDateTime::Spec &newSpec);
539 void setSnoozeTime(
const Duration &alarmSnoozeTime);
557 void setRepeatCount(
int alarmRepeatCount);
564 int repeatCount()
const;
577 KDateTime nextRepetition(
const KDateTime &preTime)
const;
592 KDateTime previousRepetition(
const KDateTime &afterTime)
const;
614 void setEnabled(
bool enable);
621 bool enabled()
const;
629 void setHasLocationRadius(
bool hasLocationRadius);
636 bool hasLocationRadius()
const;
646 void setLocationRadius(
int locationRadius);
653 int locationRadius()
const;
660 virtual void customPropertyUpdated();
666 virtual void virtual_hook(
int id,
void *data);
This file is part of the API for handling calendar data and defines the CustomProperties class...
Represents a span of time measured in seconds or days.
QSharedPointer< Alarm > Ptr
A shared pointer to an Alarm object.
Represents an alarm notification.
Type
The different types of alarms.
QVector< Ptr > List
List of persons.
QVector< Ptr > List
List of alarms.
This file is part of the API for handling calendar data and defines the Person class.
KCALCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalCore::Alarm::Ptr &)
Alarm deserializer.
This file is part of the API for handling calendar data and defines the Duration class.
QSharedPointer< Person > Ptr
A shared pointer to a Person object.
A class to manage custom calendar properties.
KCALCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalCore::Alarm::Ptr &)
Alarm serializer.
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...