|
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: LocationPickerAllView declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef LOCATIONPICKERALLVIEW_H |
|
19 #define LOCATIONPICKERALLVIEW_H |
|
20 |
|
21 #include <HbView> |
|
22 #include "locationpickerproxymodel.h" |
|
23 |
|
24 //forward declaration |
|
25 class HbListView; |
|
26 class HbAction; |
|
27 class QStandardItemModel; |
|
28 class LocationPickerAppWindow; |
|
29 class LocationPickerDataManager; |
|
30 |
|
31 /** Class for handling a 'All' view of location picker |
|
32 * |
|
33 */ |
|
34 class LocationPickerAllView : public HbView |
|
35 { |
|
36 Q_OBJECT |
|
37 public: |
|
38 |
|
39 // contructor |
|
40 LocationPickerAllView( LocationPickerAppWindow *aWindow, QGraphicsItem* aParent = 0 ); |
|
41 |
|
42 // destructor |
|
43 ~LocationPickerAllView(); |
|
44 |
|
45 // locationsNotFound |
|
46 bool locationsFound(); |
|
47 |
|
48 private slots: |
|
49 // slot triggered when sort by ascending is selected in menu |
|
50 void sortAscending(); |
|
51 // slot triggered when sort by descending is selected in menu |
|
52 void sortDescending(); |
|
53 |
|
54 // slot to handle select event on a list item |
|
55 void handleActivated( const QModelIndex &aIndex ); |
|
56 |
|
57 private: |
|
58 // used to construct a menu for the view |
|
59 void constructMenu(); |
|
60 |
|
61 private: |
|
62 HbListView *mListView; |
|
63 LocationPickerProxyModel *mProxyModel; |
|
64 QStandardItemModel *mModel; |
|
65 LocationPickerAppWindow *mWindow; |
|
66 LocationPickerDataManager *mDataManager; |
|
67 bool mLocationsFound; |
|
68 HbAction *mSecondaryBackAction; |
|
69 }; |
|
70 |
|
71 |
|
72 #endif // LOCATIONPICKERALLVIEW_H |