|
1 /* |
|
2 * Copyright (c) 2004-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: Class for Landmarks Package Viewer |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CLMKPACKAGEEDITORIMPL_H |
|
19 #define CLMKPACKAGEEDITORIMPL_H |
|
20 |
|
21 // INCLUDES |
|
22 #include "CLmkEditorImpl.h" |
|
23 #include "MLmkAOOperationObserver.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CLmkParser; |
|
27 class CLmkLandMarkCategoriesName; |
|
28 class CAknWaitDialog; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 * CLmkPackageEditorImpl specific class for viewing/editing a landmark |
|
33 * which exists in the received landmark package. |
|
34 */ |
|
35 class CLmkPackageEditorImpl : public CLmkEditorImpl, |
|
36 public MLmkAOOperationObserver |
|
37 { |
|
38 public: |
|
39 // Constructors and destructor |
|
40 /** |
|
41 * View/edit landmark. User must ensure that aItemIndex is |
|
42 * valid index for a parsed item. |
|
43 * @param aDb |
|
44 * @param aParser |
|
45 * @param aSender landmark sender reference |
|
46 * @param aItemIndex index of item to show in editor |
|
47 * @return newly instantiated object |
|
48 */ |
|
49 IMPORT_C static CLmkPackageEditorImpl* NewL(CPosLandmarkDatabase& aDb, |
|
50 CLmkParser& aParser, CLmkSender& aSender, TInt aItemIndex); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CLmkPackageEditorImpl(); |
|
56 |
|
57 public: |
|
58 //from MLmkAOOperationObserver |
|
59 void HandleOperationL(TOperationTypes aType, TReal32 aProgress, |
|
60 TInt aStatus); |
|
61 |
|
62 protected: |
|
63 // From CAknForm |
|
64 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane); |
|
65 void ProcessCommandL(TInt aCommandId); |
|
66 |
|
67 private: |
|
68 // New functions |
|
69 void SaveLandmarkCmdL(); |
|
70 /** |
|
71 * Sends the current displayed landmark |
|
72 */ |
|
73 void SendLandmarkCmdL(TInt aCommandId); |
|
74 void DimmMenuItemsL(CEikMenuPane* aMenuPane); |
|
75 |
|
76 private: |
|
77 // Constructors and destructor |
|
78 /** |
|
79 * C++ default constructor. |
|
80 * @param aDb |
|
81 * @param aParser |
|
82 * @param aSender landmark sender reference |
|
83 * @param aItemIndex index of item to show in editor |
|
84 * @return newly instantiated object |
|
85 */ |
|
86 CLmkPackageEditorImpl(CPosLandmarkDatabase& aDb, CLmkParser& aParser, |
|
87 CLmkSender& aSender, TInt aItemIndex); |
|
88 |
|
89 /** |
|
90 * By default Symbian 2nd phase constructor is private. |
|
91 |
|
92 */ |
|
93 void ConstructL(); |
|
94 |
|
95 private: |
|
96 //from CLmkEditorImpl |
|
97 void UpdateMskOnArrowMoveForViewerL(); |
|
98 void EnableMskMenuL(); |
|
99 void PostLayoutDynInitL(); |
|
100 |
|
101 #ifdef RD_SCALABLE_UI_V2 |
|
102 protected: |
|
103 // From MEikDialogPageObserver |
|
104 void HandleDialogPageEventL(TInt aEventID); |
|
105 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
106 |
|
107 #endif //RD_SCALABLE_UI_V2 |
|
108 |
|
109 private: |
|
110 // Data |
|
111 ///Ref: landmark package parser |
|
112 CLmkParser& iParser; |
|
113 |
|
114 // edited item's index within parser |
|
115 TInt iItemIndex; |
|
116 |
|
117 ///Owns: parsed landmark |
|
118 CPosLandmark* iLandmark; |
|
119 CLmkLandMarkCategoriesName* iCategoryNameArray; |
|
120 |
|
121 // Owns. |
|
122 CAknWaitDialog* iWaitNote; |
|
123 }; |
|
124 |
|
125 #endif // CLMKPACKAGEEDITORIMPL_H |
|
126 |
|
127 // End of File |