author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:32:06 +0100 | |
branch | GCC_SURGE |
changeset 47 | 5b14749788d7 |
parent 27 | e4592d119491 |
parent 44 | 36f374c67aa8 |
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:Conversation Base view. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#include "msgconversationbaseview.h" |
|
19 |
||
20 |
// SYSTEM INCLUDES |
|
21 |
#include <QGraphicsLinearLayout> |
|
22 |
#include <HbMainWindow> |
|
23 |
#include <HbNotificationDialog> |
|
24 |
||
25 |
#include <xqaiwrequest.h> |
|
26 |
#include <xqappmgr.h> |
|
27 |
||
28 |
#include <cntservicescontact.h> |
|
29 |
#include <qtcontactsglobal.h> |
|
30 |
#include <qtcontacts.h> |
|
31 |
#include <ccsdefs.h> |
|
32 |
#include <XQSettingsManager> |
|
33 |
#include <QTimer> |
|
34 |
||
35 |
// USER INCLUDES |
|
36 |
#include "msgconversationview.h" |
|
37 |
#include "conversationsengine.h" |
|
38 |
#include "msgviewdefines.h" |
|
39 |
#include "conversationsenginedefines.h" |
|
40 |
#include "msgcontactcardwidget.h" |
|
41 |
#include "conversationidpsconsts.h" |
|
42 |
||
43 |
QTM_USE_NAMESPACE |
|
44 |
||
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
45 |
const int INVALID_MSGID = -1; |
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
46 |
const int INVALID_CONVID = -1; |
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
47 |
|
31 | 48 |
// LOCALIZATION |
49 |
#define LOC_SAVED_TO_DRAFTS hbTrId("txt_messaging_dpopinfo_saved_to_drafts") |
|
50 |
||
51 |
//--------------------------------------------------------------- |
|
52 |
// MsgConversationBaseView::MsgConversationBaseView |
|
53 |
// Constructor |
|
54 |
//--------------------------------------------------------------- |
|
55 |
MsgConversationBaseView::MsgConversationBaseView(QGraphicsItem* parent) : |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
56 |
MsgBaseView(parent), mConversationId(-1), mCVIdkey(XQSettingsKey::TargetPublishAndSubscribe, |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
57 |
KMsgCVIdProperty, KMsgCVIdKey) |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
58 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
59 |
connect(this->mainWindow(), SIGNAL(viewReady()), this, SLOT(doDelayedConstruction())); |
31 | 60 |
initView(); |
61 |
} |
|
62 |
||
63 |
//--------------------------------------------------------------- |
|
64 |
// MsgConversationBaseView::~MsgConversationBaseView |
|
65 |
// Destructor |
|
66 |
//--------------------------------------------------------------- |
|
67 |
MsgConversationBaseView::~MsgConversationBaseView() |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
68 |
{ |
31 | 69 |
} |
70 |
||
71 |
//--------------------------------------------------------------- |
|
72 |
// MsgConversationBaseView::openConversationView |
|
73 |
// Launches conversation view for entry id and mode |
|
74 |
//--------------------------------------------------------------- |
|
75 |
void MsgConversationBaseView::openConversation(qint64 convId) |
|
76 |
{ |
|
77 |
ConversationsEngine::instance()->getConversations(convId); |
|
78 |
mConversationId = convId; |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
79 |
connect(this->mainWindow(), SIGNAL(viewReady()), this, SLOT(doDelayedConstruction())); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
80 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
81 |
// publsih conversation id |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
82 |
mSettingsManager->writeItemValue(mCVIdkey, (int) mConversationId); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
83 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
84 |
if (mConversationView) { |
31 | 85 |
mConversationView->refreshView(); |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
86 |
} |
31 | 87 |
} |
88 |
||
89 |
//--------------------------------------------------------------- |
|
90 |
// MsgConversationBaseView::initView |
|
91 |
// create and initialise the conversationview |
|
92 |
//--------------------------------------------------------------- |
|
93 |
void MsgConversationBaseView::initView() |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
94 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
95 |
|
31 | 96 |
// Create header widget |
97 |
mContactCard = new MsgContactCardWidget(this); |
|
98 |
||
99 |
mMainLayout = new QGraphicsLinearLayout(Qt::Vertical); |
|
100 |
||
101 |
qreal spacing = HbDeviceProfile::profile(this).unitValue(); |
|
102 |
mMainLayout->setSpacing(spacing); |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
103 |
mMainLayout->setContentsMargins(CONTENT_MARGIN, CONTENT_MARGIN, CONTENT_MARGIN, CONTENT_MARGIN); |
31 | 104 |
|
105 |
mMainLayout->addItem(mContactCard); |
|
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
106 |
connect(mContactCard, SIGNAL(conversationIdChanged(qint64)), this, |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
107 |
SLOT(handleConversationIdChange(qint64))); |
31 | 108 |
|
109 |
/** |
|
110 |
* Create conversation view and connect to proper signals. |
|
111 |
* NOTE: contactCardWidget is NOT parent of MsgConversationView. |
|
112 |
* Just passing reference to MsgConversationView. |
|
113 |
*/ |
|
114 |
mConversationView = new MsgConversationView(mContactCard); |
|
115 |
||
116 |
mConversationView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
117 |
||
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
118 |
connect(mConversationView, SIGNAL(closeConversationView()), this, SLOT(closeConversationView())); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
119 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
120 |
connect(mConversationView, SIGNAL(replyStarted()), this, SLOT(markMessagesAsRead())); |
31 | 121 |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
122 |
connect(mConversationView, SIGNAL(switchView(const QVariantList&)), this, |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
123 |
SIGNAL(switchView(const QVariantList&))); |
31 | 124 |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
125 |
connect(mConversationView, SIGNAL(vkbOpened(bool)), this, SLOT(hideChrome(bool))); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
126 |
connect(mConversationView, SIGNAL(vkbOpened(bool)), mContactCard, SLOT(ignoreSignals(bool))); |
31 | 127 |
|
128 |
this->setMenu(mConversationView->menu()); |
|
129 |
||
130 |
mMainLayout->addItem(mConversationView); |
|
131 |
||
132 |
this->setLayout(mMainLayout); |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
133 |
|
31 | 134 |
mSettingsManager = new XQSettingsManager(this); |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
135 |
|
31 | 136 |
} |
137 |
||
138 |
//--------------------------------------------------------------- |
|
139 |
// MsgConversationBaseView::closeConversationView |
|
140 |
// close conversation view |
|
141 |
//--------------------------------------------------------------- |
|
142 |
void MsgConversationBaseView::closeConversationView() |
|
143 |
{ |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
144 |
markMessagesAsRead(); |
31 | 145 |
} |
146 |
||
147 |
//--------------------------------------------------------------- |
|
148 |
// MsgConversationBaseView::markMessagesAsRead |
|
149 |
// Mark unread msgs in cv as read |
|
150 |
//--------------------------------------------------------------- |
|
151 |
void MsgConversationBaseView::markMessagesAsRead() |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
152 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
153 |
if (mConversationId >= 0) { |
31 | 154 |
ConversationsEngine::instance()->markConversationRead(mConversationId); |
155 |
} |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
156 |
} |
31 | 157 |
|
158 |
//--------------------------------------------------------------- |
|
159 |
// MsgConversationBaseView::saveContentToDrafts |
|
160 |
// saves the editors content to drafts |
|
161 |
//--------------------------------------------------------------- |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
162 |
int MsgConversationBaseView::saveContentToDrafts() |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
163 |
{ |
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
164 |
int msgId = INVALID_MSGID; |
31 | 165 |
bool result = false; |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
166 |
if (mConversationId >= 0) { |
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
167 |
msgId = mConversationView->saveContentToDrafts(); |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
168 |
} |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
169 |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
170 |
if (msgId != INVALID_MSGID) { |
31 | 171 |
HbNotificationDialog::launchDialog(LOC_SAVED_TO_DRAFTS); |
172 |
} |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
173 |
return msgId; |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
174 |
} |
31 | 175 |
|
176 |
//--------------------------------------------------------------- |
|
177 |
// MsgConversationBaseView::conversationId |
|
178 |
// get the conversation ID |
|
179 |
//--------------------------------------------------------------- |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
180 |
qint64 MsgConversationBaseView::conversationId() |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
181 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
182 |
return mConversationId; |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
183 |
} |
31 | 184 |
|
185 |
//--------------------------------------------------------------- |
|
186 |
// MsgConversationBaseView::clearContent |
|
187 |
// clears conversation view content |
|
188 |
//--------------------------------------------------------------- |
|
189 |
void MsgConversationBaseView::clearContent() |
|
190 |
{ |
|
191 |
ConversationsEngine::instance()->clearConversations(); |
|
192 |
mConversationView->clearEditors(); |
|
193 |
} |
|
194 |
||
195 |
//--------------------------------------------------------------- |
|
196 |
// MsgConversationBaseView::handleOk |
|
197 |
// |
|
198 |
//--------------------------------------------------------------- |
|
199 |
void MsgConversationBaseView::handleOk(const QVariant& result) |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
200 |
{ |
31 | 201 |
Q_UNUSED(result) |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
202 |
} |
31 | 203 |
|
204 |
//--------------------------------------------------------------- |
|
205 |
// MsgConversationBaseView::handleError |
|
206 |
// |
|
207 |
//--------------------------------------------------------------- |
|
208 |
void MsgConversationBaseView::handleError(int errorCode, const QString& errorMessage) |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
209 |
{ |
31 | 210 |
Q_UNUSED(errorMessage) |
211 |
Q_UNUSED(errorCode) |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
212 |
} |
31 | 213 |
|
214 |
//--------------------------------------------------------------- |
|
215 |
// MsgConversationBaseView::doDelayedConstruction |
|
216 |
// |
|
217 |
//--------------------------------------------------------------- |
|
218 |
void MsgConversationBaseView::doDelayedConstruction() |
|
219 |
{ |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
220 |
disconnect(this->mainWindow(), SIGNAL(viewReady()), this, SLOT(doDelayedConstruction())); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
221 |
QTimer::singleShot(50, this, SLOT(handleViewReady())); |
31 | 222 |
} |
223 |
||
224 |
//--------------------------------------------------------------- |
|
225 |
// MsgConversationBaseView::handleViewReady |
|
226 |
// |
|
227 |
//--------------------------------------------------------------- |
|
228 |
void MsgConversationBaseView::handleViewReady() |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
229 |
{ |
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
230 |
mConversationView->onViewReady(); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
231 |
} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
232 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
233 |
//--------------------------------------------------------------- |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
234 |
// MsgConversationBaseView::handleConversationIdChange |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
235 |
// |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
236 |
//--------------------------------------------------------------- |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
237 |
void MsgConversationBaseView::handleConversationIdChange(qint64 convId) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
238 |
{ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
239 |
if (INVALID_CONVID != convId && mConversationId != convId) { |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
240 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
241 |
mConversationId = convId; |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
242 |
// publsih conversation id |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
243 |
mSettingsManager->writeItemValue(mCVIdkey, (int) mConversationId); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
244 |
} |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
245 |
} |
31 | 246 |
|
247 |
//--------------------------------------------------------------- |
|
248 |
// MsgConversationBaseView::hideChrome |
|
249 |
// |
|
250 |
//--------------------------------------------------------------- |
|
251 |
void MsgConversationBaseView::hideChrome(bool hide) |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
252 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
253 |
if (hide) { |
31 | 254 |
this->hideItems(Hb::StatusBarItem | Hb::TitleBarItem); |
255 |
this->setContentFullScreen(true); |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
256 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
257 |
if (this->mainWindow()->orientation() == Qt::Horizontal) { |
31 | 258 |
mMainLayout->removeItem(mContactCard); |
259 |
mContactCard->hide(); |
|
260 |
} |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
261 |
} |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
262 |
else { |
31 | 263 |
this->showItems(Hb::StatusBarItem | Hb::TitleBarItem); |
264 |
this->setContentFullScreen(false); |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
265 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
266 |
if (!mContactCard->isVisible()) { |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
267 |
mMainLayout->insertItem(0, mContactCard); |
31 | 268 |
mContactCard->show(); |
269 |
} |
|
270 |
} |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
271 |
} |
31 | 272 |
|
273 |
//--------------------------------------------------------------- |
|
274 |
// MsgConversationBaseView::setPSCVId |
|
275 |
// |
|
276 |
//--------------------------------------------------------------- |
|
277 |
void MsgConversationBaseView::setPSCVId(bool setId) |
|
278 |
{ |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
279 |
if (setId) { |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
280 |
mSettingsManager->writeItemValue(mCVIdkey, (int) mConversationId); |
31 | 281 |
} |
282 |
else { |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
283 |
mSettingsManager->writeItemValue(mCVIdkey, -1); |
31 | 284 |
} |
285 |
} |
|
286 |
// EOF |