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 #ifndef CPTHEMEINFO_H_ |
|
18 #define CPTHEMEINFO_H_ |
|
19 |
|
20 |
|
21 #include <QString> |
|
22 |
|
23 #include <hbicon.h> |
|
24 |
|
25 class CpThemeInfo { |
|
26 |
|
27 public: |
|
28 |
|
29 |
|
30 enum ThemeListItemType { |
|
31 ThemeListItemType_default = 0, |
|
32 ThemeListItemType_URL, |
|
33 ThemeListItemType_APP |
|
34 }; |
|
35 |
|
36 CpThemeInfo(); |
|
37 ~CpThemeInfo(); |
|
38 |
|
39 QString name() const; |
|
40 void setName(const QString& newName); |
|
41 |
|
42 ThemeListItemType itemType() const; |
|
43 void setItemType(ThemeListItemType type); |
|
44 |
|
45 QString itemData() const; |
|
46 void setItemData(const QString& data); |
|
47 |
|
48 HbIcon icon() const; |
|
49 void setIcon(const HbIcon& newIcon); |
|
50 |
|
51 HbIcon portraitPreviewIcon() const; |
|
52 void setPortraitPreviewIcon(const HbIcon& newIcon); |
|
53 |
|
54 HbIcon landscapePreviewIcon() const; |
|
55 void setLandscapePreviewIcon(const HbIcon& newIcon); |
|
56 |
|
57 bool operator < (const CpThemeInfo &other) const { |
|
58 return mName.toCaseFolded().localeAwareCompare(other.mName.toCaseFolded()) < 0; |
|
59 } |
|
60 bool operator == (const CpThemeInfo &other) const { |
|
61 return mName.localeAwareCompare(other.mName) == 0; |
|
62 } |
|
63 |
|
64 private: |
|
65 CpThemeInfo::ThemeListItemType mItemType; |
|
66 QString mItemData; |
|
67 QString mName; |
|
68 HbIcon mIcon; |
|
69 HbIcon mPortraitPreviewIcon; |
|
70 HbIcon mLandscapePreviewIcon; |
|
71 |
|
72 }; |
|
73 Q_DECLARE_METATYPE(CpThemeInfo::ThemeListItemType) |
|
74 |
|
75 |
|
76 #endif /* CPTHEMEINFO_H_ */ |
|