85 // Destructor |
86 // Destructor |
86 // --------------------------------------------------------------------------- |
87 // --------------------------------------------------------------------------- |
87 // |
88 // |
88 CAknQueryDialogExtension::~CAknQueryDialogExtension() |
89 CAknQueryDialogExtension::~CAknQueryDialogExtension() |
89 { |
90 { |
|
91 _AKNTRACE( "[%s][%s] do nothing", "CAknQueryDialogExtension", "~CAknQueryDialogExtension" ); |
90 } |
92 } |
91 |
93 |
92 |
94 |
93 // --------------------------------------------------------------------------- |
95 // --------------------------------------------------------------------------- |
94 // Constructor |
96 // Constructor |
95 // --------------------------------------------------------------------------- |
97 // --------------------------------------------------------------------------- |
96 // |
98 // |
97 CAknQueryDialogExtension::CAknQueryDialogExtension |
99 CAknQueryDialogExtension::CAknQueryDialogExtension |
98 (CAknQueryDialog* aQueryDialog) : iParent(aQueryDialog) |
100 (CAknQueryDialog* aQueryDialog) : iParent(aQueryDialog) |
99 { |
101 { |
|
102 _AKNTRACE( "[%s][%s] do nothing", "CAknQueryDialogExtension", "CAknQueryDialogExtension" ); |
100 } |
103 } |
101 |
104 |
102 // --------------------------------------------------------------------------- |
105 // --------------------------------------------------------------------------- |
103 // GetCaptionForFep |
106 // GetCaptionForFep |
104 // Overrides MCoeCaptionRetrieverForFep::GetCaptionForFep |
107 // Overrides MCoeCaptionRetrieverForFep::GetCaptionForFep |
105 // Responsible for retrieving the caption from query dialog to FEP |
108 // Responsible for retrieving the caption from query dialog to FEP |
106 // --------------------------------------------------------------------------- |
109 // --------------------------------------------------------------------------- |
107 // |
110 // |
108 EXPORT_C void CAknQueryDialogExtension::GetCaptionForFep(TDes& aCaption) const |
111 EXPORT_C void CAknQueryDialogExtension::GetCaptionForFep(TDes& aCaption) const |
109 { |
112 { |
|
113 _AKNTRACE( "[%s][%s] enter aCaption:%s", "CAknQueryDialogExtension", "GetCaptionForFep" , &aCaption); |
110 aCaption = KNullDesC; |
114 aCaption = KNullDesC; |
111 |
115 |
112 CAknQueryControl* control = iParent->QueryControl(); |
116 CAknQueryControl* control = iParent->QueryControl(); |
113 if ( control ) |
117 if ( control ) |
114 { |
118 { |
177 // Destructor |
182 // Destructor |
178 // --------------------------------------------------------------------------- |
183 // --------------------------------------------------------------------------- |
179 // |
184 // |
180 CAknMultilineQueryDialogExtension::~CAknMultilineQueryDialogExtension() |
185 CAknMultilineQueryDialogExtension::~CAknMultilineQueryDialogExtension() |
181 { |
186 { |
|
187 _AKNTRACE( "[%s][%s] do nothing", "CAknMultilineQueryDialogExtension", "~CAknMultilineQueryDialogExtension" ); |
182 } |
188 } |
183 |
189 |
184 // --------------------------------------------------------------------------- |
190 // --------------------------------------------------------------------------- |
185 // Constructor |
191 // Constructor |
186 // --------------------------------------------------------------------------- |
192 // --------------------------------------------------------------------------- |
187 // |
193 // |
188 CAknMultilineQueryDialogExtension::CAknMultilineQueryDialogExtension |
194 CAknMultilineQueryDialogExtension::CAknMultilineQueryDialogExtension |
189 (CAknQueryDialog* aQueryDialog, TInt aQueryType):CAknQueryDialogExtension(aQueryDialog),iQueryType(aQueryType) |
195 (CAknQueryDialog* aQueryDialog, TInt aQueryType):CAknQueryDialogExtension(aQueryDialog),iQueryType(aQueryType) |
190 { |
196 { |
|
197 _AKNTRACE( "[%s][%s] do nothing", "CAknMultilineQueryDialogExtension", "CAknMultilineQueryDialogExtension" ); |
191 } |
198 } |
192 |
199 |
193 // --------------------------------------------------------------------------- |
200 // --------------------------------------------------------------------------- |
194 // GetCaptionForFep |
201 // GetCaptionForFep |
195 // Overrides MCoeCaptionRetrieverForFep::GetCaptionForFep |
202 // Overrides MCoeCaptionRetrieverForFep::GetCaptionForFep |
441 * compiler will complain if this is not implemented in |
458 * compiler will complain if this is not implemented in |
442 * derived class as well |
459 * derived class as well |
443 */ |
460 */ |
444 EXPORT_C TInt CAknQueryDialog::ExecuteLD(TInt aResourceId) |
461 EXPORT_C TInt CAknQueryDialog::ExecuteLD(TInt aResourceId) |
445 { |
462 { |
|
463 _AKNTRACE_FUNC_ENTER; |
|
464 _AKNTRACE( "[%s][%s] aResourceId: %d", "CAknQueryDialog", __FUNCTION__, aResourceId ); |
446 PrepareLC(aResourceId); |
465 PrepareLC(aResourceId); |
447 return(RunLD()); |
466 TInt ret = RunLD(); |
|
467 _AKNTRACE( "[%s][%s] ret:%d", "CAknQueryDialog", __FUNCTION__,ret ); |
|
468 _AKNTRACE_FUNC_EXIT; |
|
469 return ret; |
448 } |
470 } |
449 |
471 |
450 /** |
472 /** |
451 * Call PrepareLC, set the prompt and display dialog. |
473 * Call PrepareLC, set the prompt and display dialog. |
452 */ |
474 */ |
453 EXPORT_C TInt CAknQueryDialog::ExecuteLD(TInt aResourceId,const TDesC& aPrompt) |
475 EXPORT_C TInt CAknQueryDialog::ExecuteLD(TInt aResourceId,const TDesC& aPrompt) |
454 { |
476 { |
|
477 _AKNTRACE_FUNC_ENTER; |
455 PrepareLC(aResourceId); |
478 PrepareLC(aResourceId); |
456 SetPromptL(aPrompt); |
479 SetPromptL(aPrompt); |
457 return(RunLD()); |
480 _AKNTRACE( "[%s][%s] aResourceId: %d", "CAknQueryDialog", __FUNCTION__, aResourceId ); |
|
481 TInt ret= RunLD(); |
|
482 _AKNTRACE( "[%s][%s] ret:%d", "CAknQueryDialog", __FUNCTION__,ret ); |
|
483 _AKNTRACE_FUNC_EXIT; |
|
484 return ret; |
458 } |
485 } |
459 /** |
486 /** |
460 * Get layout information from the control and use this layout |
487 * Get layout information from the control and use this layout |
461 * information to do layout. If there is a heading, add the |
488 * information to do layout. If there is a heading, add the |
462 * heading height to the height returned by the control layout |
489 * heading height to the height returned by the control layout |
491 control->MopGetObject( dialog ); |
519 control->MopGetObject( dialog ); |
492 if ( dialog && ( dialog->DialogFlags() & EEikDialogFlagVirtualInput ) ) |
520 if ( dialog && ( dialog->DialogFlags() & EEikDialogFlagVirtualInput ) ) |
493 { |
521 { |
494 TAknWindowLineLayout lay = AknLayoutScalable_Avkon::application_window(0); |
522 TAknWindowLineLayout lay = AknLayoutScalable_Avkon::application_window(0); |
495 TRect re(0, 0, lay.iW, lay.iH); |
523 TRect re(0, 0, lay.iW, lay.iH); |
|
524 _AKNTRACE( "[%s][%s] Rect: x[%d],y[%d],w[%d],h[%d]", "CAknQueryDialog", __FUNCTION__, |
|
525 re.iTl.iX, re.iTl.iY, re.Width(),re.Height()); |
496 SetRect(re); |
526 SetRect(re); |
|
527 _AKNTRACE_FUNC_EXIT; |
497 return; |
528 return; |
498 } |
529 } |
499 } |
530 } |
500 #endif |
531 #endif |
501 TAknWindowLineLayout windowLineLayoutScreen = AknLayoutScalable_Avkon::Screen().LayoutLine(); |
532 TAknWindowLineLayout windowLineLayoutScreen = AknLayoutScalable_Avkon::Screen().LayoutLine(); |
502 TRect rectZero = TRect(0,0,0,0); |
533 TRect rectZero = TRect(0,0,0,0); |
503 TAknLayoutRect layoutRect; |
534 TAknLayoutRect layoutRect; |
504 layoutRect.LayoutRect( rectZero, windowLineLayoutScreen ); |
535 layoutRect.LayoutRect( rectZero, windowLineLayoutScreen ); |
505 TRect rectScreen( layoutRect.Rect() ); |
536 TRect rectScreen( layoutRect.Rect() ); |
506 TSize maxSize = rectScreen.Size(); |
537 TSize maxSize = rectScreen.Size(); |
507 |
538 _AKNTRACE( "[%s][%s] maxSize: w[%d],h[%d]", "CAknQueryDialog", __FUNCTION__, |
|
539 maxSize.iWidth,maxSize.iHeight); |
508 if ( AknLayoutUtils::PenEnabled() ) |
540 if ( AknLayoutUtils::PenEnabled() ) |
509 { |
541 { |
510 CAknDialog::SetSizeAndPosition( PreferredSize( maxSize ) ); |
542 TSize preferredSize = PreferredSize( maxSize ); |
|
543 |
|
544 _AKNTRACE( "[%s][%s] call CAknDialog::SetSizeAndPosition( PreferredSize( w[%d],h[%d] ) )", "CAknQueryDialog", |
|
545 __FUNCTION__, preferredSize.iWidth, preferredSize.iHeight); |
|
546 |
|
547 CAknDialog::SetSizeAndPosition( preferredSize ); |
511 } |
548 } |
512 else |
549 else |
513 { |
550 { |
514 TAknWindowLineLayout layout; |
551 TAknWindowLineLayout layout; |
515 control->WindowLayout( layout ); |
552 control->WindowLayout( layout ); |
528 TAknLayoutRect headingLayoutRect; |
565 TAknLayoutRect headingLayoutRect; |
529 headingLayoutRect.LayoutRect(mainPane, |
566 headingLayoutRect.LayoutRect(mainPane, |
530 AknLayoutScalable_Avkon::heading_pane(0)); |
567 AknLayoutScalable_Avkon::heading_pane(0)); |
531 winRect.iTl.iY -= headingLayoutRect.Rect().Height(); |
568 winRect.iTl.iY -= headingLayoutRect.Rect().Height(); |
532 } |
569 } |
|
570 _AKNTRACE( "[%s][%s] Rect: x[%d],y[%d],w[%d],h[%d]", "CAknQueryDialog", __FUNCTION__, |
|
571 winRect.iTl.iX, winRect.iTl.iY, winRect.Width(),winRect.Height()); |
533 SetRect(winRect); |
572 SetRect(winRect); |
534 } |
573 } |
535 } |
574 } |
|
575 _AKNTRACE_FUNC_EXIT; |
536 } |
576 } |
537 |
577 |
538 /** |
578 /** |
539 * |
579 * |
540 */ |
580 */ |
541 EXPORT_C void CAknQueryDialog::PreLayoutDynInitL() |
581 EXPORT_C void CAknQueryDialog::PreLayoutDynInitL() |
542 { |
582 { |
|
583 _AKNTRACE_FUNC_ENTER; |
543 SetBorder( TGulBorder::ENone ); |
584 SetBorder( TGulBorder::ENone ); |
544 SetEditableL( ETrue ) ; |
585 SetEditableL( ETrue ) ; |
545 DoSetPromptL(); |
586 DoSetPromptL(); |
546 |
587 |
547 CAknQueryControl* control = QueryControl(); |
588 CAknQueryControl* control = QueryControl(); |
562 |
603 |
563 // Create CaptionRetriever for FEP |
604 // Create CaptionRetriever for FEP |
564 delete iExtension; |
605 delete iExtension; |
565 iExtension = NULL; |
606 iExtension = NULL; |
566 iExtension = new(ELeave) CAknQueryDialogExtension(this); |
607 iExtension = new(ELeave) CAknQueryDialogExtension(this); |
|
608 _AKNTRACE_FUNC_EXIT; |
567 } |
609 } |
568 |
610 |
569 /** |
611 /** |
570 * |
612 * |
571 */ |
613 */ |
572 EXPORT_C void CAknQueryDialog::PostLayoutDynInitL() |
614 EXPORT_C void CAknQueryDialog::PostLayoutDynInitL() |
573 { |
615 { |
|
616 _AKNTRACE_FUNC_ENTER; |
574 CAknQueryControl* control = QueryControl(); |
617 CAknQueryControl* control = QueryControl(); |
575 if (control) |
618 if (control) |
576 control->StartAnimationL(); |
619 control->StartAnimationL(); |
577 |
620 _AKNTRACE_FUNC_EXIT; |
578 } |
621 } |
579 |
622 |
580 /** |
623 /** |
581 * |
624 * |
582 */ |
625 */ |
583 EXPORT_C TKeyResponse CAknQueryDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent, |
626 EXPORT_C TKeyResponse CAknQueryDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent, |
584 TEventCode aType) |
627 TEventCode aType) |
585 { |
628 { |
|
629 _AKNTRACE( "[%s][%s] aKeyEvent.iCode[%d],aType[%d]", "CAknQueryDialog", __FUNCTION__,aKeyEvent.iCode, aType); |
586 if( NeedToDismissQueryL(aKeyEvent) ) |
630 if( NeedToDismissQueryL(aKeyEvent) ) |
587 return EKeyWasConsumed; |
631 { |
588 |
632 _AKNTRACE( "[%s][%s] Need Dismiss Query, return EKeyWasConsumed", "CAknQueryDialog", __FUNCTION__); |
|
633 return EKeyWasConsumed; |
|
634 } |
|
635 |
589 if (aType == EEventKey && aKeyEvent.iCode == EKeyOK) |
636 if (aType == EEventKey && aKeyEvent.iCode == EKeyOK) |
590 { |
637 { |
591 CAknQueryControl* control = QueryControl(); |
638 CAknQueryControl* control = QueryControl(); |
592 if (control) |
639 if (control) |
593 { |
640 { |
594 if (IsLeftSoftkeyVisible()) |
641 if (IsLeftSoftkeyVisible()) |
595 { |
642 { |
596 TryExitL(EEikBidOk); |
643 TryExitL(EEikBidOk); |
|
644 _AKNTRACE( "[%s][%s] TryExitL(EEikBidOk) and reutrn EKeyWasConsumed", "CAknQueryDialog", __FUNCTION__); |
597 return EKeyWasConsumed; |
645 return EKeyWasConsumed; |
598 } |
646 } |
599 } |
647 } |
600 } |
648 } |
601 else if ( aType == EEventKey && aKeyEvent.iCode == EKeyEnter ) |
649 else if ( aType == EEventKey && aKeyEvent.iCode == EKeyEnter ) |
605 if (control) |
653 if (control) |
606 { |
654 { |
607 if (IsLeftSoftkeyVisible()) |
655 if (IsLeftSoftkeyVisible()) |
608 { |
656 { |
609 TryExitL(EEikBidOk); |
657 TryExitL(EEikBidOk); |
|
658 _AKNTRACE( "[%s][%s] TryExitL(EEikBidOk) and reutrn EKeyWasConsumed", "CAknQueryDialog", __FUNCTION__); |
610 return EKeyWasConsumed; |
659 return EKeyWasConsumed; |
611 } |
660 } |
612 } |
661 } |
613 } |
662 } |
614 |
663 TKeyResponse response = CAknDialog::OfferKeyEventL(aKeyEvent,aType); |
615 |
664 _AKNTRACE( "[%s][%s] return [%d]", "CAknQueryDialog", __FUNCTION__, response); |
616 return CAknDialog::OfferKeyEventL(aKeyEvent,aType); |
665 return response; |
617 } |
666 } |
618 |
667 |
619 /** |
668 /** |
620 * Allows dismissing of queries. Only mandatory requirement is that PIN |
669 * Allows dismissing of queries. Only mandatory requirement is that PIN |
621 * queries are dismissed by the # key. Clients can |
670 * queries are dismissed by the # key. Clients can |
622 * override this and implement something different. |
671 * override this and implement something different. |
623 * |
672 * |
624 */ |
673 */ |
625 EXPORT_C TBool CAknQueryDialog::NeedToDismissQueryL(const TKeyEvent& aKeyEvent) |
674 EXPORT_C TBool CAknQueryDialog::NeedToDismissQueryL(const TKeyEvent& aKeyEvent) |
626 { |
675 { |
|
676 _AKNTRACE( "[%s][%s] aKeyEvent.iScanCode [%d]", "CAknQueryDialog", __FUNCTION__, aKeyEvent.iScanCode); |
627 if (aKeyEvent.iScanCode == EStdKeyHash) |
677 if (aKeyEvent.iScanCode == EStdKeyHash) |
628 { |
678 { |
629 CAknQueryControl* control = QueryControl(); |
679 CAknQueryControl* control = QueryControl(); |
630 if (control && control->QueryType() == EPinLayout) |
680 if (control && control->QueryType() == EPinLayout) |
631 { |
681 { |
|
682 _AKNTRACE( "[%s][%s] EPinLayout, Dismiss Query and return ETrue", "CAknQueryDialog", __FUNCTION__); |
632 DismissQueryL(); |
683 DismissQueryL(); |
633 return ETrue; |
684 return ETrue; |
634 } |
685 } |
635 } |
686 } |
|
687 _AKNTRACE( "[%s][%s] return EFalse", "CAknQueryDialog", __FUNCTION__); |
636 return EFalse; |
688 return EFalse; |
637 } |
689 } |
638 |
690 |
639 /** |
691 /** |
640 * Dismiss query. Query is accepted if the left softkey is displayed |
692 * Dismiss query. Query is accepted if the left softkey is displayed |
642 * Query is discarded if the left softkey is not displayed. |
694 * Query is discarded if the left softkey is not displayed. |
643 * Clients can override this and implement something different. |
695 * Clients can override this and implement something different. |
644 */ |
696 */ |
645 EXPORT_C void CAknQueryDialog::DismissQueryL() |
697 EXPORT_C void CAknQueryDialog::DismissQueryL() |
646 { |
698 { |
|
699 _AKNTRACE_FUNC_ENTER; |
647 if (IsLeftSoftkeyVisible()) |
700 if (IsLeftSoftkeyVisible()) |
648 { |
701 { |
|
702 _AKNTRACE( "[%s][%s] TryExitL(EEikBidOk) ", "CAknQueryDialog", __FUNCTION__); |
649 TryExitL(EEikBidOk); |
703 TryExitL(EEikBidOk); |
650 } |
704 } |
651 else |
705 else |
652 { |
706 { |
|
707 _AKNTRACE( "[%s][%s] TryExitL(EEikBidCancel) ", "CAknQueryDialog", __FUNCTION__); |
653 TryExitL(EEikBidCancel); |
708 TryExitL(EEikBidCancel); |
654 } |
709 } |
|
710 _AKNTRACE_FUNC_EXIT; |
655 } |
711 } |
656 |
712 |
657 /** |
713 /** |
658 * |
714 * |
659 */ |
715 */ |
660 EXPORT_C TBool CAknQueryDialog::OkToExitL(TInt aButtonId) |
716 EXPORT_C TBool CAknQueryDialog::OkToExitL(TInt aButtonId) |
661 { |
717 { |
|
718 _AKNTRACE( "[%s][%s] aButtonId : %d ", "CAknQueryDialog", __FUNCTION__,aButtonId); |
662 if ( aButtonId == EAknSoftkeyEmergencyCall ) |
719 if ( aButtonId == EAknSoftkeyEmergencyCall ) |
663 { |
720 { |
664 // ECS number entered and "call" softkey pressed, |
721 // ECS number entered and "call" softkey pressed, |
665 // send a key event to the query control to |
722 // send a key event to the query control to |
666 // initiate the call. |
723 // initiate the call. |
667 CAknQueryControl* control = QueryControl(); |
724 CAknQueryControl* control = QueryControl(); |
668 if ( control ) |
725 if ( control ) |
669 { |
726 { |
|
727 _AKNTRACE( "[%s][%s] AttemptEmergencyCall ", "CAknQueryDialog", __FUNCTION__); |
670 control->AttemptEmergencyCallL(); |
728 control->AttemptEmergencyCallL(); |
671 } |
729 } |
672 |
730 _AKNTRACE( "[%s][%s] return ETrue without doing anything", "CAknQueryDialog", __FUNCTION__); |
673 return ETrue; |
731 return ETrue; |
674 } |
732 } |
675 else if((IsLeftSoftkeyVisible() && |
733 else if((IsLeftSoftkeyVisible() && |
676 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk)) |
734 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk)) |
677 || aButtonId == GetRightCBAShortKeyPress() ) |
735 || aButtonId == GetRightCBAShortKeyPress() ) |
678 { |
736 { |
|
737 _AKNTRACE( "[%s][%s] return ETrue without doing anything ", "CAknQueryDialog", __FUNCTION__); |
679 return ETrue; |
738 return ETrue; |
680 } |
739 } |
|
740 |
|
741 _AKNTRACE( "[%s][%s] return EFalse without doing anyting ", "CAknQueryDialog", __FUNCTION__); |
681 return EFalse; |
742 return EFalse; |
682 } |
743 } |
683 |
744 |
684 /** |
745 /** |
685 * Return pointer to query heading or NULL (use QueryHeading()) |
746 * Return pointer to query heading or NULL (use QueryHeading()) |
794 if ( isVisible != aVisible ) |
860 if ( isVisible != aVisible ) |
795 { |
861 { |
796 btnGroupContainer.MakeCommandVisibleByPosition(CEikButtonGroupContainer::EMiddleSoftkeyPosition,aVisible); |
862 btnGroupContainer.MakeCommandVisibleByPosition(CEikButtonGroupContainer::EMiddleSoftkeyPosition,aVisible); |
797 } |
863 } |
798 } |
864 } |
|
865 _AKNTRACE_FUNC_EXIT; |
799 } |
866 } |
800 |
867 |
801 |
868 |
802 |
869 |
803 void CAknQueryDialog::PlayTone() |
870 void CAknQueryDialog::PlayTone() |
804 { |
871 { |
|
872 _AKNTRACE_FUNC_ENTER; |
805 if (iTone != 0 && iSoundSystem) |
873 if (iTone != 0 && iSoundSystem) |
806 { |
874 { |
|
875 _AKNTRACE( "[%s][%s] iSoundSystem->PlaySound(iTone)", "CAknQueryDialog", __FUNCTION__); |
807 iSoundSystem->PlaySound(iTone); |
876 iSoundSystem->PlaySound(iTone); |
808 } |
877 } |
|
878 _AKNTRACE_FUNC_EXIT; |
809 } |
879 } |
810 |
880 |
811 /** |
881 /** |
812 * Reset timers monitoring user inactivity. Will make applications |
882 * Reset timers monitoring user inactivity. Will make applications |
813 * using these timers react, e.g. if the screen saver is running, |
883 * using these timers react, e.g. if the screen saver is running, |
814 * this will disactivate it (as from screen saver specs) |
884 * this will disactivate it (as from screen saver specs) |
815 */ |
885 */ |
816 void CAknQueryDialog::ReportUserActivity() const |
886 void CAknQueryDialog::ReportUserActivity() const |
817 { |
887 { |
|
888 _AKNTRACE_FUNC_ENTER; |
818 #ifdef AVKON_RDEBUG_INFO |
889 #ifdef AVKON_RDEBUG_INFO |
819 RDebug::Print(_L("Reset user inactivity")); |
890 RDebug::Print(_L("Reset user inactivity")); |
820 #endif |
891 #endif |
821 User::ResetInactivityTime(); |
892 User::ResetInactivityTime(); |
|
893 _AKNTRACE_FUNC_EXIT; |
822 } |
894 } |
823 |
895 |
824 TInt CAknQueryDialog::GetLeftCBAShortKeyPress() |
896 TInt CAknQueryDialog::GetLeftCBAShortKeyPress() |
825 { |
897 { |
826 return TInt16(0xffff & TInt16(ButtonGroupContainer().ButtonGroup()->CommandId(0))); |
898 return TInt16(0xffff & TInt16(ButtonGroupContainer().ButtonGroup()->CommandId(0))); |
831 return TInt16(0xffff & TInt16(ButtonGroupContainer().ButtonGroup()->CommandId(2))); |
903 return TInt16(0xffff & TInt16(ButtonGroupContainer().ButtonGroup()->CommandId(2))); |
832 } |
904 } |
833 |
905 |
834 TBool CAknQueryDialog::IsLeftSoftkeyVisible() |
906 TBool CAknQueryDialog::IsLeftSoftkeyVisible() |
835 { |
907 { |
836 return ButtonGroupContainer().ButtonGroup()->IsCommandVisible( |
908 _AKNTRACE_FUNC_ENTER; |
837 ButtonGroupContainer().ButtonGroup()->CommandId(0)); |
909 TBool visible = ButtonGroupContainer().ButtonGroup()->IsCommandVisible( |
|
910 ButtonGroupContainer().ButtonGroup()->CommandId(0)); |
|
911 _AKNTRACE( "[%s][%s] visible: %d", "CAknQueryDialog", __FUNCTION__, visible); |
|
912 _AKNTRACE_FUNC_EXIT; |
|
913 return visible; |
838 } |
914 } |
839 |
915 |
840 /** |
916 /** |
841 * Sets emergency call support enabled. Must be called prior to PreLayoutDynamicInitL |
917 * Sets emergency call support enabled. Must be called prior to PreLayoutDynamicInitL |
842 */ |
918 */ |
843 EXPORT_C void CAknQueryDialog::SetEmergencyCallSupport( TBool aOnOff ) |
919 EXPORT_C void CAknQueryDialog::SetEmergencyCallSupport( TBool aOnOff ) |
844 { |
920 { |
|
921 _AKNTRACE_FUNC_ENTER; |
|
922 _AKNTRACE( "[%s][%s] aOnOff: %d", "CAknQueryDialog", __FUNCTION__, aOnOff); |
845 iFlags.Assign(CAknQueryControl::EEmergencyCallsEnabledByAPI, aOnOff ); |
923 iFlags.Assign(CAknQueryControl::EEmergencyCallsEnabledByAPI, aOnOff ); |
|
924 _AKNTRACE_FUNC_EXIT; |
846 } |
925 } |
847 |
926 |
848 EXPORT_C void CAknQueryDialog::SetPredictiveTextInputPermitted( TBool aPermitted ) |
927 EXPORT_C void CAknQueryDialog::SetPredictiveTextInputPermitted( TBool aPermitted ) |
849 { |
928 { |
|
929 _AKNTRACE_FUNC_ENTER; |
|
930 _AKNTRACE( "[%s][%s] aPermitted: %d", "CAknQueryDialog", __FUNCTION__, aPermitted); |
850 iFlags.Assign( CAknQueryControl::EPredictiveTextEntryPermitted, aPermitted ); |
931 iFlags.Assign( CAknQueryControl::EPredictiveTextEntryPermitted, aPermitted ); |
|
932 _AKNTRACE_FUNC_EXIT; |
851 } |
933 } |
852 |
934 |
853 EXPORT_C void CAknQueryDialog::RemoveEditorIndicator() |
935 EXPORT_C void CAknQueryDialog::RemoveEditorIndicator() |
854 { |
936 { |
|
937 _AKNTRACE_FUNC_ENTER; |
855 iFlags.Assign(CAknQueryControl::EEditorIndicatorOff,ETrue); |
938 iFlags.Assign(CAknQueryControl::EEditorIndicatorOff,ETrue); |
|
939 _AKNTRACE_FUNC_EXIT; |
856 } |
940 } |
857 |
941 |
858 EXPORT_C void CAknQueryDialog::SetHeaderTextL(const TDesC& aHeader) |
942 EXPORT_C void CAknQueryDialog::SetHeaderTextL(const TDesC& aHeader) |
859 { |
943 { |
|
944 _AKNTRACE_FUNC_ENTER; |
|
945 _AKNTRACE( "[%s][%s] aHeader: %s", "CAknQueryDialog", __FUNCTION__, &aHeader); |
860 CAknPopupHeadingPane* controlHeading = QueryHeading(); |
946 CAknPopupHeadingPane* controlHeading = QueryHeading(); |
861 if (controlHeading) |
947 if (controlHeading) |
862 controlHeading->SetTextL(aHeader); |
948 controlHeading->SetTextL(aHeader); |
863 |
|
864 LayoutAndDraw(); |
949 LayoutAndDraw(); |
|
950 _AKNTRACE_FUNC_EXIT; |
865 } |
951 } |
866 |
952 |
867 /** |
953 /** |
868 * Show left CBA only if editor text is valid |
954 * Show left CBA only if editor text is valid |
869 */ |
955 */ |
1039 // number is entered to the query. |
1129 // number is entered to the query. |
1040 // --------------------------------------------------------------------------- |
1130 // --------------------------------------------------------------------------- |
1041 // |
1131 // |
1042 EXPORT_C void CAknQueryDialog::SetEmergencyCallSupportForCBA( TBool aOnOff ) |
1132 EXPORT_C void CAknQueryDialog::SetEmergencyCallSupportForCBA( TBool aOnOff ) |
1043 { |
1133 { |
|
1134 _AKNTRACE_FUNC_ENTER; |
|
1135 _AKNTRACE( "[%s][%s] aOnOff:%d ", "CAknQueryDialog", __FUNCTION__, aOnOff); |
1044 if ( aOnOff ) |
1136 if ( aOnOff ) |
1045 { |
1137 { |
1046 // Ensure also that the EEmergencyCallsEnabledByAPI is set. |
1138 // Ensure also that the EEmergencyCallsEnabledByAPI is set. |
1047 iFlags.Assign( CAknQueryControl::EEmergencyCallsEnabledByAPI, aOnOff ); |
1139 iFlags.Assign( CAknQueryControl::EEmergencyCallsEnabledByAPI, aOnOff ); |
1048 } |
1140 } |
1049 iFlags.Assign( CAknQueryControl::EEmergencyCallsCBASupport, aOnOff ); |
1141 iFlags.Assign( CAknQueryControl::EEmergencyCallsCBASupport, aOnOff ); |
|
1142 _AKNTRACE_FUNC_EXIT; |
1050 } |
1143 } |
1051 |
1144 |
1052 |
1145 |
1053 |
1146 |
1054 /************************ |
1147 /************************ |
1098 return EFalse; |
1194 return EFalse; |
1099 } |
1195 } |
1100 |
1196 |
1101 EXPORT_C void CAknTextQueryDialog::SetDefaultInputMode(TInt aInputMode) |
1197 EXPORT_C void CAknTextQueryDialog::SetDefaultInputMode(TInt aInputMode) |
1102 { |
1198 { |
|
1199 _AKNTRACE_FUNC_ENTER; |
|
1200 _AKNTRACE( "[%s][%s] aInputMode:%d ", "CAknTextQueryDialog", __FUNCTION__,aInputMode); |
1103 CAknQueryControl* control = QueryControl(); |
1201 CAknQueryControl* control = QueryControl(); |
1104 if ( control ) |
1202 if ( control ) |
1105 { |
1203 { |
1106 CEikSecretEditor* secretEditor = STATIC_CAST(CEikSecretEditor*, control->ControlByLayoutOrNull( ECodeLayout )); |
1204 CEikSecretEditor* secretEditor = STATIC_CAST(CEikSecretEditor*, control->ControlByLayoutOrNull( ECodeLayout )); |
1107 if (secretEditor) |
1205 if (secretEditor) |
1108 { |
1206 { |
1109 secretEditor->SetDefaultInputMode(aInputMode); |
1207 secretEditor->SetDefaultInputMode(aInputMode); |
1110 } |
1208 } |
1111 } |
1209 } |
|
1210 _AKNTRACE_FUNC_EXIT; |
1112 } |
1211 } |
1113 |
1212 |
1114 EXPORT_C void CAknTextQueryDialog::PreLayoutDynInitL() |
1213 EXPORT_C void CAknTextQueryDialog::PreLayoutDynInitL() |
1115 { |
1214 { |
|
1215 _AKNTRACE_FUNC_ENTER; |
1116 CAknQueryDialog::PreLayoutDynInitL(); |
1216 CAknQueryDialog::PreLayoutDynInitL(); |
1117 |
1217 |
1118 SetControlTextL(); |
1218 SetControlTextL(); |
1119 UpdateLeftSoftKeyL(); |
1219 UpdateLeftSoftKeyL(); |
|
1220 _AKNTRACE_FUNC_EXIT; |
1120 } |
1221 } |
1121 |
1222 |
1122 |
1223 |
1123 EXPORT_C void CAknTextQueryDialog::SetMaxLength(TInt aLength) |
1224 EXPORT_C void CAknTextQueryDialog::SetMaxLength(TInt aLength) |
1124 { |
1225 { |
1152 * |
1253 * |
1153 * @see IsLeftSoftkeyVisible |
1254 * @see IsLeftSoftkeyVisible |
1154 */ |
1255 */ |
1155 EXPORT_C TBool CAknTextQueryDialog::OkToExitL( TInt aButtonId ) |
1256 EXPORT_C TBool CAknTextQueryDialog::OkToExitL( TInt aButtonId ) |
1156 { |
1257 { |
|
1258 _AKNTRACE( "[%s][%s] aButtonId:%d ", "CAknTextQueryDialog", __FUNCTION__,aButtonId); |
1157 if ( aButtonId == EAknSoftkeyEmergencyCall ) |
1259 if ( aButtonId == EAknSoftkeyEmergencyCall ) |
1158 { |
1260 { |
1159 // ECS number entered and "call" softkey pressed, |
1261 // ECS number entered and "call" softkey pressed, |
1160 // send a key event to the query control to |
1262 // send a key event to the query control to |
1161 // initiate the call. |
1263 // initiate the call. |
1162 CAknQueryControl* control = QueryControl(); |
1264 CAknQueryControl* control = QueryControl(); |
1163 if ( control ) |
1265 if ( control ) |
1164 { |
1266 { |
1165 control->AttemptEmergencyCallL(); |
1267 control->AttemptEmergencyCallL(); |
1166 } |
1268 } |
1167 |
1269 _AKNTRACE( "[%s][%s] return ETrue ", "CAknTextQueryDialog", __FUNCTION__); |
1168 return ETrue; |
1270 return ETrue; |
1169 } |
1271 } |
1170 else if ( ( IsLeftSoftkeyVisible() && |
1272 else if ( ( IsLeftSoftkeyVisible() && |
1171 ( aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk ) ) ) |
1273 ( aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk ) ) ) |
1172 { |
1274 { |
1267 } |
1376 } |
1268 } |
1377 } |
1269 |
1378 |
1270 EXPORT_C TBool CAknNumberQueryDialog::OkToExitL( TInt aButtonId ) |
1379 EXPORT_C TBool CAknNumberQueryDialog::OkToExitL( TInt aButtonId ) |
1271 { |
1380 { |
|
1381 _AKNTRACE( "[%s][%s] aButtonId:%d ", "CAknNumberQueryDialog", __FUNCTION__,aButtonId); |
1272 if ( aButtonId == EAknSoftkeyEmergencyCall ) |
1382 if ( aButtonId == EAknSoftkeyEmergencyCall ) |
1273 { |
1383 { |
1274 // ECS number entered and "call" softkey pressed, |
1384 // ECS number entered and "call" softkey pressed, |
1275 // send a key event to the query control to |
1385 // send a key event to the query control to |
1276 // initiate the call. |
1386 // initiate the call. |
1277 CAknQueryControl* control = QueryControl(); |
1387 CAknQueryControl* control = QueryControl(); |
1278 if ( control ) |
1388 if ( control ) |
1279 { |
1389 { |
1280 control->AttemptEmergencyCallL(); |
1390 control->AttemptEmergencyCallL(); |
1281 } |
1391 } |
1282 |
1392 _AKNTRACE( "[%s][%s] attempt emergency and return ETrue ", "CAknNumberQueryDialog", __FUNCTION__); |
1283 return ETrue; |
1393 return ETrue; |
1284 } |
1394 } |
1285 else if ( aButtonId == GetRightCBAShortKeyPress() ) |
1395 else if ( aButtonId == GetRightCBAShortKeyPress() ) |
1286 { |
1396 { |
|
1397 _AKNTRACE( "[%s][%s] do nothing and reutrn ETrue ", "CAknNumberQueryDialog", __FUNCTION__); |
1287 return ETrue; |
1398 return ETrue; |
1288 } |
1399 } |
1289 else if ( ( IsLeftSoftkeyVisible() && |
1400 else if ( ( IsLeftSoftkeyVisible() && |
1290 ( aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk ) ) ) |
1401 ( aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk ) ) ) |
1291 { |
1402 { |
1341 * Second phase construction required to align API with multiline queries |
1454 * Second phase construction required to align API with multiline queries |
1342 * and because in future MAknQueryData will be used. |
1455 * and because in future MAknQueryData will be used. |
1343 */ |
1456 */ |
1344 EXPORT_C CAknTimeQueryDialog* CAknTimeQueryDialog::NewL(TTime& aTime, const TTone& aTone) |
1457 EXPORT_C CAknTimeQueryDialog* CAknTimeQueryDialog::NewL(TTime& aTime, const TTone& aTone) |
1345 { |
1458 { |
|
1459 _AKNTRACE_FUNC_ENTER; |
1346 CAknTimeQueryDialog* self = new (ELeave) CAknTimeQueryDialog(aTime, aTone); |
1460 CAknTimeQueryDialog* self = new (ELeave) CAknTimeQueryDialog(aTime, aTone); |
1347 AKNTASHOOK_ADDL( self, "CAknTimeQueryDialog" ); |
1461 AKNTASHOOK_ADDL( self, "CAknTimeQueryDialog" ); |
|
1462 _AKNTRACE_FUNC_EXIT; |
1348 return self; |
1463 return self; |
1349 } |
1464 } |
1350 |
1465 |
1351 EXPORT_C CAknTimeQueryDialog::CAknTimeQueryDialog |
1466 EXPORT_C CAknTimeQueryDialog::CAknTimeQueryDialog |
1352 (TTime& aTime, const TTone& aTone) : CAknQueryDialog(aTone), iTime(aTime) |
1467 (TTime& aTime, const TTone& aTone) : CAknQueryDialog(aTone), iTime(aTime) |
1384 } |
1501 } |
1385 } |
1502 } |
1386 |
1503 |
1387 EXPORT_C TBool CAknTimeQueryDialog::OkToExitL(TInt aButtonId) |
1504 EXPORT_C TBool CAknTimeQueryDialog::OkToExitL(TInt aButtonId) |
1388 { |
1505 { |
|
1506 _AKNTRACE( "[%s][%s] aButtonId:%d ", "CAknTimeQueryDialog", __FUNCTION__,aButtonId); |
1389 if((IsLeftSoftkeyVisible() && |
1507 if((IsLeftSoftkeyVisible() && |
1390 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) |
1508 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) |
1391 { |
1509 { |
1392 CAknQueryControl* control = QueryControl(); |
1510 CAknQueryControl* control = QueryControl(); |
1393 if ( control ) |
1511 if ( control ) |
1394 { |
1512 { |
1395 iTime = control->GetTime(); |
1513 iTime = control->GetTime(); |
1396 } |
1514 } |
|
1515 _AKNTRACE( "[%s][%s] get time and return ETrue ", "CAknTimeQueryDialog", __FUNCTION__); |
1397 return ETrue; |
1516 return ETrue; |
1398 } |
1517 } |
1399 else if(aButtonId == GetRightCBAShortKeyPress()) |
1518 else if(aButtonId == GetRightCBAShortKeyPress()) |
1400 return ETrue; |
1519 { |
1401 |
1520 _AKNTRACE( "[%s][%s] do nothing, return ETrue ", "CAknTimeQueryDialog", __FUNCTION__); |
|
1521 return ETrue; |
|
1522 } |
|
1523 _AKNTRACE( "[%s][%s] do nothing and return EFalse ", "CAknTimeQueryDialog", __FUNCTION__); |
1402 return EFalse; |
1524 return EFalse; |
1403 } |
1525 } |
1404 |
1526 |
1405 EXPORT_C void CAknTimeQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
1527 EXPORT_C void CAknTimeQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
1406 { |
1528 { |
1436 * Second phase construction required to align API with multiline queries |
1558 * Second phase construction required to align API with multiline queries |
1437 * and because in future MAknQueryData will be used. |
1559 * and because in future MAknQueryData will be used. |
1438 */ |
1560 */ |
1439 EXPORT_C CAknDurationQueryDialog* CAknDurationQueryDialog::NewL(TTimeIntervalSeconds& aDuration, const TTone& aTone) |
1561 EXPORT_C CAknDurationQueryDialog* CAknDurationQueryDialog::NewL(TTimeIntervalSeconds& aDuration, const TTone& aTone) |
1440 { |
1562 { |
|
1563 _AKNTRACE_FUNC_ENTER; |
1441 CAknDurationQueryDialog* self = new (ELeave) CAknDurationQueryDialog(aDuration, aTone); |
1564 CAknDurationQueryDialog* self = new (ELeave) CAknDurationQueryDialog(aDuration, aTone); |
1442 AKNTASHOOK_ADDL( self, "CAknDurationQueryDialog" ); |
1565 AKNTASHOOK_ADDL( self, "CAknDurationQueryDialog" ); |
|
1566 _AKNTRACE_FUNC_EXIT; |
1443 return self; |
1567 return self; |
1444 } |
1568 } |
1445 |
1569 |
1446 EXPORT_C CAknDurationQueryDialog::CAknDurationQueryDialog |
1570 EXPORT_C CAknDurationQueryDialog::CAknDurationQueryDialog |
1447 (TTimeIntervalSeconds& aDuration, const TTone& aTone) : CAknQueryDialog(aTone), iDuration(aDuration) |
1571 (TTimeIntervalSeconds& aDuration, const TTone& aTone) : CAknQueryDialog(aTone), iDuration(aDuration) |
1472 } |
1598 } |
1473 } |
1599 } |
1474 |
1600 |
1475 EXPORT_C TBool CAknDurationQueryDialog::OkToExitL(TInt aButtonId) |
1601 EXPORT_C TBool CAknDurationQueryDialog::OkToExitL(TInt aButtonId) |
1476 { |
1602 { |
|
1603 _AKNTRACE( "[%s][%s] aButtonId:%d ", "CAknDurationQueryDialog", __FUNCTION__,aButtonId); |
1477 if((IsLeftSoftkeyVisible() && |
1604 if((IsLeftSoftkeyVisible() && |
1478 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) |
1605 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) |
1479 { |
1606 { |
1480 CAknQueryControl* control = QueryControl(); |
1607 CAknQueryControl* control = QueryControl(); |
1481 if ( control ) |
1608 if ( control ) |
1482 { |
1609 { |
1483 iDuration = control->GetDuration(); |
1610 iDuration = control->GetDuration(); |
1484 } |
1611 } |
|
1612 _AKNTRACE( "[%s][%s] get duration and return ETrue ", "CAknDurationQueryDialog", __FUNCTION__); |
1485 return ETrue; |
1613 return ETrue; |
1486 } |
1614 } |
1487 else if(aButtonId == GetRightCBAShortKeyPress()) |
1615 else if(aButtonId == GetRightCBAShortKeyPress()) |
1488 { |
1616 { |
|
1617 _AKNTRACE( "[%s][%s] do nothing, return ETrue ", "CAknDurationQueryDialog", __FUNCTION__); |
1489 return ETrue; |
1618 return ETrue; |
1490 } |
1619 } |
|
1620 _AKNTRACE( "[%s][%s] return ETrue ", "CAknDurationQueryDialog", __FUNCTION__); |
1491 return EFalse; |
1621 return EFalse; |
1492 } |
1622 } |
1493 |
1623 |
1494 EXPORT_C void CAknDurationQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
1624 EXPORT_C void CAknDurationQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
1495 { |
1625 { |
1565 } |
1697 } |
1566 } |
1698 } |
1567 |
1699 |
1568 EXPORT_C TBool CAknFloatingPointQueryDialog::OkToExitL(TInt aButtonId) |
1700 EXPORT_C TBool CAknFloatingPointQueryDialog::OkToExitL(TInt aButtonId) |
1569 { |
1701 { |
|
1702 _AKNTRACE( "[%s][%s] aButtonId :%d ", "CAknFloatingPointQueryDialog", __FUNCTION__,aButtonId); |
1570 if((IsLeftSoftkeyVisible() && |
1703 if((IsLeftSoftkeyVisible() && |
1571 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) |
1704 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) |
1572 { |
1705 { |
1573 CAknQueryControl* control = QueryControl(); |
1706 CAknQueryControl* control = QueryControl(); |
1574 if ( control ) |
1707 if ( control ) |
1575 { |
1708 { |
1576 iNumber = control->GetFloatingPointNumberL(); |
1709 iNumber = control->GetFloatingPointNumberL(); |
1577 } |
1710 } |
|
1711 _AKNTRACE( "[%s][%s] Get Floatingpoint number and return ETrue ", "CAknFloatingPointQueryDialog", __FUNCTION__); |
1578 return ETrue; |
1712 return ETrue; |
1579 } |
1713 } |
1580 else if(aButtonId == GetRightCBAShortKeyPress()) |
1714 else if(aButtonId == GetRightCBAShortKeyPress()) |
1581 { |
1715 { |
|
1716 _AKNTRACE( "[%s][%s] do nothing, return ETrue ", "CAknFloatingPointQueryDialog", __FUNCTION__); |
1582 return ETrue; |
1717 return ETrue; |
1583 } |
1718 } |
|
1719 _AKNTRACE( "[%s][%s] return ETrue ", "CAknFloatingPointQueryDialog", __FUNCTION__); |
1584 return EFalse; |
1720 return EFalse; |
1585 } |
1721 } |
1586 |
1722 |
1587 EXPORT_C void CAknFloatingPointQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
1723 EXPORT_C void CAknFloatingPointQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
1588 { |
1724 { |
1776 EXPORT_C void CAknMultiLineDataQueryDialog::SetPromptL(const TDesC& aFP, const TDesC& aSP) |
1912 EXPORT_C void CAknMultiLineDataQueryDialog::SetPromptL(const TDesC& aFP, const TDesC& aSP) |
1777 // |
1913 // |
1778 //Store new prompt values |
1914 //Store new prompt values |
1779 // |
1915 // |
1780 { |
1916 { |
|
1917 _AKNTRACE_FUNC_ENTER; |
1781 delete iSecondPrompt; |
1918 delete iSecondPrompt; |
1782 iSecondPrompt = NULL; |
1919 iSecondPrompt = NULL; |
1783 iSecondPrompt = aSP.AllocL(); |
1920 iSecondPrompt = aSP.AllocL(); |
1784 |
1921 |
1785 CAknQueryDialog::SetPromptL(aFP); |
1922 CAknQueryDialog::SetPromptL(aFP); |
|
1923 _AKNTRACE_FUNC_EXIT; |
1786 } |
1924 } |
1787 |
1925 |
1788 EXPORT_C void CAknMultiLineDataQueryDialog::DoSetPromptL() |
1926 EXPORT_C void CAknMultiLineDataQueryDialog::DoSetPromptL() |
1789 { |
1927 { |
|
1928 _AKNTRACE_FUNC_ENTER; |
1790 // |
1929 // |
1791 //Set prompt in query controls, called during layout |
1930 //Set prompt in query controls, called during layout |
1792 // |
1931 // |
1793 CAknMultilineQueryControl* secondControl = SecondControl(); |
1932 CAknMultilineQueryControl* secondControl = SecondControl(); |
1794 if(secondControl && iSecondPrompt && iSecondPrompt->Length()) |
1933 if(secondControl && iSecondPrompt && iSecondPrompt->Length()) |
1795 secondControl->SetPromptL(*iSecondPrompt); |
1934 secondControl->SetPromptL(*iSecondPrompt); |
1796 |
1935 |
1797 CAknQueryDialog::DoSetPromptL(); |
1936 CAknQueryDialog::DoSetPromptL(); |
|
1937 _AKNTRACE_FUNC_EXIT; |
1798 } |
1938 } |
1799 |
1939 |
1800 /** |
1940 /** |
1801 * Allows dismissing of queries. Same as base class implementation only take into |
1941 * Allows dismissing of queries. Same as base class implementation only take into |
1802 * consideration both controls |
1942 * consideration both controls |
1999 secondControl->GetText( ptext ); |
2142 secondControl->GetText( ptext ); |
2000 iSecondText->Copy( *text ); |
2143 iSecondText->Copy( *text ); |
2001 CleanupStack::PopAndDestroy( text ); |
2144 CleanupStack::PopAndDestroy( text ); |
2002 } |
2145 } |
2003 } |
2146 } |
2004 |
2147 _AKNTRACE( "[%s][%s] return ETrue ", "CAknMultiLineDataQueryDialog", __FUNCTION__); |
2005 return ETrue; |
2148 return ETrue; |
2006 } |
2149 } |
2007 else if(aButtonId == GetRightCBAShortKeyPress()) |
2150 else if(aButtonId == GetRightCBAShortKeyPress()) |
2008 { |
2151 { |
|
2152 _AKNTRACE( "[%s][%s] do nothing,return ETrue ", "CAknMultiLineDataQueryDialog", __FUNCTION__); |
2009 return ETrue; |
2153 return ETrue; |
2010 } |
2154 } |
2011 |
2155 _AKNTRACE( "[%s][%s] do nothing,return EFalse ", "CAknMultiLineDataQueryDialog", __FUNCTION__); |
2012 return EFalse; |
2156 return EFalse; |
2013 } |
2157 } |
2014 |
2158 |
2015 EXPORT_C void CAknMultiLineDataQueryDialog::UpdateLeftSoftKeyL() |
2159 EXPORT_C void CAknMultiLineDataQueryDialog::UpdateLeftSoftKeyL() |
2016 { |
2160 { |
2017 |
|
2018 if (Layout_Meta_Data::IsLandscapeOrientation()) |
2161 if (Layout_Meta_Data::IsLandscapeOrientation()) |
2019 { |
2162 { |
2020 if ( (FirstControl()->EditorContentIsValidL() && FirstControl()->IsFocused()) || (SecondControl()->EditorContentIsValidL() && FirstControl()->EditorContentIsValidL()) ) |
2163 if ( (FirstControl()->EditorContentIsValidL() && FirstControl()->IsFocused()) || (SecondControl()->EditorContentIsValidL() && FirstControl()->EditorContentIsValidL()) ) |
2021 { |
2164 { |
2022 MakeLeftSoftkeyVisible(ETrue); |
2165 MakeLeftSoftkeyVisible(ETrue); |
2068 TDesC* aPrompt, |
2211 TDesC* aPrompt, |
2069 TDesC* aPrompt2, |
2212 TDesC* aPrompt2, |
2070 const TTone& aTone) |
2213 const TTone& aTone) |
2071 : CAknQueryDialog(aTone) |
2214 : CAknQueryDialog(aTone) |
2072 { |
2215 { |
|
2216 _AKNTRACE_FUNC_ENTER; |
2073 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2217 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2074 TRAP(ignore,SetDataL(*aTime,*aTime2)); |
2218 TRAP(ignore,SetDataL(*aTime,*aTime2)); |
2075 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
2219 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
|
2220 _AKNTRACE_FUNC_EXIT; |
2076 } |
2221 } |
2077 |
2222 |
2078 EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, |
2223 EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, |
2079 TDes* aDataText2, |
2224 TDes* aDataText2, |
2080 TDesC* aPrompt, |
2225 TDesC* aPrompt, |
2081 TDesC* aPrompt2, |
2226 TDesC* aPrompt2, |
2082 const TTone& aTone) |
2227 const TTone& aTone) |
2083 : CAknQueryDialog(aTone) |
2228 : CAknQueryDialog(aTone) |
2084 { |
2229 { |
|
2230 _AKNTRACE_FUNC_ENTER; |
2085 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2231 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2086 TRAP(ignore,SetDataL(*aDataText,*aDataText2)); |
2232 TRAP(ignore,SetDataL(*aDataText,*aDataText2)); |
2087 |
2233 |
2088 iText = aDataText; |
2234 iText = aDataText; |
2089 iSecondText = aDataText2; |
2235 iSecondText = aDataText2; |
2090 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
2236 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
|
2237 _AKNTRACE_FUNC_EXIT; |
2091 } |
2238 } |
2092 |
2239 |
2093 EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, |
2240 EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, |
2094 TTime* aTime, |
2241 TTime* aTime, |
2095 TDesC* aPrompt, |
2242 TDesC* aPrompt, |
2096 TDesC* aPrompt2, |
2243 TDesC* aPrompt2, |
2097 const TTone& aTone) |
2244 const TTone& aTone) |
2098 : CAknQueryDialog(aTone) |
2245 : CAknQueryDialog(aTone) |
2099 { |
2246 { |
|
2247 _AKNTRACE_FUNC_ENTER; |
2100 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2248 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2101 TRAP(ignore,SetDataL(*aDataText,*aTime)); |
2249 TRAP(ignore,SetDataL(*aDataText,*aTime)); |
2102 |
2250 |
2103 iText = aDataText; |
2251 iText = aDataText; |
2104 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
2252 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
|
2253 _AKNTRACE_FUNC_EXIT; |
2105 } |
2254 } |
2106 |
2255 |
2107 EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, |
2256 EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, |
2108 TInt* aNumber, |
2257 TInt* aNumber, |
2109 TDesC* aPrompt, |
2258 TDesC* aPrompt, |
2110 TDesC* aPrompt2, |
2259 TDesC* aPrompt2, |
2111 const TTone& aTone) |
2260 const TTone& aTone) |
2112 : CAknQueryDialog(aTone) |
2261 : CAknQueryDialog(aTone) |
2113 { |
2262 { |
|
2263 _AKNTRACE_FUNC_ENTER; |
2114 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2264 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2115 TRAP(ignore,SetDataL(*aDataText,*aNumber)); |
2265 TRAP(ignore,SetDataL(*aDataText,*aNumber)); |
2116 |
2266 |
2117 iText = aDataText; |
2267 iText = aDataText; |
2118 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
2268 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
|
2269 _AKNTRACE_FUNC_EXIT; |
2119 } |
2270 } |
2120 |
2271 |
2121 EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TInt* aNumber, |
2272 EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TInt* aNumber, |
2122 TInt* aNumber2, |
2273 TInt* aNumber2, |
2123 TDesC* aPrompt, |
2274 TDesC* aPrompt, |
2124 TDesC* aPrompt2, |
2275 TDesC* aPrompt2, |
2125 const TTone& aTone) |
2276 const TTone& aTone) |
2126 : CAknQueryDialog(aTone) |
2277 : CAknQueryDialog(aTone) |
2127 { |
2278 { |
|
2279 _AKNTRACE_FUNC_ENTER; |
2128 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2280 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2129 TRAP(ignore,SetDataL(*aNumber,*aNumber2)); |
2281 TRAP(ignore,SetDataL(*aNumber,*aNumber2)); |
2130 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
2282 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
|
2283 _AKNTRACE_FUNC_EXIT; |
2131 } |
2284 } |
2132 |
2285 |
2133 EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, |
2286 EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, |
2134 TTimeIntervalSeconds* aDuration, |
2287 TTimeIntervalSeconds* aDuration, |
2135 TDesC* aPrompt, |
2288 TDesC* aPrompt, |
2136 TDesC* aPrompt2, |
2289 TDesC* aPrompt2, |
2137 const TTone& aTone) |
2290 const TTone& aTone) |
2138 : CAknQueryDialog(aTone) |
2291 : CAknQueryDialog(aTone) |
2139 { |
2292 { |
|
2293 _AKNTRACE_FUNC_ENTER; |
2140 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2294 TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); |
2141 TRAP(ignore,SetDataL(*aDataText,*aDuration)); |
2295 TRAP(ignore,SetDataL(*aDataText,*aDuration)); |
2142 |
2296 |
2143 iText = aDataText; |
2297 iText = aDataText; |
2144 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
2298 AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); |
2192 * Second phase construction required to align API with multiline queries |
2348 * Second phase construction required to align API with multiline queries |
2193 * and because in future MAknQueryData will be used. |
2349 * and because in future MAknQueryData will be used. |
2194 */ |
2350 */ |
2195 EXPORT_C CAknIpAddressQueryDialog* CAknIpAddressQueryDialog::NewL(TInetAddr& aInetAddr, const TTone& aTone) |
2351 EXPORT_C CAknIpAddressQueryDialog* CAknIpAddressQueryDialog::NewL(TInetAddr& aInetAddr, const TTone& aTone) |
2196 { |
2352 { |
|
2353 _AKNTRACE_FUNC_ENTER; |
2197 CAknIpAddressQueryDialog* self = new (ELeave) CAknIpAddressQueryDialog(aInetAddr, aTone); |
2354 CAknIpAddressQueryDialog* self = new (ELeave) CAknIpAddressQueryDialog(aInetAddr, aTone); |
2198 AKNTASHOOK_ADDL( self, "CAknIpAddressQueryDialog" ); |
2355 AKNTASHOOK_ADDL( self, "CAknIpAddressQueryDialog" ); |
|
2356 _AKNTRACE_FUNC_EXIT; |
2199 return self; |
2357 return self; |
2200 } |
2358 } |
2201 |
2359 |
2202 CAknIpAddressQueryDialog::CAknIpAddressQueryDialog |
2360 CAknIpAddressQueryDialog::CAknIpAddressQueryDialog |
2203 (TInetAddr& aInetAddr, const TTone& aTone) : CAknQueryDialog(aTone), iInetAddr(aInetAddr) |
2361 (TInetAddr& aInetAddr, const TTone& aTone) : CAknQueryDialog(aTone), iInetAddr(aInetAddr) |
2204 { |
2362 { |
2205 } |
2363 } |
2206 |
2364 |
2207 EXPORT_C CAknIpAddressQueryDialog::~CAknIpAddressQueryDialog() |
2365 EXPORT_C CAknIpAddressQueryDialog::~CAknIpAddressQueryDialog() |
2208 { |
2366 { |
|
2367 _AKNTRACE_FUNC_ENTER; |
2209 AKNTASHOOK_REMOVE(); |
2368 AKNTASHOOK_REMOVE(); |
|
2369 _AKNTRACE_FUNC_EXIT; |
2210 } |
2370 } |
2211 EXPORT_C void CAknIpAddressQueryDialog::SetSizeAndPosition( |
2371 EXPORT_C void CAknIpAddressQueryDialog::SetSizeAndPosition( |
2212 const TSize& aSize ) |
2372 const TSize& aSize ) |
2213 { |
2373 { |
|
2374 _AKNTRACE_FUNC_ENTER; |
|
2375 _AKNTRACE( "[%s][%s] aSize (W[%d],H[%d]) ", "CAknIpAddressQueryDialog", __FUNCTION__, aSize.iWidth, aSize.iHeight); |
2214 CAknExtQueryControl* control = STATIC_CAST(CAknExtQueryControl*,QueryControl()); |
2376 CAknExtQueryControl* control = STATIC_CAST(CAknExtQueryControl*,QueryControl()); |
2215 if(control) |
2377 if(control) |
2216 { |
2378 { |
2217 if ( AknLayoutUtils::PenEnabled() ) |
2379 if ( AknLayoutUtils::PenEnabled() ) |
2218 { |
2380 { |
2315 } |
2484 } |
2316 } |
2485 } |
2317 |
2486 |
2318 EXPORT_C TBool CAknIpAddressQueryDialog::OkToExitL(TInt aButtonId) |
2487 EXPORT_C TBool CAknIpAddressQueryDialog::OkToExitL(TInt aButtonId) |
2319 { |
2488 { |
|
2489 _AKNTRACE( "[%s][%s] aButtonId : %d ", |
|
2490 "CAknIpAddressQueryDialog", __FUNCTION__, aButtonId); |
2320 if((IsLeftSoftkeyVisible() && |
2491 if((IsLeftSoftkeyVisible() && |
2321 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) |
2492 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) |
2322 { |
2493 { |
2323 CAknExtQueryControl* control = STATIC_CAST(CAknExtQueryControl*,QueryControl()); |
2494 CAknExtQueryControl* control = STATIC_CAST(CAknExtQueryControl*,QueryControl()); |
2324 if ( control ) |
2495 if ( control ) |
2325 { |
2496 { |
2326 iInetAddr = control->GetInetAddress(); |
2497 iInetAddr = control->GetInetAddress(); |
2327 } |
2498 } |
|
2499 _AKNTRACE( "[%s][%s] get address and return ETrue", "CAknIpAddressQueryDialog", __FUNCTION__); |
2328 return ETrue; |
2500 return ETrue; |
2329 } |
2501 } |
2330 else if(aButtonId == GetRightCBAShortKeyPress()) |
2502 else if(aButtonId == GetRightCBAShortKeyPress()) |
2331 { |
2503 { |
|
2504 _AKNTRACE( "[%s][%s] do nothing, return ETrue", "CAknIpAddressQueryDialog", __FUNCTION__); |
2332 return ETrue; |
2505 return ETrue; |
2333 } |
2506 } |
|
2507 _AKNTRACE( "[%s][%s] do nothing, return EFalse", "CAknIpAddressQueryDialog", __FUNCTION__); |
2334 return EFalse; |
2508 return EFalse; |
2335 } |
2509 } |
2336 |
2510 |
2337 |
2511 |
2338 EXPORT_C void CAknIpAddressQueryDialog::UpdateLeftSoftKeyL() |
2512 EXPORT_C void CAknIpAddressQueryDialog::UpdateLeftSoftKeyL() |
2382 * Second phase construction required to align API with multiline queries |
2556 * Second phase construction required to align API with multiline queries |
2383 * and because in future MAknQueryData will be used. |
2557 * and because in future MAknQueryData will be used. |
2384 */ |
2558 */ |
2385 EXPORT_C CAknFixedPointQueryDialog* CAknFixedPointQueryDialog::NewL(TInt& aNumber, const TTone& aTone) |
2559 EXPORT_C CAknFixedPointQueryDialog* CAknFixedPointQueryDialog::NewL(TInt& aNumber, const TTone& aTone) |
2386 { |
2560 { |
|
2561 _AKNTRACE_FUNC_ENTER; |
2387 CAknFixedPointQueryDialog* self = new (ELeave) CAknFixedPointQueryDialog(aNumber, aTone); |
2562 CAknFixedPointQueryDialog* self = new (ELeave) CAknFixedPointQueryDialog(aNumber, aTone); |
2388 AKNTASHOOK_ADDL( self, "CAknFixedPointQueryDialog" ); |
2563 AKNTASHOOK_ADDL( self, "CAknFixedPointQueryDialog" ); |
|
2564 _AKNTRACE_FUNC_EXIT; |
2389 return self; |
2565 return self; |
2390 } |
2566 } |
2391 |
2567 |
2392 CAknFixedPointQueryDialog::CAknFixedPointQueryDialog |
2568 CAknFixedPointQueryDialog::CAknFixedPointQueryDialog |
2393 (TInt& aNumber, const TTone& aTone) : CAknQueryDialog(aTone), iNumber(aNumber) |
2569 (TInt& aNumber, const TTone& aTone) : CAknQueryDialog(aTone), iNumber(aNumber) |
2505 } |
2690 } |
2506 } |
2691 } |
2507 |
2692 |
2508 EXPORT_C TBool CAknFixedPointQueryDialog::OkToExitL(TInt aButtonId) |
2693 EXPORT_C TBool CAknFixedPointQueryDialog::OkToExitL(TInt aButtonId) |
2509 { |
2694 { |
|
2695 _AKNTRACE( "[%s][%s] aButtonId : %d ", "CAknFixedPointQueryDialog", __FUNCTION__, aButtonId); |
2510 if((IsLeftSoftkeyVisible() && |
2696 if((IsLeftSoftkeyVisible() && |
2511 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) |
2697 (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) |
2512 { |
2698 { |
2513 CAknExtQueryControl* control = STATIC_CAST(CAknExtQueryControl*,QueryControl()); |
2699 CAknExtQueryControl* control = STATIC_CAST(CAknExtQueryControl*,QueryControl()); |
2514 if ( control ) |
2700 if ( control ) |
2515 { |
2701 { |
2516 iNumber = control->GetFixedPointNumber(); |
2702 iNumber = control->GetFixedPointNumber(); |
2517 } |
2703 } |
|
2704 _AKNTRACE( "[%s][%s] get point number and return ETrue ", "CAknFixedPointQueryDialog", __FUNCTION__); |
2518 return ETrue; |
2705 return ETrue; |
2519 } |
2706 } |
2520 else if(aButtonId == GetRightCBAShortKeyPress()) |
2707 else if(aButtonId == GetRightCBAShortKeyPress()) |
2521 { |
2708 { |
|
2709 _AKNTRACE( "[%s][%s] do nothing and return ETrue ", "CAknFixedPointQueryDialog", __FUNCTION__); |
2522 return ETrue; |
2710 return ETrue; |
2523 } |
2711 } |
|
2712 _AKNTRACE( "[%s][%s] return EFalse ", "CAknFixedPointQueryDialog", __FUNCTION__); |
2524 return EFalse; |
2713 return EFalse; |
2525 } |
2714 } |
2526 |
2715 |
2527 |
2716 |
2528 EXPORT_C void CAknFixedPointQueryDialog::UpdateLeftSoftKeyL() |
2717 EXPORT_C void CAknFixedPointQueryDialog::UpdateLeftSoftKeyL() |