|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Phonebook 2 names list not ready state. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "CPbk2NamesListNotReadyState.h" |
|
21 |
|
22 // Phonebook 2 |
|
23 #include "CPbk2ContactViewListBox.h" |
|
24 #include "CPbk2NamesListControl.h" |
|
25 #include <Pbk2MenuFilteringFlags.hrh> |
|
26 #include <Pbk2UIControls.rsg> |
|
27 |
|
28 // System includes |
|
29 #include <AknsDrawUtils.h> |
|
30 #include <aknsfld.h> // CAknSearchField |
|
31 #include <StringLoader.h> |
|
32 |
|
33 // Debugging headers |
|
34 #include <Pbk2Debug.h> |
|
35 |
|
36 |
|
37 /// Unnamed namespace for local definitions |
|
38 namespace { |
|
39 |
|
40 const TInt KNumberOfContacts = 0; |
|
41 const TInt KNumberOfControls = 1; |
|
42 |
|
43 } /// namespace |
|
44 |
|
45 |
|
46 // -------------------------------------------------------------------------- |
|
47 // CPbk2NamesListNotReadyState::CPbk2NamesListNotReadyState |
|
48 // -------------------------------------------------------------------------- |
|
49 // |
|
50 inline CPbk2NamesListNotReadyState::CPbk2NamesListNotReadyState( |
|
51 const CCoeControl& aParent, |
|
52 CPbk2ContactViewListBox& aListBox, |
|
53 CAknSearchField* aFindBox ) : |
|
54 iParent( aParent ), |
|
55 iListBox( aListBox ), |
|
56 iFindBox( aFindBox ) |
|
57 { |
|
58 } |
|
59 |
|
60 // -------------------------------------------------------------------------- |
|
61 // CPbk2NamesListNotReadyState::~CPbk2NamesListNotReadyState |
|
62 // -------------------------------------------------------------------------- |
|
63 // |
|
64 CPbk2NamesListNotReadyState::~CPbk2NamesListNotReadyState() |
|
65 { |
|
66 } |
|
67 |
|
68 // -------------------------------------------------------------------------- |
|
69 // CPbk2NamesListNotReadyState::NewL |
|
70 // -------------------------------------------------------------------------- |
|
71 // |
|
72 CPbk2NamesListNotReadyState* CPbk2NamesListNotReadyState::NewLC |
|
73 ( const CCoeControl* aParent, CPbk2ContactViewListBox& aListBox, |
|
74 CAknSearchField* aFindBox ) |
|
75 { |
|
76 CPbk2NamesListNotReadyState* self = |
|
77 new (ELeave) CPbk2NamesListNotReadyState( |
|
78 *aParent, aListBox, aFindBox ); |
|
79 CleanupStack::PushL( self ); |
|
80 return self; |
|
81 } |
|
82 |
|
83 // -------------------------------------------------------------------------- |
|
84 // CPbk2NamesListNotReadyState::ActivateStateL |
|
85 // -------------------------------------------------------------------------- |
|
86 // |
|
87 void CPbk2NamesListNotReadyState::ActivateStateL() |
|
88 { |
|
89 // Set findbox not focused to prevent cursor blinking in list view. |
|
90 if ( iFindBox && iFindBox->IsFocused() ) |
|
91 { |
|
92 iFindBox->SetFocus( EFalse ); |
|
93 } |
|
94 } |
|
95 |
|
96 // -------------------------------------------------------------------------- |
|
97 // CPbk2NamesListNotReadyState::DeactivateState |
|
98 // -------------------------------------------------------------------------- |
|
99 // |
|
100 void CPbk2NamesListNotReadyState::DeactivateState() |
|
101 { |
|
102 if ( iFindBox && !iFindBox->IsFocused() ) |
|
103 { |
|
104 iFindBox->SetFocus( ETrue ); |
|
105 } |
|
106 } |
|
107 |
|
108 // -------------------------------------------------------------------------- |
|
109 // CPbk2NamesListNotReadyState::CountComponentControls |
|
110 // -------------------------------------------------------------------------- |
|
111 // |
|
112 TInt CPbk2NamesListNotReadyState::CountComponentControls() const |
|
113 { |
|
114 return KNumberOfControls; |
|
115 } |
|
116 |
|
117 // -------------------------------------------------------------------------- |
|
118 // CPbk2NamesListNotReadyState::ComponentControl |
|
119 // -------------------------------------------------------------------------- |
|
120 // |
|
121 CCoeControl* CPbk2NamesListNotReadyState::ComponentControl |
|
122 ( TInt /*aIndex*/ ) const |
|
123 { |
|
124 return &iListBox; |
|
125 } |
|
126 |
|
127 // -------------------------------------------------------------------------- |
|
128 // CPbk2NamesListNotReadyState::SizeChanged |
|
129 // -------------------------------------------------------------------------- |
|
130 // |
|
131 void CPbk2NamesListNotReadyState::SizeChanged() |
|
132 { |
|
133 const TRect rect(iParent.Rect()); |
|
134 PBK2_DEBUG_PRINT(PBK2_DEBUG_STRING |
|
135 ("CPbk2NamesListNotReadyState::SizeChanged(0x%x), rect=(%d,%d,%d,%d)"), |
|
136 this, rect.iTl.iX, rect.iTl.iY, rect.iBr.iX, rect.iBr.iY); |
|
137 |
|
138 AknLayoutUtils::LayoutControl(&iListBox, rect, |
|
139 AKN_LAYOUT_WINDOW_list_gen_pane(0)); |
|
140 } |
|
141 |
|
142 // -------------------------------------------------------------------------- |
|
143 // CPbk2NamesListNotReadyState::MakeComponentsVisible |
|
144 // -------------------------------------------------------------------------- |
|
145 // |
|
146 void CPbk2NamesListNotReadyState::MakeComponentsVisible |
|
147 ( TBool aVisible ) |
|
148 { |
|
149 PBK2_DEBUG_PRINT(PBK2_DEBUG_STRING( |
|
150 "CPbk2NamesListNotReadyState::MakeComponentsVisible(0x%x,%d)"), |
|
151 this, aVisible); |
|
152 |
|
153 iListBox.MakeVisible(aVisible); |
|
154 } |
|
155 |
|
156 // -------------------------------------------------------------------------- |
|
157 // CPbk2NamesListNotReadyState::ActivateL |
|
158 // -------------------------------------------------------------------------- |
|
159 // |
|
160 void CPbk2NamesListNotReadyState::ActivateL() |
|
161 { |
|
162 // Do nothing |
|
163 } |
|
164 |
|
165 // -------------------------------------------------------------------------- |
|
166 // CPbk2NamesListNotReadyState::Draw |
|
167 // -------------------------------------------------------------------------- |
|
168 // |
|
169 void CPbk2NamesListNotReadyState::Draw |
|
170 (const TRect& aRect, CWindowGc& /*aGc*/) const |
|
171 { |
|
172 PBK2_DEBUG_PRINT(PBK2_DEBUG_STRING( |
|
173 "CPbk2NamesListNotReadyState::Draw(0x%x, TRect(%d,%d,%d,%d))"), |
|
174 this, aRect.iTl.iX, aRect.iTl.iY, aRect.iBr.iX, aRect.iBr.iY); |
|
175 } |
|
176 |
|
177 // -------------------------------------------------------------------------- |
|
178 // CPbk2NamesListNotReadyState::OfferKeyEventL |
|
179 // -------------------------------------------------------------------------- |
|
180 // |
|
181 TKeyResponse CPbk2NamesListNotReadyState::OfferKeyEventL |
|
182 (const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/) |
|
183 { |
|
184 return EKeyWasNotConsumed; |
|
185 } |
|
186 |
|
187 // -------------------------------------------------------------------------- |
|
188 // CPbk2NamesListNotReadyState::HandlePointerEventL |
|
189 // -------------------------------------------------------------------------- |
|
190 // |
|
191 void CPbk2NamesListNotReadyState::HandlePointerEventL |
|
192 ( const TPointerEvent& /*aPointerEvent*/ ) |
|
193 { |
|
194 // Do nothing |
|
195 } |
|
196 |
|
197 // -------------------------------------------------------------------------- |
|
198 // CPbk2NamesListNotReadyState::NamesListState |
|
199 // -------------------------------------------------------------------------- |
|
200 // |
|
201 TInt CPbk2NamesListNotReadyState::NamesListState() const |
|
202 { |
|
203 return CPbk2NamesListControl::EStateNotReady; |
|
204 } |
|
205 |
|
206 // -------------------------------------------------------------------------- |
|
207 // CPbk2NamesListNotReadyState::HandleContactViewEventL |
|
208 // -------------------------------------------------------------------------- |
|
209 // |
|
210 void CPbk2NamesListNotReadyState::HandleContactViewEventL |
|
211 ( TInt /*aEvent*/, TInt /*aIndex*/ ) |
|
212 { |
|
213 // Do nothing |
|
214 } |
|
215 |
|
216 // -------------------------------------------------------------------------- |
|
217 // CPbk2NamesListNotReadyState::HandleCommandEventL |
|
218 // -------------------------------------------------------------------------- |
|
219 // |
|
220 void CPbk2NamesListNotReadyState::HandleCommandEventL |
|
221 (TInt /*aEvent*/, TInt /*aListboxIndex*/) |
|
222 { |
|
223 // do nothing |
|
224 } |
|
225 |
|
226 // -------------------------------------------------------------------------- |
|
227 // CPbk2NamesListNotReadyState::CoeControl |
|
228 // -------------------------------------------------------------------------- |
|
229 // |
|
230 CCoeControl& CPbk2NamesListNotReadyState::CoeControl() |
|
231 { |
|
232 return const_cast<CCoeControl&>(iParent); |
|
233 } |
|
234 |
|
235 // -------------------------------------------------------------------------- |
|
236 // CPbk2NamesListNotReadyState::HandleControlEventL |
|
237 // -------------------------------------------------------------------------- |
|
238 // |
|
239 void CPbk2NamesListNotReadyState::HandleControlEventL( |
|
240 CCoeControl* /*aControl*/, |
|
241 MCoeControlObserver::TCoeEvent /*aEventType*/, TInt /*aParam */ ) |
|
242 { |
|
243 // Do nothing |
|
244 } |
|
245 |
|
246 // -------------------------------------------------------------------------- |
|
247 // CPbk2NamesListNotReadyState::TopContactL |
|
248 // -------------------------------------------------------------------------- |
|
249 // |
|
250 const MVPbkViewContact* CPbk2NamesListNotReadyState::TopContactL() |
|
251 { |
|
252 return NULL; |
|
253 } |
|
254 |
|
255 // -------------------------------------------------------------------------- |
|
256 // CPbk2NamesListNotReadyState::ParentControl |
|
257 // -------------------------------------------------------------------------- |
|
258 // |
|
259 MPbk2ContactUiControl* CPbk2NamesListNotReadyState::ParentControl() const |
|
260 { |
|
261 // Names list control does not have a parent control |
|
262 return NULL; |
|
263 } |
|
264 |
|
265 // -------------------------------------------------------------------------- |
|
266 // CPbk2NamesListNotReadyState::NumberOfContacts |
|
267 // -------------------------------------------------------------------------- |
|
268 // |
|
269 TInt CPbk2NamesListNotReadyState::NumberOfContacts() const |
|
270 { |
|
271 return KNumberOfContacts; |
|
272 } |
|
273 |
|
274 // -------------------------------------------------------------------------- |
|
275 // CPbk2NamesListNotReadyState::FocusedContactL |
|
276 // -------------------------------------------------------------------------- |
|
277 // |
|
278 const MVPbkBaseContact* CPbk2NamesListNotReadyState::FocusedContactL() const |
|
279 { |
|
280 return NULL; |
|
281 } |
|
282 |
|
283 // -------------------------------------------------------------------------- |
|
284 // CPbk2NamesListNotReadyState::FocusedViewContactL |
|
285 // -------------------------------------------------------------------------- |
|
286 // |
|
287 const MVPbkViewContact* |
|
288 CPbk2NamesListNotReadyState::FocusedViewContactL() const |
|
289 { |
|
290 return NULL; |
|
291 } |
|
292 |
|
293 // -------------------------------------------------------------------------- |
|
294 // CPbk2NamesListNotReadyState::FocusedStoreContact |
|
295 // -------------------------------------------------------------------------- |
|
296 // |
|
297 const MVPbkStoreContact* |
|
298 CPbk2NamesListNotReadyState::FocusedStoreContact() const |
|
299 { |
|
300 return NULL; |
|
301 } |
|
302 |
|
303 // -------------------------------------------------------------------------- |
|
304 // CPbk2NamesListNotReadyState::SetFocusedContactL |
|
305 // -------------------------------------------------------------------------- |
|
306 // |
|
307 void CPbk2NamesListNotReadyState::SetFocusedContactL |
|
308 ( const MVPbkBaseContact& /*aContact*/ ) |
|
309 { |
|
310 // Do nothing |
|
311 } |
|
312 |
|
313 // -------------------------------------------------------------------------- |
|
314 // CPbk2NamesListNotReadyState::SetFocusedContactL |
|
315 // -------------------------------------------------------------------------- |
|
316 // |
|
317 void CPbk2NamesListNotReadyState::SetFocusedContactL |
|
318 ( const MVPbkContactBookmark& /*aContactBookmark*/ ) |
|
319 { |
|
320 // Do nothing |
|
321 } |
|
322 |
|
323 // -------------------------------------------------------------------------- |
|
324 // CPbk2NamesListNotReadyState::SetFocusedContactL |
|
325 // -------------------------------------------------------------------------- |
|
326 // |
|
327 void CPbk2NamesListNotReadyState::SetFocusedContactL |
|
328 ( const MVPbkContactLink& /*aContactLink*/ ) |
|
329 { |
|
330 // Do nothing |
|
331 } |
|
332 |
|
333 // -------------------------------------------------------------------------- |
|
334 // CPbk2NamesListNotReadyState::NumberOfContactFields |
|
335 // -------------------------------------------------------------------------- |
|
336 // |
|
337 TInt CPbk2NamesListNotReadyState::NumberOfContactFields() const |
|
338 { |
|
339 return KErrNotSupported; |
|
340 } |
|
341 |
|
342 // -------------------------------------------------------------------------- |
|
343 // CPbk2NamesListNotReadyState::FocusedContactIndex |
|
344 // -------------------------------------------------------------------------- |
|
345 // |
|
346 TInt CPbk2NamesListNotReadyState::FocusedContactIndex() const |
|
347 { |
|
348 return KErrNotFound; |
|
349 } |
|
350 |
|
351 // -------------------------------------------------------------------------- |
|
352 // CPbk2NamesListNotReadyState::SetFocusedContactIndexL |
|
353 // -------------------------------------------------------------------------- |
|
354 // |
|
355 void CPbk2NamesListNotReadyState::SetFocusedContactIndexL( TInt /*aIndex*/ ) |
|
356 { |
|
357 // Do nothing |
|
358 } |
|
359 |
|
360 // -------------------------------------------------------------------------- |
|
361 // CPbk2NamesListNotReadyState::FocusedField |
|
362 // -------------------------------------------------------------------------- |
|
363 // |
|
364 const MVPbkBaseContactField* |
|
365 CPbk2NamesListNotReadyState::FocusedField() const |
|
366 { |
|
367 return NULL; |
|
368 } |
|
369 |
|
370 // -------------------------------------------------------------------------- |
|
371 // CPbk2NamesListNotReadyState::FocusedFieldIndex |
|
372 // -------------------------------------------------------------------------- |
|
373 // |
|
374 TInt CPbk2NamesListNotReadyState::FocusedFieldIndex() const |
|
375 { |
|
376 return KErrNotFound; |
|
377 } |
|
378 |
|
379 // -------------------------------------------------------------------------- |
|
380 // CPbk2NamesListNotReadyState::SetFocusedFieldIndex |
|
381 // -------------------------------------------------------------------------- |
|
382 // |
|
383 void CPbk2NamesListNotReadyState::SetFocusedFieldIndex( TInt /*aIndex*/ ) |
|
384 { |
|
385 // Do nothing |
|
386 } |
|
387 |
|
388 // -------------------------------------------------------------------------- |
|
389 // CPbk2NamesListNotReadyState::ContactsMarked |
|
390 // -------------------------------------------------------------------------- |
|
391 // |
|
392 TBool CPbk2NamesListNotReadyState::ContactsMarked() const |
|
393 { |
|
394 return EFalse; |
|
395 } |
|
396 |
|
397 // -------------------------------------------------------------------------- |
|
398 // CPbk2NamesListNotReadyState::SelectedContactsL |
|
399 // -------------------------------------------------------------------------- |
|
400 // |
|
401 MVPbkContactLinkArray* CPbk2NamesListNotReadyState::SelectedContactsL() const |
|
402 { |
|
403 return NULL; |
|
404 } |
|
405 |
|
406 // -------------------------------------------------------------------------- |
|
407 // CPbk2NamesListNotReadyState::SelectedContactsOrFocusedContactL |
|
408 // -------------------------------------------------------------------------- |
|
409 // |
|
410 MVPbkContactLinkArray* CPbk2NamesListNotReadyState:: |
|
411 SelectedContactsOrFocusedContactL() const |
|
412 { |
|
413 return NULL; |
|
414 } |
|
415 |
|
416 // -------------------------------------------------------------------------- |
|
417 // CPbk2NamesListNotReadyState::SelectedContactsIteratorL |
|
418 // -------------------------------------------------------------------------- |
|
419 // |
|
420 MPbk2ContactLinkIterator* |
|
421 CPbk2NamesListNotReadyState::SelectedContactsIteratorL() const |
|
422 { |
|
423 return NULL; |
|
424 } |
|
425 |
|
426 // -------------------------------------------------------------------------- |
|
427 // CPbk2NamesListNotReadyState::SelectedContactStoresL |
|
428 // -------------------------------------------------------------------------- |
|
429 // |
|
430 CArrayPtr<MVPbkContactStore>* |
|
431 CPbk2NamesListNotReadyState::SelectedContactStoresL() const |
|
432 { |
|
433 // This is not a state of the contact store control |
|
434 return NULL; |
|
435 } |
|
436 |
|
437 // -------------------------------------------------------------------------- |
|
438 // CPbk2NamesListNotReadyState::ClearMarks |
|
439 // -------------------------------------------------------------------------- |
|
440 // |
|
441 void CPbk2NamesListNotReadyState::ClearMarks() |
|
442 { |
|
443 // Do nothing |
|
444 } |
|
445 |
|
446 // -------------------------------------------------------------------------- |
|
447 // CPbk2NamesListNotReadyState::SetSelectedContactL |
|
448 // -------------------------------------------------------------------------- |
|
449 // |
|
450 void CPbk2NamesListNotReadyState::SetSelectedContactL( |
|
451 TInt /*aIndex*/, TBool /*aSelected*/) |
|
452 { |
|
453 // Do nothing |
|
454 } |
|
455 |
|
456 // -------------------------------------------------------------------------- |
|
457 // CPbk2NamesListNotReadyState::SetSelectedContactL |
|
458 // -------------------------------------------------------------------------- |
|
459 // |
|
460 void CPbk2NamesListNotReadyState::SetSelectedContactL( |
|
461 const MVPbkContactBookmark& /*aContactBookmark*/, |
|
462 TBool /*aSelected*/ ) |
|
463 { |
|
464 // Do nothing |
|
465 } |
|
466 |
|
467 // -------------------------------------------------------------------------- |
|
468 // CPbk2NamesListNotReadyState::SetSelectedContactL |
|
469 // -------------------------------------------------------------------------- |
|
470 // |
|
471 void CPbk2NamesListNotReadyState::SetSelectedContactL( |
|
472 const MVPbkContactLink& /*aContactLink*/, |
|
473 TBool /*aSelected*/ ) |
|
474 { |
|
475 // Do nothing |
|
476 } |
|
477 |
|
478 TInt CPbk2NamesListNotReadyState::CommandItemCount() const |
|
479 { |
|
480 return 0; // No command items in this state. |
|
481 } |
|
482 |
|
483 const MPbk2UiControlCmdItem& |
|
484 CPbk2NamesListNotReadyState::CommandItemAt( TInt /*aIndex*/ ) const |
|
485 { |
|
486 // There are no command items in this state. |
|
487 __ASSERT_ALWAYS( EFalse, User::Panic( _L("Pbk2"), 2)); //TODO |
|
488 |
|
489 MPbk2UiControlCmdItem* item = NULL; /// For compiler only |
|
490 return *item; // For compiler only |
|
491 } |
|
492 |
|
493 const MPbk2UiControlCmdItem* |
|
494 CPbk2NamesListNotReadyState::FocusedCommandItem() const |
|
495 { |
|
496 // There shouldn't be any command items during this state. |
|
497 return NULL; |
|
498 } |
|
499 |
|
500 void CPbk2NamesListNotReadyState::DeleteCommandItemL( TInt /*aIndex*/ ) |
|
501 { |
|
502 //Do nothing, since there shouldn't be any command items in this state. |
|
503 } |
|
504 |
|
505 void CPbk2NamesListNotReadyState::AddCommandItemL(MPbk2UiControlCmdItem* /*aCommand*/, TInt /*aIndex*/) |
|
506 { |
|
507 //Do nothing, since there shouldn't be any command items in this state. |
|
508 } |
|
509 |
|
510 // -------------------------------------------------------------------------- |
|
511 // CPbk2NamesListNotReadyState::DynInitMenuPaneL |
|
512 // -------------------------------------------------------------------------- |
|
513 // |
|
514 void CPbk2NamesListNotReadyState::DynInitMenuPaneL( |
|
515 TInt aResourceId, CEikMenuPane* aMenuPane) const |
|
516 { |
|
517 AknSelectionService::HandleMarkableListDynInitMenuPane |
|
518 (aResourceId, aMenuPane, &iListBox); |
|
519 } |
|
520 |
|
521 // -------------------------------------------------------------------------- |
|
522 // CPbk2NamesListNotReadyState::ProcessCommandL |
|
523 // -------------------------------------------------------------------------- |
|
524 // |
|
525 void CPbk2NamesListNotReadyState::ProcessCommandL |
|
526 ( TInt /*aCommandId*/ ) const |
|
527 { |
|
528 // Do nothing |
|
529 } |
|
530 |
|
531 // -------------------------------------------------------------------------- |
|
532 // CPbk2NamesListNotReadyState::UpdateAfterCommandExecution |
|
533 // -------------------------------------------------------------------------- |
|
534 // |
|
535 void CPbk2NamesListNotReadyState::UpdateAfterCommandExecution() |
|
536 { |
|
537 // Do nothing |
|
538 } |
|
539 |
|
540 // -------------------------------------------------------------------------- |
|
541 // CPbk2NamesListNotReadyState::GetMenuFilteringFlagsL |
|
542 // -------------------------------------------------------------------------- |
|
543 // |
|
544 TInt CPbk2NamesListNotReadyState::GetMenuFilteringFlagsL() const |
|
545 { |
|
546 return KPbk2ListContainsNoMarkedItems; |
|
547 } |
|
548 |
|
549 |
|
550 // -------------------------------------------------------------------------- |
|
551 // CPbk2NamesListNotReadyState::ControlStateL |
|
552 // -------------------------------------------------------------------------- |
|
553 // |
|
554 CPbk2ViewState* CPbk2NamesListNotReadyState::ControlStateL() const |
|
555 { |
|
556 // State objects do not handle control state changes |
|
557 return NULL; |
|
558 } |
|
559 |
|
560 // -------------------------------------------------------------------------- |
|
561 // CPbk2NamesListNotReadyState::RestoreControlStateL |
|
562 // -------------------------------------------------------------------------- |
|
563 // |
|
564 void CPbk2NamesListNotReadyState::RestoreControlStateL |
|
565 ( CPbk2ViewState* /*aState*/ ) |
|
566 { |
|
567 // State objects do not handle control state changes |
|
568 } |
|
569 |
|
570 // -------------------------------------------------------------------------- |
|
571 // CPbk2NamesListNotReadyState::FindTextL |
|
572 // -------------------------------------------------------------------------- |
|
573 // |
|
574 const TDesC& CPbk2NamesListNotReadyState::FindTextL() |
|
575 { |
|
576 return KNullDesC; |
|
577 } |
|
578 |
|
579 // -------------------------------------------------------------------------- |
|
580 // CPbk2NamesListNotReadyState::ResetFindL |
|
581 // -------------------------------------------------------------------------- |
|
582 // |
|
583 void CPbk2NamesListNotReadyState::ResetFindL() |
|
584 { |
|
585 // Do nothing |
|
586 } |
|
587 |
|
588 // -------------------------------------------------------------------------- |
|
589 // CPbk2NamesListNotReadyState::HideThumbnail |
|
590 // -------------------------------------------------------------------------- |
|
591 // |
|
592 void CPbk2NamesListNotReadyState::HideThumbnail() |
|
593 { |
|
594 // Do nothing |
|
595 } |
|
596 |
|
597 // -------------------------------------------------------------------------- |
|
598 // CPbk2NamesListNotReadyState::ShowThumbnail |
|
599 // -------------------------------------------------------------------------- |
|
600 // |
|
601 void CPbk2NamesListNotReadyState::ShowThumbnail() |
|
602 { |
|
603 // Do nothing |
|
604 } |
|
605 |
|
606 // -------------------------------------------------------------------------- |
|
607 // CPbk2NamesListNotReadyState::SetBlank |
|
608 // -------------------------------------------------------------------------- |
|
609 // |
|
610 void CPbk2NamesListNotReadyState::SetBlank( |
|
611 TBool aBlank ) |
|
612 { |
|
613 if (!aBlank) |
|
614 { |
|
615 // Redraw |
|
616 iParent.DrawDeferred(); |
|
617 TRAPD( error, iListBox.UpdateScrollBarsL() ); |
|
618 if ( error != KErrNone ) |
|
619 { |
|
620 CCoeEnv::Static()->HandleError( error ); |
|
621 } |
|
622 } |
|
623 } |
|
624 |
|
625 // -------------------------------------------------------------------------- |
|
626 // CPbk2NamesListNotReadyState::RegisterCommand |
|
627 // -------------------------------------------------------------------------- |
|
628 // |
|
629 void CPbk2NamesListNotReadyState::RegisterCommand( |
|
630 MPbk2Command* /*aCommand*/) |
|
631 { |
|
632 // Do nothing |
|
633 } |
|
634 |
|
635 // -------------------------------------------------------------------------- |
|
636 // CPbk2NamesListNotReadyState::SetTextL |
|
637 // -------------------------------------------------------------------------- |
|
638 // |
|
639 void CPbk2NamesListNotReadyState::SetTextL( const TDesC& aText ) |
|
640 { |
|
641 iListBox.View()->SetListEmptyTextL( aText ); |
|
642 } |
|
643 // -------------------------------------------------------------------------- |
|
644 // CPbk2NamesListNotReadyState::ContactUiControlExtension |
|
645 // -------------------------------------------------------------------------- |
|
646 // |
|
647 TAny* CPbk2NamesListNotReadyState::ContactUiControlExtension(TUid aExtensionUid ) |
|
648 { |
|
649 if( aExtensionUid == KMPbk2ContactUiControlExtension2Uid ) |
|
650 { |
|
651 return static_cast<MPbk2ContactUiControl2*>( this ); |
|
652 } |
|
653 |
|
654 return NULL; |
|
655 } |
|
656 |
|
657 // -------------------------------------------------------------------------- |
|
658 // CPbk2NamesListNotReadyState::FocusedItemPointed |
|
659 // -------------------------------------------------------------------------- |
|
660 // |
|
661 TBool CPbk2NamesListNotReadyState::FocusedItemPointed() |
|
662 { |
|
663 return EFalse; |
|
664 } |
|
665 |
|
666 // -------------------------------------------------------------------------- |
|
667 // CPbk2NamesListNotReadyState::FocusableItemPointed |
|
668 // -------------------------------------------------------------------------- |
|
669 // |
|
670 TBool CPbk2NamesListNotReadyState::FocusableItemPointed() |
|
671 { |
|
672 return EFalse; |
|
673 } |
|
674 |
|
675 // -------------------------------------------------------------------------- |
|
676 // CPbk2NamesListNotReadyState::SearchFieldPointed |
|
677 // -------------------------------------------------------------------------- |
|
678 // |
|
679 TBool CPbk2NamesListNotReadyState::SearchFieldPointed() |
|
680 { |
|
681 return EFalse; |
|
682 } |
|
683 |
|
684 // -------------------------------------------------------------------------- |
|
685 // CPbk2NamesListNotReadyState::TopViewChangedL |
|
686 // -------------------------------------------------------------------------- |
|
687 // |
|
688 void CPbk2NamesListNotReadyState::TopViewChangedL( |
|
689 MVPbkContactViewBase& /*aOldView*/ ) |
|
690 { |
|
691 // Do nothing |
|
692 } |
|
693 |
|
694 // -------------------------------------------------------------------------- |
|
695 // CPbk2NamesListNotReadyState::TopViewUpdatedL |
|
696 // -------------------------------------------------------------------------- |
|
697 // |
|
698 void CPbk2NamesListNotReadyState::TopViewUpdatedL() |
|
699 { |
|
700 // Do nothing |
|
701 } |
|
702 |
|
703 // -------------------------------------------------------------------------- |
|
704 // CPbk2NamesListNotReadyState::BaseViewChangedL |
|
705 // -------------------------------------------------------------------------- |
|
706 // |
|
707 void CPbk2NamesListNotReadyState::BaseViewChangedL() |
|
708 { |
|
709 // Do nothing |
|
710 } |
|
711 |
|
712 // -------------------------------------------------------------------------- |
|
713 // CPbk2NamesListNotReadyState::ViewStackError |
|
714 // -------------------------------------------------------------------------- |
|
715 // |
|
716 void CPbk2NamesListNotReadyState::ViewStackError( TInt /*aError*/ ) |
|
717 { |
|
718 // Do nothing |
|
719 } |
|
720 |
|
721 // -------------------------------------------------------------------------- |
|
722 // CPbk2NamesListNotReadyState::ContactAddedToBaseView |
|
723 // -------------------------------------------------------------------------- |
|
724 // |
|
725 void CPbk2NamesListNotReadyState::ContactAddedToBaseView( |
|
726 MVPbkContactViewBase& /*aBaseView*/, |
|
727 TInt /*aIndex*/, |
|
728 const MVPbkContactLink& /*aContactLink*/ ) |
|
729 { |
|
730 // Do nothing |
|
731 } |
|
732 |
|
733 // End of File |