|
1 /* |
|
2 * Copyright (c) 2008 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: Videolist content widget implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "videolistwidget.h" |
|
19 #include "videolistwidgetdata.h" |
|
20 #include "videocollectioncommon.h" |
|
21 |
|
22 int VideoListWidgetData::mInitializeCount = 0; |
|
23 int VideoListWidgetData::mInitializeReturnValue = 0; |
|
24 int VideoListWidgetData::mActivateCount = 0; |
|
25 int VideoListWidgetData::mActivateReturnValue = 0; |
|
26 bool VideoListWidgetData::mActive = false; |
|
27 int VideoListWidgetData::mDeactivateCount = 0; |
|
28 QModelIndex VideoListWidgetData::mEmitActivatedIndex = QModelIndex(); |
|
29 |
|
30 VideoListWidget::VideoListWidget(VideoCollectionUiLoader* uiLoader, HbView *parent): |
|
31 HbListView(parent), |
|
32 mModel(0), |
|
33 mVideoServices(0), |
|
34 mCurrentLevel(VideoCollectionCommon::ELevelInvalid), |
|
35 mSignalsConnected(false), |
|
36 mNavKeyAction(0), |
|
37 mContextMenu(0), |
|
38 mSelectionMode(HbAbstractItemView::NoSelection), |
|
39 mScrollPositionTimer(0), |
|
40 mUiLoader(uiLoader) |
|
41 { |
|
42 // nop |
|
43 } |
|
44 |
|
45 VideoListWidget::~VideoListWidget() |
|
46 { |
|
47 VideoListWidgetData::reset(); |
|
48 } |
|
49 |
|
50 int VideoListWidget::initialize(VideoSortFilterProxyModel &model, |
|
51 bool isService, VideoCollectionCommon::TCollectionLevels level) |
|
52 { |
|
53 Q_UNUSED(isService); |
|
54 |
|
55 VideoListWidgetData::mInitializeCount++; |
|
56 mModel = &model; |
|
57 mCurrentLevel = level; |
|
58 return VideoListWidgetData::mInitializeReturnValue; |
|
59 } |
|
60 |
|
61 int VideoListWidget::activate() |
|
62 { |
|
63 return activate(mCurrentLevel); |
|
64 } |
|
65 |
|
66 int VideoListWidget::activate(VideoCollectionCommon::TCollectionLevels level) |
|
67 { |
|
68 VideoListWidgetData::mActive = true; |
|
69 VideoListWidgetData::mActivateCount++; |
|
70 mCurrentLevel = level; |
|
71 |
|
72 return VideoListWidgetData::mActivateReturnValue; |
|
73 } |
|
74 |
|
75 void VideoListWidget::deactivate() |
|
76 { |
|
77 VideoListWidgetData::mActive = false; |
|
78 VideoListWidgetData::mDeactivateCount++; |
|
79 } |
|
80 |
|
81 int VideoListWidget::connectSignals() |
|
82 { |
|
83 // not stubbed |
|
84 return 0; |
|
85 } |
|
86 |
|
87 void VideoListWidget::disConnectSignals() |
|
88 { |
|
89 // not stubbed |
|
90 } |
|
91 |
|
92 void VideoListWidget::deleteItemSlot() |
|
93 { |
|
94 // not stubbed |
|
95 } |
|
96 |
|
97 void VideoListWidget::createContextMenu() |
|
98 { |
|
99 // not stubbed |
|
100 } |
|
101 |
|
102 void VideoListWidget::setContextMenu() |
|
103 { |
|
104 // not stubbed |
|
105 } |
|
106 |
|
107 VideoCollectionCommon::TCollectionLevels VideoListWidget::getLevel() |
|
108 { |
|
109 return mCurrentLevel; |
|
110 } |
|
111 |
|
112 VideoSortFilterProxyModel* VideoListWidget::getModel() |
|
113 { |
|
114 return mModel; |
|
115 } |
|
116 |
|
117 void VideoListWidget::emitActivated (const QModelIndex &modelIndex) |
|
118 { |
|
119 VideoListWidgetData::mEmitActivatedIndex = modelIndex; |
|
120 } |
|
121 |
|
122 void VideoListWidget::setSelectionMode(int mode) |
|
123 { |
|
124 Q_UNUSED(mode); |
|
125 // not stubbed |
|
126 } |
|
127 |
|
128 void VideoListWidget::longPressedSlot(HbAbstractViewItem *item, const QPointF &point) |
|
129 { |
|
130 Q_UNUSED(item); |
|
131 Q_UNUSED(point); |
|
132 // not stubbed |
|
133 } |
|
134 |
|
135 void VideoListWidget::openItemSlot() |
|
136 { |
|
137 // not stubbed |
|
138 } |
|
139 |
|
140 void VideoListWidget::playItemSlot() |
|
141 { |
|
142 // not stubbed |
|
143 } |
|
144 |
|
145 void VideoListWidget::doDelayedsSlot() |
|
146 { |
|
147 // not stubbed |
|
148 } |
|
149 |
|
150 void VideoListWidget::openDetailsSlot() |
|
151 { |
|
152 // not stubbed |
|
153 } |
|
154 |
|
155 void VideoListWidget::renameSlot() |
|
156 { |
|
157 // not stubbed |
|
158 } |
|
159 |
|
160 void VideoListWidget::addToCollectionSlot() |
|
161 { |
|
162 // not stubbed |
|
163 } |
|
164 |
|
165 void VideoListWidget::removeCollectionSlot() |
|
166 { |
|
167 // not stubbed |
|
168 } |
|
169 |
|
170 void VideoListWidget::removeFromCollectionSlot() |
|
171 { |
|
172 // not stubbed |
|
173 } |
|
174 |
|
175 void VideoListWidget::back() |
|
176 { |
|
177 // not stubbed |
|
178 } |
|
179 |
|
180 void VideoListWidget::endVideoFecthingSlot() |
|
181 { |
|
182 // not stubbed |
|
183 } |
|
184 |
|
185 void VideoListWidget::scrollingStartedSlot() |
|
186 { |
|
187 // not stubbed |
|
188 } |
|
189 |
|
190 void VideoListWidget::scrollingEndedSlot() |
|
191 { |
|
192 // not stubbed |
|
193 } |
|
194 |
|
195 void VideoListWidget::scrollPositionChangedSlot(const QPointF &newPosition) |
|
196 { |
|
197 Q_UNUSED(newPosition); |
|
198 // not stubbed |
|
199 } |
|
200 |
|
201 void VideoListWidget::scrollPositionTimerSlot() |
|
202 { |
|
203 // not stubbed |
|
204 } |
|
205 |
|
206 void VideoListWidget::fetchThumbnailsForVisibleItems() |
|
207 { |
|
208 // not stubbed |
|
209 } |
|
210 |
|
211 void VideoListWidget::setNavigationAction() |
|
212 { |
|
213 // not stubbed |
|
214 } |
|
215 |
|
216 void VideoListWidget::renameDialogFinished(HbAction *action) |
|
217 { |
|
218 Q_UNUSED(action); |
|
219 // not stubbed |
|
220 } |
|
221 |
|
222 void VideoListWidget::deleteItemDialogFinished(int action) |
|
223 { |
|
224 Q_UNUSED(action); |
|
225 // not stubbed |
|
226 } |
|
227 |
|
228 void VideoListWidget::removeCollectionDialogFinished(int action) |
|
229 { |
|
230 Q_UNUSED(action); |
|
231 // not stubbed |
|
232 } |
|
233 |
|
234 void VideoListWidget::rowsInserted(const QModelIndex &parent, int start, int end) |
|
235 { |
|
236 Q_UNUSED(parent); |
|
237 Q_UNUSED(start); |
|
238 Q_UNUSED(end); |
|
239 // not stubbed |
|
240 } |
|
241 |
|
242 void VideoListWidget::rowsRemoved(const QModelIndex &parent, int start, int end) |
|
243 { |
|
244 Q_UNUSED(parent); |
|
245 Q_UNUSED(start); |
|
246 Q_UNUSED(end); |
|
247 // not stubbed |
|
248 } |
|
249 // end of file |