uifw/AvKon/src/AknQueryControl.cpp
branchRCL_3
changeset 51 fcdfafb36fe7
parent 38 c52421ed5f07
child 55 aecbbf00d063
equal deleted inserted replaced
50:a1caeb42b3a3 51:fcdfafb36fe7
    77 #include <AknTasHook.h> // for testability hooks
    77 #include <AknTasHook.h> // for testability hooks
    78 #include <tacticon.h>
    78 #include <tacticon.h>
    79 
    79 
    80 #include "akntrace.h"
    80 #include "akntrace.h"
    81 const TInt KPinCodeTacticonInterval = 30000000; // 30s
    81 const TInt KPinCodeTacticonInterval = 30000000; // 30s
    82 const TInt KPinCodeMaxTacticons = 10;
    82 const TInt KPinCodeMaxTacticons = 5;
    83 /*******
    83 /*******
    84  * CAknQueryControlExtension
    84  * CAknQueryControlExtension
    85  */
    85  */
    86  
    86  
    87 NONSHARABLE_CLASS(CAknQueryControlExtension) : public CBase
    87 NONSHARABLE_CLASS(CAknQueryControlExtension) : public CBase
  3070 
  3070 
  3071             Window().EndRedraw();
  3071             Window().EndRedraw();
  3072             DeactivateGc();
  3072             DeactivateGc();
  3073 
  3073 
  3074             // Draw the label after the background.
  3074             // Draw the label after the background.
  3075             iPrompt->Line( i )->ActivateL(); // Never leaves
  3075             TRAPD(err, iPrompt->Line( i )->ActivateL()); // Never leaves
  3076             iPrompt->Line( i )->DrawNow();
  3076             if (err == KErrNone)
       
  3077                 {
       
  3078                 iPrompt->Line( i )->DrawNow();
       
  3079                 }
  3077             iPrompt->SetLineModified( i, EFalse );
  3080             iPrompt->SetLineModified( i, EFalse );
  3078             }
  3081             }
  3079         }
  3082         }
  3080     _AKNTRACE_FUNC_EXIT;
  3083     _AKNTRACE_FUNC_EXIT;
  3081     }
  3084     }
  3383     AknLayoutUtils::LayoutLabel(iPrompt->Line(2), rect.Rect(), lineLayout );   
  3386     AknLayoutUtils::LayoutLabel(iPrompt->Line(2), rect.Rect(), lineLayout );   
  3384 	}
  3387 	}
  3385 
  3388 
  3386 EXPORT_C void CAknQueryControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) 
  3389 EXPORT_C void CAknQueryControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) 
  3387     { 
  3390     { 
  3388     if ( iEditorFrame.Rect().Contains( aPointerEvent.iPosition ) )
  3391     if ( iHasEditor && iEditorFrame.Valid() 
       
  3392         && iEditorFrame.Rect().Contains( aPointerEvent.iPosition ) )
  3389     	{
  3393     	{
  3390 		/*For the events happening inside editor frame's rect, query control will forward
  3394 		/*For the events happening inside editor frame's rect, query control will forward
  3391 		the events to editors to handle.This is added to fix bug ESLM-85YFCH:Text editor is hard 
  3395 		the events to editors to handle.This is added to fix bug ESLM-85YFCH:Text editor is hard 
  3392 		to open in input dialog (usability). The valid area is enlarged to editor frame rect,
  3396 		to open in input dialog (usability). The valid area is enlarged to editor frame rect,
  3393 		instead of text's rect, because text rect is too small for user to tap*/
  3397 		instead of text's rect, because text rect is too small for user to tap*/
  3786         }
  3790         }
  3787     }
  3791     }
  3788 
  3792 
  3789 EXPORT_C void CAknExtQueryControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) 
  3793 EXPORT_C void CAknExtQueryControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) 
  3790     { 
  3794     { 
  3791 	if ( iEditorFrame.Rect().Contains( aPointerEvent.iPosition ) )
  3795 	if ( iHasEditor && iEditorFrame.Valid() 
       
  3796 	    && iEditorFrame.Rect().Contains( aPointerEvent.iPosition ) )
  3792 		{
  3797 		{
  3793 		/*For the events happening inside editor frame's rect, query control will forward
  3798 		/*For the events happening inside editor frame's rect, query control will forward
  3794 		the events to editors to handle.This is added to fix bug ESLM-85YFCH:Text editor is hard 
  3799 		the events to editors to handle.This is added to fix bug ESLM-85YFCH:Text editor is hard 
  3795 		to open in input dialog (usability). The valid area is enlarged to editor frame rect,
  3800 		to open in input dialog (usability). The valid area is enlarged to editor frame rect,
  3796 		instead of text's rect, because text rect is too small for user to tap*/
  3801 		instead of text's rect, because text rect is too small for user to tap*/
  4072 
  4077 
  4073             Window().EndRedraw();
  4078             Window().EndRedraw();
  4074             DeactivateGc();
  4079             DeactivateGc();
  4075 
  4080 
  4076             // Draw the label after the background.
  4081             // Draw the label after the background.
  4077             iPrompt->Line( i )->ActivateL(); // Never leaves
  4082             TRAPD(err, iPrompt->Line( i )->ActivateL()); // Never leaves
  4078             iPrompt->Line( i )->DrawNow();
  4083             if (err == KErrNone)
       
  4084                 {
       
  4085                 iPrompt->Line( i )->DrawNow();
       
  4086                 }
  4079             iPrompt->SetLineModified( i, EFalse );
  4087             iPrompt->SetLineModified( i, EFalse );
  4080             }
  4088             }
  4081         }
  4089         }
  4082     _AKNTRACE_FUNC_EXIT;
  4090     _AKNTRACE_FUNC_EXIT;
  4083     }
  4091     }