|
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 <QDebug> |
|
18 #include <QObject> |
|
19 #include <smcmockclassincludes.h> |
|
20 #include "infowidgetlayoutmanager.h" |
|
21 |
|
22 // ============================ MEMBER FUNCTIONS =============================== |
|
23 |
|
24 // ----------------------------------------------------------------------------- |
|
25 // InfoWidgetLayoutManager::InfoWidgetLayoutManager |
|
26 // ----------------------------------------------------------------------------- |
|
27 // |
|
28 InfoWidgetLayoutManager::InfoWidgetLayoutManager( |
|
29 QObject * parent ) |
|
30 :QObject( parent ) |
|
31 { |
|
32 |
|
33 } |
|
34 |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // InfoWidgetLayoutManager::~InfoWidgetLayoutManager |
|
38 // ----------------------------------------------------------------------------- |
|
39 // |
|
40 InfoWidgetLayoutManager::~InfoWidgetLayoutManager( ) |
|
41 { |
|
42 |
|
43 } |
|
44 |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // InfoWidgetLayoutManager::currentDisplayRole |
|
48 // ----------------------------------------------------------------------------- |
|
49 // |
|
50 InfoWidgetLayoutManager::DisplayRole InfoWidgetLayoutManager::currentDisplayRole( ) |
|
51 { |
|
52 SMC_MOCK_METHOD0( DisplayRole ) |
|
53 } |
|
54 |
|
55 |
|
56 // ----------------------------------------------------------------------------- |
|
57 // InfoWidgetLayoutManager::currentWidgetRoles |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 QList <InfoWidgetLayoutManager::LayoutItemRole > |
|
61 InfoWidgetLayoutManager::currentWidgetRoles( ) |
|
62 { |
|
63 SMC_MOCK_METHOD0( QList <LayoutItemRole > ) |
|
64 } |
|
65 |
|
66 |
|
67 // ----------------------------------------------------------------------------- |
|
68 // InfoWidgetLayoutManager::layoutInfoDisplay |
|
69 // ----------------------------------------------------------------------------- |
|
70 // |
|
71 QGraphicsLayout * InfoWidgetLayoutManager::layoutInfoDisplay( ) |
|
72 { |
|
73 SMC_MOCK_METHOD0( QGraphicsLayout * ) |
|
74 } |
|
75 |
|
76 |
|
77 // ----------------------------------------------------------------------------- |
|
78 // InfoWidgetLayoutManager::layoutSettingsDialog |
|
79 // ----------------------------------------------------------------------------- |
|
80 // |
|
81 QGraphicsLayout * InfoWidgetLayoutManager::layoutSettingsDialog( ) |
|
82 { |
|
83 SMC_MOCK_METHOD0( QGraphicsLayout * ) |
|
84 } |
|
85 |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // InfoWidgetLayoutManager::widgetRoles |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 const QList <InfoWidgetLayoutManager::LayoutItemRole > |
|
92 InfoWidgetLayoutManager::widgetRoles(DisplayRole displayRole ) const |
|
93 { |
|
94 SMC_MOCK_METHOD1( |
|
95 const QList <InfoWidgetLayoutManager::LayoutItemRole >, |
|
96 DisplayRole, displayRole ) |
|
97 } |
|
98 |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // InfoWidgetLayoutManager::loadWidgets |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 bool InfoWidgetLayoutManager::loadWidgets( |
|
105 const DisplayRole displayRole, |
|
106 const QList<LayoutItemRole> &displayWidgets, |
|
107 QMap<LayoutItemRole, QGraphicsWidget *> &widgetMap) |
|
108 { |
|
109 typedef QMap <LayoutItemRole, QGraphicsWidget *> & TYPE3; |
|
110 SMC_MOCK_METHOD3( bool, const DisplayRole, displayRole, |
|
111 const QList<LayoutItemRole> &, displayWidgets, |
|
112 TYPE3, widgetMap ) |
|
113 } |
|
114 |
|
115 // ----------------------------------------------------------------------------- |
|
116 // InfoWidgetLayoutManager::reloadWidgets |
|
117 // ----------------------------------------------------------------------------- |
|
118 // |
|
119 bool InfoWidgetLayoutManager::reloadWidgets( |
|
120 const DisplayRole displayRole ) |
|
121 { |
|
122 SMC_MOCK_METHOD1( bool, const DisplayRole, displayRole ) |
|
123 } |
|
124 |
|
125 |
|
126 // ----------------------------------------------------------------------------- |
|
127 // InfoWidgetLayoutManager::loadWidget |
|
128 // ----------------------------------------------------------------------------- |
|
129 // |
|
130 QGraphicsWidget* InfoWidgetLayoutManager::loadWidget( |
|
131 InfoWidgetDocumentLoader &loader, |
|
132 DisplayRole displayRole, |
|
133 LayoutItemRole widgetRole) |
|
134 { |
|
135 SMC_MOCK_METHOD3( QGraphicsWidget *, InfoWidgetDocumentLoader &, loader, |
|
136 DisplayRole, displayRole, |
|
137 LayoutItemRole, widgetRole ) |
|
138 } |
|
139 |
|
140 |
|
141 // ----------------------------------------------------------------------------- |
|
142 // InfoWidgetLayoutManager::getWidget |
|
143 // ----------------------------------------------------------------------------- |
|
144 // |
|
145 QGraphicsWidget * InfoWidgetLayoutManager::getWidget( |
|
146 LayoutItemRole itemRole ) |
|
147 { |
|
148 SMC_MOCK_METHOD1( QGraphicsWidget *, LayoutItemRole, itemRole ) |
|
149 } |
|
150 |
|
151 |
|
152 // ----------------------------------------------------------------------------- |
|
153 // InfoWidgetLayoutManager::loadObject |
|
154 // ----------------------------------------------------------------------------- |
|
155 // |
|
156 QObject * InfoWidgetLayoutManager::loadObject( |
|
157 InfoWidgetDocumentLoader & loader, |
|
158 DisplayRole displayRole, |
|
159 LayoutItemRole objectRole ) |
|
160 { |
|
161 SMC_MOCK_METHOD3( QObject *, InfoWidgetDocumentLoader &, loader, |
|
162 DisplayRole, displayRole, |
|
163 LayoutItemRole, objectRole ) |
|
164 } |
|
165 |
|
166 |
|
167 // ----------------------------------------------------------------------------- |
|
168 // InfoWidgetLayoutManager::getObject |
|
169 // ----------------------------------------------------------------------------- |
|
170 // |
|
171 QObject * InfoWidgetLayoutManager::getObject( |
|
172 LayoutItemRole itemRole ) |
|
173 { |
|
174 SMC_MOCK_METHOD1( QObject *, LayoutItemRole, itemRole ) |
|
175 } |
|
176 |
|
177 |
|
178 // ----------------------------------------------------------------------------- |
|
179 // InfoWidgetLayoutManager::contentWidget |
|
180 // ----------------------------------------------------------------------------- |
|
181 // |
|
182 QGraphicsWidget * InfoWidgetLayoutManager::contentWidget( ) |
|
183 { |
|
184 SMC_MOCK_METHOD0( QGraphicsWidget * ) |
|
185 } |
|
186 |
|
187 |
|
188 // ----------------------------------------------------------------------------- |
|
189 // InfoWidgetLayoutManager::marqueeItems |
|
190 // ----------------------------------------------------------------------------- |
|
191 // |
|
192 QList <HbMarqueeItem * > InfoWidgetLayoutManager::marqueeItems( ) |
|
193 { |
|
194 SMC_MOCK_METHOD0( QList <HbMarqueeItem * > ) |
|
195 } |
|
196 |
|
197 |
|
198 // ----------------------------------------------------------------------------- |
|
199 // InfoWidgetLayoutManager::removeWidget |
|
200 // ----------------------------------------------------------------------------- |
|
201 // |
|
202 void InfoWidgetLayoutManager::removeWidget( |
|
203 LayoutItemRole itemRole, |
|
204 bool deleteLater ) |
|
205 { |
|
206 SMC_MOCK_METHOD2( void, LayoutItemRole, itemRole, |
|
207 bool, deleteLater ) |
|
208 } |
|
209 |
|
210 |
|
211 // ----------------------------------------------------------------------------- |
|
212 // InfoWidgetLayoutManager::destroyWidgets |
|
213 // ----------------------------------------------------------------------------- |
|
214 // |
|
215 void InfoWidgetLayoutManager::destroyWidgets( ) |
|
216 { |
|
217 SMC_MOCK_METHOD0( void ) |
|
218 } |
|
219 |
|
220 |
|
221 // ----------------------------------------------------------------------------- |
|
222 // InfoWidgetLayoutManager::layoutRows |
|
223 // ----------------------------------------------------------------------------- |
|
224 // |
|
225 int InfoWidgetLayoutManager::layoutRows( ) const |
|
226 { |
|
227 SMC_MOCK_METHOD0( int ) |
|
228 } |
|
229 |
|
230 |
|
231 // ----------------------------------------------------------------------------- |
|
232 // InfoWidgetLayoutManager::setLayoutRows |
|
233 // ----------------------------------------------------------------------------- |
|
234 // |
|
235 void InfoWidgetLayoutManager::setLayoutRows( |
|
236 int rows ) |
|
237 { |
|
238 SMC_MOCK_METHOD1( void, int, rows ) |
|
239 } |
|
240 |
|
241 |
|
242 // ----------------------------------------------------------------------------- |
|
243 // InfoWidgetLayoutManager::layoutRowHeight |
|
244 // ----------------------------------------------------------------------------- |
|
245 // |
|
246 qreal InfoWidgetLayoutManager::layoutRowHeight( ) const |
|
247 { |
|
248 SMC_MOCK_METHOD0( qreal ) |
|
249 } |
|
250 |
|
251 |
|
252 // ----------------------------------------------------------------------------- |
|
253 // InfoWidgetLayoutManager::textFitsToRect |
|
254 // ----------------------------------------------------------------------------- |
|
255 // |
|
256 bool InfoWidgetLayoutManager::textFitsToRect( |
|
257 QString text, |
|
258 QFont font, |
|
259 QRectF rect ) |
|
260 { |
|
261 SMC_MOCK_METHOD3( bool, QString, text, |
|
262 QFont, font, |
|
263 QRectF, rect ) |
|
264 } |
|
265 |
|
266 |
|
267 // ----------------------------------------------------------------------------- |
|
268 // InfoWidgetDocumentLoader::InfoWidgetDocumentLoader |
|
269 // ----------------------------------------------------------------------------- |
|
270 // |
|
271 InfoWidgetDocumentLoader::InfoWidgetDocumentLoader( ) |
|
272 //: |
|
273 //HbDocumentLoader( /**/ ) |
|
274 { |
|
275 |
|
276 } |
|
277 |
|
278 |
|
279 // ----------------------------------------------------------------------------- |
|
280 // InfoWidgetDocumentLoader::createObject |
|
281 // ----------------------------------------------------------------------------- |
|
282 // |
|
283 QObject * InfoWidgetDocumentLoader::createObject( |
|
284 const QString & type, |
|
285 const QString & name ) |
|
286 { |
|
287 SMC_MOCK_METHOD2( QObject *, const QString &, type, |
|
288 const QString &, name ) |
|
289 } |
|
290 |
|
291 |