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

akonadi

  • sources
  • kde-4.12
  • kdepimlibs
  • akonadi
  • notes
noteutils.h
1 /* This file is part of the KDE project
2  Copyright (C) 2011 Christian Mollekopf <chrigi_1@fastmail.fm>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef NOTEUTILS_H
21 #define NOTEUTILS_H
22 
23 #include "akonadi-notes_export.h"
24 
25 #include <QtCore/QUrl>
26 #include <QTextEdit>
27 
28 class KDateTime;
29 class QString;
30 
31 namespace boost {
32  template <typename T> class shared_ptr;
33 }
34 
35 namespace KMime {
36  class Message;
37  typedef boost::shared_ptr<Message> MessagePtr;
38 }
39 namespace Akonadi {
40 namespace NoteUtils {
41 
46 AKONADI_NOTES_EXPORT QString noteMimeType();
47 
52 AKONADI_NOTES_EXPORT QString noteIconName();
53 
58 class AKONADI_NOTES_EXPORT Attachment
59 {
60 public:
64  Attachment( const QUrl &url, const QString &mimetype );
68  Attachment( const QByteArray &data, const QString &mimetype );
69  Attachment( const Attachment & );
70  ~Attachment();
71 
72  bool operator==( const Attachment & ) const;
73  void operator=( const Attachment & );
74 
78  QUrl url() const;
79 
83  QByteArray data() const;
84 
88  QString mimetype() const;
89 
93  void setLabel( const QString &label );
94 
98  QString label() const;
99 private:
100  //@cond PRIVATE
101  class AttachmentPrivate;
102  AttachmentPrivate * const d_ptr;
103  Q_DECLARE_PRIVATE( Attachment )
104  //@endcond
105 };
106 
145 class AKONADI_NOTES_EXPORT NoteMessageWrapper
146 {
147 public:
148  NoteMessageWrapper();
149  explicit NoteMessageWrapper( const KMime::MessagePtr & );
150  ~NoteMessageWrapper();
151 
156  void setUid( const QString &uid );
157 
161  QString uid() const;
162 
163  enum Classification {
164  Public,
165  Private,
166  Confidential
167  };
168 
172  void setClassification( Classification );
173 
177  Classification classification() const;
178 
182  void setTitle( const QString &title );
183 
187  QString title() const;
188 
194  void setText( const QString &text, Qt::TextFormat format = Qt::PlainText );
195 
199  QString text() const;
200 
204  Qt::TextFormat textFormat() const;
205 
209  QString toPlainText() const;
210 
214  void setCreationDate( const KDateTime &creationDate );
215 
219  KDateTime creationDate() const;
220 
224  void setLastModifiedDate( const KDateTime &lastModifiedDate );
225 
229  KDateTime lastModifiedDate() const;
230 
236  void setFrom( const QString &from );
237 
241  QString from() const;
242 
246  QList<Attachment> &attachments();
247 
252  QMap<QString, QString> &custom();
253 
259  KMime::MessagePtr message() const;
260 
261 private:
262  //@cond PRIVATE
263  class NoteMessageWrapperPrivate;
264  NoteMessageWrapperPrivate * const d_ptr;
265  Q_DECLARE_PRIVATE( NoteMessageWrapper )
266  //@endcond
267 };
268 
269 }
270 }
271 
272 #endif
Akonadi::NoteUtils::NoteMessageWrapper
A convenience wrapper around KMime::Message::Ptr for notes.
Definition: noteutils.h:145
Akonadi::NoteUtils::Attachment
An attachment for a note.
Definition: noteutils.h:58
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • 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