|
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: VideoProxyModelGeneric implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <qstringlist.h> |
|
22 #include <qset.h> |
|
23 #include <qtimer.h> |
|
24 #include <qdatetime.h> |
|
25 #include <vcxmyvideosdefs.h> |
|
26 |
|
27 #include "videolistdatamodel.h" |
|
28 #include "videocollectioncommon.h" |
|
29 #include "videoproxymodelgeneric.h" |
|
30 |
|
31 const TMPXItemId INVALID_ID = TMPXItemId::InvalidId(); |
|
32 |
|
33 int VideoProxyModelGeneric::mOpenItemCallCount = 0; |
|
34 int VideoProxyModelGeneric::mGetOpenItemCallCount = 0; |
|
35 int VideoProxyModelGeneric::mLessThanCallCount = 0; |
|
36 int VideoProxyModelGeneric::mFilterAcceptsRowCallCount = 0; |
|
37 int VideoProxyModelGeneric::mConnectSignalsCallCount = 0; |
|
38 int VideoProxyModelGeneric::mDisconnectSignalsCallCount = 0; |
|
39 int VideoProxyModelGeneric::mProcessSortingCallCount = 0; |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // VideoProxyModelGeneric::VideoProxyModelGeneric |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 VideoProxyModelGeneric::VideoProxyModelGeneric(QObject *parent) : |
|
46 mModel(0), |
|
47 mCollectionClient(0), |
|
48 mLevel(VideoCollectionCommon::ELevelInvalid), |
|
49 mWantedSortOrder(Qt::AscendingOrder), |
|
50 mDefaultSortRole(0) |
|
51 { |
|
52 Q_UNUSED(parent); |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // VideoProxyModelGeneric::~VideoProxyModelGeneric |
|
57 // ----------------------------------------------------------------------------- |
|
58 // |
|
59 VideoProxyModelGeneric::~VideoProxyModelGeneric() |
|
60 { |
|
61 delete mModel; |
|
62 mModel = 0; |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // VideoProxyModelGeneric::openItem |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 int VideoProxyModelGeneric::openItem(TMPXItemId mediaId) |
|
70 { |
|
71 Q_UNUSED(mediaId); |
|
72 mOpenItemCallCount++; |
|
73 return -1; |
|
74 } |
|
75 |
|
76 // ----------------------------------------------------------------------------- |
|
77 // VideoProxyModelGeneric::getOpenItem() |
|
78 // ----------------------------------------------------------------------------- |
|
79 // |
|
80 TMPXItemId VideoProxyModelGeneric::getOpenItem() const |
|
81 { |
|
82 mGetOpenItemCallCount++; |
|
83 TMPXItemId itemId = TMPXItemId::InvalidId(); |
|
84 return itemId; |
|
85 } |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // VideoProxyModelGeneric::lessThan |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 bool VideoProxyModelGeneric::lessThan(const QModelIndex &left, |
|
92 const QModelIndex &right) const |
|
93 { |
|
94 Q_UNUSED(left); |
|
95 Q_UNUSED(right); |
|
96 mLessThanCallCount++; |
|
97 return true; |
|
98 } |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // VideoProxyModelGeneric::filterAcceptsRow |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 bool VideoProxyModelGeneric::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const |
|
105 { |
|
106 Q_UNUSED(source_row); |
|
107 Q_UNUSED(source_parent); |
|
108 mFilterAcceptsRowCallCount++; |
|
109 return false; |
|
110 } |
|
111 |
|
112 // ----------------------------------------------------------------------------- |
|
113 // VideoProxyModelGeneric::connectSignals |
|
114 // ----------------------------------------------------------------------------- |
|
115 // |
|
116 bool VideoProxyModelGeneric::connectSignals() |
|
117 { |
|
118 mConnectSignalsCallCount++; |
|
119 return true; |
|
120 } |
|
121 |
|
122 // ----------------------------------------------------------------------------- |
|
123 // VideoProxyModelGeneric::disconnectSignals |
|
124 // ----------------------------------------------------------------------------- |
|
125 // |
|
126 void VideoProxyModelGeneric::disconnectSignals() |
|
127 { |
|
128 mDisconnectSignalsCallCount++; |
|
129 } |
|
130 |
|
131 // ----------------------------------------------------------------------------- |
|
132 // VideoProxyModelGeneric::processSorting |
|
133 // ----------------------------------------------------------------------------- |
|
134 // |
|
135 void VideoProxyModelGeneric::processSorting() |
|
136 { |
|
137 mProcessSortingCallCount++; |
|
138 } |
|
139 |
|
140 const VideoListDataModel *VideoProxyModelGeneric::sourceModel() const |
|
141 { |
|
142 return mModel; |
|
143 } |
|
144 |
|
145 // End of file |