|
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: VideoProxyModelContent class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef VIDEOPROXYMODELCONTENT_H |
|
19 #define VIDEOPROXYMODELCONTENT_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 VideoProxyModelContent : public VideoProxyModelGeneric |
|
29 { |
|
30 Q_OBJECT |
|
31 |
|
32 public: |
|
33 |
|
34 /** |
|
35 * Contructor. |
|
36 * |
|
37 * @param QObject parent object. |
|
38 */ |
|
39 VideoProxyModelContent(QObject *parent = 0); |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 * |
|
44 */ |
|
45 virtual ~VideoProxyModelContent(); |
|
46 |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Gets the currently opened item. |
|
51 * |
|
52 * @param None. |
|
53 * @return TMPXItemId. |
|
54 */ |
|
55 TMPXItemId getOpenItem() const; |
|
56 |
|
57 protected: |
|
58 |
|
59 /** |
|
60 * Connects all signals emitted from or throught this object. |
|
61 * |
|
62 * @return bool |
|
63 */ |
|
64 bool connectSignals(); |
|
65 |
|
66 /** |
|
67 * Disconnects all signals. |
|
68 */ |
|
69 void disconnectSignals(); |
|
70 |
|
71 protected: // from QSortFilterProxyModel |
|
72 |
|
73 /** |
|
74 * Filtering functionality. Called by the FW. |
|
75 * |
|
76 * @param source_row row to check |
|
77 * @param source_parent row's parent |
|
78 * |
|
79 * @return bool row accepted(true) or not accepted(false) |
|
80 */ |
|
81 bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const; |
|
82 |
|
83 private slots: |
|
84 |
|
85 /** |
|
86 * Signaled when particular album content has changed and |
|
87 * refiltering is required. |
|
88 */ |
|
89 void albumChangedSlot(); |
|
90 |
|
91 }; |
|
92 |
|
93 #endif // VIDEOPROXYMODELCONTENT_H |