equal
deleted
inserted
replaced
|
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: |
|
15 * |
|
16 */ |
|
17 #include "tstask.h" |
|
18 |
|
19 #include <xqconversions> |
|
20 |
|
21 #include "tsfswentry.h" |
|
22 |
|
23 TsTask::TsTask(CTsFswEntry* entry) : mEntry(entry) |
|
24 { |
|
25 } |
|
26 |
|
27 TsTask::~TsTask() |
|
28 { |
|
29 delete mEntry; |
|
30 } |
|
31 |
|
32 bool TsTask::isClosable() const |
|
33 { |
|
34 return mEntry->CloseableApp(); |
|
35 } |
|
36 |
|
37 QPixmap TsTask::icon() const |
|
38 { |
|
39 QPixmap pixmap = QPixmap::fromSymbianCFbsBitmap(mEntry->AppIconBitmap()); |
|
40 QPixmap mask = QPixmap::fromSymbianCFbsBitmap(mEntry->AppIconMask()); |
|
41 // @todo QPixmap::setAlphaChannel() is deprecated, change to code using QPainter |
|
42 pixmap.setAlphaChannel(mask); |
|
43 return pixmap; |
|
44 } |
|
45 |
|
46 QString TsTask::name() const |
|
47 { |
|
48 return XQConversions::s60DescToQString(mEntry->AppName()); |
|
49 } |