|
1 /* |
|
2 * Copyright (c) 2010 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: LocationPickerLandscapeView declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef LOCATIONPICKERLANDSCAPEVIEW_H_ |
|
19 #define LOCATIONPICKERLANDSCAPEVIEW_H_ |
|
20 |
|
21 |
|
22 |
|
23 #include <hbview> |
|
24 #include <hbdocumentloader.h> |
|
25 #include "locationpickertypes.h" |
|
26 |
|
27 //forward declarations |
|
28 class HbListView; |
|
29 class QStandardItemModel; |
|
30 class LocationPickerProxyModel; |
|
31 class LocationPickerContent; |
|
32 class LocationPickerCollectionListContent; |
|
33 class LocationPickerCollectionContent; |
|
34 class HbGridViewItem; |
|
35 class HbGridView; |
|
36 class HbAction; |
|
37 |
|
38 /** |
|
39 * Class defines the location picker view |
|
40 */ |
|
41 class LocationPickerLandscapeView : public HbView |
|
42 { |
|
43 |
|
44 Q_OBJECT |
|
45 public: |
|
46 // constructor |
|
47 LocationPickerLandscapeView(HbDocumentLoader* aLoader); |
|
48 // destructor |
|
49 ~LocationPickerLandscapeView(); |
|
50 private: |
|
51 //disable the tabs |
|
52 void disableTabs(); |
|
53 public: |
|
54 //get the items from docml and connect to respective slots |
|
55 void init(Qt::Orientation aOrientation ); |
|
56 //Set the appropriate model on grid view |
|
57 void manageGridView(); |
|
58 //Create collection list and sets to list view |
|
59 void setCollectionData( quint32 aCategoryId ); |
|
60 //Set Ctegory ID |
|
61 void setCategoryID( quint32 aCategoryId ); |
|
62 //Get the view type |
|
63 TViewType getViewType(); |
|
64 //set the view type |
|
65 void setViewType(TViewType aViewType); |
|
66 private slots: |
|
67 //slot to handle list item actions |
|
68 void handleActivated(const QModelIndex &aIndex); |
|
69 //slots to handle menu action items |
|
70 void sortDescending(); |
|
71 void sortAscending(); |
|
72 void backButtonTriggered(); |
|
73 //slot to handle search tab |
|
74 void searchTabTriggered(); |
|
75 public slots: |
|
76 //slot to handle all tab |
|
77 void allTabTriggered(); |
|
78 //slot to handle collection tab |
|
79 void colectionTabTriggered(); |
|
80 signals: |
|
81 void switchToSearchView(); |
|
82 void handleCollectionList(); |
|
83 void selectItem( quint32 aLm ); |
|
84 void completeService(); |
|
85 void sendCategoryID( quint32 acategoryId ); |
|
86 private: |
|
87 //document loader |
|
88 HbDocumentLoader* mDocumentLoader; |
|
89 // all view |
|
90 LocationPickerContent* mLocationPickerContent; |
|
91 // collection list content |
|
92 LocationPickerCollectionListContent* mLocationPickerCollectionListContent; |
|
93 //actions |
|
94 HbAction *mAllAction; |
|
95 HbAction *mCollectionAction; |
|
96 HbAction *mSearchAction; |
|
97 HbAction *mAscendingAction; |
|
98 HbAction *mDescendingAction; |
|
99 //secondary back action |
|
100 HbAction *mLandscapeBackAction; |
|
101 HbGridView *mGridView; |
|
102 //collection content |
|
103 LocationPickerCollectionContent *mCollectionContent; |
|
104 HbGridViewItem *mGridViewItem; |
|
105 //view type |
|
106 TViewType mViewType ; |
|
107 //get the collection/category id |
|
108 quint32 mCategoryId; |
|
109 |
|
110 }; |
|
111 |
|
112 #endif /* LOCATIONPICKERLANDSCAPEVIEW_H_ */ |