|
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 "videoproxymodelcontent.h" |
|
31 #undef private |
|
32 |
|
33 class FilterProxyTester : public VideoProxyModelContent |
|
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 * Helper methor to call protected connectSignals. |
|
68 * |
|
69 */ |
|
70 bool callConnectSignals(); |
|
71 |
|
72 /** |
|
73 * Helper methor to call protected disconnectSignals. |
|
74 * |
|
75 */ |
|
76 void callDisconnectSignals(); |
|
77 |
|
78 |
|
79 }; |
|
80 |
|
81 #endif // __FILTERLISTPROXY_TESTER_H |