diff -r e7aa27f58ae1 -r 578830873419 emailuis/nmailui/inc/nmviewerheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailuis/nmailui/inc/nmviewerheader.h Fri Apr 16 14:51:52 2010 +0300 @@ -0,0 +1,71 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#ifndef NMVIEWERHEADER_H_ +#define NMVIEWERHEADER_H_ + +#include + +class NmMessage; +class NmAddress; +class NmViewerView; +class HbTextItem; +class HbGroupBox; +class HbTextEdit; +class HbIconItem; + +class NmViewerHeader : public HbWidget +{ +Q_OBJECT + +public: + NmViewerHeader(QGraphicsItem *parent=0); + virtual ~NmViewerHeader(); + void setMessage(NmMessage* message); + void paint(QPainter *painter, + const QStyleOptionGraphicsItem *option, + QWidget *widget); + void rescaleHeader(const QSizeF layoutReso); + void setView(NmViewerView* view); + void updateMessageData(NmMessage* message); + +private slots: + void cursorPositionChanged(int oldPos, int newPos); + +private: + void loadWidgets(); + void setHeaderData(); + void createExpandableHeader(); + QString formatRecipientList(const QString &sender, + const QList &to, + const QList &cc); + QString addressToDisplayInHtml(const NmAddress &addr); + +private: + NmMessage *mMessage; // Not owned + QString mSenderName; // Not owned + HbTextItem *mSubject; // Not owned + HbTextItem *mSent; // Not owned + HbIconItem *mPrioIcon; // Not owned + HbGroupBox *mHeaderBox; // not owned + HbTextEdit *mRecipientsBox; // Not owned + NmViewerView *mViewerView; // Not owned + +}; + + #endif /* NMVIEWERHEADER_H_ */