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

KAlarm Library

  • sources
  • kde-4.14
  • kdepimlibs
  • kalarmcal
alarmtext.h
1 /*
2  * alarmtext.h - 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,2008-2012 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 #ifndef ALARMTEXT_H
24 #define ALARMTEXT_H
25 
26 #include "kalarmcal_export.h"
27 
28 #ifndef KALARMCAL_USE_KRESOURCES
29 #include <kcalcore/todo.h>
30 #else
31 namespace KCal { class Todo; }
32 #endif
33 #include <QtCore/QString>
34 
35 
36 namespace KAlarmCal
37 {
38 
39 class KAEvent;
40 
55 class KALARMCAL_EXPORT AlarmText
56 {
57  public:
62  explicit AlarmText(const QString& text = QString());
63 
64  AlarmText(const AlarmText& other);
65  ~AlarmText();
66  AlarmText& operator=(const AlarmText& other);
67 
72  void setText(const QString& text);
73 
77  void setScript(const QString& text);
78 
87  void setEmail(const QString& to, const QString& from, const QString& cc, const QString& time,
88  const QString& subject, const QString& body, unsigned long kmailSerialNumber = 0);
89 
90 #ifndef KALARMCAL_USE_KRESOURCES
91 
94  void setTodo(const KCalCore::Todo::Ptr& todo);
95 #else
96 
99  void setTodo(const KCal::Todo* todo);
100 #endif
101 
107  QString displayText() const;
111  QString to() const;
115  QString from() const;
119  QString cc() const;
123  QString time() const;
127  QString subject() const;
131  QString body() const;
132 
136  QString summary() const;
140  QString location() const;
144  QString due() const;
148  QString description() const;
149 
151  bool isEmpty() const;
153  bool isEmail() const;
155  bool isScript() const;
157  bool isTodo() const;
158 
162  unsigned long kmailSerialNumber() const;
163 
171  static QString summary(const KAEvent& event, int maxLines = 1, bool* truncated = 0);
172 
176  static bool checkIfEmail(const QString& text);
177 
185  static QString emailHeaders(const QString& text, bool subjectOnly);
186 
193  static QString fromCalendarText(const QString& text, bool& email);
194 
199  static QString toCalendarText(const QString& text);
200 
201  private:
202  //@cond PRIVATE
203  class Private;
204  Private* const d;
205  //@endcond
206 };
207 
208 } // namespace KAlarmCal
209 
210 #endif // ALARMTEXT_H
211 
212 // vim: et sw=4:
QSharedPointer
todo.h
QString
KAlarmCal::AlarmText
Parses email, todo and script alarm texts.
Definition: alarmtext.h:55
KAlarmCal::KAEvent
KAEvent represents a KAlarm event.
Definition: kaevent.h:210
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:49 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs 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

Search



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