1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
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 Base view. |
|
15 * |
8 * |
16 */ |
9 * Initial Contributors: |
17 |
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description:Conversation Base view. |
|
15 * |
|
16 */ |
18 |
17 |
19 #ifndef MSG_CONVERSATION_VIEW_INTERFACE_H |
18 #ifndef MSG_CONVERSATION_VIEW_INTERFACE_H |
20 #define MSG_CONVERSATION_VIEW_INTERFACE_H |
19 #define MSG_CONVERSATION_VIEW_INTERFACE_H |
21 |
20 |
22 #ifdef CONVERSATIONVIEW_DLL |
21 #ifdef CONVERSATIONVIEW_DLL |
23 #define CONVERSATION_VIEW_EXPORT Q_DECL_EXPORT |
22 #define CONVERSATION_VIEW_EXPORT Q_DECL_EXPORT |
24 #else |
23 #else |
25 #define CONVERSATION_VIEW_EXPORT Q_DECL_IMPORT |
24 #define CONVERSATION_VIEW_EXPORT Q_DECL_IMPORT |
26 #endif |
25 #endif |
27 |
26 |
|
27 #include <xqsettingskey.h> |
28 #include "msgbaseview.h" |
28 #include "msgbaseview.h" |
29 |
29 |
30 // FORWARD DECLARATIONS |
30 // FORWARD DECLARATIONS |
31 class MsgConversationView; |
31 class MsgConversationView; |
32 class HbListWidgetItem; |
32 class HbListWidgetItem; |
33 class MsgContactCardWidget; |
33 class MsgContactCardWidget; |
34 class QGraphicsLinearLayout; |
34 class QGraphicsLinearLayout; |
|
35 class XQSettingsManager; |
|
36 class XQPublishAndSubscribeUtils; |
35 |
37 |
36 class CONVERSATION_VIEW_EXPORT MsgConversationBaseView : public MsgBaseView |
38 class CONVERSATION_VIEW_EXPORT MsgConversationBaseView: public MsgBaseView |
37 { |
39 { |
38 Q_OBJECT |
40 Q_OBJECT |
39 |
41 |
40 public: |
42 public: |
41 |
43 |
42 /** |
44 /** |
43 * Constructor |
45 * Constructor |
44 */ |
46 */ |
45 MsgConversationBaseView(QGraphicsItem* parent=0); |
47 MsgConversationBaseView(QGraphicsItem* parent = 0); |
46 |
48 |
47 /** |
49 /** |
48 * Destructor |
50 * Destructor |
49 */ |
51 */ |
50 ~MsgConversationBaseView(); |
52 ~MsgConversationBaseView(); |
65 void clearContent(); |
67 void clearContent(); |
66 |
68 |
67 /** |
69 /** |
68 * saveContentToDrafts |
70 * saveContentToDrafts |
69 * Saves the editors content in cv to drafts |
71 * Saves the editors content in cv to drafts |
|
72 * @return valid message id if save is success |
|
73 * else invalid message id ( i.e. -1 ) |
70 */ |
74 */ |
71 void saveContentToDrafts(); |
75 int saveContentToDrafts(); |
72 |
76 |
73 public slots: |
77 /** |
|
78 * conversationId |
|
79 * Get the conversationId |
|
80 */ |
|
81 qint64 conversationId(); |
|
82 |
|
83 public slots: |
74 /** |
84 /** |
75 * Close the conversation view |
85 * Close the conversation view |
76 * This slot is triggered when user presses back(seconday sofykey) |
86 * This slot is triggered when user presses back(seconday sofykey) |
77 */ |
87 */ |
78 void closeConversationView(); |
88 void closeConversationView(); |
79 |
89 |
80 /** |
90 /** |
81 * Mark messages as read |
91 * Mark messages as read |
82 * Slot is triiggered when replying started |
92 * Slot is triiggered when replying started |
83 */ |
93 */ |
84 void markMessagesAsRead(); |
94 void markMessagesAsRead(); |
85 |
95 |
|
96 /** |
|
97 * Publish the conversation id based on the flag. |
|
98 * @param setId if true previous conversation id |
|
99 * will be published else -1 will be published. |
|
100 */ |
|
101 void setPSCVId(bool setId); |
|
102 |
86 private slots: |
103 private slots: |
87 /** |
104 /** |
88 * Slot for delayed construction |
105 * Slot for delayed construction |
89 */ |
106 */ |
90 void doDelayedConstruction(); |
107 void doDelayedConstruction(); |
91 |
108 |
92 /** |
109 /** |
93 * Hides chrome when itu-t is up |
110 * Hides chrome when itu-t is up |
94 */ |
111 */ |
95 void hideChrome(bool hide); |
112 void hideChrome(bool hide); |
96 |
113 |
97 /** |
114 /** |
98 * Slot for handling valid returns from the framework. |
115 * Slot for handling valid returns from the framework. |
99 * |
116 * |
100 * @param result const QVariant& |
117 * @param result const QVariant& |
101 */ |
118 */ |
102 void handleOk(const QVariant& result); |
119 void handleOk(const QVariant& result); |
103 |
120 |
104 /** |
121 /** |
105 * Slot for handling errors. Error ids are provided as |
122 * Slot for handling errors. Error ids are provided as |
106 * 32-bit integers. |
123 * 32-bit integers. |
107 * @param errorCode qint32 |
124 * @param errorCode qint32 |
108 */ |
125 */ |
109 void handleError(int errorCode, const QString& errorMessage); |
126 void handleError(int errorCode, const QString& errorMessage); |
110 |
127 |
111 |
128 /** |
112 signals: |
129 * Slot for handling the timer expiry event fired from view reay indication |
113 /** |
130 */ |
114 * Signal emitted when the conversation view is closed. |
131 void handleViewReady(); |
115 */ |
132 |
116 void conversationViewClosed(); |
133 /** |
117 |
134 * |
118 private : |
135 */ |
|
136 void handleConversationIdChange(qint64 convId); |
|
137 |
|
138 signals: |
|
139 /** |
|
140 * Signal emitted when the conversation view is closed. |
|
141 */ |
|
142 void conversationViewClosed(); |
|
143 |
|
144 private: |
119 /** |
145 /** |
120 * Create and initialise the view |
146 * Create and initialise the view |
121 */ |
147 */ |
122 void initView(); |
148 void initView(); |
123 |
149 |
124 private: |
150 private: |
125 |
151 |
126 /** |
152 /** |
127 * Conversation ID |
153 * Conversation ID |
128 */ |
154 */ |
129 qint64 mConversationId; |
155 qint64 mConversationId; |
130 |
156 |
131 /** |
157 /** |
132 * MsgConversationView, main view class |
158 * MsgConversationView, main view class |
133 * Owned |
159 * Owned |
134 */ |
160 */ |
135 MsgConversationView *mConversationView; |
161 MsgConversationView *mConversationView; |
136 |
162 |
137 /** |
163 /** |
138 * Contact card widget. |
164 * Contact card widget. |
139 */ |
165 */ |
140 MsgContactCardWidget* mContactCard; |
166 MsgContactCardWidget* mContactCard; |
141 |
167 |
142 /** |
168 /** |
143 * Main layout. |
169 * Main layout. |
144 */ |
170 */ |
145 QGraphicsLinearLayout* mMainLayout; |
171 QGraphicsLinearLayout* mMainLayout; |
146 |
172 |
147 }; |
173 /** |
|
174 * Object of XQSettingsKey. |
|
175 */ |
|
176 XQSettingsKey mCVIdkey; |
|
177 |
|
178 /** |
|
179 * mSettingsManager |
|
180 * Instance of the XQSettingsManager |
|
181 * Own. |
|
182 */ |
|
183 XQSettingsManager* mSettingsManager; |
|
184 }; |
148 |
185 |
149 #endif // MSG_CONVERSATION_VIEW_INTERFACE_H |
186 #endif // MSG_CONVERSATION_VIEW_INTERFACE_H |
150 |
|
151 // EOF |
187 // EOF |