| author | William Roberts <williamr@symbian.org> | 
| Thu, 22 Jul 2010 16:32:06 +0100 | |
| branch | GCC_SURGE | 
| changeset 47 | 5b14749788d7 | 
| parent 27 | e4592d119491 | 
| parent 34 | 84197e66a4bd | 
| permissions | -rw-r--r-- | 
| 31 | 1 | /* | 
| 2 | * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). | |
| 3 | * All rights reserved. | |
| 4 | * This component and the accompanying materials are made available | |
| 5 | * under the terms of "Eclipse Public License v1.0" | |
| 6 | * which accompanies this distribution, and is available | |
| 7 | * at the URL "http://www.eclipse.org/legal/epl-v10.html". | |
| 8 | * | |
| 9 | * Initial Contributors: | |
| 10 | * Nokia Corporation - initial contribution. | |
| 11 | * | |
| 12 | * Contributors: | |
| 13 | * | |
| 14 | * Description: Main view of unified viewer | |
| 15 | * | |
| 16 | */ | |
| 17 | ||
| 18 | #ifndef UNIFIED_VIEWER_H | |
| 19 | #define UNIFIED_VIEWER_H | |
| 20 | ||
| 21 | #ifdef BUILD_UNI_VIEWER_DLL | |
| 22 | #define UNI_VIEWER_DLL Q_DECL_EXPORT | |
| 23 | #else | |
| 24 | #define UNI_VIEWER_DLL Q_DECL_IMPORT | |
| 25 | #endif | |
| 26 | ||
| 27 | #include "msgbaseview.h" | |
| 28 | ||
| 29 | #include "convergedmessage.h" | |
| 30 | ||
| 31 | class UniViewerFeeder; | |
| 32 | class ConvergedMessage; | |
| 33 | class HbScrollArea; | |
| 34 | class UniScrollArea; | |
| 35 | class UniContentsWidget; | |
| 36 | class MessageDeleteAction; | |
| 37 | class HbAction; | |
| 38 | /** | |
| 39 | * Main view of unified viewer. | |
| 40 | */ | |
| 41 | class UNI_VIEWER_DLL UnifiedViewer : public MsgBaseView | |
| 42 | {
 | |
| 43 | Q_OBJECT | |
| 44 | ||
| 45 | public: | |
| 46 | /** | |
| 47 | * Constructor | |
| 48 | */ | |
| 34 
84197e66a4bd
Revision: 201021
 Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> parents: 
31diff
changeset | 49 | UnifiedViewer(const qint32 messageId, | 
| 
84197e66a4bd
Revision: 201021
 Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> parents: 
31diff
changeset | 50 | int canForwardMessage = 0, | 
| 
84197e66a4bd
Revision: 201021
 Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> parents: 
31diff
changeset | 51 | QGraphicsItem *parent = 0); | 
| 31 | 52 | |
| 53 | /** | |
| 54 | * Destructor | |
| 55 | */ | |
| 56 | ~UnifiedViewer(); | |
| 57 | ||
| 58 | /** | |
| 59 | * Populates the content on the widget | |
| 60 | */ | |
| 61 | void populateContent(const qint32 messageId, bool update, int msgCount); | |
| 62 | ||
| 63 | protected: | |
| 64 | ||
| 65 | /** | |
| 66 | * reimplemented from base class to provide proper geometry for scrolling. | |
| 67 | * @see HbWidget | |
| 68 | */ | |
| 69 | void resizeEvent(QGraphicsSceneResizeEvent * event); | |
| 70 | ||
| 71 | private: | |
| 72 | ||
| 73 | /** | |
| 74 | * Creates tool bar actions | |
| 75 | * @see HbView | |
| 76 | */ | |
| 77 | void createToolBar(); | |
| 34 
84197e66a4bd
Revision: 201021
 Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> parents: 
31diff
changeset | 78 | |
| 31 | 79 | |
| 80 | public slots: | |
| 81 | ||
| 82 | /** | |
| 83 | * Clears the content on the widget | |
| 84 | */ | |
| 85 | void clearContent(); | |
| 86 | ||
| 87 | // Used for internal testing will be removed | |
| 88 | void handleFwdAction(); | |
| 89 | ||
| 90 | /** | |
| 91 | * Handle delete | |
| 92 | */ | |
| 93 | void handleDeleteAction(); | |
| 94 | ||
| 95 | private slots: | |
| 96 | /** | |
| 97 | * This slot is called when sendMessage signal is emitted for a highlighted | |
| 98 | * phone number, from body widget. | |
| 99 | */ | |
| 100 | void sendMessage(const QString& phoneNumber, const QString& alias = QString()); | |
| 101 | ||
| 102 | /** | |
| 103 | * This slot is called when delete message dialog is launched. | |
| 104 | * @param action selected action (yes or no). | |
| 105 | */ | |
| 106 | void onDialogDeleteMsg(HbAction* action); | |
| 107 | ||
| 108 | private: | |
| 109 | ||
| 110 | /** | |
| 111 | * Feeder object | |
| 112 | * Owned | |
| 113 | */ | |
| 114 | UniViewerFeeder *mViewFeeder; | |
| 115 | ||
| 116 | /** | |
| 117 | * HbScrollArea object | |
| 118 | * Owned | |
| 119 | */ | |
| 120 | UniScrollArea* mScrollArea; | |
| 121 | ||
| 122 | /** | |
| 123 | * UniContentsWidget object | |
| 124 | * Owned | |
| 125 | */ | |
| 126 | UniContentsWidget* mContentsWidget; | |
| 127 | ||
| 128 | /** | |
| 129 | * Contact id | |
| 130 | */ | |
| 131 | qint32 mContactId; | |
| 132 | ||
| 133 | /** | |
| 134 | * Message id | |
| 135 | */ | |
| 136 | qint32 mMessageId; | |
| 137 | ||
| 138 | /** | |
| 139 | * Message count | |
| 140 | */ | |
| 141 | int mMsgCount; | |
| 34 
84197e66a4bd
Revision: 201021
 Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> parents: 
31diff
changeset | 142 | |
| 
84197e66a4bd
Revision: 201021
 Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> parents: 
31diff
changeset | 143 | /** | 
| 
84197e66a4bd
Revision: 201021
 Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> parents: 
31diff
changeset | 144 | * Forward status of message | 
| 
84197e66a4bd
Revision: 201021
 Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> parents: 
31diff
changeset | 145 | */ | 
| 
84197e66a4bd
Revision: 201021
 Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> parents: 
31diff
changeset | 146 | bool mForwardMessage; | 
| 31 | 147 | }; | 
| 148 | ||
| 149 | #endif | |
| 150 | // EOF |