videocollection/videocollectionwrapper/src/videocollectionwrapper.cpp
author hgs
Thu, 08 Jul 2010 13:05:19 +0300
changeset 44 518105d52e45
parent 40 13331705e488
child 58 d2b028fd1f7d
permissions -rw-r--r--
201027
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:   VideoCollectionWrapper class implementation
hgs
parents:
diff changeset
    15
* 
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
40
hgs
parents: 36
diff changeset
    18
// Version : %version: 31 %
36
hgs
parents: 34
diff changeset
    19
30
hgs
parents:
diff changeset
    20
// INCLUDE FILES
hgs
parents:
diff changeset
    21
#include <qabstractitemmodel.h>
36
hgs
parents: 34
diff changeset
    22
30
hgs
parents:
diff changeset
    23
#include "videocollectionwrapper.h"
hgs
parents:
diff changeset
    24
#include "videocollectionwrapper_p.h"
hgs
parents:
diff changeset
    25
#include "videosortfilterproxymodel.h"
36
hgs
parents: 34
diff changeset
    26
#include "videocollectiontrace.h"
30
hgs
parents:
diff changeset
    27
hgs
parents:
diff changeset
    28
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    29
// VideoCollectionWrapper::CVideoCollectionWrapper()
hgs
parents:
diff changeset
    30
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    31
//
34
hgs
parents: 30
diff changeset
    32
VideoCollectionWrapper &VideoCollectionWrapper::instance()
30
hgs
parents:
diff changeset
    33
{
36
hgs
parents: 34
diff changeset
    34
	FUNC_LOG;
34
hgs
parents: 30
diff changeset
    35
    static VideoCollectionWrapper _staticWrapper;
30
hgs
parents:
diff changeset
    36
34
hgs
parents: 30
diff changeset
    37
    return _staticWrapper;
30
hgs
parents:
diff changeset
    38
}
hgs
parents:
diff changeset
    39
hgs
parents:
diff changeset
    40
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    41
// VideoCollectionWrapper::VideoCollectionWrapper()
hgs
parents:
diff changeset
    42
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    43
//
hgs
parents:
diff changeset
    44
VideoCollectionWrapper::VideoCollectionWrapper() : 
hgs
parents:
diff changeset
    45
    d( new VideoCollectionWrapperPrivate ),
hgs
parents:
diff changeset
    46
    mReferenceCount(0)
hgs
parents:
diff changeset
    47
{
36
hgs
parents: 34
diff changeset
    48
	FUNC_LOG;
30
hgs
parents:
diff changeset
    49
}
hgs
parents:
diff changeset
    50
hgs
parents:
diff changeset
    51
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    52
// CVideoCollectionWrapper::~CVideoCollectionWrapper()
hgs
parents:
diff changeset
    53
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    54
//
hgs
parents:
diff changeset
    55
VideoCollectionWrapper::~VideoCollectionWrapper()
hgs
parents:
diff changeset
    56
{
36
hgs
parents: 34
diff changeset
    57
	FUNC_LOG;
40
hgs
parents: 36
diff changeset
    58
    delete d;    
30
hgs
parents:
diff changeset
    59
}
hgs
parents:
diff changeset
    60
hgs
parents:
diff changeset
    61
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    62
// CVideoCollectionWrapper::getModel()
hgs
parents:
diff changeset
    63
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    64
//
36
hgs
parents: 34
diff changeset
    65
VideoSortFilterProxyModel* VideoCollectionWrapper::getModel(VideoCollectionCommon::TModelType type)
30
hgs
parents:
diff changeset
    66
{
36
hgs
parents: 34
diff changeset
    67
	FUNC_LOG;
30
hgs
parents:
diff changeset
    68
    if(d)
hgs
parents:
diff changeset
    69
    {
34
hgs
parents: 30
diff changeset
    70
        return d->getModel(type);
30
hgs
parents:
diff changeset
    71
    }
hgs
parents:
diff changeset
    72
    return 0;
hgs
parents:
diff changeset
    73
}
hgs
parents:
diff changeset
    74
hgs
parents:
diff changeset
    75
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    76
// VideoCollectionWrapper::sendAsyncStatus()
hgs
parents:
diff changeset
    77
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    78
//
hgs
parents:
diff changeset
    79
void VideoCollectionWrapper::sendAsyncStatus(int statusCode,  QVariant &additional)
hgs
parents:
diff changeset
    80
{
36
hgs
parents: 34
diff changeset
    81
	FUNC_LOG;
30
hgs
parents:
diff changeset
    82
    emit asyncStatus(statusCode, additional);
hgs
parents:
diff changeset
    83
}
hgs
parents:
diff changeset
    84
hgs
parents:
diff changeset
    85
// End of file