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 #ifndef __FILTERLISTPROXY_TESTER_H |
|
20 #define __FILTERLISTPROXY_TESTER_H |
|
21 |
|
22 #include <QObject> |
|
23 |
|
24 #include "videocollectioncommon.h" |
|
25 #include "videosortfilterproxymodel.h" |
|
26 |
|
27 class VideoListDataModel; |
|
28 |
|
29 class FilterProxyTester : public VideoSortFilterProxyModel |
|
30 { |
|
31 |
|
32 Q_OBJECT |
|
33 |
|
34 public: // Constructors and destructor |
|
35 |
|
36 /** |
|
37 * Constructor |
|
38 * |
|
39 */ |
|
40 FilterProxyTester(VideoCollectionCommon::TModelType type, QObject *parent=0); |
|
41 |
|
42 /** |
|
43 * destructor |
|
44 * |
|
45 */ |
|
46 virtual ~FilterProxyTester(); |
|
47 |
|
48 public: // helper methods for test |
|
49 |
|
50 /** |
|
51 * Helper method to call protected lessThan |
|
52 * |
|
53 */ |
|
54 bool callLessThan( const QModelIndex & left, const QModelIndex & right ) const; |
|
55 |
|
56 /** |
|
57 * Helper methor to call protected filterAcceptsRow. |
|
58 * |
|
59 */ |
|
60 bool callFilterAcceptsRow( int source_row, const QModelIndex & source_parent ) const; |
|
61 |
|
62 /** |
|
63 * For setting CVideoCollectionClient pointer |
|
64 * |
|
65 */ |
|
66 int setClient(VideoCollectionClient *collectionClient); |
|
67 |
|
68 /** |
|
69 * For getting CVideoCollectionClient pointer |
|
70 * |
|
71 */ |
|
72 VideoCollectionClient* getClient(); |
|
73 |
|
74 }; |
|
75 |
|
76 #endif // __FILTERLISTPROXY_TESTER_H |
|
77 |
|
78 |
|