|
1 /* |
|
2 * Copyright (c) 2008 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: Declares view class of View architecture for Missed Event view. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CALENMISSEDEVENTVIEW_H |
|
21 #define CALENMISSEDEVENTVIEW_H |
|
22 |
|
23 // Include Files |
|
24 #include <calentoolbar.h> // MCalenToolbarObserver |
|
25 #include "calennativeview.h" |
|
26 |
|
27 //Forward declarations |
|
28 class CAknButton; |
|
29 class CCalenMissedEventViewContainer; |
|
30 |
|
31 // class declaration |
|
32 /** |
|
33 * Declares view for missed event view |
|
34 */ |
|
35 NONSHARABLE_CLASS(CCalenMissedEventView):public CCalenNativeView |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 */ |
|
42 IMPORT_C static CCalenMissedEventView* NewL( MCalenServices& aServices ); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CCalenMissedEventView(); |
|
48 |
|
49 private: |
|
50 |
|
51 /** |
|
52 * By default Symbian OS constructor is private. |
|
53 */ |
|
54 void ConstructL(); |
|
55 |
|
56 /** |
|
57 * C++ constructor. |
|
58 */ |
|
59 CCalenMissedEventView( MCalenServices& aServices ); |
|
60 |
|
61 public: // From CCalenView |
|
62 |
|
63 virtual TNextPopulationStep ActiveStepL(); |
|
64 virtual void CancelPopulation(); |
|
65 virtual TCyclePosition CyclePosition() const; |
|
66 virtual const TDesC& LocalisedViewNameL( CCalenView::TViewName aViewName ); |
|
67 virtual CGulIcon* CCalenMissedEventView::ViewIconL() const; |
|
68 |
|
69 protected: // From CCalenNativeView |
|
70 |
|
71 /** |
|
72 * Clears view specific data |
|
73 */ |
|
74 virtual void ClearViewSpecificDataL(); |
|
75 |
|
76 /** |
|
77 * From CCalenView Second phase DoActivateL |
|
78 */ |
|
79 void DoActivateImplL( const TVwsViewId& aPrevViewId, |
|
80 TUid aCustomMessageId, |
|
81 const TDesC8& aCustomMessage ); |
|
82 |
|
83 /** |
|
84 * From CCalenView Second phase DoDeactivate |
|
85 */ |
|
86 void DoDeactivateImpl(); |
|
87 |
|
88 /** |
|
89 * From CCalenView. Called when locale was changed and |
|
90 * time was crossed over |
|
91 */ |
|
92 void OnLocaleChangedL(TInt aReason); |
|
93 |
|
94 public: // From CCalenView |
|
95 |
|
96 /** |
|
97 * Redraw status pane when Form is closed |
|
98 **/ |
|
99 void RedrawStatusPaneL(); |
|
100 |
|
101 /** |
|
102 * From CCalenView Creates CCalenContainer |
|
103 **/ |
|
104 CCalenContainer* CreateContainerImplL(); |
|
105 |
|
106 /** |
|
107 * From CCalenView. Normal command handling method. |
|
108 * needed for MSK. |
|
109 */ |
|
110 void HandleCommandL(TInt aCommand); |
|
111 |
|
112 public: |
|
113 |
|
114 /** |
|
115 * Update CBA buttons depending |
|
116 */ |
|
117 void UpdateCbaL(); |
|
118 |
|
119 private: // From MEikMenuObserver |
|
120 |
|
121 /** |
|
122 * From MEikMenuObserver Changes MenuPane dynamically |
|
123 */ |
|
124 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
125 |
|
126 private: |
|
127 |
|
128 /** |
|
129 * Returns view uid |
|
130 */ |
|
131 TUid Id() const; |
|
132 |
|
133 /** |
|
134 * Create calendar toolbar buttons |
|
135 */ |
|
136 CAknButton* CreateButtonL( CGulIcon* aIcon, |
|
137 const TDesC& aText, |
|
138 TInt aTooltipID, |
|
139 CAknToolbar& aToolbar ); |
|
140 |
|
141 /** |
|
142 * Removes the event viewer toolbar buttons and unhides the view cycling buttons |
|
143 */ |
|
144 void RemoveToolbarButtonsL(); |
|
145 |
|
146 /** |
|
147 * Adds the necessary toolbar buttons on the existing toolbar for event viewer |
|
148 */ |
|
149 void AddToolbarButtonsL(); |
|
150 |
|
151 private: |
|
152 TVwsViewId iPreviousViewId; |
|
153 enum TPopulationStep |
|
154 { |
|
155 ENothingDone, |
|
156 EBuildTextEditor, |
|
157 ERequestInstanceView, |
|
158 EAddField, |
|
159 EPopulationDone |
|
160 }; |
|
161 TPopulationStep iPopulationStep; |
|
162 TBool iShowCloseButtonOnCba; |
|
163 }; |
|
164 |
|
165 #endif // CALENEVENTVIEW_H |