30
|
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: CVideoCollectionWrapper dummy class definition
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef __VIDEOCOLLECTIONWRAPPER_H__
|
|
19 |
#define __VIDEOCOLLECTIONWRAPPER_H__
|
|
20 |
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <QObject>
|
|
24 |
|
36
|
25 |
#include <videocollectioncommon.h>
|
30
|
26 |
|
|
27 |
// FORWARD DECLARATIONS
|
|
28 |
class VideoSortFilterProxyModel;
|
|
29 |
|
|
30 |
|
|
31 |
class VideoCollectionWrapper : public QObject
|
|
32 |
{
|
|
33 |
/**
|
|
34 |
* define to be able to use signals and slots
|
|
35 |
*/
|
|
36 |
Q_OBJECT
|
|
37 |
|
|
38 |
public: // Constructor
|
34
|
39 |
|
|
40 |
enum TModelType
|
|
41 |
{
|
|
42 |
EAllVideos,
|
|
43 |
ECollections,
|
|
44 |
ECollectionContent,
|
|
45 |
EGeneric
|
|
46 |
};
|
30
|
47 |
|
|
48 |
/**
|
|
49 |
* Returns singleton instance for this class.
|
|
50 |
*
|
|
51 |
* WARNING! Not safe to call this from destructor of another function scope static object!
|
|
52 |
*
|
|
53 |
* @return The singleton instance.
|
|
54 |
*/
|
34
|
55 |
static VideoCollectionWrapper &instance();
|
30
|
56 |
|
|
57 |
/**
|
|
58 |
* Returns pointer to model
|
|
59 |
*
|
|
60 |
* @return address to model or NULL if fails.
|
|
61 |
*/
|
36
|
62 |
VideoSortFilterProxyModel* getModel(VideoCollectionCommon::TModelType type);
|
30
|
63 |
|
|
64 |
/* Additional functions needed for testing purposes */
|
|
65 |
|
|
66 |
void reset();
|
|
67 |
|
|
68 |
void setModel(VideoSortFilterProxyModel* model);
|
|
69 |
|
|
70 |
signals:
|
|
71 |
|
|
72 |
private:
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Private contructor.
|
|
76 |
*/
|
|
77 |
VideoCollectionWrapper();
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Private destructor.
|
|
81 |
*
|
|
82 |
*/
|
|
83 |
virtual ~VideoCollectionWrapper();
|
|
84 |
|
|
85 |
/**
|
|
86 |
* disables copy-constructor and assingment operator
|
|
87 |
*/
|
|
88 |
Q_DISABLE_COPY(VideoCollectionWrapper)
|
|
89 |
|
|
90 |
private:
|
|
91 |
|
|
92 |
VideoSortFilterProxyModel* mModel;
|
|
93 |
|
|
94 |
public:
|
|
95 |
|
|
96 |
static VideoCollectionWrapper *mInstance;
|
|
97 |
|
|
98 |
static int mReferenceCount;
|
|
99 |
};
|
|
100 |
|
|
101 |
#endif // __VIDEOCOLLECTIONWRAPPER_H__
|
|
102 |
// End of file
|
|
103 |
|
|
104 |
|
|
105 |
|