|
1 /* |
|
2 * Copyright (c) 2010 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 #include "hgmediawall_p.h" |
|
19 #include "hgcoverflowcontainer.h" |
|
20 #include "trace.h" |
|
21 |
|
22 HgMediawallPrivate::HgMediawallPrivate() |
|
23 { |
|
24 FUNC_LOG; |
|
25 } |
|
26 |
|
27 HgMediawallPrivate::~HgMediawallPrivate() |
|
28 { |
|
29 FUNC_LOG; |
|
30 } |
|
31 |
|
32 void HgMediawallPrivate::init() |
|
33 { |
|
34 FUNC_LOG; |
|
35 |
|
36 Q_Q(HgMediawall); |
|
37 HgCoverflowContainer* container = new HgCoverflowContainer(q); |
|
38 // Mediawall supports only horizontal scrolling. |
|
39 container->init(Qt::Horizontal); |
|
40 HgWidgetPrivate::init(container); |
|
41 } |
|
42 |
|
43 void HgMediawallPrivate::setTitlePosition(HgMediawall::LabelPosition position) |
|
44 { |
|
45 FUNC_LOG; |
|
46 |
|
47 container()->setTitlePosition(position); |
|
48 } |
|
49 |
|
50 HgMediawall::LabelPosition HgMediawallPrivate::titlePosition() const |
|
51 { |
|
52 FUNC_LOG; |
|
53 |
|
54 return container()->titlePosition(); |
|
55 } |
|
56 |
|
57 void HgMediawallPrivate::setDescriptionPosition(HgMediawall::LabelPosition position) |
|
58 { |
|
59 FUNC_LOG; |
|
60 |
|
61 container()->setDescriptionPosition(position); |
|
62 } |
|
63 |
|
64 HgMediawall::LabelPosition HgMediawallPrivate::descriptionPosition() const |
|
65 { |
|
66 FUNC_LOG; |
|
67 |
|
68 return container()->descriptionPosition(); |
|
69 } |
|
70 |
|
71 void HgMediawallPrivate::setTitleFontSpec(const HbFontSpec &fontSpec) |
|
72 { |
|
73 FUNC_LOG; |
|
74 |
|
75 container()->setTitleFontSpec(fontSpec); |
|
76 } |
|
77 |
|
78 HbFontSpec HgMediawallPrivate::titleFontSpec() const |
|
79 { |
|
80 FUNC_LOG; |
|
81 |
|
82 return container()->titleFontSpec(); |
|
83 } |
|
84 |
|
85 void HgMediawallPrivate::setDescriptionFontSpec(const HbFontSpec &fontSpec) |
|
86 { |
|
87 FUNC_LOG; |
|
88 |
|
89 container()->setDescriptionFontSpec(fontSpec); |
|
90 } |
|
91 |
|
92 HbFontSpec HgMediawallPrivate::descriptionFontSpec() const |
|
93 { |
|
94 FUNC_LOG; |
|
95 |
|
96 return container()->descriptionFontSpec(); |
|
97 } |
|
98 |
|
99 HgCoverflowContainer *HgMediawallPrivate::container() |
|
100 { |
|
101 HANDLE_ERROR_NULL(mContainer); |
|
102 return qobject_cast<HgCoverflowContainer *>(mContainer); |
|
103 } |
|
104 |
|
105 const HgCoverflowContainer *HgMediawallPrivate::container() const |
|
106 { |
|
107 HANDLE_ERROR_NULL(mContainer); |
|
108 return qobject_cast<const HgCoverflowContainer *>(mContainer); |
|
109 } |
|
110 |
|
111 // EOF |