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

messagelist

  • sources
  • kde-4.12
  • kdepim
  • messagelist
  • core
messageitem_p.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright 2008 Szymon Tomasz Stefanek <pragma@kvirc.net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  *******************************************************************************/
20 
21 #ifndef MESSAGELIST_MESSAGEITEM_P_H
22 #define MESSAGELIST_MESSAGEITEM_P_H
23 
24 #include "messageitem.h"
25 #include "item_p.h"
26 #include "messagecore/widgets/annotationdialog.h"
27 #include <Akonadi/Item>
28 #include <QWeakPointer>
29 
30 namespace MessageList {
31 namespace Core {
32 
33 class MessageItemPrivate : public ItemPrivate
34 {
35 public:
36 
37  explicit MessageItemPrivate( MessageItem *qq );
38  ~MessageItemPrivate();
39 
45  const MessageItem::Tag *findTagInternal( const QString &szTagId ) const;
46 
48  QList<MessageItem::Tag*> getTagList() const;
49 
50  bool tagListInitialized() const;
51 
53  const MessageItem::Tag* bestTag() const;
54 
56  void invalidateTagCache();
57 
59  void invalidateAnnotationCache();
60 
62  void resourceReceived( const Nepomuk2::Resource &resource );
63 
64  QByteArray mMessageIdMD5;
65  QByteArray mInReplyToIdMD5;
66  QByteArray mReferencesIdMD5;
67  QByteArray mStrippedSubjectMD5;
68  Akonadi::Item mAkonadiItem;
69  QWeakPointer<MessageCore::AnnotationEditDialog> mAnnotationDialog;
70  MessageItem::ThreadingStatus mThreadingStatus : 4;
71  MessageItem::EncryptionState mEncryptionState : 4;
72  MessageItem::SignatureState mSignatureState : 4;
73 
74  bool mAboutToBeRemoved : 1;
75  bool mSubjectIsPrefixed : 1;
76  mutable bool mAnnotationStateChecked : 1;
77  mutable bool mHasAnnotation : 1;
78 
79 private:
80 
81  // This creates mTagList and fills it with useful data
82  void fillTagList(const Nepomuk2::Resource& resource) const;
83 
84  // List of all tags. If this is 0, it means we have not yet calculated this list. It is calculated
85  // on demand when needed.
86  mutable QList< MessageItem::Tag * > * mTagList;
87 };
88 
89 class FakeItemPrivate : public MessageItemPrivate
90 {
91  public:
92  explicit FakeItemPrivate( FakeItem *qq );
93  QList<MessageItem::Tag*> mFakeTags;
94 };
95 
96 }
97 }
98 
99 #endif
MessageList::Core::MessageItemPrivate::mStrippedSubjectMD5
QByteArray mStrippedSubjectMD5
set only if we're doing threading
Definition: messageitem_p.h:67
MessageList::Core::MessageItem::EncryptionState
EncryptionState
Definition: messageitem.h:84
MessageList::Core::MessageItem
Definition: messageitem.h:50
MessageList::Core::MessageItemPrivate::mMessageIdMD5
QByteArray mMessageIdMD5
always set
Definition: messageitem_p.h:64
MessageList::Core::MessageItemPrivate::mAboutToBeRemoved
bool mAboutToBeRemoved
Set to true when this item is going to be deleted and shouldn't be selectable.
Definition: messageitem_p.h:74
MessageList::Core::MessageItemPrivate
Definition: messageitem_p.h:33
MessageList::Core::ItemPrivate
Definition: item_p.h:41
MessageList::Core::MessageItemPrivate::getTagList
QList< MessageItem::Tag * > getTagList() const
Returns the list of tags. This is calculated on demand and cached in mTagList.
Definition: messageitem.cpp:236
MessageList::Core::FakeItemPrivate
Definition: messageitem_p.h:89
MessageList::Core::MessageItemPrivate::mAnnotationDialog
QWeakPointer< MessageCore::AnnotationEditDialog > mAnnotationDialog
Definition: messageitem_p.h:69
MessageList::Core::MessageItemPrivate::mAkonadiItem
Akonadi::Item mAkonadiItem
Definition: messageitem_p.h:68
MessageList::Core::FakeItemPrivate::mFakeTags
QList< MessageItem::Tag * > mFakeTags
Definition: messageitem_p.h:93
MessageList::Core::MessageItemPrivate::bestTag
const MessageItem::Tag * bestTag() const
Returns the tag with the highest priority, or 0 if there are no tags.
Definition: messageitem.cpp:182
MessageList::Core::MessageItemPrivate::MessageItemPrivate
MessageItemPrivate(MessageItem *qq)
Definition: messageitem.cpp:149
messageitem.h
MessageList::Core::MessageItemPrivate::mReferencesIdMD5
QByteArray mReferencesIdMD5
set only if we're doing threading
Definition: messageitem_p.h:66
MessageList::Core::MessageItemPrivate::mAnnotationStateChecked
bool mAnnotationStateChecked
The state of the annotation below has been checked.
Definition: messageitem_p.h:76
MessageList::Core::MessageItemPrivate::mSignatureState
MessageItem::SignatureState mSignatureState
Definition: messageitem_p.h:72
MessageList::Core::MessageItemPrivate::tagListInitialized
bool tagListInitialized() const
Definition: messageitem.cpp:246
MessageList::Core::FakeItem
A message item that can have a fake tag list and a fake annotation.
Definition: messageitem.h:218
MessageList::Core::MessageItem::SignatureState
SignatureState
Definition: messageitem.h:92
MessageList::Core::MessageItemPrivate::mEncryptionState
MessageItem::EncryptionState mEncryptionState
Definition: messageitem_p.h:71
MessageList::Core::MessageItemPrivate::invalidateAnnotationCache
void invalidateAnnotationCache()
Deletes the cache of the annotation.
Definition: messageitem.cpp:177
MessageList::Core::MessageItemPrivate::findTagInternal
const MessageItem::Tag * findTagInternal(const QString &szTagId) const
Linear search in the list of tags.
Definition: messageitem.cpp:322
MessageList::Core::MessageItemPrivate::~MessageItemPrivate
~MessageItemPrivate()
Definition: messageitem.cpp:162
MessageList::Core::MessageItemPrivate::resourceReceived
void resourceReceived(const Nepomuk2::Resource &resource)
Callback for async Nepomuk resource retrieval.
Definition: messageitem.cpp:251
MessageList::Core::MessageItemPrivate::mSubjectIsPrefixed
bool mSubjectIsPrefixed
set only if we're doing subject based threading
Definition: messageitem_p.h:75
MessageList::Core::FakeItemPrivate::FakeItemPrivate
FakeItemPrivate(FakeItem *qq)
Definition: messageitem.cpp:691
MessageList::Core::MessageItemPrivate::invalidateTagCache
void invalidateTagCache()
Deletes the internal list of tags.
Definition: messageitem.cpp:168
MessageList::Core::MessageItemPrivate::mHasAnnotation
bool mHasAnnotation
Cached value for hasAnnotation()
Definition: messageitem_p.h:77
MessageList::Core::MessageItem::Tag
Definition: messageitem.h:53
item_p.h
MessageList::Core::MessageItemPrivate::mThreadingStatus
MessageItem::ThreadingStatus mThreadingStatus
Definition: messageitem_p.h:70
MessageList::Core::MessageItem::ThreadingStatus
ThreadingStatus
Definition: messageitem.h:76
MessageList::Core::MessageItemPrivate::mInReplyToIdMD5
QByteArray mInReplyToIdMD5
set only if we're doing threading
Definition: messageitem_p.h:65
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messagelist

Skip menu "messagelist"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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