author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 17 Sep 2010 08:28:39 +0300 | |
changeset 70 | a15d9966050f |
parent 52 | 12db4185673b |
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: This widget displays the body of the viewer |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#include "univiewerbodywidget.h" |
|
19 |
||
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
20 |
// SYSTEM INCLUDES |
31 | 21 |
#include <QFile> |
22 |
#include <HbTextItem> |
|
23 |
#include <HbMainWindow> |
|
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
24 |
#include <HbIconItem> |
31 | 25 |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
26 |
// USER INCLUDES |
31 | 27 |
#include "univiewertextitem.h" |
28 |
#include "univiewerpixmapwidget.h" |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
29 |
#include "univieweraudiowidget.h" |
31 | 30 |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
31 |
// LOCAL CONSTANTS |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
32 |
const QString IMAGE_MIMETYPE("image"); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
33 |
const QString AUDIO_MIMETYPE("audio"); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
34 |
const QString VIDEO_MIMETYPE("video"); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
35 |
const QString TEXT_MIMETYPE("text"); |
31 | 36 |
|
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
37 |
static const char VIDEO_ICON[] = "qtg_large_video_player"; |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
38 |
|
31 | 39 |
//--------------------------------------------------------------- |
40 |
//UniViewerBodyWidget::UniViewerBodyWidget |
|
41 |
// @see header file |
|
42 |
//--------------------------------------------------------------- |
|
43 |
UniViewerBodyWidget::UniViewerBodyWidget(QGraphicsItem *parent) : |
|
44 |
HbWidget(parent), mHasText(false), mHasPixmap(false), mTextItem(0), mSlideCounter(0), |
|
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
45 |
mPixmapItem(0), mAudioItem(0), mOverlayItem(0) |
31 | 46 |
{ |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
47 |
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
31 | 48 |
} |
49 |
||
50 |
//--------------------------------------------------------------- |
|
51 |
//UniViewerBodyWidget::~UniViewerBodyWidget |
|
52 |
// @see header file |
|
53 |
//--------------------------------------------------------------- |
|
54 |
UniViewerBodyWidget::~UniViewerBodyWidget() |
|
55 |
{ |
|
56 |
} |
|
57 |
||
58 |
//--------------------------------------------------------------- |
|
59 |
// UniViewerBodyWidget::setHasText |
|
60 |
// @see header file |
|
61 |
//--------------------------------------------------------------- |
|
62 |
void UniViewerBodyWidget::setHasText(bool text) |
|
63 |
{ |
|
64 |
mHasText = text; |
|
65 |
} |
|
66 |
||
67 |
//--------------------------------------------------------------- |
|
68 |
// UniViewerBodyWidget::hasText |
|
69 |
// @see header file |
|
70 |
//--------------------------------------------------------------- |
|
71 |
bool UniViewerBodyWidget::hasText() |
|
72 |
{ |
|
73 |
return mHasText; |
|
74 |
} |
|
75 |
||
76 |
//--------------------------------------------------------------- |
|
77 |
// UniViewerBodyWidget::setHasPixmap |
|
78 |
// @see header file |
|
79 |
//--------------------------------------------------------------- |
|
80 |
void UniViewerBodyWidget::setHasPixmap(bool pixmap) |
|
81 |
{ |
|
82 |
mHasPixmap = pixmap; |
|
83 |
} |
|
84 |
||
85 |
//--------------------------------------------------------------- |
|
86 |
// UniViewerBodyWidget::hasPixmap |
|
87 |
// @see header file |
|
88 |
//--------------------------------------------------------------- |
|
89 |
bool UniViewerBodyWidget::hasPixmap() |
|
90 |
{ |
|
91 |
return mHasPixmap; |
|
92 |
} |
|
93 |
||
94 |
//--------------------------------------------------------------- |
|
95 |
// UniViewerBodyWidget::setSlideContents |
|
96 |
// @see header file |
|
97 |
//--------------------------------------------------------------- |
|
98 |
void UniViewerBodyWidget::setSlideContents(UniMessageInfoList objList, QString slideString) |
|
99 |
{ |
|
100 |
if (!slideString.isEmpty()) { |
|
101 |
setSlideCounter(slideString); |
|
102 |
} |
|
103 |
||
104 |
int count = objList.count(); |
|
105 |
for (int a = 0; a < count; ++a) { |
|
106 |
UniMessageInfo* info = objList.at(a); |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
107 |
QString mimeType = info->mimetype(); |
31 | 108 |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
109 |
if (mimeType.contains(TEXT_MIMETYPE)) { |
31 | 110 |
QFile file(info->path()); |
111 |
if (file.open(QIODevice::ReadOnly)) { |
|
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
112 |
QString textContent; |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
113 |
QByteArray textArray; |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
114 |
textArray = file.readAll(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
115 |
char *data = new char[textArray.size()+1]; |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
116 |
strcpy(data,textArray.data()); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
117 |
//This is needed since MMS text content |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
118 |
//is stored in UTF8 format |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
119 |
textContent = textContent.fromUtf8(data,strlen(data)); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
120 |
file.close(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
121 |
delete []data; |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
122 |
setText(textContent); |
31 | 123 |
} |
124 |
} |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
125 |
else if (mimeType.contains(AUDIO_MIMETYPE)) { |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
126 |
setAudio(info); |
31 | 127 |
} |
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
128 |
else if (mimeType.contains(VIDEO_MIMETYPE)) { |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
129 |
setVideo(info); |
31 | 130 |
} |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
131 |
else if (mimeType.contains(IMAGE_MIMETYPE)) { |
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
132 |
setPixmap(info); |
31 | 133 |
} |
134 |
||
135 |
delete info; |
|
136 |
} |
|
137 |
} |
|
138 |
||
139 |
//--------------------------------------------------------------- |
|
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
140 |
// UniViewerBodyWidget :: clearContent |
31 | 141 |
// @see header file |
142 |
//--------------------------------------------------------------- |
|
143 |
void UniViewerBodyWidget::clearContent() |
|
144 |
{ |
|
145 |
// delete the temp items(pixmap) & clear permanent items(text) |
|
146 |
if (mPixmapItem) { |
|
147 |
mPixmapItem->setParent(NULL); |
|
148 |
delete mPixmapItem; |
|
149 |
mPixmapItem = NULL; |
|
150 |
} |
|
151 |
||
152 |
if (mAudioItem) { |
|
153 |
mAudioItem->setParent(NULL); |
|
154 |
delete mAudioItem; |
|
155 |
mAudioItem = NULL; |
|
156 |
} |
|
157 |
||
158 |
if (mTextItem) { |
|
159 |
mTextItem->setParent(NULL); |
|
160 |
delete mTextItem; |
|
161 |
mTextItem = NULL; |
|
162 |
} |
|
163 |
||
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
164 |
if (mOverlayItem) { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
165 |
mOverlayItem->setParent(NULL); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
166 |
delete mOverlayItem; |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
167 |
mOverlayItem = NULL; |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
168 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
169 |
|
31 | 170 |
setHasText(false); |
171 |
setHasPixmap(false); |
|
172 |
repolish(); |
|
173 |
} |
|
174 |
||
175 |
//--------------------------------------------------------------- |
|
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
176 |
// UniViewerBodyWidget::setText |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
177 |
// @see header file |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
178 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
179 |
void UniViewerBodyWidget::setText(QString text) |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
180 |
{ |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
181 |
setHasText(true); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
182 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
183 |
if (!mTextItem) { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
184 |
mTextItem = new UniViewerTextItem(this); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
185 |
mTextItem->setObjectName("textItem"); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
186 |
HbStyle::setItemName(mTextItem, "textItem"); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
187 |
connect(mTextItem, SIGNAL(sendMessage(const QString&)), this, |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
188 |
SIGNAL(sendMessage(const QString&))); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
189 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
190 |
mTextItem->hide(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
191 |
text.replace(QChar::ParagraphSeparator, QChar::LineSeparator); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
192 |
text.replace('\r', QChar::LineSeparator); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
193 |
mTextItem->setText(text); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
194 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
195 |
this->repolish(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
196 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
197 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
198 |
//--------------------------------------------------------------- |
31 | 199 |
//UniViewerBodyWidget::sizeHint |
200 |
// @see header file |
|
201 |
//--------------------------------------------------------------- |
|
202 |
QSizeF UniViewerBodyWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const |
|
203 |
{ |
|
204 |
QSizeF szHint = HbWidget::sizeHint(which, constraint); |
|
205 |
||
206 |
HbMainWindow *mainWindow = this->mainWindow(); |
|
207 |
if (!mainWindow) { |
|
208 |
return szHint; |
|
209 |
} |
|
210 |
||
211 |
qreal screenWidth = 0.0; |
|
212 |
qreal screenHeight = 0.0; |
|
213 |
qreal leftMargin = 0.0; |
|
214 |
qreal rightMargin = 0.0; |
|
215 |
qreal chromeHeight = 0.0; |
|
216 |
qreal toolbarHeight = 0.0; |
|
217 |
qreal iconSize = 0.0; |
|
218 |
qreal spacing = 0.0; |
|
219 |
qreal unitSize = HbDeviceProfile::profile(mPixmapItem).unitValue(); |
|
220 |
style()->parameter("hb-param-screen-width", screenWidth); |
|
221 |
style()->parameter("hb-param-screen-height", screenHeight); |
|
222 |
style()->parameter("hb-param-margin-gene-left", leftMargin); |
|
223 |
style()->parameter("hb-param-margin-gene-right", rightMargin); |
|
224 |
style()->parameter("hb-param-widget-chrome-height", chromeHeight); |
|
225 |
style()->parameter("hb-param-widget-toolbar-height", toolbarHeight); |
|
226 |
style()->parameter("hb-param-graphic-size-primary-large", iconSize); |
|
227 |
style()->parameter("hb-param-margin-gene-middle-vertical", spacing); |
|
228 |
||
229 |
qreal maxWidth = 0.0; |
|
230 |
qreal maxHeight = 0.0; |
|
231 |
||
232 |
// Calculate max height & max width. |
|
233 |
if (mainWindow->orientation() == Qt::Horizontal) { |
|
234 |
qreal temp; |
|
235 |
temp = screenWidth; |
|
236 |
screenWidth = screenHeight; |
|
237 |
screenHeight = temp; |
|
238 |
||
239 |
if (mPixmapItem && mHasText) { |
|
240 |
maxWidth = (screenWidth / 2) - leftMargin - unitSize; |
|
241 |
} |
|
242 |
else { |
|
243 |
maxWidth = screenWidth - leftMargin - rightMargin; |
|
244 |
} |
|
245 |
maxHeight = screenHeight - chromeHeight - toolbarHeight; |
|
246 |
||
247 |
if (mAudioItem) { |
|
248 |
mAudioItem->setStretched(true); |
|
249 |
} |
|
250 |
} |
|
251 |
else if (mainWindow->orientation() == Qt::Vertical) { |
|
252 |
maxWidth = screenWidth - leftMargin - rightMargin; |
|
253 |
maxHeight = screenHeight - chromeHeight - toolbarHeight; |
|
254 |
||
255 |
if (mAudioItem) { |
|
256 |
mAudioItem->setStretched(false); |
|
257 |
} |
|
258 |
} |
|
259 |
||
260 |
// Slide Counter |
|
261 |
QSizeF slideCounterSize(0, 0); |
|
262 |
if (mSlideCounter) { |
|
263 |
slideCounterSize = mSlideCounter->effectiveSizeHint(which, constraint); |
|
264 |
mSlideCounter->show(); |
|
265 |
} |
|
266 |
// Audio Item |
|
267 |
QSizeF audioSize(0, 0); |
|
268 |
if (mAudioItem) { |
|
269 |
audioSize = mAudioItem->effectiveSizeHint(which, constraint); |
|
270 |
mAudioItem->show(); |
|
271 |
} |
|
272 |
||
273 |
// Text Item |
|
274 |
QSizeF textSize(0, 0); |
|
275 |
if (mTextItem) { |
|
276 |
textSize = mTextItem->effectiveSizeHint(which, constraint); |
|
277 |
mTextItem->show(); |
|
278 |
} |
|
279 |
||
280 |
// Pixmap Item |
|
281 |
QSizeF pixmapSize(0, 0); |
|
282 |
if (mPixmapItem) { |
|
283 |
qreal imageWidth = mPixmapItem->icon().defaultSize().width(); |
|
284 |
qreal imageHeight = mPixmapItem->icon().defaultSize().height(); |
|
285 |
||
286 |
qreal widthToSet = 0.0; |
|
287 |
qreal heightToSet = 0.0; |
|
288 |
||
289 |
if (imageWidth < iconSize) { |
|
290 |
widthToSet = iconSize; |
|
291 |
heightToSet = iconSize; |
|
292 |
} |
|
293 |
else if (imageWidth <= maxWidth) { |
|
294 |
// resize not needed |
|
295 |
widthToSet = imageWidth; |
|
296 |
heightToSet = qMin(imageHeight, maxHeight); |
|
297 |
} |
|
298 |
else { |
|
299 |
// resize needed, keep aspect-ratio and resize |
|
300 |
widthToSet = maxWidth; |
|
301 |
heightToSet = maxWidth * (imageHeight / imageWidth); |
|
302 |
heightToSet = qMin(heightToSet, maxHeight); |
|
303 |
||
304 |
} |
|
305 |
if (heightToSet == maxHeight) { |
|
306 |
widthToSet = heightToSet * (imageWidth / imageHeight); |
|
307 |
} |
|
308 |
||
309 |
pixmapSize.setHeight(heightToSet); |
|
310 |
pixmapSize.setWidth(widthToSet); |
|
311 |
mPixmapItem->setPreferredSize(pixmapSize); |
|
312 |
mPixmapItem->show(); |
|
313 |
} |
|
314 |
||
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
315 |
if (mOverlayItem) { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
316 |
mOverlayItem->show(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
317 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
318 |
|
31 | 319 |
// Calculate the size hint to be returned. |
320 |
szHint.setHeight(0); |
|
321 |
||
322 |
if (!slideCounterSize.isNull()) { |
|
323 |
szHint.rheight() += (slideCounterSize.height() + spacing); |
|
324 |
} |
|
325 |
if (!audioSize.isNull()) { |
|
326 |
szHint.rheight() += (audioSize.height() + spacing); |
|
327 |
} |
|
328 |
||
329 |
if (mainWindow->orientation() == Qt::Horizontal) { |
|
330 |
qreal remainingHeight = qMax(pixmapSize.height(), textSize.height()); |
|
331 |
if (remainingHeight > 0.0) { |
|
332 |
szHint.rheight() += (remainingHeight + spacing); |
|
333 |
} |
|
334 |
} |
|
335 |
else if (mainWindow->orientation() == Qt::Vertical) { |
|
336 |
if (!pixmapSize.isNull()) { |
|
337 |
szHint.rheight() += (pixmapSize.height() + spacing); |
|
338 |
} |
|
339 |
if (!textSize.isNull()) { |
|
340 |
szHint.rheight() += (textSize.height() + spacing); |
|
341 |
} |
|
342 |
} |
|
343 |
szHint.rheight() = qMax(maxHeight, szHint.height()); |
|
344 |
||
345 |
return szHint; |
|
346 |
} |
|
347 |
||
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
348 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
349 |
//UniViewerBodyWidget::setPixmap |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
350 |
// @see header file |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
351 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
352 |
void UniViewerBodyWidget::setPixmap(UniMessageInfo *info) |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
353 |
{ |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
354 |
setHasPixmap(true); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
355 |
//create image item instance |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
356 |
if (!mPixmapItem) { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
357 |
mPixmapItem = new UniViewerPixmapWidget(this); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
358 |
HbStyle::setItemName(mPixmapItem, "pixmap"); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
359 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
360 |
mPixmapItem->hide(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
361 |
mPixmapItem->populate(info); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
362 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
363 |
this->repolish(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
364 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
365 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
366 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
367 |
//UniViewerBodyWidget::setAudio |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
368 |
// @see header file |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
369 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
370 |
void UniViewerBodyWidget::setAudio(UniMessageInfo *info) |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
371 |
{ |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
372 |
if (!mAudioItem) { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
373 |
mAudioItem = new UniViewerAudioWidget(this); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
374 |
HbStyle::setItemName(mAudioItem, "audioItem"); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
375 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
376 |
mAudioItem->hide(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
377 |
mAudioItem->populate(info); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
378 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
379 |
this->repolish(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
380 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
381 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
382 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
383 |
//UniViewerBodyWidget::setVideo |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
384 |
// @see header file |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
385 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
386 |
void UniViewerBodyWidget::setVideo(UniMessageInfo *info) |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
387 |
{ |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
388 |
setHasPixmap(true); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
389 |
//create image item instance |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
390 |
if (!mPixmapItem) { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
391 |
mPixmapItem = new UniViewerPixmapWidget(this); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
392 |
HbStyle::setItemName(mPixmapItem, "pixmap"); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
393 |
connect(mPixmapItem, SIGNAL(thumbnailFound(bool, UniMessageInfo*)), this, |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
394 |
SLOT(onThumbnailFound(bool, UniMessageInfo*))); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
395 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
396 |
mPixmapItem->hide(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
397 |
mPixmapItem->populate(info); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
398 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
399 |
this->repolish(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
400 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
401 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
402 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
403 |
// UniViewerBodyWidget::setSlideCounter |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
404 |
// @see header file |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
405 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
406 |
void UniViewerBodyWidget::setSlideCounter(QString &slideCounter) |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
407 |
{ |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
408 |
if (!mSlideCounter) { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
409 |
mSlideCounter = new HbTextItem(this); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
410 |
HbStyle::setItemName(mSlideCounter, "slideCounter"); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
411 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
412 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
413 |
mSlideCounter->hide(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
414 |
mSlideCounter->setText(slideCounter); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
415 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
416 |
this->repolish(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
417 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
418 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
419 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
420 |
// UniViewerBodyWidget::setOverlayIcon |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
421 |
// @see header file |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
422 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
423 |
void UniViewerBodyWidget::setOverlayIcon(const QString &iconName) |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
424 |
{ |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
425 |
if (!mOverlayItem) { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
426 |
mOverlayItem = new HbIconItem(this); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
427 |
HbStyle::setItemName(mOverlayItem, "overlayItem"); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
428 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
429 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
430 |
mOverlayItem->hide(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
431 |
mOverlayItem->setIconName(iconName); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
432 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
433 |
this->repolish(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
434 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
435 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
436 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
437 |
// UniViewerBodyWidget::onThumbnailFound |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
438 |
// @see header file |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
439 |
//--------------------------------------------------------------- |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
440 |
void UniViewerBodyWidget::onThumbnailFound(bool result, UniMessageInfo *info) |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
441 |
{ |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
442 |
if (result) { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
443 |
// Thumbnail generation success |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
444 |
setOverlayIcon(VIDEO_ICON); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
445 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
446 |
else { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
447 |
// Show video content in audio widget. |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
448 |
setAudio(info); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
449 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
450 |
// Remove the pixmap widget. |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
451 |
setHasPixmap(false); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
452 |
if (mPixmapItem) { |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
453 |
HbStyle::setItemName(mPixmapItem, ""); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
454 |
mPixmapItem->hide(); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
455 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
456 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
457 |
} |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
458 |
|
31 | 459 |
// EOF |