|
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: VideoCollectionWrapperPrivate class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __VIDEOCOLLECTIONWRAPPERPRIVATE_H__ |
|
19 #define __VIDEOCOLLECTIONWRAPPERPRIVATE_H__ |
|
20 |
|
21 |
|
22 // INCLUDES |
|
23 #include <QObject> |
|
24 #include <QPointer> |
|
25 #include <qabstractitemmodel.h> |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CMPXMediaArray; |
|
30 class CMPXMedia; |
|
31 class VideoListDataModel; |
|
32 class VideoSortFilterProxyModel; |
|
33 |
|
34 // TODO: MVcxNsMyVideosCategoryModelObserver implementation should probably not be in this class |
|
35 class VideoCollectionWrapperPrivate : public QObject |
|
36 { |
|
37 Q_DISABLE_COPY(VideoCollectionWrapperPrivate) |
|
38 |
|
39 /** |
|
40 * define to be able to use signals and slots |
|
41 */ |
|
42 Q_OBJECT |
|
43 |
|
44 public: // Constructor |
|
45 |
|
46 /** |
|
47 * Default constructor |
|
48 */ |
|
49 VideoCollectionWrapperPrivate(); |
|
50 |
|
51 /** |
|
52 * Destructor |
|
53 */ |
|
54 ~VideoCollectionWrapperPrivate(); |
|
55 |
|
56 /** |
|
57 * Returns the pointer into model. Creates the model if it doesn't exists yet. |
|
58 * |
|
59 * @param type type of model |
|
60 * @return address of model, NULL if creation did not succeed. |
|
61 */ |
|
62 VideoSortFilterProxyModel* getModel(int &type); |
|
63 |
|
64 private slots: |
|
65 |
|
66 |
|
67 /** |
|
68 * Signaled when UI environment is about to be destroyed. |
|
69 * Source model needs to be cleaned up before of that |
|
70 * |
|
71 */ |
|
72 void aboutToQuitSlot(); |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * data model for all videos |
|
78 */ |
|
79 QPointer<VideoSortFilterProxyModel> mAllVideosModel; |
|
80 |
|
81 /** |
|
82 * data model for collections |
|
83 */ |
|
84 QPointer<VideoSortFilterProxyModel> mCollectionsModel; |
|
85 |
|
86 /** |
|
87 * data model for collection content |
|
88 */ |
|
89 QPointer<VideoSortFilterProxyModel> mCollectionContentModel; |
|
90 |
|
91 /** |
|
92 * data model for collection content |
|
93 */ |
|
94 QPointer<VideoSortFilterProxyModel> mGenericModel; |
|
95 |
|
96 /** |
|
97 * source model |
|
98 */ |
|
99 QPointer<VideoListDataModel> mSourceModel; |
|
100 |
|
101 }; |
|
102 #endif // __VIDEOCOLLECTIONWRAPPERPRIVATE_H__ |
|
103 |
|
104 // End of file |
|
105 |
|
106 |
|
107 |