|
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: LocationPickerDataManager private declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef LOCATIONPICKERDATAMANAGER_P_H |
|
19 #define LOCATIONPICKERDATAMANAGER_P_H |
|
20 |
|
21 #include <QStandardItemModel> |
|
22 #include "locationpickertypes.h" |
|
23 #include "qlocationpickeritem.h" |
|
24 |
|
25 class CPosLmItemIterator; |
|
26 class CPosLandmarkDatabase; |
|
27 class CPosLmCategoryManager; |
|
28 class CPosLandmarkSearch; |
|
29 |
|
30 /** Class used for managing the data of model |
|
31 * |
|
32 */ |
|
33 class LocationPickerDataManagerPrivate |
|
34 { |
|
35 public: |
|
36 // constructors |
|
37 LocationPickerDataManagerPrivate(); |
|
38 LocationPickerDataManagerPrivate( QStandardItemModel &aModel, TViewType aViewType ); |
|
39 |
|
40 // destructor |
|
41 ~LocationPickerDataManagerPrivate(); |
|
42 |
|
43 // populates the model with data |
|
44 bool populateModel( quint32 aCollectionId = 0 ); |
|
45 |
|
46 // gets the data pointed to by index and copies to the aValue |
|
47 void getData(int index, quint32& aValue ); |
|
48 |
|
49 // gets the location item |
|
50 void getLocationItem( quint32 aLmId, QLocationPickerItem &aItem ); |
|
51 |
|
52 private: |
|
53 // populates model |
|
54 bool populateModelL( quint32 aCollectionId ); |
|
55 // populates landmarks |
|
56 void populateLandmarksL(); |
|
57 // populates collections |
|
58 void populateCollectionsL(); |
|
59 // gets the location item |
|
60 void getLocationItemL( quint32 aLmId, QLocationPickerItem &aItem ); |
|
61 |
|
62 private: |
|
63 |
|
64 QStandardItemModel *mModel; |
|
65 TViewType mViewType; |
|
66 CPosLmItemIterator* mIterator; |
|
67 CPosLandmarkDatabase* mLandmarkDb; |
|
68 CPosLmCategoryManager *mLmCategoryManager; |
|
69 CPosLandmarkSearch *mLandmarkSearch; |
|
70 quint32 mCategoryId; |
|
71 }; |
|
72 |
|
73 #endif // LOCATIONPICKERDATAMANAGER_P_H |