66
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-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: For Week View of Calendar application.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#include <aknnavi.h>
|
|
20 |
#include <aknnavide.h>
|
|
21 |
#include <bldvariant.hrh> // For FeatureIds (lint warns without)
|
|
22 |
#include <eikmenup.h>
|
|
23 |
#include <eikspane.h>
|
|
24 |
#include <featmgr.h>
|
|
25 |
#include <StringLoader.h>
|
|
26 |
#include <aknappui.h>
|
|
27 |
#include <Calendar.rsg>
|
|
28 |
#include <calencommonui.rsg>
|
|
29 |
#include <calencommands.hrh> // Calendar commands
|
|
30 |
#include <calencontext.h>
|
|
31 |
#include <CalenStatusPaneUtils.h>
|
|
32 |
#include <calenservices.h>
|
|
33 |
#include <caleninstanceid.h>
|
|
34 |
#include <calenviewutils.h>
|
|
35 |
#include <CalenInterimUtils2.h>
|
|
36 |
|
|
37 |
#include "calendarui_debug.h"
|
|
38 |
#include "calenweekview.h"
|
|
39 |
#include "calentitlepane.h"
|
|
40 |
#include "calenweekcontainer.h"
|
|
41 |
#include "calensend.h"
|
|
42 |
#include "ToDo.hrh"
|
|
43 |
#include "CalenUid.h"
|
|
44 |
#include "calendar.hrh"
|
|
45 |
|
|
46 |
|
|
47 |
// Button position of the MSK CBA button
|
|
48 |
const TInt KSK2CBAPosition = 2;
|
|
49 |
|
|
50 |
// LOCAL CONSTANTS AND MACROS
|
|
51 |
#define iWeekContainer static_cast<CCalenWeekContainer*>( iContainer )
|
|
52 |
|
|
53 |
// ================= MEMBER FUNCTIONS =======================
|
|
54 |
|
|
55 |
// ----------------------------------------------------------------------------
|
|
56 |
// CCalenWeekView::NewLC
|
|
57 |
// Two-phased constructor.
|
|
58 |
// (other items were commented in a header).
|
|
59 |
// ----------------------------------------------------------------------------
|
|
60 |
//
|
|
61 |
EXPORT_C CCalenWeekView* CCalenWeekView::NewL( MCalenServices& aServices )
|
|
62 |
{
|
|
63 |
TRACE_ENTRY_POINT;
|
|
64 |
|
|
65 |
CCalenWeekView* self = new(ELeave) CCalenWeekView( aServices );
|
|
66 |
CleanupStack::PushL(self);
|
|
67 |
self->ConstructL();
|
|
68 |
CleanupStack::Pop( self );
|
|
69 |
|
|
70 |
TRACE_EXIT_POINT;
|
|
71 |
return self;
|
|
72 |
}
|
|
73 |
|
|
74 |
// ----------------------------------------------------------------------------
|
|
75 |
// CCalenWeekView::~CCalenWeekView
|
|
76 |
// Destructor.
|
|
77 |
// (other items were commented in a header).
|
|
78 |
// ----------------------------------------------------------------------------
|
|
79 |
//
|
|
80 |
CCalenWeekView::~CCalenWeekView()
|
|
81 |
{
|
|
82 |
TRACE_ENTRY_POINT;
|
|
83 |
TRACE_EXIT_POINT;
|
|
84 |
}
|
|
85 |
|
|
86 |
// ----------------------------------------------------------------------------
|
|
87 |
// CCalenWeekView::CCalenWeekView
|
|
88 |
// C++ constructor can NOT contain any code, that might leave.
|
|
89 |
// (other items were commented in a header).
|
|
90 |
// ----------------------------------------------------------------------------
|
|
91 |
//
|
|
92 |
CCalenWeekView::CCalenWeekView( MCalenServices& aServices )
|
|
93 |
: CCalenNativeView( aServices ),
|
|
94 |
iPopulationStep( ENothingDone )
|
|
95 |
{
|
|
96 |
TRACE_ENTRY_POINT;
|
|
97 |
TRACE_EXIT_POINT;
|
|
98 |
}
|
|
99 |
|
|
100 |
// ----------------------------------------------------------------------------
|
|
101 |
// CCalenWeekView::ConstructL
|
|
102 |
// By default Symbian OS constructor is private.
|
|
103 |
// (other items were commented in a header).
|
|
104 |
// ----------------------------------------------------------------------------
|
|
105 |
//
|
|
106 |
void CCalenWeekView::ConstructL()
|
|
107 |
{
|
|
108 |
TRACE_ENTRY_POINT;
|
|
109 |
|
|
110 |
CommonConstructL( R_CALEN_WEEKVIEW_INFO );
|
|
111 |
//iLocalisedViewName = StringLoader::LoadL( R_CALEN_VIEW_WEEK, iCoeEnv );
|
|
112 |
|
|
113 |
TRACE_EXIT_POINT;
|
|
114 |
}
|
|
115 |
|
|
116 |
// ----------------------------------------------------------------------------
|
|
117 |
// CCalenWeekView::SetStatusPaneFromActiveContextL
|
|
118 |
// Set a date text to StatusPane
|
|
119 |
// (other items were commented in a header).
|
|
120 |
// ----------------------------------------------------------------------------
|
|
121 |
//
|
|
122 |
void CCalenWeekView::SetStatusPaneFromActiveContextL()
|
|
123 |
{
|
|
124 |
TRACE_ENTRY_POINT;
|
|
125 |
|
|
126 |
if( !iWeekContainer->IsVisible() )
|
|
127 |
{
|
|
128 |
return;
|
|
129 |
}
|
|
130 |
|
|
131 |
TTime activeDay = CCalenContainer::DateFromContextL( iServices.Context() );
|
|
132 |
// Title pane
|
|
133 |
CCalenSetting* setting = CCalenSetting::InstanceL();
|
|
134 |
CleanupReleasePushL( *setting );
|
|
135 |
HBufC* title = iSPUtils->WeekNameByActiveTimeL( activeDay,
|
|
136 |
setting->WeekFormat(),
|
|
137 |
setting->WeekTitle() );
|
|
138 |
CleanupStack::PopAndDestroy( setting );
|
|
139 |
CleanupStack::PushL( title );
|
|
140 |
iSPUtils->UnderLineTitleText( EFalse );
|
|
141 |
iSPUtils->SetTitleText( title ); // ownership passed
|
|
142 |
CleanupStack::Pop( title );
|
|
143 |
|
|
144 |
CAknNavigationDecorator* naviLabel = iSPUtils->ShowNaviPaneL( activeDay );
|
|
145 |
|
|
146 |
TTime start = (activeDay);
|
|
147 |
TLocale locale;
|
|
148 |
TInt column(activeDay.DayNoInWeek() - locale.StartOfWeek());
|
|
149 |
if (column < 0)
|
|
150 |
{
|
|
151 |
column += KCalenDaysInWeek;
|
|
152 |
}
|
|
153 |
start -= TTimeIntervalDays(column);
|
|
154 |
|
|
155 |
ShowValidScrollButtons( *naviLabel,
|
|
156 |
start -TTimeIntervalDays(1),
|
|
157 |
start +TTimeIntervalDays( KCalenDaysInWeek ) );
|
|
158 |
|
|
159 |
iSPUtils->RefreshStatusPane();
|
|
160 |
TRACE_EXIT_POINT;
|
|
161 |
}
|
|
162 |
|
|
163 |
// ----------------------------------------------------------------------------
|
|
164 |
// CCalenWeekView::DoActivateImplL
|
|
165 |
// CCalenNativeView::DoActivateL() calls DoActivateImplL()
|
|
166 |
// (other items were commented in a header).
|
|
167 |
// ----------------------------------------------------------------------------
|
|
168 |
//
|
|
169 |
void CCalenWeekView::DoActivateImplL( const TVwsViewId& aPrevViewId,
|
|
170 |
TUid aCustomMessageId,
|
|
171 |
const TDesC8& /*aCustomMessage*/ )
|
|
172 |
{
|
|
173 |
TRACE_ENTRY_POINT;
|
|
174 |
if( aPrevViewId.iAppUid == KUidCalendar ) // switch from internal view
|
|
175 |
{
|
|
176 |
iShowBackButtonOnCba =
|
|
177 |
( aCustomMessageId == KUidCalenShowBackCba ? ETrue : EFalse );
|
|
178 |
}
|
|
179 |
else
|
|
180 |
{
|
|
181 |
iShowBackButtonOnCba = EFalse;
|
|
182 |
}
|
|
183 |
iWeekContainer->SetCursorToActiveDayL();
|
|
184 |
//SetStatusPaneFromActiveContextL();
|
|
185 |
|
|
186 |
TRACE_EXIT_POINT;
|
|
187 |
}
|
|
188 |
|
|
189 |
// ----------------------------------------------------------------------------
|
|
190 |
// CCalenWeekView::DoDeactivateImpl
|
|
191 |
// CCalenNativeView::DoActivateL() calls DoActivateImplL()
|
|
192 |
// (other items were commented in a header).
|
|
193 |
// ----------------------------------------------------------------------------
|
|
194 |
//
|
|
195 |
void CCalenWeekView::DoDeactivateImpl()
|
|
196 |
{
|
|
197 |
TRACE_ENTRY_POINT;
|
|
198 |
|
|
199 |
if (!iAvkonAppUi->IsDisplayingMenuOrDialog())
|
|
200 |
{
|
|
201 |
iSPUtils->HideNaviPane();
|
|
202 |
//iNaviContainer->Pop(iNaviLabel);
|
|
203 |
//delete iNaviLabel;
|
|
204 |
//iNaviLabel = NULL;
|
|
205 |
}
|
|
206 |
|
|
207 |
TRACE_EXIT_POINT;
|
|
208 |
}
|
|
209 |
|
|
210 |
// ----------------------------------------------------------------------------
|
|
211 |
// CCalenWeekView::OnLocaleChangedL
|
|
212 |
// Called when cross over midinight or locale change.
|
|
213 |
// (other items were commented in a header).
|
|
214 |
// ----------------------------------------------------------------------------
|
|
215 |
//
|
|
216 |
void CCalenWeekView::OnLocaleChangedL( TInt aReason )
|
|
217 |
{
|
|
218 |
TRACE_ENTRY_POINT;
|
|
219 |
|
|
220 |
if(!iContainer)
|
|
221 |
{
|
|
222 |
return;
|
|
223 |
}
|
|
224 |
|
|
225 |
if (iContainer->IsVisible())
|
|
226 |
{
|
|
227 |
if (!IsContainerFocused())
|
|
228 |
{
|
|
229 |
iLocChangeReason = EChangesLocale;
|
|
230 |
}
|
|
231 |
else
|
|
232 |
{
|
|
233 |
if (aReason & EChangesLocale)
|
|
234 |
{
|
|
235 |
iWeekContainer->RedrawLocaleChangeL(
|
|
236 |
CCalenWeekContainer::ERedrawAll);
|
|
237 |
}
|
|
238 |
|
|
239 |
if (aReason & EChangesSystemTime)
|
|
240 |
{
|
|
241 |
// iWeekContainer->NotifyDocChange();
|
|
242 |
}
|
|
243 |
else
|
|
244 |
{
|
|
245 |
iWeekContainer->RedrawLocaleChangeL(
|
|
246 |
CCalenWeekContainer::ERedrawWeek);
|
|
247 |
//SetStatusPaneFromActiveContextL();
|
|
248 |
}
|
|
249 |
}
|
|
250 |
}
|
|
251 |
else
|
|
252 |
{
|
|
253 |
iWeekContainer->RedrawLocaleChangeL(
|
|
254 |
CCalenWeekContainer::ERedrawWeek);
|
|
255 |
}
|
|
256 |
|
|
257 |
TRACE_EXIT_POINT;
|
|
258 |
}
|
|
259 |
|
|
260 |
// ----------------------------------------------------------------------------
|
|
261 |
// CCalenWeekView::CreateContainerImplL
|
|
262 |
// Creates CCalenContainer
|
|
263 |
// (other items were commented in a header).
|
|
264 |
// ----------------------------------------------------------------------------
|
|
265 |
//
|
|
266 |
CCalenContainer* CCalenWeekView::CreateContainerImplL()
|
|
267 |
{
|
|
268 |
TRACE_ENTRY_POINT;
|
|
269 |
|
|
270 |
TRACE_EXIT_POINT;
|
|
271 |
return new(ELeave) CCalenWeekContainer( this,
|
|
272 |
iTime,
|
|
273 |
iSelectedRowNumber,
|
|
274 |
iFirstRowTime,
|
|
275 |
iServices );
|
|
276 |
}
|
|
277 |
|
|
278 |
// ----------------------------------------------------------------------------
|
|
279 |
// CCalenWeekView::RedrawStatusPaneL
|
|
280 |
// Redraw status pane when Form is closed
|
|
281 |
// (other items were commented in a header).
|
|
282 |
// ----------------------------------------------------------------------------
|
|
283 |
//
|
|
284 |
void CCalenWeekView::RedrawStatusPaneL()
|
|
285 |
{
|
|
286 |
TRACE_ENTRY_POINT;
|
|
287 |
|
|
288 |
iWeekContainer->RedrawLocaleChangeL(
|
|
289 |
CCalenWeekContainer::ERedrawWeek);
|
|
290 |
SetStatusPaneFromActiveContextL();
|
|
291 |
|
|
292 |
TRACE_EXIT_POINT;
|
|
293 |
}
|
|
294 |
|
|
295 |
// ----------------------------------------------------------------------------
|
|
296 |
// CCalenWeekView::DynInitMenuPaneL
|
|
297 |
// (other items were commented in a header).
|
|
298 |
// ----------------------------------------------------------------------------
|
|
299 |
//
|
|
300 |
void CCalenWeekView::DynInitMenuPaneL(TInt aResourceId,
|
|
301 |
CEikMenuPane* aMenuPane)
|
|
302 |
{
|
|
303 |
TRACE_ENTRY_POINT;
|
|
304 |
|
|
305 |
|
|
306 |
iWeekContainer->HidePopup();
|
|
307 |
|
|
308 |
|
|
309 |
CCalenNativeView::DynInitMenuPaneL(aResourceId, aMenuPane);
|
|
310 |
switch (aResourceId)
|
|
311 |
{
|
|
312 |
case R_CALENDAR_WEEK_MENUPANE:
|
|
313 |
{
|
|
314 |
|
|
315 |
#ifdef RD_CALEN_EXTERNAL_CAL
|
|
316 |
TBool isit=ExtCalendarAvailableL();
|
|
317 |
if (!isit)
|
|
318 |
{
|
|
319 |
ReleaseServiceHandler();
|
|
320 |
TInt dummy;
|
|
321 |
if (aMenuPane->MenuItemExists(ECalenExtAiwCommandId,dummy))
|
|
322 |
{
|
|
323 |
aMenuPane->DeleteMenuItem(ECalenExtAiwCommandId);
|
|
324 |
}
|
|
325 |
}
|
|
326 |
#endif //RD_CALEN_EXTERNAL_CAL
|
|
327 |
|
|
328 |
if ( ! FeatureManager::FeatureSupported(KFeatureIdHelp) )
|
|
329 |
{
|
|
330 |
aMenuPane->DeleteMenuItem(EAknCmdHelp);
|
|
331 |
}
|
|
332 |
if( !iServices.InterimUtilsL().MRViewersEnabledL( ETrue ) )
|
|
333 |
{
|
|
334 |
aMenuPane->DeleteMenuItem( ECalenNewMeetingRequest );
|
|
335 |
}
|
|
336 |
|
|
337 |
// Offer the menu pane to the services for customisation by the
|
|
338 |
// the view manager/plugins
|
|
339 |
iServices.OfferMenuPaneL( aResourceId, aMenuPane );
|
|
340 |
|
|
341 |
break;
|
|
342 |
}
|
|
343 |
default:
|
|
344 |
// Should we do ASSERT( EFalse );
|
|
345 |
break;
|
|
346 |
}
|
|
347 |
|
|
348 |
TRACE_EXIT_POINT;
|
|
349 |
}
|
|
350 |
|
|
351 |
// ----------------------------------------------------------------------------
|
|
352 |
// CCalenWeekView::HandleCommandL
|
|
353 |
// Command handling week view.
|
|
354 |
// We will handle MSK Open here. Other commands are passed to
|
|
355 |
// to the CCalenNativeView.
|
|
356 |
// (other items were commented in a header).
|
|
357 |
// ----------------------------------------------------------------------------
|
|
358 |
//
|
|
359 |
void CCalenWeekView::HandleCommandL( TInt aCommand )
|
|
360 |
{
|
|
361 |
TRACE_ENTRY_POINT;
|
|
362 |
|
|
363 |
switch ( aCommand )
|
|
364 |
{
|
|
365 |
case ECalenForwardsToDayView:
|
|
366 |
case EAknSoftkeyOpen:
|
|
367 |
iWeekContainer->SetActiveContextFromHighlightL();
|
|
368 |
CCalenNativeView::HandleCommandL( ECalenForwardsToDayView );
|
|
369 |
break;
|
|
370 |
|
|
371 |
// Special handling for new timed notes. Instead of creating at 8am on
|
|
372 |
// current day, as per other views, just use the current context time.
|
|
373 |
case ECalenNewMeeting:
|
|
374 |
case ECalenNewMeetingRequest:
|
|
375 |
{
|
|
376 |
// set the editoractive for not showing the preview popup or preview pane
|
|
377 |
SetEditorActive(ETrue);
|
|
378 |
iServices.IssueCommandL( aCommand );
|
|
379 |
}
|
|
380 |
break;
|
|
381 |
case EAknSoftkeyBack:
|
|
382 |
{
|
|
383 |
|
|
384 |
SetCbaL( R_CALEN_MONTH_AND_WEEK_VIEW_CBA );
|
|
385 |
|
|
386 |
iServices.IssueNotificationL(ECalenNotifyWeekViewClosed);
|
|
387 |
}
|
|
388 |
break;
|
|
389 |
default:
|
|
390 |
CCalenNativeView::HandleCommandL( aCommand );
|
|
391 |
break;
|
|
392 |
}
|
|
393 |
|
|
394 |
TRACE_EXIT_POINT;
|
|
395 |
}
|
|
396 |
// ---------------------------------------------------------
|
|
397 |
// CCalenWeekView::UpdateCbaL
|
|
398 |
// Set context menubar and also CBA button back / exit.
|
|
399 |
// (other items were commented in a header).
|
|
400 |
// ---------------------------------------------------------
|
|
401 |
//
|
|
402 |
void CCalenWeekView::UpdateCbaL()
|
|
403 |
{
|
|
404 |
TRACE_ENTRY_POINT;
|
|
405 |
|
|
406 |
if( iShowBackButtonOnCba )
|
|
407 |
{
|
|
408 |
CEikButtonGroupContainer* cba = Cba();
|
|
409 |
cba->SetCommandL( KSK2CBAPosition, R_CALEN_BACK_CBA_BUTTON);
|
|
410 |
cba->DrawNow();
|
|
411 |
}
|
|
412 |
else
|
|
413 |
{
|
|
414 |
SetCbaL(R_CALEN_MONTH_AND_WEEK_VIEW_CBA);
|
|
415 |
}
|
|
416 |
|
|
417 |
TRACE_EXIT_POINT;
|
|
418 |
}
|
|
419 |
|
|
420 |
// ----------------------------------------------------------------------------
|
|
421 |
// CCalenWeekView::Id
|
|
422 |
// From CAknView
|
|
423 |
// Return the UID of the week view
|
|
424 |
// (other items were commented in a header)
|
|
425 |
// ----------------------------------------------------------------------------
|
|
426 |
//
|
|
427 |
TUid CCalenWeekView::Id() const
|
|
428 |
{
|
|
429 |
TRACE_ENTRY_POINT;
|
|
430 |
|
|
431 |
TRACE_EXIT_POINT;
|
|
432 |
return KUidCalenWeekView;
|
|
433 |
}
|
|
434 |
|
|
435 |
// ----------------------------------------------------------------------------
|
|
436 |
// CCalenWeekView::ClearViewSpecificDataL
|
|
437 |
// Clears any cached data for the specific view, e.g. currently
|
|
438 |
// highlighted row, column, etc.
|
|
439 |
// (other items were commented in a header)
|
|
440 |
// ----------------------------------------------------------------------------
|
|
441 |
//
|
|
442 |
void CCalenWeekView::ClearViewSpecificDataL()
|
|
443 |
{
|
|
444 |
TRACE_ENTRY_POINT;
|
|
445 |
|
|
446 |
iTime = Time::NullTTime();
|
|
447 |
iSelectedRowNumber = KErrNotFound;
|
|
448 |
iFirstRowTime = -1;
|
|
449 |
|
|
450 |
TRACE_EXIT_POINT;
|
|
451 |
}
|
|
452 |
|
|
453 |
// ----------------------------------------------------------------------------
|
|
454 |
// CCalenWeekView::IsViewSpecificDataNullL
|
|
455 |
// From CCalenNativeView
|
|
456 |
// Returns ETrue if the view specific data is null, EFalse otherwise.
|
|
457 |
// (other items were commented in a header)
|
|
458 |
// ----------------------------------------------------------------------------
|
|
459 |
//
|
|
460 |
TBool CCalenWeekView::IsViewSpecificDataNullL()
|
|
461 |
{
|
|
462 |
TRACE_ENTRY_POINT;
|
|
463 |
TRACE_EXIT_POINT;
|
|
464 |
return ( iTime == Time::NullTTime() ) &&
|
|
465 |
( iSelectedRowNumber == KErrNotFound ) &&
|
|
466 |
( iFirstRowTime.Int() == -1 );
|
|
467 |
}
|
|
468 |
|
|
469 |
// ----------------------------------------------------------------------------
|
|
470 |
// CCalenWeekView::ActiveStepL
|
|
471 |
// From CCalenView
|
|
472 |
// (other items were commented in a header)
|
|
473 |
// ----------------------------------------------------------------------------
|
|
474 |
//
|
|
475 |
CCalenView::TNextPopulationStep CCalenWeekView::ActiveStepL()
|
|
476 |
{
|
|
477 |
TRACE_ENTRY_POINT;
|
|
478 |
switch( iPopulationStep )
|
|
479 |
{
|
|
480 |
case ENothingDone:
|
|
481 |
{
|
|
482 |
iWeekContainer->CheckLayoutAndExtensionL();
|
|
483 |
|
|
484 |
RArray<TInt> colIdArray;
|
|
485 |
CCalenNativeView::GetActiveCollectionidsL( iServices, colIdArray );
|
|
486 |
if(colIdArray.Count() > 0)
|
|
487 |
{
|
|
488 |
if( !iServices.InstanceViewL(colIdArray) )
|
|
489 |
{
|
|
490 |
colIdArray.Reset();
|
|
491 |
return CCalenView::EWaitForInstanceView;
|
|
492 |
}
|
|
493 |
}
|
|
494 |
else
|
|
495 |
{
|
|
496 |
if( !iServices.InstanceViewL() )
|
|
497 |
{
|
|
498 |
colIdArray.Reset();
|
|
499 |
return CCalenView::EWaitForInstanceView;
|
|
500 |
}
|
|
501 |
}
|
|
502 |
colIdArray.Reset();
|
|
503 |
// else fall through...
|
|
504 |
//lint -fallthrough
|
|
505 |
}
|
|
506 |
case ERequestedInstanceView:
|
|
507 |
{
|
|
508 |
iWeekContainer->BeginPopulationWithInstanceViewL();
|
|
509 |
iPopulationStep = ESlotTable1Next;
|
|
510 |
TRACE_EXIT_POINT;
|
|
511 |
return CCalenView::EWaitForInstanceView;
|
|
512 |
}
|
|
513 |
case ESlotTable1Next:
|
|
514 |
{
|
|
515 |
iWeekContainer->FirstPopulateOfSlotTableL();
|
|
516 |
iPopulationStep = ESlotTable2Next;
|
|
517 |
TRACE_EXIT_POINT;
|
|
518 |
return CCalenView::EKeepGoing;
|
|
519 |
}
|
|
520 |
case ESlotTable2Next:
|
|
521 |
{
|
|
522 |
iWeekContainer->SecondPopulateOfSlotTableL();
|
|
523 |
iPopulationStep = ESetListBoxDataNext;
|
|
524 |
TRACE_EXIT_POINT;
|
|
525 |
return CCalenView::EKeepGoing;
|
|
526 |
}
|
|
527 |
case ESetListBoxDataNext:
|
|
528 |
default:
|
|
529 |
{
|
|
530 |
iWeekContainer->CompletePopulationL();
|
|
531 |
iPopulationStep = EPopulationDone;
|
|
532 |
TRACE_EXIT_POINT;
|
|
533 |
return CCalenView::EDone;
|
|
534 |
}
|
|
535 |
}
|
|
536 |
}
|
|
537 |
|
|
538 |
// ----------------------------------------------------------------------------
|
|
539 |
// CCalenWeekView::CancelPopulation
|
|
540 |
// From CCalenView
|
|
541 |
// (other items were commented in a header)
|
|
542 |
// ----------------------------------------------------------------------------
|
|
543 |
//
|
|
544 |
void CCalenWeekView::CancelPopulation()
|
|
545 |
{
|
|
546 |
TRACE_ENTRY_POINT;
|
|
547 |
|
|
548 |
iPopulationStep = ENothingDone;
|
|
549 |
|
|
550 |
TRACE_EXIT_POINT;
|
|
551 |
}
|
|
552 |
|
|
553 |
// ----------------------------------------------------------------------------
|
|
554 |
// CCalenWeekView::CyclePosition
|
|
555 |
// From CCalenView
|
|
556 |
// (other items were commented in a header)
|
|
557 |
// ----------------------------------------------------------------------------
|
|
558 |
//
|
|
559 |
CCalenView::TCyclePosition CCalenWeekView::CyclePosition() const
|
|
560 |
{
|
|
561 |
TRACE_ENTRY_POINT;
|
|
562 |
TRACE_EXIT_POINT;
|
|
563 |
return CCalenView::EReplaceWeekView;
|
|
564 |
}
|
|
565 |
|
|
566 |
// ----------------------------------------------------------------------------
|
|
567 |
// CCalenWeekView::LocalisedViewNameL
|
|
568 |
// From CCalenView
|
|
569 |
// (other items were commented in a header)
|
|
570 |
// ----------------------------------------------------------------------------
|
|
571 |
//
|
|
572 |
const TDesC& CCalenWeekView::LocalisedViewNameL( CCalenView::TViewName aViewName )
|
|
573 |
{
|
|
574 |
TRACE_ENTRY_POINT;
|
|
575 |
|
|
576 |
HBufC* ret = NULL;
|
|
577 |
|
|
578 |
switch ( aViewName )
|
|
579 |
{
|
|
580 |
case CCalenView::EMenuName:
|
|
581 |
if ( !iMenuName )
|
|
582 |
{
|
|
583 |
iMenuName = StringLoader::LoadL( R_CALEN_VIEW_WEEK, iCoeEnv );
|
|
584 |
}
|
|
585 |
ret = iMenuName;
|
|
586 |
break;
|
|
587 |
case CCalenView::ESettingsName:
|
|
588 |
if ( !iSettingsName )
|
|
589 |
{
|
|
590 |
iSettingsName = StringLoader::LoadL( R_CALEN_QTN_DEFAULT_WEEK_VIEW,
|
|
591 |
iCoeEnv );
|
|
592 |
}
|
|
593 |
ret = iSettingsName;
|
|
594 |
break;
|
|
595 |
default:
|
|
596 |
ASSERT( EFalse );
|
|
597 |
break;
|
|
598 |
}
|
|
599 |
|
|
600 |
TRACE_EXIT_POINT;
|
|
601 |
return *ret;
|
|
602 |
}
|
|
603 |
|
|
604 |
// ----------------------------------------------------------------------------
|
|
605 |
// CCalenWeekView::ViewIcon
|
|
606 |
// From CCalenView
|
|
607 |
// (other items were commented in a header)
|
|
608 |
// ----------------------------------------------------------------------------
|
|
609 |
//
|
|
610 |
CGulIcon* CCalenWeekView::ViewIconL() const
|
|
611 |
{
|
|
612 |
TRACE_ENTRY_POINT;
|
|
613 |
TRACE_EXIT_POINT;
|
|
614 |
return iServices.GetIconL( MCalenServices::ECalenWeekViewIcon );
|
|
615 |
}
|
|
616 |
|
|
617 |
// ----------------------------------------------------------------------------
|
|
618 |
// CCalenWeekView::UpdatePreviewPaneL
|
|
619 |
// Updates preview pane/preview popup
|
|
620 |
// (other items were commented in a header)
|
|
621 |
// ----------------------------------------------------------------------------
|
|
622 |
//
|
|
623 |
void CCalenWeekView::UpdatePreviewPaneL()
|
|
624 |
{
|
|
625 |
TRACE_ENTRY_POINT;
|
|
626 |
|
|
627 |
CCalenWeekContainer* cnt = static_cast<CCalenWeekContainer*>( iContainer );
|
|
628 |
if(cnt)
|
|
629 |
{
|
|
630 |
cnt->UpdatePreviewPaneL();
|
|
631 |
}
|
|
632 |
|
|
633 |
TRACE_EXIT_POINT;
|
|
634 |
}
|
|
635 |
|
|
636 |
// ----------------------------------------------------------------------------
|
|
637 |
// CCalenWeekView::HidePreviewPane
|
|
638 |
// Hides preview pane/preview popup
|
|
639 |
// (other items were commented in a header)
|
|
640 |
// ----------------------------------------------------------------------------
|
|
641 |
//
|
|
642 |
void CCalenWeekView::HidePreviewPane()
|
|
643 |
{
|
|
644 |
TRACE_ENTRY_POINT;
|
|
645 |
|
|
646 |
CCalenWeekContainer* cnt = static_cast<CCalenWeekContainer*>( iContainer );
|
|
647 |
if(cnt)
|
|
648 |
{
|
|
649 |
cnt->HidePopup();
|
|
650 |
}
|
|
651 |
|
|
652 |
TRACE_EXIT_POINT;
|
|
653 |
}
|
|
654 |
|
|
655 |
// End of File
|