Fix akonadimodel.cpp:1: warning: unterminated character constant
[kdepim.git] / messageviewer / contactphotomemento.h
blob34321b87fa083e8ef22e576d619669cd95b5496e
1 /* Copyright 2010 Thomas McGuire <mcguire@kde.org>
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU General Public License as
5 published by the Free Software Foundation; either version 2 of
6 the License or (at your option) version 3 or any later version
7 accepted by the membership of KDE e.V. (or its successor approved
8 by the membership of KDE e.V.), which shall act as a proxy
9 defined in Section 14 of version 3 of the license.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef CONTACTPHOTOMEMENTO_H
20 #define CONTACTPHOTOMEMENTO_H
22 #include "interfaces/bodypart.h"
24 #include "viewer.h"
26 #include <KABC/Picture>
28 #include <KUrl>
30 #include <QImage>
31 #include <QObject>
33 class KJob;
35 namespace Akonadi {
36 class ContactSearchJob;
39 namespace MessageViewer {
41 class ContactPhotoMemento : public QObject, public Interface::BodyPartMemento
43 Q_OBJECT
44 public:
45 ContactPhotoMemento( const QString &emailAddress );
47 bool finished() const;
48 KABC::Picture photo() const;
50 virtual void detach();
52 signals:
53 // TODO: Factor our update and detach into base class
54 void update( Viewer::UpdateMode );
56 private slots:
57 void slotSearchJobFinished( KJob *job );
59 private:
60 bool mFinished;
61 KABC::Picture mPhoto;
66 #endif