1
/***************************************************************************
2
* Copyright (c) 2009 by Eckhart Wörner <ewoerner@kde.org> *
4
* This program is free software; you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation; either version 2 of the License, or *
7
* (at your option) any later version. *
9
* This program 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 *
12
* GNU General Public License for more details. *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program; if not, write to the *
16
* Free Software Foundation, Inc., *
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
18
***************************************************************************/
20
#ifndef MESSAGEWIDGET_H
21
#define MESSAGEWIDGET_H
23
#include <Plasma/DataEngine>
24
#include <Plasma/Frame>
26
#include "personwatch.h"
30
class QGraphicsGridLayout;
31
class QGraphicsLinearLayout;
38
class MessageWidget : public Plasma::Frame
43
explicit MessageWidget(Plasma::DataEngine* engine, QGraphicsWidget* parent = 0);
45
void setFolder(const QString& folderId);
46
void setMessage(const QString& messageId);
47
void setProvider(const QString& provider);
50
void dataUpdated(const QString& source, const Plasma::DataEngine::Data& data);
52
void markMessageRead();
56
void setSourceParameter(QString& variable, const QString& value);
58
Plasma::DataEngine* m_engine;
62
QGraphicsGridLayout* m_layout;
63
ContactImage* m_image;
64
Plasma::Label* m_subjectLabel;
65
Plasma::Label* m_bodyLabel;
66
Plasma::Label* m_fromLabel;
67
Plasma::IconWidget* m_setRead;
69
PersonWatch m_personWatch;