|
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: VideoProxyModelCollections class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef VIDEOPROXYMODELCOLLETIONS_H |
|
19 #define VIDEOPROXYMODELCOLLETIONS_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <qsortfilterproxymodel.h> |
|
23 #include <mpxitemid.h> |
|
24 #include "videocollectioncommon.h" |
|
25 #include "videoproxymodelgeneric.h" |
|
26 |
|
27 // CLASS DECLARATION |
|
28 class VideoProxyModelCollections : public VideoProxyModelGeneric |
|
29 { |
|
30 Q_OBJECT |
|
31 |
|
32 public: |
|
33 |
|
34 /** |
|
35 * Contructor. |
|
36 * |
|
37 * @param QObject parent object. |
|
38 */ |
|
39 VideoProxyModelCollections(QObject *parent = 0); |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 * |
|
44 */ |
|
45 virtual ~VideoProxyModelCollections(); |
|
46 |
|
47 protected: // from QSortFilterProxyModel |
|
48 |
|
49 /** |
|
50 * Compares items based in the role setted before sorting. |
|
51 * |
|
52 */ |
|
53 bool lessThan(const QModelIndex & left, const QModelIndex & right) const; |
|
54 |
|
55 /** |
|
56 * Filtering functionality. Called by the fw. |
|
57 * |
|
58 * @param source_row row to check |
|
59 * @param source_parent row's parent |
|
60 * |
|
61 * @return bool row accepted(true) or not accepted(false) |
|
62 */ |
|
63 bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const; |
|
64 |
|
65 }; |
|
66 |
|
67 #endif // VIDEOPROXYMODELCOLLETIONS_H |