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: VideoCollectionWrapper class implementation
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
40
|
18 |
// Version : %version: 31 %
|
36
|
19 |
|
30
|
20 |
// INCLUDE FILES
|
|
21 |
#include <qabstractitemmodel.h>
|
36
|
22 |
|
30
|
23 |
#include "videocollectionwrapper.h"
|
|
24 |
#include "videocollectionwrapper_p.h"
|
|
25 |
#include "videosortfilterproxymodel.h"
|
36
|
26 |
#include "videocollectiontrace.h"
|
30
|
27 |
|
|
28 |
// -----------------------------------------------------------------------------
|
|
29 |
// VideoCollectionWrapper::CVideoCollectionWrapper()
|
|
30 |
// -----------------------------------------------------------------------------
|
|
31 |
//
|
34
|
32 |
VideoCollectionWrapper &VideoCollectionWrapper::instance()
|
30
|
33 |
{
|
36
|
34 |
FUNC_LOG;
|
34
|
35 |
static VideoCollectionWrapper _staticWrapper;
|
30
|
36 |
|
34
|
37 |
return _staticWrapper;
|
30
|
38 |
}
|
|
39 |
|
|
40 |
// -----------------------------------------------------------------------------
|
|
41 |
// VideoCollectionWrapper::VideoCollectionWrapper()
|
|
42 |
// -----------------------------------------------------------------------------
|
|
43 |
//
|
|
44 |
VideoCollectionWrapper::VideoCollectionWrapper() :
|
|
45 |
d( new VideoCollectionWrapperPrivate ),
|
|
46 |
mReferenceCount(0)
|
|
47 |
{
|
36
|
48 |
FUNC_LOG;
|
30
|
49 |
}
|
|
50 |
|
|
51 |
// -----------------------------------------------------------------------------
|
|
52 |
// CVideoCollectionWrapper::~CVideoCollectionWrapper()
|
|
53 |
// -----------------------------------------------------------------------------
|
|
54 |
//
|
|
55 |
VideoCollectionWrapper::~VideoCollectionWrapper()
|
|
56 |
{
|
36
|
57 |
FUNC_LOG;
|
40
|
58 |
delete d;
|
30
|
59 |
}
|
|
60 |
|
|
61 |
// -----------------------------------------------------------------------------
|
|
62 |
// CVideoCollectionWrapper::getModel()
|
|
63 |
// -----------------------------------------------------------------------------
|
|
64 |
//
|
36
|
65 |
VideoSortFilterProxyModel* VideoCollectionWrapper::getModel(VideoCollectionCommon::TModelType type)
|
30
|
66 |
{
|
36
|
67 |
FUNC_LOG;
|
30
|
68 |
if(d)
|
|
69 |
{
|
34
|
70 |
return d->getModel(type);
|
30
|
71 |
}
|
|
72 |
return 0;
|
|
73 |
}
|
|
74 |
|
|
75 |
// -----------------------------------------------------------------------------
|
|
76 |
// VideoCollectionWrapper::sendAsyncStatus()
|
|
77 |
// -----------------------------------------------------------------------------
|
|
78 |
//
|
|
79 |
void VideoCollectionWrapper::sendAsyncStatus(int statusCode, QVariant &additional)
|
|
80 |
{
|
36
|
81 |
FUNC_LOG;
|
30
|
82 |
emit asyncStatus(statusCode, additional);
|
|
83 |
}
|
|
84 |
|
|
85 |
// End of file
|