25 #include "hb_calencommands.hrh" |
25 #include "hb_calencommands.hrh" |
26 #include "calenservicesimpl.h" |
26 #include "calenservicesimpl.h" |
27 #include "agendaentry.h" |
27 #include "agendaentry.h" |
28 #include "caleneditor.h" |
28 #include "caleneditor.h" |
29 #include "calendateutils.h" |
29 #include "calendateutils.h" |
|
30 #include "OstTraceDefinitions.h" |
|
31 #ifdef OST_TRACE_COMPILER_IN_USE |
|
32 #include "calenedituiTraces.h" |
|
33 #endif |
30 |
34 |
31 // ---------------------------------------------------------------------------- |
35 // ---------------------------------------------------------------------------- |
32 // CCalenEditUi::NewL |
36 // CCalenEditUi::NewL |
33 // First stage construction |
37 // First stage construction |
34 // (other items were commented in a header). |
38 // (other items were commented in a header). |
35 // ---------------------------------------------------------------------------- |
39 // ---------------------------------------------------------------------------- |
36 // |
40 // |
37 CCalenEditUi* CCalenEditUi::NewL( CCalenController& aController ) |
41 CCalenEditUi* CCalenEditUi::NewL( CCalenController& aController ) |
38 { |
42 { |
39 TRACE_ENTRY_POINT; |
43 OstTraceFunctionEntry0( CCALENEDITUI_NEWL_ENTRY ); |
40 |
44 |
41 CCalenEditUi* self = new(ELeave) CCalenEditUi( aController ); |
45 CCalenEditUi* self = new(ELeave) CCalenEditUi( aController ); |
42 CleanupStack::PushL( self ); |
46 CleanupStack::PushL( self ); |
43 self->ConstructL(); |
47 self->ConstructL(); |
44 CleanupStack::Pop( self ); |
48 CleanupStack::Pop( self ); |
45 |
49 |
46 TRACE_EXIT_POINT; |
50 OstTraceFunctionExit0( CCALENEDITUI_NEWL_EXIT ); |
47 return self; |
51 return self; |
48 } |
52 } |
49 |
53 |
50 // ---------------------------------------------------------------------------- |
54 // ---------------------------------------------------------------------------- |
51 // CCalenEditUi::~CCalenEditUi |
55 // CCalenEditUi::~CCalenEditUi |
53 // (other items were commented in a header). |
57 // (other items were commented in a header). |
54 // ---------------------------------------------------------------------------- |
58 // ---------------------------------------------------------------------------- |
55 // |
59 // |
56 CCalenEditUi::~CCalenEditUi() |
60 CCalenEditUi::~CCalenEditUi() |
57 { |
61 { |
58 TRACE_ENTRY_POINT; |
62 OstTraceFunctionEntry0( CCALENEDITUI_CCALENEDITUI_ENTRY ); |
|
63 |
59 iController.CancelNotifications(this); |
64 iController.CancelNotifications(this); |
60 TRACE_EXIT_POINT; |
65 |
|
66 OstTraceFunctionExit0( CCALENEDITUI_CCALENEDITUI_EXIT ); |
61 } |
67 } |
62 |
68 |
63 // ---------------------------------------------------------------------------- |
69 // ---------------------------------------------------------------------------- |
64 // CCalenEditUi::CCalenEditUi |
70 // CCalenEditUi::CCalenEditUi |
65 // Constructor |
71 // Constructor |
67 // ---------------------------------------------------------------------------- |
73 // ---------------------------------------------------------------------------- |
68 // |
74 // |
69 CCalenEditUi::CCalenEditUi( CCalenController& aController ) |
75 CCalenEditUi::CCalenEditUi( CCalenController& aController ) |
70 : iController( aController ) |
76 : iController( aController ) |
71 { |
77 { |
72 TRACE_ENTRY_POINT; |
78 OstTraceFunctionEntry0( DUP1_CCALENEDITUI_CCALENEDITUI_ENTRY ); |
73 TRACE_EXIT_POINT; |
79 |
|
80 OstTraceFunctionExit0( DUP1_CCALENEDITUI_CCALENEDITUI_EXIT ); |
74 } |
81 } |
75 |
82 |
76 // ---------------------------------------------------------------------------- |
83 // ---------------------------------------------------------------------------- |
77 // CCalenEditUi::ConstructL |
84 // CCalenEditUi::ConstructL |
78 // Second stage construction |
85 // Second stage construction |
79 // (other items were commented in a header). |
86 // (other items were commented in a header). |
80 // ---------------------------------------------------------------------------- |
87 // ---------------------------------------------------------------------------- |
81 // |
88 // |
82 void CCalenEditUi::ConstructL() |
89 void CCalenEditUi::ConstructL() |
83 { |
90 { |
84 TRACE_ENTRY_POINT; |
91 OstTraceFunctionEntry0( CCALENEDITUI_CONSTRUCTL_ENTRY ); |
85 |
92 |
86 iController.RegisterForNotificationsL( this, ECalenNotifyDialogClosed ); |
93 iController.RegisterForNotificationsL( this, ECalenNotifyDialogClosed ); |
87 |
94 |
88 TRACE_EXIT_POINT; |
95 OstTraceFunctionExit0( CCALENEDITUI_CONSTRUCTL_EXIT ); |
89 } |
96 } |
90 |
97 |
91 // ---------------------------------------------------------------------------- |
98 // ---------------------------------------------------------------------------- |
92 // CCalenEditUi::HandleActionUiCommandL |
99 // CCalenEditUi::HandleActionUiCommandL |
93 // Handles action ui commands |
100 // Handles action ui commands |
94 // (other items were commented in a header). |
101 // (other items were commented in a header). |
95 // ---------------------------------------------------------------------------- |
102 // ---------------------------------------------------------------------------- |
96 // |
103 // |
97 TBool CCalenEditUi::HandleCommandL( const TCalenCommand& aCommand ) |
104 TBool CCalenEditUi::HandleCommandL( const TCalenCommand& aCommand ) |
98 { |
105 { |
99 TRACE_ENTRY_POINT; |
106 OstTraceFunctionEntry0( CCALENEDITUI_HANDLECOMMANDL_ENTRY ); |
100 |
107 |
101 TBool continueCommand(EFalse); |
108 TBool continueCommand(EFalse); |
102 TInt command = aCommand.Command(); |
109 TInt command = aCommand.Command(); |
103 MCalenContext& context = iController.Services().Context(); |
110 MCalenContext& context = iController.Services().Context(); |
104 AgendaEntry editedEntry; |
111 AgendaEntry editedEntry; |
138 // Controller decided this class was the place to handle this |
145 // Controller decided this class was the place to handle this |
139 // command |
146 // command |
140 break; |
147 break; |
141 } |
148 } |
142 |
149 |
143 TRACE_EXIT_POINT; |
150 OstTraceFunctionExit0( CCALENEDITUI_HANDLECOMMANDL_EXIT ); |
144 return continueCommand; |
151 return continueCommand; |
145 } |
152 } |
146 |
153 |
147 // ---------------------------------------------------------------------------- |
154 // ---------------------------------------------------------------------------- |
148 // CCalenEditUi::handleEntrySaved |
155 // CCalenEditUi::handleEntrySaved |
149 // Issues the entry saved notification after receiving signal from editor. |
156 // Issues the entry saved notification after receiving signal from editor. |
150 // ---------------------------------------------------------------------------- |
157 // ---------------------------------------------------------------------------- |
151 // |
158 // |
152 void CCalenEditUi::handleEntrySaved() |
159 void CCalenEditUi::handleEntrySaved() |
153 { |
160 { |
|
161 OstTraceFunctionEntry0( CCALENEDITUI_HANDLEENTRYSAVED_ENTRY ); |
|
162 |
154 iController.Services().IssueNotificationL(ECalenNotifyEntrySaved); |
163 iController.Services().IssueNotificationL(ECalenNotifyEntrySaved); |
|
164 |
|
165 OstTraceFunctionExit0( CCALENEDITUI_HANDLEENTRYSAVED_EXIT ); |
155 } |
166 } |
156 |
167 |
157 // ---------------------------------------------------------------------------- |
168 // ---------------------------------------------------------------------------- |
158 // CCalenEditUi::handleEntrySaved |
169 // CCalenEditUi::handleEntrySaved |
159 // Issues the dialog closed notification after receiving signal from editor. |
170 // Issues the dialog closed notification after receiving signal from editor. |
160 // ---------------------------------------------------------------------------- |
171 // ---------------------------------------------------------------------------- |
161 // |
172 // |
162 void CCalenEditUi::handleDialogClosed() |
173 void CCalenEditUi::handleDialogClosed() |
163 { |
174 { |
|
175 OstTraceFunctionEntry0( CCALENEDITUI_HANDLEDIALOGCLOSED_ENTRY ); |
|
176 |
164 iController.Services().IssueNotificationL(ECalenNotifyDialogClosed); |
177 iController.Services().IssueNotificationL(ECalenNotifyDialogClosed); |
|
178 |
|
179 OstTraceFunctionExit0( CCALENEDITUI_HANDLEDIALOGCLOSED_EXIT ); |
165 } |
180 } |
166 |
181 |
167 // ---------------------------------------------------------------------------- |
182 // ---------------------------------------------------------------------------- |
168 // CCalenEditUi::HandleNotification |
183 // CCalenEditUi::HandleNotification |
169 // Handle notifications |
184 // Handle notifications |
170 // (other items were commented in a header). |
185 // (other items were commented in a header). |
171 // ---------------------------------------------------------------------------- |
186 // ---------------------------------------------------------------------------- |
172 // |
187 // |
173 void CCalenEditUi::HandleNotification(const TCalenNotification aNotification ) |
188 void CCalenEditUi::HandleNotification(const TCalenNotification aNotification ) |
174 { |
189 { |
175 TRACE_ENTRY_POINT; |
190 OstTraceFunctionEntry0( CCALENEDITUI_HANDLENOTIFICATION_ENTRY ); |
176 |
191 |
177 if( aNotification == ECalenNotifyDialogClosed ) |
192 if( aNotification == ECalenNotifyDialogClosed ) |
178 { |
193 { |
179 iEditor->deleteLater(); |
194 iEditor->deleteLater(); |
180 } |
195 } |
181 TRACE_EXIT_POINT; |
196 |
|
197 OstTraceFunctionExit0( CCALENEDITUI_HANDLENOTIFICATION_EXIT ); |
182 } |
198 } |
183 |
199 |
184 // End of file |
200 // End of file |