|
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 CNTBASELISTVIEW_H |
|
19 #define CNTBASELISTVIEW_H |
|
20 |
|
21 #include "cntbaseview.h" |
|
22 #include "cntstringmapper.h" |
|
23 |
|
24 #include <hblistview.h> |
|
25 #include <hblabel.h> |
|
26 #include <hbgroupbox.h> |
|
27 #include <hbabstractviewitem.h> |
|
28 |
|
29 // forward declarations |
|
30 class QGraphicsLinearLayout; |
|
31 |
|
32 class CntBaseListView : public CntBaseView |
|
33 { |
|
34 Q_OBJECT |
|
35 |
|
36 public slots: |
|
37 virtual void onLongPressed(HbAbstractViewItem *item, const QPointF &coords); |
|
38 virtual void onListViewActivated(const QModelIndex &index); |
|
39 |
|
40 public: |
|
41 CntBaseListView(CntViewManager *viewManager, QGraphicsItem *parent = 0); |
|
42 ~CntBaseListView(); |
|
43 |
|
44 public: // from CntBaseView |
|
45 virtual void setupView(); |
|
46 virtual void activateView(const CntViewParameters &viewParameters); |
|
47 |
|
48 #ifdef PBK_UNIT_TEST |
|
49 public: |
|
50 #else |
|
51 protected: |
|
52 #endif |
|
53 //layout |
|
54 QGraphicsLinearLayout *listLayout(); |
|
55 virtual void addItemsToLayout(); |
|
56 |
|
57 //banner |
|
58 HbGroupBox *banner(); |
|
59 bool isBannerVisible(); |
|
60 void setBannerVisibility(bool aVisible); |
|
61 void setBannerName(QString aName); |
|
62 QString bannerName(); |
|
63 |
|
64 //list view |
|
65 virtual HbListView *listView(); |
|
66 |
|
67 //model |
|
68 virtual void setDataModel(); |
|
69 virtual void clearDataModelFilter(); |
|
70 |
|
71 #ifdef PBK_UNIT_TEST |
|
72 public: |
|
73 #else |
|
74 private: |
|
75 #endif |
|
76 |
|
77 HbGroupBox *mBanner; |
|
78 bool mHasBanner; |
|
79 QString mBannerName; |
|
80 |
|
81 HbListView *mListView; |
|
82 QGraphicsLinearLayout *mListLayout; |
|
83 CntStringMapper mStringMapper; |
|
84 }; |
|
85 |
|
86 #endif // CNTBASELISTVIEW_H |
|
87 |
|
88 // EOF |