videocollection/videocollectionwrapper/tsrc/testvideoproxymodelallvideos/stub/inc/filterproxytester.h
changeset 62 0e1e938beb1a
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 the proxy model 
       
    16 * 
       
    17 */
       
    18 
       
    19 #ifndef __FILTERLISTPROXY_TESTER_H
       
    20 #define __FILTERLISTPROXY_TESTER_H
       
    21 
       
    22 #include <QObject>
       
    23 #include <QModelIndex>
       
    24 
       
    25 #include "videocollectioncommon.h"
       
    26 
       
    27 #include "videoproxymodelgeneric.h"
       
    28 
       
    29 #define private public
       
    30 #include "videoproxymodelallvideos.h"
       
    31 #undef private
       
    32 
       
    33 class  FilterProxyTester : public VideoProxyModelAllVideos
       
    34 {
       
    35 
       
    36     Q_OBJECT
       
    37     
       
    38 public: // Constructors and destructor
       
    39 
       
    40     /**
       
    41      * Constructor
       
    42      *
       
    43      */
       
    44     FilterProxyTester(QObject *parent = 0);
       
    45 
       
    46     /**
       
    47      * destructor
       
    48      *
       
    49      */
       
    50     virtual ~FilterProxyTester();
       
    51 
       
    52 public: // helper methods for test
       
    53 
       
    54     /**
       
    55      * Helper methor to call protected lessThan.
       
    56      * 
       
    57      */
       
    58     bool callLessThan( const QModelIndex & left, const QModelIndex & right ) const;
       
    59     
       
    60     /**
       
    61      * Helper methor to call protected filterAcceptsRow.
       
    62      * 
       
    63      */
       
    64     bool callFilterAcceptsRow( int source_row, const QModelIndex & source_parent ) const;
       
    65 };
       
    66 
       
    67 #endif // __FILTERLISTPROXY_TESTER_H