22
|
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 |
|
|
18 |
/*!
|
|
19 |
* A simple class to represent theme information. This information includes:
|
|
20 |
* 1. Theme Name
|
|
21 |
* 2. Theme Preview Thumbnail
|
|
22 |
* 3. Theme Preview landscape and portrait icon
|
|
23 |
* 4. Theme list type: either an item representing a theme, or a link (e.g OviStore).
|
|
24 |
* 5. Item type data. Represents additional information (e.g for link type, the URL).
|
|
25 |
*/
|
|
26 |
#include <hbicon.h>
|
|
27 |
|
|
28 |
#include "cpthemeinfo.h"
|
|
29 |
|
|
30 |
CpThemeInfo::CpThemeInfo()
|
|
31 |
{
|
|
32 |
}
|
|
33 |
|
|
34 |
|
|
35 |
CpThemeInfo::~CpThemeInfo()
|
|
36 |
{
|
|
37 |
}
|
|
38 |
|
|
39 |
QString CpThemeInfo::name() const
|
|
40 |
{
|
|
41 |
return mName;
|
|
42 |
}
|
|
43 |
|
|
44 |
void CpThemeInfo::setName(const QString& newName)
|
|
45 |
{
|
|
46 |
mName = newName;
|
|
47 |
}
|
|
48 |
|
|
49 |
CpThemeInfo::ThemeListItemType CpThemeInfo::itemType() const
|
|
50 |
{
|
|
51 |
return mItemType;
|
|
52 |
}
|
|
53 |
|
|
54 |
void CpThemeInfo::setItemType(CpThemeInfo::ThemeListItemType type)
|
|
55 |
{
|
|
56 |
mItemType = type;
|
|
57 |
}
|
|
58 |
|
|
59 |
|
|
60 |
QString CpThemeInfo::itemData() const
|
|
61 |
{
|
|
62 |
return mItemData;
|
|
63 |
}
|
|
64 |
|
|
65 |
void CpThemeInfo::setItemData(const QString& data)
|
|
66 |
{
|
|
67 |
mItemData = data;
|
|
68 |
}
|
|
69 |
|
|
70 |
|
|
71 |
HbIcon CpThemeInfo::icon() const
|
|
72 |
{
|
|
73 |
return mIcon;
|
|
74 |
}
|
|
75 |
|
|
76 |
void CpThemeInfo::setIcon(const HbIcon& newIcon)
|
|
77 |
{
|
|
78 |
mIcon = newIcon;
|
|
79 |
}
|
|
80 |
|
|
81 |
|
|
82 |
HbIcon CpThemeInfo::portraitPreviewIcon() const
|
|
83 |
{
|
|
84 |
return mPortraitPreviewIcon;
|
|
85 |
}
|
|
86 |
|
|
87 |
void CpThemeInfo::setPortraitPreviewIcon(const HbIcon& newIcon)
|
|
88 |
{
|
|
89 |
mPortraitPreviewIcon = newIcon;
|
|
90 |
}
|
|
91 |
|
|
92 |
|
|
93 |
HbIcon CpThemeInfo::landscapePreviewIcon() const
|
|
94 |
{
|
|
95 |
return mLandscapePreviewIcon;
|
|
96 |
}
|
|
97 |
|
|
98 |
void CpThemeInfo::setLandscapePreviewIcon(const HbIcon& newIcon)
|
|
99 |
{
|
|
100 |
mLandscapePreviewIcon = newIcon;
|
|
101 |
}
|
|
102 |
|