• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KAlarm Library

  • kalarmcal
alarmtext.cpp
1/*
2 * alarmtext.cpp - text/email alarm text conversion
3 * This file is part of kalarmcal library, which provides access to KAlarm
4 * calendar data.
5 * Copyright © 2004,2005,2007-2013 by David Jarvie <djarvie@kde.org>
6 *
7 * This library is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Library General Public License as published
9 * by the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
15 * License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 * MA 02110-1301, USA.
21 */
22
23#include "alarmtext.h"
24
25#include "kaevent.h"
26
27#ifdef KALARMCAL_USE_KRESOURCES
28#include <kcal/todo.h>
29#endif
30#include <klocale.h>
31#include <klocalizedstring.h>
32#include <kglobal.h>
33#include <QStringList>
34
35namespace
36{
37const int MAIL_FROM_LINE = 0; // line number containing From in email text
38const int MAIL_TO_LINE = 1; // line number containing To in email text
39const int MAIL_CC_LINE = 2; // line number containing CC in email text
40const int MAIL_MIN_LINES = 4; // allow for From, To, no CC, Date, Subject
41}
42
43namespace KAlarmCal
44{
45
46class AlarmText::Private
47{
48 public:
49 enum Type { None, Email, Script, Todo };
50 QString displayText() const;
51 void clear();
52 static void initialise();
53 static void setUpTranslations();
54 static int emailHeaderCount(const QStringList&);
55 static QString todoTitle(const QString& text);
56
57 static QString mFromPrefix; // translated header prefixes
58 static QString mToPrefix;
59 static QString mCcPrefix;
60 static QString mDatePrefix;
61 static QString mSubjectPrefix;
62 static QString mTitlePrefix;
63 static QString mLocnPrefix;
64 static QString mDuePrefix;
65 static QString mFromPrefixEn; // untranslated header prefixes
66 static QString mToPrefixEn;
67 static QString mCcPrefixEn;
68 static QString mDatePrefixEn;
69 static QString mSubjectPrefixEn;
70 static bool mInitialised;
71
72 QString mBody, mFrom, mTo, mCc, mTime, mSubject;
73 unsigned long mKMailSerialNum; // if email, message's KMail serial number, else 0
74 Type mType;
75 bool mIsEmail;
76};
77
78QString AlarmText::Private::mFromPrefix;
79QString AlarmText::Private::mToPrefix;
80QString AlarmText::Private::mCcPrefix;
81QString AlarmText::Private::mDatePrefix;
82QString AlarmText::Private::mSubjectPrefix;
83QString AlarmText::Private::mTitlePrefix;
84QString AlarmText::Private::mLocnPrefix;
85QString AlarmText::Private::mDuePrefix;
86QString AlarmText::Private::mFromPrefixEn;
87QString AlarmText::Private::mToPrefixEn;
88QString AlarmText::Private::mCcPrefixEn;
89QString AlarmText::Private::mDatePrefixEn;
90QString AlarmText::Private::mSubjectPrefixEn;
91bool AlarmText::Private::mInitialised = false;
92
93void AlarmText::Private::initialise()
94{
95 if (!mInitialised)
96 {
97 mInitialised = true;
98 mFromPrefixEn = QLatin1String("From:");
99 mToPrefixEn = QLatin1String("To:");
100 mCcPrefixEn = QLatin1String("Cc:");
101 mDatePrefixEn = QLatin1String("Date:");
102 mSubjectPrefixEn = QLatin1String("Subject:");
103 }
104}
105
106AlarmText::AlarmText(const QString& text)
107 : d(new Private)
108{
109 Private::initialise();
110 setText(text);
111}
112
113AlarmText::AlarmText(const AlarmText& other)
114 : d(new Private(*other.d))
115{
116}
117
118AlarmText::~AlarmText()
119{
120 delete d;
121}
122
123AlarmText& AlarmText::operator=(const AlarmText& other)
124{
125 if (&other != this)
126 *d = *other.d;
127 return *this;
128}
129
130void AlarmText::setText(const QString& text)
131{
132 d->clear();
133 d->mBody = text;
134 if (text.startsWith(QLatin1String("#!")))
135 d->mType = Private::Script;
136}
137
138void AlarmText::setScript(const QString& text)
139{
140 setText(text);
141 d->mType = Private::Script;
142}
143
144void AlarmText::setEmail(const QString& to, const QString& from, const QString& cc, const QString& time,
145 const QString& subject, const QString& body, unsigned long kmailSerialNumber)
146{
147 d->clear();
148 d->mType = Private::Email;
149 d->mTo = to;
150 d->mFrom = from;
151 d->mCc = cc;
152 d->mTime = time;
153 d->mSubject = subject;
154 d->mBody = body;
155 d->mKMailSerialNum = kmailSerialNumber;
156}
157
158#ifndef KALARMCAL_USE_KRESOURCES
159void AlarmText::setTodo(const KCalCore::Todo::Ptr& todo)
160#else
161void AlarmText::setTodo(const KCal::Todo* todo)
162#endif
163{
164 d->clear();
165 d->mType = Private::Todo;
166 d->mSubject = todo->summary();
167 d->mBody = todo->description();
168 d->mTo = todo->location();
169 if (todo->hasDueDate())
170 {
171 KDateTime due = todo->dtDue(false); // fetch the next due date
172 if (todo->hasStartDate() && todo->dtStart() != due)
173 {
174 d->mTime = todo->allDay() ? KGlobal::locale()->formatDate(due.date(), KLocale::ShortDate)
175 : KGlobal::locale()->formatDateTime(due.dateTime());
176 }
177 }
178}
179
180/******************************************************************************
181* Return the text for a text message alarm, in display format.
182*/
183QString AlarmText::displayText() const
184{
185 return d->displayText();
186}
187
188QString AlarmText::Private::displayText() const
189{
190 QString text;
191 switch (mType)
192 {
193 case Email:
194 // Format the email into a text alarm
195 setUpTranslations();
196 text = mFromPrefix + QLatin1Char('\t') + mFrom + QLatin1Char('\n');
197 text += mToPrefix + QLatin1Char('\t') + mTo + QLatin1Char('\n');
198 if (!mCc.isEmpty())
199 text += mCcPrefix + QLatin1Char('\t') + mCc + QLatin1Char('\n');
200 if (!mTime.isEmpty())
201 text += mDatePrefix + QLatin1Char('\t') + mTime + QLatin1Char('\n');
202 text += mSubjectPrefix + QLatin1Char('\t') + mSubject;
203 if (!mBody.isEmpty())
204 {
205 text += QLatin1String("\n\n");
206 text += mBody;
207 }
208 break;
209 case Todo:
210 // Format the todo into a text alarm
211 setUpTranslations();
212 if (!mSubject.isEmpty())
213 text = mTitlePrefix + QLatin1Char('\t') + mSubject + QLatin1Char('\n');
214 if (!mTo.isEmpty())
215 text += mLocnPrefix + QLatin1Char('\t') + mTo + QLatin1Char('\n');
216 if (!mTime.isEmpty())
217 text += mDuePrefix + QLatin1Char('\t') + mTime + QLatin1Char('\n');
218 if (!mBody.isEmpty())
219 {
220 if (!text.isEmpty())
221 text += QLatin1Char('\n');
222 text += mBody;
223 }
224 break;
225 default:
226 break;
227 }
228 return !text.isEmpty() ? text : mBody;
229}
230
231QString AlarmText::to() const
232{
233 return (d->mType == Private::Email) ? d->mTo : QString();
234}
235
236QString AlarmText::from() const
237{
238 return (d->mType == Private::Email) ? d->mFrom : QString();
239}
240
241QString AlarmText::cc() const
242{
243 return (d->mType == Private::Email) ? d->mCc : QString();
244}
245
246QString AlarmText::time() const
247{
248 return (d->mType == Private::Email) ? d->mTime : QString();
249}
250
251QString AlarmText::subject() const
252{
253 return (d->mType == Private::Email) ? d->mSubject : QString();
254}
255
256QString AlarmText::body() const
257{
258 return (d->mType == Private::Email) ? d->mBody : QString();
259}
260
261QString AlarmText::summary() const
262{
263 return (d->mType == Private::Todo) ? d->mSubject : QString();
264}
265
266QString AlarmText::location() const
267{
268 return (d->mType == Private::Todo) ? d->mTo : QString();
269}
270
271QString AlarmText::due() const
272{
273 return (d->mType == Private::Todo) ? d->mTime : QString();
274}
275
276QString AlarmText::description() const
277{
278 return (d->mType == Private::Todo) ? d->mBody : QString();
279}
280
281/******************************************************************************
282* Return whether there is any text.
283*/
284bool AlarmText::isEmpty() const
285{
286 if (!d->mBody.isEmpty())
287 return false;
288 if (d->mType != Private::Email)
289 return true;
290 return d->mFrom.isEmpty() && d->mTo.isEmpty() && d->mCc.isEmpty() && d->mTime.isEmpty() && d->mSubject.isEmpty();
291}
292
293bool AlarmText::isEmail() const
294{
295 return d->mType == Private::Email;
296}
297
298bool AlarmText::isScript() const
299{
300 return d->mType == Private::Script;
301}
302
303bool AlarmText::isTodo() const
304{
305 return d->mType == Private::Todo;
306}
307
308unsigned long AlarmText::kmailSerialNumber() const
309{
310 return d->mKMailSerialNum;
311}
312
313/******************************************************************************
314* Return the alarm summary text for either single line or tooltip display.
315* The maximum number of line returned is determined by 'maxLines'.
316* If 'truncated' is non-null, it will be set true if the text returned has been
317* truncated, other than to strip a trailing newline.
318*/
319QString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated)
320{
321 static const QRegExp localfile(QLatin1String("^file:/+"));
322 QString text;
323 switch (event.actionSubType())
324 {
325 case KAEvent::AUDIO:
326 text = event.audioFile();
327 if (localfile.indexIn(text) >= 0)
328 text = text.mid(localfile.matchedLength() - 1);
329 break;
330 case KAEvent::EMAIL:
331 text = event.emailSubject();
332 break;
333 case KAEvent::COMMAND:
334 text = event.cleanText();
335 if (localfile.indexIn(text) >= 0)
336 text = text.mid(localfile.matchedLength() - 1);
337 break;
338 case KAEvent::FILE:
339 text = event.cleanText();
340 break;
341 case KAEvent::MESSAGE:
342 {
343 text = event.cleanText();
344 // If the message is the text of an email, return its headers or just subject line
345 QString subject = emailHeaders(text, (maxLines <= 1));
346 if (!subject.isNull())
347 {
348 if (truncated)
349 *truncated = true;
350 return subject;
351 }
352 if (maxLines == 1)
353 {
354 // If the message is the text of a todo, return either the
355 // title/description or the whole text.
356 subject = Private::todoTitle(text);
357 if (!subject.isEmpty())
358 {
359 if (truncated)
360 *truncated = true;
361 return subject;
362 }
363 }
364 break;
365 }
366 }
367 if (truncated)
368 *truncated = false;
369 if (text.count(QLatin1Char('\n')) < maxLines)
370 return text;
371 int newline = -1;
372 for (int i = 0; i < maxLines; ++i)
373 {
374 newline = text.indexOf(QLatin1Char('\n'), newline + 1);
375 if (newline < 0)
376 return text; // not truncated after all !?!
377 }
378 if (newline == static_cast<int>(text.length()) - 1)
379 return text.left(newline); // text ends in newline
380 if (truncated)
381 *truncated = true;
382 return text.left(newline + (maxLines <= 1 ? 0 : 1)) + QLatin1String("...");
383}
384
385/******************************************************************************
386* Check whether a text is an email.
387*/
388bool AlarmText::checkIfEmail(const QString& text)
389{
390 const QStringList lines = text.split(QLatin1Char('\n'), QString::SkipEmptyParts);
391 return Private::emailHeaderCount(lines);
392}
393
394/******************************************************************************
395* Check whether a text is an email, and if so return its headers or optionally
396* only its subject line.
397* Reply = headers/subject line, or QString() if not the text of an email.
398*/
399QString AlarmText::emailHeaders(const QString& text, bool subjectOnly)
400{
401 const QStringList lines = text.split(QLatin1Char('\n'), QString::SkipEmptyParts);
402 const int n = Private::emailHeaderCount(lines);
403 if (!n)
404 return QString();
405 if (subjectOnly)
406 return lines[n-1].mid(Private::mSubjectPrefix.length()).trimmed();
407 QString h = lines[0];
408 for (int i = 1; i < n; ++i)
409 {
410 h += QLatin1Char('\n');
411 h += lines[i];
412 }
413 return h;
414}
415
416/******************************************************************************
417* Translate an alarm calendar text to a display text.
418* Translation is needed for email texts, since the alarm calendar stores
419* untranslated email prefixes.
420* 'email' is set to indicate whether it is an email text.
421*/
422QString AlarmText::fromCalendarText(const QString& text, bool& email)
423{
424 Private::initialise();
425 const QStringList lines = text.split(QLatin1Char('\n'), QString::SkipEmptyParts);
426 const int maxn = lines.count();
427 if (maxn >= MAIL_MIN_LINES
428 && lines[MAIL_FROM_LINE].startsWith(Private::mFromPrefixEn)
429 && lines[MAIL_TO_LINE].startsWith(Private::mToPrefixEn))
430 {
431 int n = MAIL_CC_LINE;
432 if (lines[MAIL_CC_LINE].startsWith(Private::mCcPrefixEn))
433 ++n;
434 if (maxn > n + 1
435 && lines[n].startsWith(Private::mDatePrefixEn)
436 && lines[n+1].startsWith(Private::mSubjectPrefixEn))
437 {
438 Private::setUpTranslations();
439 QString dispText;
440 dispText = Private::mFromPrefix + lines[MAIL_FROM_LINE].mid(Private::mFromPrefixEn.length()) + QLatin1Char('\n');
441 dispText += Private::mToPrefix + lines[MAIL_TO_LINE].mid(Private::mToPrefixEn.length()) + QLatin1Char('\n');
442 if (n > MAIL_CC_LINE)
443 dispText += Private::mCcPrefix + lines[MAIL_CC_LINE].mid(Private::mCcPrefixEn.length()) + QLatin1Char('\n');
444 dispText += Private::mDatePrefix + lines[n].mid(Private::mDatePrefixEn.length()) + QLatin1Char('\n');
445 dispText += Private::mSubjectPrefix + lines[n+1].mid(Private::mSubjectPrefixEn.length());
446 int i = text.indexOf(Private::mSubjectPrefixEn);
447 i = text.indexOf(QLatin1Char('\n'), i);
448 if (i > 0)
449 dispText += text.mid(i);
450 email = true;
451 return dispText;
452 }
453 }
454 email = false;
455 return text;
456}
457
458/******************************************************************************
459* Return the text for a text message alarm, in alarm calendar format.
460* (The prefix strings are untranslated in the calendar.)
461*/
462QString AlarmText::toCalendarText(const QString& text)
463{
464 Private::setUpTranslations();
465 const QStringList lines = text.split(QLatin1Char('\n'), QString::SkipEmptyParts);
466 const int maxn = lines.count();
467 if (maxn >= MAIL_MIN_LINES
468 && lines[MAIL_FROM_LINE].startsWith(Private::mFromPrefix)
469 && lines[MAIL_TO_LINE].startsWith(Private::mToPrefix))
470 {
471 int n = MAIL_CC_LINE;
472 if (lines[MAIL_CC_LINE].startsWith(Private::mCcPrefix))
473 ++n;
474 if (maxn > n + 1
475 && lines[n].startsWith(Private::mDatePrefix)
476 && lines[n+1].startsWith(Private::mSubjectPrefix))
477 {
478 // Format the email into a text alarm
479 QString calText;
480 calText = Private::mFromPrefixEn + lines[MAIL_FROM_LINE].mid(Private::mFromPrefix.length()) + QLatin1Char('\n');
481 calText += Private::mToPrefixEn + lines[MAIL_TO_LINE].mid(Private::mToPrefix.length()) + QLatin1Char('\n');
482 if (n > MAIL_CC_LINE)
483 calText += Private::mCcPrefixEn + lines[MAIL_CC_LINE].mid(Private::mCcPrefix.length()) + QLatin1Char('\n');
484 calText += Private::mDatePrefixEn + lines[n].mid(Private::mDatePrefix.length()) + QLatin1Char('\n');
485 calText += Private::mSubjectPrefixEn + lines[n+1].mid(Private::mSubjectPrefix.length());
486 int i = text.indexOf(Private::mSubjectPrefix);
487 i = text.indexOf(QLatin1Char('\n'), i);
488 if (i > 0)
489 calText += text.mid(i);
490 return calText;
491 }
492 }
493 return text;
494}
495
496void AlarmText::Private::clear()
497{
498 mType = None;
499 mBody.clear();
500 mTo.clear();
501 mFrom.clear();
502 mCc.clear();
503 mTime.clear();
504 mSubject.clear();
505 mKMailSerialNum = 0;
506}
507
508/******************************************************************************
509* Set up messages used by executeDropEvent() and emailHeaders().
510*/
511void AlarmText::Private::setUpTranslations()
512{
513 initialise();
514 if (mFromPrefix.isNull())
515 {
516 mFromPrefix = i18nc("@info/plain 'From' email address", "From:");
517 mToPrefix = i18nc("@info/plain Email addressee", "To:");
518 mCcPrefix = i18nc("@info/plain Copy-to in email headers", "Cc:");
519 mDatePrefix = i18nc("@info/plain", "Date:");
520 mSubjectPrefix = i18nc("@info/plain Email subject", "Subject:");
521 // Todo prefixes
522 mTitlePrefix = i18nc("@info/plain Todo calendar item's title field", "To-do:");
523 mLocnPrefix = i18nc("@info/plain Todo calendar item's location field", "Location:");
524 mDuePrefix = i18nc("@info/plain Todo calendar item's due date/time", "Due:");
525 }
526}
527
528/******************************************************************************
529* Check whether a text is an email.
530* Reply = number of email header lines, or 0 if not an email.
531*/
532int AlarmText::Private::emailHeaderCount(const QStringList& lines)
533{
534 setUpTranslations();
535 const int maxn = lines.count();
536 if (maxn >= MAIL_MIN_LINES
537 && lines[MAIL_FROM_LINE].startsWith(mFromPrefix)
538 && lines[MAIL_TO_LINE].startsWith(mToPrefix))
539 {
540 int n = MAIL_CC_LINE;
541 if (lines[MAIL_CC_LINE].startsWith(mCcPrefix))
542 ++n;
543 if (maxn > n + 1
544 && lines[n].startsWith(mDatePrefix)
545 && lines[n+1].startsWith(mSubjectPrefix))
546 return n+2;
547 }
548 return 0;
549}
550
551/******************************************************************************
552* Return the Todo title line, if the text is for a Todo.
553*/
554QString AlarmText::Private::todoTitle(const QString& text)
555{
556 setUpTranslations();
557 const QStringList lines = text.split(QLatin1Char('\n'), QString::SkipEmptyParts);
558 int n;
559 for (n = 0; n < lines.count() && lines[n].contains(QLatin1Char('\t')); ++n) ;
560 if (!n || n > 3)
561 return QString();
562 QString title;
563 int i = 0;
564 if (lines[i].startsWith(mTitlePrefix + QLatin1Char('\t')))
565 {
566 title = lines[i].mid(mTitlePrefix.length()).trimmed();
567 ++i;
568 }
569 if (i < n && lines[i].startsWith(mLocnPrefix + QLatin1Char('\t')))
570 ++i;
571 if (i < n && lines[i].startsWith(mDuePrefix + QLatin1Char('\t')))
572 ++i;
573 if (i == n)
574 {
575 // It's a Todo text
576 if (!title.isEmpty())
577 return title;
578 if (n < lines.count())
579 return lines[n];
580 }
581 return QString();
582}
583
584} // namespace KAlarmCal
585
586// vim: et sw=4:
KAlarmCal::AlarmText
Parses email, todo and script alarm texts.
Definition alarmtext.h:56
KAlarmCal::AlarmText::setText
void setText(const QString &text)
Set the alarm text.
Definition alarmtext.cpp:130
KAlarmCal::AlarmText::body
QString body() const
Return the email message body.
Definition alarmtext.cpp:256
KAlarmCal::AlarmText::summary
QString summary() const
Return the summary text for a todo.
Definition alarmtext.cpp:261
KAlarmCal::AlarmText::location
QString location() const
Return the location text for a todo.
Definition alarmtext.cpp:266
KAlarmCal::AlarmText::isEmail
bool isEmail() const
Return whether the instance contains the text of an email.
Definition alarmtext.cpp:293
KAlarmCal::AlarmText::cc
QString cc() const
Return the 'Cc' header parameter for an email alarm.
Definition alarmtext.cpp:241
KAlarmCal::AlarmText::due
QString due() const
Return the due date text for a todo.
Definition alarmtext.cpp:271
KAlarmCal::AlarmText::fromCalendarText
static QString fromCalendarText(const QString &text, bool &email)
Translate an alarm calendar text to a display text.
Definition alarmtext.cpp:422
KAlarmCal::AlarmText::subject
QString subject() const
Return the 'Subject' header parameter for an email alarm.
Definition alarmtext.cpp:251
KAlarmCal::AlarmText::setEmail
void setEmail(const QString &to, const QString &from, const QString &cc, const QString &time, const QString &subject, const QString &body, unsigned long kmailSerialNumber=0)
Set the instance contents to be an email.
Definition alarmtext.cpp:144
KAlarmCal::AlarmText::AlarmText
AlarmText(const QString &text=QString())
Constructor which sets the alarm text.
Definition alarmtext.cpp:106
KAlarmCal::AlarmText::kmailSerialNumber
unsigned long kmailSerialNumber() const
Return the kmail serial number of an email.
Definition alarmtext.cpp:308
KAlarmCal::AlarmText::time
QString time() const
Return the 'Date' header parameter for an email alarm.
Definition alarmtext.cpp:246
KAlarmCal::AlarmText::from
QString from() const
Return the 'From' header parameter for an email alarm.
Definition alarmtext.cpp:236
KAlarmCal::AlarmText::displayText
QString displayText() const
Return the text for a text message alarm, in display format.
Definition alarmtext.cpp:183
KAlarmCal::AlarmText::emailHeaders
static QString emailHeaders(const QString &text, bool subjectOnly)
Check whether a text is an email (with at least To and From headers), and if so return its headers or...
Definition alarmtext.cpp:399
KAlarmCal::AlarmText::isEmpty
bool isEmpty() const
Return whether there is any text.
Definition alarmtext.cpp:284
KAlarmCal::AlarmText::description
QString description() const
Return the description text for a todo.
Definition alarmtext.cpp:276
KAlarmCal::AlarmText::isScript
bool isScript() const
Return whether the instance contains the text of a script.
Definition alarmtext.cpp:298
KAlarmCal::AlarmText::checkIfEmail
static bool checkIfEmail(const QString &text)
Return whether a text is an email, with at least To and From headers.
Definition alarmtext.cpp:388
KAlarmCal::AlarmText::setScript
void setScript(const QString &text)
Set the instance contents to be a script.
Definition alarmtext.cpp:138
KAlarmCal::AlarmText::isTodo
bool isTodo() const
Return whether the instance contains the text of a todo.
Definition alarmtext.cpp:303
KAlarmCal::AlarmText::toCalendarText
static QString toCalendarText(const QString &text)
Return the text for an alarm message text, in alarm calendar format.
Definition alarmtext.cpp:462
KAlarmCal::AlarmText::setTodo
void setTodo(const KCalCore::Todo::Ptr &todo)
Set the instance contents to be a todo.
Definition alarmtext.cpp:159
KAlarmCal::AlarmText::to
QString to() const
Return the 'To' header parameter for an email alarm.
Definition alarmtext.cpp:231
KAlarmCal::KAEvent
KAEvent represents a KAlarm event.
Definition kaevent.h:211
KAlarmCal::KAEvent::FILE
@ FILE
display the contents of a file
Definition kaevent.h:259
KAlarmCal::KAEvent::COMMAND
@ COMMAND
execute a command
Definition kaevent.h:260
KAlarmCal::KAEvent::EMAIL
@ EMAIL
send an email
Definition kaevent.h:261
KAlarmCal::KAEvent::MESSAGE
@ MESSAGE
display a message text
Definition kaevent.h:258
KAlarmCal::KAEvent::AUDIO
@ AUDIO
play an audio file
Definition kaevent.h:262
KAlarmCal::KAEvent::actionSubType
SubAction actionSubType() const
Return the action sub-type of the event's main alarm.
Definition kaevent.cpp:1987
KCalCore::Todo::Ptr
QSharedPointer< Todo > Ptr
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KAlarm Library

Skip menu "KAlarm Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal