• 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.12
  • 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 class QStringList;
36 
37 namespace KAlarmCal
38 {
39 
40 class KAEvent;
41 
56 class KALARMCAL_EXPORT AlarmText
57 {
58  public:
63  explicit AlarmText(const QString& text = QString());
64 
65  AlarmText(const AlarmText& other);
66  ~AlarmText();
67  AlarmText& operator=(const AlarmText& other);
68 
73  void setText(const QString& text);
74 
78  void setScript(const QString& text);
79 
88  void setEmail(const QString& to, const QString& from, const QString& cc, const QString& time,
89  const QString& subject, const QString& body, unsigned long kmailSerialNumber = 0);
90 
91 #ifndef KALARMCAL_USE_KRESOURCES
92 
95  void setTodo(const KCalCore::Todo::Ptr& todo);
96 #else
97 
100  void setTodo(const KCal::Todo* todo);
101 #endif
102 
108  QString displayText() const;
112  QString to() const;
116  QString from() const;
120  QString cc() const;
124  QString time() const;
128  QString subject() const;
132  QString body() const;
133 
137  QString summary() const;
141  QString location() const;
145  QString due() const;
149  QString description() const;
150 
152  bool isEmpty() const;
154  bool isEmail() const;
156  bool isScript() const;
158  bool isTodo() const;
159 
163  unsigned long kmailSerialNumber() const;
164 
172  static QString summary(const KAEvent& event, int maxLines = 1, bool* truncated = 0);
173 
177  static bool checkIfEmail(const QString& text);
178 
186  static QString emailHeaders(const QString& text, bool subjectOnly);
187 
194  static QString fromCalendarText(const QString& text, bool& email);
195 
200  static QString toCalendarText(const QString& text);
201 
202  private:
203  //@cond PRIVATE
204  class Private;
205  Private* const d;
206  //@endcond
207 };
208 
209 } // namespace KAlarmCal
210 
211 #endif // ALARMTEXT_H
212 
213 // vim: et sw=4:
todo.h
KAlarmCal::AlarmText
Parses email, todo and script alarm texts.
Definition: alarmtext.h:56
KAlarmCal::KAEvent
KAEvent represents a KAlarm event.
Definition: kaevent.h:211
KCalCore::Todo::Ptr
QSharedPointer< Todo > Ptr
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:01:14 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
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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