|
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: Conversation view interface used for launching |
|
15 * conversation view. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef MSG_CONVERSATION_VIEW_INTERFACE_H |
|
21 #define MSG_CONVERSATION_VIEW_INTERFACE_H |
|
22 |
|
23 #include "msgconversationviewdefines.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class HbMainWindow; |
|
27 class MsgConversationView; |
|
28 class HbView; |
|
29 |
|
30 /** |
|
31 * Interface for launching the Conversation View. |
|
32 * The conversation view then |
|
33 * shall be used to show the conversations or used for editing message. |
|
34 * |
|
35 * MsgConversationViewInterface emits 1 signal |
|
36 * |
|
37 * conversationViewClosed() is emitted when the view is closed. |
|
38 * The view is closed , when the back key is pressed. |
|
39 * i.e. secondary softkey. |
|
40 */ |
|
41 class CONVERSATION_VIEW_EXPORT MsgConversationViewInterface : public QObject |
|
42 { |
|
43 Q_OBJECT |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Constructor |
|
49 */ |
|
50 MsgConversationViewInterface(HbMainWindow* parent=0); |
|
51 |
|
52 /** |
|
53 * Destructor |
|
54 */ |
|
55 ~MsgConversationViewInterface(); |
|
56 |
|
57 public: |
|
58 /** |
|
59 * openConversationView |
|
60 * Launches conversation view |
|
61 * @param entryId, the conversation index to be open |
|
62 * |
|
63 */ |
|
64 void openConversationView(qint64 entryId); |
|
65 |
|
66 /** |
|
67 * openConversationView |
|
68 * Launches conversation view in send mode with pre-populated data. |
|
69 * @param dataArray, the data array from which conversation view is |
|
70 * populated. |
|
71 */ |
|
72 void openConversationView(QByteArray dataArray); |
|
73 |
|
74 /** |
|
75 * openConversationView |
|
76 * Launches conversation view in send mode with pre-populated data. |
|
77 * @param number specifies phone number string |
|
78 * @param name specifies number alias name |
|
79 */ |
|
80 void openConversationView(QString number, QString name); |
|
81 |
|
82 public slots: |
|
83 /** |
|
84 * Close the conversation view |
|
85 * This slot is triggered when user presses back(seconday sofykey) |
|
86 */ |
|
87 void closeConversationView(); |
|
88 |
|
89 signals: |
|
90 /** |
|
91 * Signal emitted when the conversation view is closed. |
|
92 */ |
|
93 void conversationViewClosed(); |
|
94 |
|
95 private : |
|
96 /** |
|
97 * Create and initialise the view |
|
98 */ |
|
99 void initView(); |
|
100 |
|
101 private: |
|
102 /** |
|
103 * Reference of HbMainWindow, main window class |
|
104 * Not Owned |
|
105 */ |
|
106 HbMainWindow *mMainWindow; |
|
107 |
|
108 /** |
|
109 * MsgConversationView, main view class |
|
110 * Owned |
|
111 */ |
|
112 MsgConversationView *mConversationView; |
|
113 |
|
114 /** |
|
115 * Container widget holding conversation view & |
|
116 * header widget |
|
117 * Owned |
|
118 */ |
|
119 HbView *mMainWidget; |
|
120 |
|
121 }; |
|
122 |
|
123 #endif // MSG_CONVERSATION_VIEW_INTERFACE_H |