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: stub Videosortfilterproxymodel for VideoCollectionWrapperPrivate unit tests |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef VIDEOSORTFILTERPROXYMODEL_H |
|
19 #define VIDEOSORTFILTERPROXYMODEL_H |
|
20 |
|
21 #include <qsortfilterproxymodel.h> |
|
22 #include <mpxitemid.h> |
|
23 |
|
24 class QTimer; |
|
25 class VideoListDataModel; |
|
26 class VideoCollectionClient; |
|
27 |
|
28 class VideoSortFilterProxyModel : public QObject |
|
29 { |
|
30 Q_OBJECT |
|
31 |
|
32 signals: |
|
33 |
|
34 void shortDetailsReady(TMPXItemId); |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Contructor. |
|
40 * |
|
41 * @param parent parent of this widget |
|
42 * @param client Collection client pointer to use. |
|
43 */ |
|
44 VideoSortFilterProxyModel( int type, QObject *parent=0); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 * |
|
49 */ |
|
50 virtual ~VideoSortFilterProxyModel(); |
|
51 |
|
52 /** |
|
53 * Initializes model, calls initialize to source model, and sets |
|
54 * the given sourceModel as source model for this proxy model. |
|
55 * |
|
56 * @param collection mpx video collectionobject |
|
57 * @param sourceModel the source model |
|
58 * |
|
59 * @return int: 0 if everything ok |
|
60 */ |
|
61 int initialize(VideoListDataModel *sourceModel); |
|
62 |
|
63 public: |
|
64 |
|
65 |
|
66 /** |
|
67 * sets gInitFails |
|
68 * |
|
69 * @param bool |
|
70 */ |
|
71 static void setInitFailure(bool fails); |
|
72 |
|
73 |
|
74 /** |
|
75 * Pointer to the actual model. |
|
76 * Not owned. |
|
77 */ |
|
78 VideoListDataModel *mModel; |
|
79 |
|
80 /** |
|
81 * type |
|
82 */ |
|
83 int mType; |
|
84 |
|
85 }; |
|
86 |
|
87 |
|
88 |
|
89 #endif //VIDEOSORTFILTERPROXYMODEL_H |
|