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

akonadi

  • akonadi
  • kmime
messagestatus.h
1 /* -*- mode: C++ -*-
2  This file is part of Akonadi.
3  Copyright (c) 2005 Andreas Gungl <a.gungl@gmx.de>
4  Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5  Copyright (c) 2010 Leo Franchi <lfranchi@kde.org>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Library General Public 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,
20  Boston, MA 02110-1301, USA.
21 */
22 #ifndef AKONADI_KMIME_MESSAGESTATUS_H
23 #define AKONADI_KMIME_MESSAGESTATUS_H
24 
25 #include <QtCore/QSet>
26 
27 #include "akonadi-kmime_export.h"
28 
29 class QString;
30 
31 namespace Akonadi {
32 
33 //---------------------------------------------------------------------------
51 class AKONADI_KMIME_EXPORT MessageStatus
52 {
53  public:
55  MessageStatus();
56 
61  MessageStatus &operator = ( const MessageStatus &other );
62 
66  bool operator == ( const MessageStatus &other ) const;
67 
71  bool operator != ( const MessageStatus &other ) const;
72 
77  bool operator & ( const MessageStatus &other ) const;
78 
80  void clear();
81 
88  void set( const MessageStatus &other );
89 
94  void toggle( const MessageStatus &other );
95 
96  /* ----- getters ----------------------------------------------------- */
97 
101  bool isOfUnknownStatus() const;
102 
106  bool isRead() const;
107 
111  bool isDeleted() const;
112 
116  bool isReplied() const;
117 
121  bool isForwarded() const;
122 
126  bool isQueued() const;
127 
131  bool isSent() const;
132 
136  bool isImportant() const;
137 
141  bool isWatched() const;
142 
146  bool isIgnored() const;
147 
151  bool isToAct() const;
152 
156  bool isSpam() const;
157 
161  bool isHam() const;
162 
166  bool hasAttachment() const;
167 
171  bool hasInvitation() const;
172 
176  bool isSigned() const;
177 
181  bool isEncrypted() const;
182 
186  bool hasError() const;
187 
188  /* ----- setters ----------------------------------------------------- */
189 
191  void setRead( bool read = true );
192 
196  void setDeleted( bool deleted = true );
197 
201  void setReplied( bool replied = true );
202 
206  void setForwarded( bool forwarded = true );
207 
211  void setQueued( bool queued = true );
212 
216  void setSent( bool sent = true );
217 
221  void setImportant( bool important = true );
222 
226  void setWatched( bool watched = true );
227 
231  void setIgnored( bool ignored = true );
232 
236  void setToAct( bool toAct = true );
237 
241  void setSpam( bool spam = true );
242 
246  void setHam( bool ham = true );
247 
251  void setHasAttachment( bool hasAttachment = true );
252 
256  void setHasInvitation( bool hasInvitation = true );
257 
261  void setSigned( bool value = true );
262 
266  void setEncrypted( bool value = true );
267 
271  void setHasError( bool value = true );
272 
273  /* ----- state representation --------------------------------------- */
274 
280  qint32 toQInt32() const;
281 
287  void fromQInt32( qint32 status );
288 
295  QString statusStr() const;
296 
304  void setStatusFromStr( const QString &aStr );
305 
309  QSet<QByteArray> statusFlags() const;
310 
314  void setStatusFromFlags( const QSet<QByteArray> &flags );
315 
316  /* ----- static accessors to simple states --------------------------- */
317 
321  static const MessageStatus statusUnread();
322 
327  static const MessageStatus statusRead();
328 
333  static const MessageStatus statusDeleted();
334 
339  static const MessageStatus statusReplied();
340 
345  static const MessageStatus statusForwarded();
346 
351  static const MessageStatus statusQueued();
352 
357  static const MessageStatus statusSent();
358 
363  static const MessageStatus statusImportant();
364 
369  static const MessageStatus statusWatched();
370 
375  static const MessageStatus statusIgnored();
376 
381  static const MessageStatus statusToAct();
382 
387  static const MessageStatus statusSpam();
388 
393  static const MessageStatus statusHam();
394 
399  static const MessageStatus statusHasAttachment();
400 
405  static const MessageStatus statusHasInvitation();
406 
411  static const MessageStatus statusSigned();
412 
417  static const MessageStatus statusEncrypted();
418 
423  static const MessageStatus statusHasError();
424 
425  private:
426  quint32 mStatus;
427 };
428 
429 } // namespace Akonadi
430 
431 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:39 by doxygen 1.8.3.1 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-4.10.5 API Reference

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