|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CNTFAVORITESVIEW_H |
|
19 #define CNTFAVORITESVIEW_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <hbdocumentloader.h> |
|
23 #include <cntabstractview.h> |
|
24 #include <QSet> |
|
25 |
|
26 class HbAction; |
|
27 class HbView; |
|
28 |
|
29 QTM_BEGIN_NAMESPACE |
|
30 class QContact; |
|
31 class QContactManager; |
|
32 QTM_END_NAMESPACE |
|
33 |
|
34 QTM_USE_NAMESPACE |
|
35 |
|
36 class CntFavoritesView : public QObject, public CntAbstractView |
|
37 { |
|
38 friend class TestCntFavoritesView; |
|
39 Q_OBJECT |
|
40 |
|
41 public: |
|
42 CntFavoritesView(); |
|
43 ~CntFavoritesView(); |
|
44 |
|
45 public: // From CntAbstractView |
|
46 void activate( const CntViewParameters aArgs ); |
|
47 void deactivate(); |
|
48 bool isDefault() const { return false; } |
|
49 HbView* view() const { return mView; } |
|
50 int viewId() const { return collectionFavoritesView; } |
|
51 inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; } |
|
52 |
|
53 private slots: |
|
54 void showPreviousView(); |
|
55 void openSelectionPopup(); |
|
56 void handleMemberSelection( QSet<QContactLocalId> aIds ); |
|
57 void setOrientation(Qt::Orientation orientation); |
|
58 |
|
59 private: |
|
60 QContactManager* getContactManager(); |
|
61 |
|
62 #ifdef PBK_UNIT_TEST |
|
63 public: |
|
64 #else |
|
65 private: |
|
66 #endif |
|
67 QContact* mContact; // own |
|
68 HbView* mView; // own |
|
69 HbAction* mSoftkey; |
|
70 CntAbstractViewManager* mViewManager; |
|
71 HbDocumentLoader mDocumentLoader; |
|
72 CntAbstractEngine* mEngine; |
|
73 }; |
|
74 |
|
75 #endif // CNTFAVORITESVIEW_H |
|
76 |
|
77 // EOF |