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

akonadi

  • 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
27class KDateTime;
28class QString;
29
30namespace boost {
31 template <typename T> class shared_ptr;
32}
33
34namespace KMime {
35 class Message;
36 typedef boost::shared_ptr<Message> MessagePtr;
37}
38namespace Akonadi {
39namespace NoteUtils {
40
45AKONADI_NOTES_EXPORT QString noteMimeType();
46
51AKONADI_NOTES_EXPORT QString noteIconName();
52
57class AKONADI_NOTES_EXPORT Attachment
58{
59public:
63 Attachment( const QUrl &url, const QString &mimetype );
67 Attachment( const QByteArray &data, const QString &mimetype );
68 Attachment( const Attachment & );
69 ~Attachment();
70
71 bool operator==( const Attachment & ) const;
72 void operator=( const Attachment & );
73
77 QUrl url() const;
78
82 QByteArray data() const;
83
87 QString mimetype() const;
88
92 void setLabel( const QString &label );
93
97 QString label() const;
98private:
99 //@cond PRIVATE
100 class AttachmentPrivate;
101 AttachmentPrivate * const d_ptr;
102 Q_DECLARE_PRIVATE( Attachment )
103 //@endcond
104};
105
144class AKONADI_NOTES_EXPORT NoteMessageWrapper
145{
146public:
147 NoteMessageWrapper();
148 explicit NoteMessageWrapper( const KMime::MessagePtr & );
149 ~NoteMessageWrapper();
150
155 void setUid( const QString &uid );
156
160 QString uid() const;
161
162 enum Classification {
163 Public,
164 Private,
165 Confidential
166 };
167
171 void setClassification( Classification );
172
176 Classification classification() const;
177
181 void setTitle( const QString &title );
182
186 QString title() const;
187
193 void setText( const QString &text, Qt::TextFormat format = Qt::PlainText );
194
198 QString text() const;
199
203 Qt::TextFormat textFormat() const;
204
208 QString toPlainText() const;
209
213 void setCreationDate( const KDateTime &creationDate );
214
218 KDateTime creationDate() const;
219
223 void setLastModifiedDate( const KDateTime &lastModifiedDate );
224
228 KDateTime lastModifiedDate() const;
229
235 void setFrom( const QString &from );
236
240 QString from() const;
241
245 QList<Attachment> &attachments();
246
251 QMap<QString, QString> &custom();
252
258 KMime::MessagePtr message() const;
259
260private:
261 //@cond PRIVATE
262 class NoteMessageWrapperPrivate;
263 NoteMessageWrapperPrivate * const d_ptr;
264 Q_DECLARE_PRIVATE( NoteMessageWrapper )
265 //@endcond
266};
267
268}
269}
270
271#endif
Akonadi::NoteUtils::Attachment
An attachment for a note.
Definition noteutils.h:58
Akonadi::NoteUtils::NoteMessageWrapper
A convenience wrapper around KMime::Message::Ptr for notes.
Definition noteutils.h:145
Akonadi
FreeBusyManager::Singleton.
Definition actionstatemanager_p.h:28
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.

akonadi

Skip menu "akonadi"
  • 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