videocollection/videocollectionwrapper/tsrc/testvideosortfilterproxymodel/stub/src/filterproxytester.cpp
changeset 62 0e1e938beb1a
parent 59 a76e86df7ccd
child 65 a9d57bd8d7b7
equal deleted inserted replaced
59:a76e86df7ccd 62:0e1e938beb1a
     1 
       
     2 /**
       
     3 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     4 * All rights reserved.
       
     5 * This component and the accompanying materials are made available
       
     6 * under the terms of "Eclipse Public License v1.0"
       
     7 * which accompanies this distribution, and is available
       
     8 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 *
       
    10 * Initial Contributors:
       
    11 * Nokia Corporation - initial contribution.
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description:  Helper class to test protected members from videocollectionsortfilterproxy 
       
    16 * 
       
    17 */
       
    18 
       
    19 // INCLUDES
       
    20 
       
    21 #define private public
       
    22 #include "videosortfilterproxymodel.h"
       
    23 #undef private
       
    24 
       
    25 #include "filterproxytester.h"
       
    26 #include "videolistdatamodel.h"
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 // FilterProxyTester
       
    30 // ---------------------------------------------------------------------------
       
    31 //
       
    32 FilterProxyTester::FilterProxyTester(VideoCollectionCommon::TModelType type, QObject *parent) :
       
    33 VideoSortFilterProxyModel(type, parent)
       
    34 {
       
    35     // NOP
       
    36 }
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // ~FilterProxyTester
       
    40 // ---------------------------------------------------------------------------
       
    41 //
       
    42 FilterProxyTester::~FilterProxyTester()
       
    43 {
       
    44     // NOP
       
    45 }
       
    46 
       
    47 // ---------------------------------------------------------------------------
       
    48 // callLessThan
       
    49 // ---------------------------------------------------------------------------
       
    50 //   
       
    51 bool FilterProxyTester::callLessThan( const QModelIndex & left, const QModelIndex & right ) const
       
    52 {
       
    53     return VideoSortFilterProxyModel::lessThan(left, right);
       
    54 }
       
    55 
       
    56 // ---------------------------------------------------------------------------
       
    57 // callLessThan
       
    58 // ---------------------------------------------------------------------------
       
    59 //   
       
    60 bool FilterProxyTester::callFilterAcceptsRow( int source_row, const QModelIndex & source_parent ) const
       
    61 {
       
    62     return VideoSortFilterProxyModel::filterAcceptsRow(source_row, source_parent);
       
    63 }
       
    64 
       
    65 // ---------------------------------------------------------------------------
       
    66 // setClient
       
    67 // ---------------------------------------------------------------------------
       
    68 //
       
    69 int FilterProxyTester::setClient(VideoCollectionClient *collectionClient)
       
    70 {
       
    71 	VideoSortFilterProxyModel::mCollectionClient = collectionClient;
       
    72 	return 0;
       
    73 }
       
    74 
       
    75 // ---------------------------------------------------------------------------
       
    76 // getClient
       
    77 // ---------------------------------------------------------------------------
       
    78 //
       
    79 VideoCollectionClient* FilterProxyTester::getClient()
       
    80 {
       
    81     return VideoSortFilterProxyModel::mCollectionClient;
       
    82 }
       
    83 
       
    84 // End of file
       
    85     
       
    86 
       
    87