videocollection/videocollectionwrapper/tsrc/testvideoproxymodelcollections/stub/src/videoproxymodelgeneric.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 17 Sep 2010 08:30:05 +0300
changeset 62 0e1e938beb1a
child 63 4707a0db12f6
permissions -rw-r--r--
Revision: 201035 Kit: 201037

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: VideoProxyModelGeneric implementation
*
*/

// Version : 

// INCLUDE FILES
#include <qstringlist.h>
#include <qset.h>
#include <qtimer.h>
#include <qdatetime.h>
#include <vcxmyvideosdefs.h>

#include "videolistdatamodel.h"
#include "videocollectioncommon.h"
#include "videoproxymodelgeneric.h"

const TMPXItemId INVALID_ID = TMPXItemId::InvalidId();

int VideoProxyModelGeneric::mOpenItemCallCount = 0;
int VideoProxyModelGeneric::mGetOpenItemCallCount = 0;
int VideoProxyModelGeneric::mLessThanCallCount = 0;
int VideoProxyModelGeneric::mFilterAcceptsRowCallCount = 0;
int VideoProxyModelGeneric::mConnectSignalsCallCount = 0;
int VideoProxyModelGeneric::mDisconnectSignalsCallCount = 0;
int VideoProxyModelGeneric::mProcessSortingCallCount = 0;

// -----------------------------------------------------------------------------
// VideoProxyModelGeneric::VideoProxyModelGeneric
// -----------------------------------------------------------------------------
//
VideoProxyModelGeneric::VideoProxyModelGeneric(QObject *parent) : 
    mModel(0), 
    mCollectionClient(0),
    mLevel(VideoCollectionCommon::ELevelInvalid),
    mWantedSortOrder(Qt::AscendingOrder),
    mDefaultSortRole(0)        
{
    Q_UNUSED(parent);
}

// -----------------------------------------------------------------------------
// VideoProxyModelGeneric::~VideoProxyModelGeneric
// -----------------------------------------------------------------------------
//
VideoProxyModelGeneric::~VideoProxyModelGeneric()
{
    delete mModel;
    mModel = 0;
}

// -----------------------------------------------------------------------------
// VideoProxyModelGeneric::openItem
// -----------------------------------------------------------------------------
//
int VideoProxyModelGeneric::openItem(TMPXItemId mediaId)
{
    Q_UNUSED(mediaId);
    mOpenItemCallCount++;
    return -1;
}

// -----------------------------------------------------------------------------
// VideoProxyModelGeneric::getOpenItem()
// -----------------------------------------------------------------------------
//
TMPXItemId VideoProxyModelGeneric::getOpenItem() const
{
	mGetOpenItemCallCount++;
    TMPXItemId itemId = TMPXItemId::InvalidId();
    return itemId;
}

// -----------------------------------------------------------------------------
// VideoProxyModelGeneric::lessThan
// -----------------------------------------------------------------------------
//
bool VideoProxyModelGeneric::lessThan(const QModelIndex &left,
    const QModelIndex &right) const
{
    Q_UNUSED(left);
    Q_UNUSED(right);
    mLessThanCallCount++;
    return true;
}

// -----------------------------------------------------------------------------
// VideoProxyModelGeneric::filterAcceptsRow
// -----------------------------------------------------------------------------
//
bool VideoProxyModelGeneric::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
{
    Q_UNUSED(source_row);
    Q_UNUSED(source_parent);
    mFilterAcceptsRowCallCount++;
    return false;
}

// -----------------------------------------------------------------------------
// VideoProxyModelGeneric::connectSignals
// -----------------------------------------------------------------------------
//
bool VideoProxyModelGeneric::connectSignals()
{
    mConnectSignalsCallCount++;
    return true;
}
   
// -----------------------------------------------------------------------------
// VideoProxyModelGeneric::disconnectSignals
// -----------------------------------------------------------------------------
//
void VideoProxyModelGeneric::disconnectSignals()
{
    mDisconnectSignalsCallCount++;
}

// -----------------------------------------------------------------------------
// VideoProxyModelGeneric::processSorting
// -----------------------------------------------------------------------------
//
void VideoProxyModelGeneric::processSorting()
{
    mProcessSortingCallCount++;
}

const VideoListDataModel *VideoProxyModelGeneric::sourceModel() const
{
    return mModel;
}

// End of file