videocollection/videocollectionwrapper/tsrc/testvideoproxymodelallvideos/stub/src/videoproxymodelgeneric.cpp
changeset 62 0e1e938beb1a
child 63 4707a0db12f6
equal deleted inserted replaced
59:a76e86df7ccd 62:0e1e938beb1a
       
     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: VideoProxyModelGeneric implementation
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <qstringlist.h>
       
    22 #include <qset.h>
       
    23 #include <qtimer.h>
       
    24 #include <qdatetime.h>
       
    25 #include <vcxmyvideosdefs.h>
       
    26 
       
    27 #include "videolistdatamodel.h"
       
    28 #include "videocollectioncommon.h"
       
    29 #include "videoproxymodelgeneric.h"
       
    30 
       
    31 const TMPXItemId INVALID_ID = TMPXItemId::InvalidId();
       
    32 
       
    33 int VideoProxyModelGeneric::mOpenItemCallCount = 0;
       
    34 int VideoProxyModelGeneric::mGetOpenItemCallCount = 0;
       
    35 int VideoProxyModelGeneric::mLessThanCallCount = 0;
       
    36 int VideoProxyModelGeneric::mFilterAcceptsRowCallCount = 0;
       
    37 int VideoProxyModelGeneric::mConnectSignalsCallCount = 0;
       
    38 int VideoProxyModelGeneric::mDisconnectSignalsCallCount = 0;
       
    39 int VideoProxyModelGeneric::mProcessSortingCallCount = 0;
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // VideoProxyModelGeneric::VideoProxyModelGeneric
       
    43 // -----------------------------------------------------------------------------
       
    44 //
       
    45 VideoProxyModelGeneric::VideoProxyModelGeneric(QObject *parent) : 
       
    46     mModel(0), 
       
    47     mCollectionClient(0)
       
    48 {
       
    49     Q_UNUSED(parent);
       
    50 }
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 // VideoProxyModelGeneric::~VideoProxyModelGeneric
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 VideoProxyModelGeneric::~VideoProxyModelGeneric()
       
    57 {
       
    58     delete mModel;
       
    59     mModel = 0;
       
    60 }
       
    61 
       
    62 // -----------------------------------------------------------------------------
       
    63 // VideoProxyModelGeneric::openItem
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 int VideoProxyModelGeneric::openItem(TMPXItemId mediaId)
       
    67 {
       
    68     Q_UNUSED(mediaId);
       
    69     mOpenItemCallCount++;
       
    70     return -1;
       
    71 }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // VideoProxyModelGeneric::getOpenItem()
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 TMPXItemId VideoProxyModelGeneric::getOpenItem() const
       
    78 {
       
    79 	mGetOpenItemCallCount++;
       
    80     TMPXItemId itemId = TMPXItemId::InvalidId();
       
    81     return itemId;
       
    82 }
       
    83 
       
    84 // -----------------------------------------------------------------------------
       
    85 // VideoProxyModelGeneric::lessThan
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 bool VideoProxyModelGeneric::lessThan(const QModelIndex &left,
       
    89     const QModelIndex &right) const
       
    90 {
       
    91     Q_UNUSED(left);
       
    92     Q_UNUSED(right);
       
    93     mLessThanCallCount++;
       
    94     return false;
       
    95 }
       
    96 
       
    97 // -----------------------------------------------------------------------------
       
    98 // VideoProxyModelGeneric::filterAcceptsRow
       
    99 // -----------------------------------------------------------------------------
       
   100 //
       
   101 bool VideoProxyModelGeneric::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
       
   102 {
       
   103     Q_UNUSED(source_row);
       
   104     Q_UNUSED(source_parent);
       
   105     mFilterAcceptsRowCallCount++;
       
   106     return false;
       
   107 }
       
   108 
       
   109 // -----------------------------------------------------------------------------
       
   110 // VideoProxyModelGeneric::connectSignals
       
   111 // -----------------------------------------------------------------------------
       
   112 //
       
   113 bool VideoProxyModelGeneric::connectSignals()
       
   114 {
       
   115     mConnectSignalsCallCount++;
       
   116     return true;
       
   117 }
       
   118    
       
   119 // -----------------------------------------------------------------------------
       
   120 // VideoProxyModelGeneric::disconnectSignals
       
   121 // -----------------------------------------------------------------------------
       
   122 //
       
   123 void VideoProxyModelGeneric::disconnectSignals()
       
   124 {
       
   125     mDisconnectSignalsCallCount++;
       
   126 }
       
   127 
       
   128 // -----------------------------------------------------------------------------
       
   129 // VideoProxyModelGeneric::processSorting
       
   130 // -----------------------------------------------------------------------------
       
   131 //
       
   132 void VideoProxyModelGeneric::processSorting()
       
   133 {
       
   134     mProcessSortingCallCount++;
       
   135 }
       
   136 
       
   137 const VideoListDataModel *VideoProxyModelGeneric::sourceModel() const
       
   138 {
       
   139     return mModel;
       
   140 }
       
   141 
       
   142 // End of file