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

messageviewer

  • sources
  • kde-4.14
  • kdepim
  • messageviewer
  • header
contactdisplaymessagememento.h
Go to the documentation of this file.
1 /* Copyright (C) 2012-2015 Laurent Montel <montel@kde.org>
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Library General Public
5  * License as published by the Free Software Foundation; either
6  * version 2 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Library General Public License for more details.
12  *
13  * You should have received a copy of the GNU Library General Public License
14  * along with this library; see the file COPYING.LIB. If not, write to
15  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  * Boston, MA 02110-1301, USA.
17  */
18 
19 #ifndef CONTACTDISPLAYMESSAGEMEMENTO_H
20 #define CONTACTDISPLAYMESSAGEMEMENTO_H
21 
22 #include "interfaces/bodypart.h"
23 #include "viewer/viewer.h"
24 
25 #include <KABC/Picture>
26 #include <KABC/Addressee>
27 
28 #include <QObject>
29 
30 class KJob;
31 namespace PimCommon {
32 class GravatarResolvUrlJob;
33 }
34 
35 namespace MessageViewer
36 {
37 
38 class ContactDisplayMessageMemento : public QObject, public Interface::BodyPartMemento
39 {
40  Q_OBJECT
41 public:
42  explicit ContactDisplayMessageMemento( const QString &emailAddress );
43  ~ContactDisplayMessageMemento();
44  void processAddress( const KABC::Addressee& addressee );
45  bool allowToRemoteContent() const;
46  KABC::Picture photo() const;
47 
48  bool finished() const;
49 
50  void detach();
51 
52  QPixmap gravatarPixmap() const;
53 
54 signals:
55  // TODO: Factor our update and detach into base class
56  void update( MessageViewer::Viewer::UpdateMode );
57  void changeDisplayMail(Viewer::DisplayFormatMessage displayAsHtml, bool remoteContent);
58 
59 private Q_SLOTS:
60  void slotSearchJobFinished( KJob *job );
61 
62  void slotGravatarResolvUrlFinished(PimCommon::GravatarResolvUrlJob *);
63 private:
64  bool searchPhoto(const KABC::AddresseeList &list);
65  Viewer::DisplayFormatMessage mForceDisplayTo;
66  KABC::Picture mPhoto;
67  QPixmap mGravatarPixmap;
68  QString mEmailAddress;
69  bool mFinished;
70  bool mMailAllowToRemoteContent;
71 };
72 
73 }
74 
75 
76 #endif /* CONTACTDISPLAYMESSAGE_H */
77 
MessageViewer::Viewer::DisplayFormatMessage
DisplayFormatMessage
Definition: viewer.h:108
viewer.h
MessageViewer::ContactDisplayMessageMemento::update
void update(MessageViewer::Viewer::UpdateMode)
MessageViewer::Viewer::UpdateMode
UpdateMode
The display update mode: Force updates the display immediately, Delayed updates after some time (150m...
Definition: viewer.h:132
MessageViewer::ContactDisplayMessageMemento::ContactDisplayMessageMemento
ContactDisplayMessageMemento(const QString &emailAddress)
Definition: contactdisplaymessagememento.cpp:26
MessageViewer::ContactDisplayMessageMemento
Definition: contactdisplaymessagememento.h:38
QObject
bodypart.h
QString
QPixmap
MessageViewer::ContactDisplayMessageMemento::processAddress
void processAddress(const KABC::Addressee &addressee)
Definition: contactdisplaymessagememento.cpp:115
MessageViewer::Interface::BodyPartMemento
interface of classes that implement status for BodyPartFormatters.
Definition: bodypart.h:55
MessageViewer::ContactDisplayMessageMemento::~ContactDisplayMessageMemento
~ContactDisplayMessageMemento()
Definition: contactdisplaymessagememento.cpp:43
MessageViewer::ContactDisplayMessageMemento::detach
void detach()
Definition: contactdisplaymessagememento.cpp:86
MessageViewer::ContactDisplayMessageMemento::photo
KABC::Picture photo() const
Definition: contactdisplaymessagememento.cpp:136
MessageViewer::ContactDisplayMessageMemento::gravatarPixmap
QPixmap gravatarPixmap() const
Definition: contactdisplaymessagememento.cpp:109
MessageViewer::ContactDisplayMessageMemento::allowToRemoteContent
bool allowToRemoteContent() const
Definition: contactdisplaymessagememento.cpp:92
MessageViewer::ContactDisplayMessageMemento::changeDisplayMail
void changeDisplayMail(Viewer::DisplayFormatMessage displayAsHtml, bool remoteContent)
KJob
MessageViewer::ContactDisplayMessageMemento::finished
bool finished() const
Definition: contactdisplaymessagememento.cpp:81
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

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
  • pimprint

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