phoneapp/phoneuiview/src/cphoneview.cpp
branchRCL_3
changeset 6 38529f706030
parent 3 8871b09be73b
child 10 ba54057fe027
equal deleted inserted replaced
5:2a26698d78ba 6:38529f706030
    64 // C++ default constructor can NOT contain any code, that
    64 // C++ default constructor can NOT contain any code, that
    65 // might leave.
    65 // might leave.
    66 // -----------------------------------------------------------------------------
    66 // -----------------------------------------------------------------------------
    67 //
    67 //
    68 CPhoneView::CPhoneView( CEikButtonGroupContainer& aCba ) :
    68 CPhoneView::CPhoneView( CEikButtonGroupContainer& aCba ) :
    69     iSecurityMode ( EFalse ),
    69     iCba ( aCba )
    70     iActivatePreviousApp( EFalse ),
       
    71     iPhoneAppViewToDialer( EFalse ),
       
    72     iCba ( aCba ),
       
    73     iDialerActivation( EFalse )
       
    74     {
    70     {
    75     }
    71     }
    76 
    72 
    77 // -----------------------------------------------------------------------------
    73 // -----------------------------------------------------------------------------
    78 // CPhoneView::ConstructL
    74 // CPhoneView::ConstructL
   149             if ( iDialerActivation )
   145             if ( iDialerActivation )
   150                 {
   146                 {
   151                 if ( iSecurityMode )
   147                 if ( iSecurityMode )
   152                     {
   148                     {
   153                     static_cast<MEikCommandObserver*>( iEikonEnv->EikAppUi() )
   149                     static_cast<MEikCommandObserver*>( iEikonEnv->EikAppUi() )
   154                     ->ProcessCommandL( EPhoneNumberAcqSecurityDialer );
   150 						->ProcessCommandL( EPhoneViewOpenNumberEntry );
   155                     return;
   151                     return;
   156                     }
   152                     }
   157                  else
   153                  else
   158                     {
   154                     {
   159                     iEikonEnv->WsSession().ClearAllRedrawStores();
   155                     iEikonEnv->WsSession().ClearAllRedrawStores();
   311         {
   307         {
   312         CCoeControl::SetRect( aRect );
   308         CCoeControl::SetRect( aRect );
   313         }
   309         }
   314     else
   310     else
   315         {
   311         {
   316         if ( Layout_Meta_Data::IsLandscapeOrientation() ||
   312         if ( Layout_Meta_Data::IsLandscapeOrientation() )
   317              iSecurityMode )
       
   318             {
   313             {
   319             // In landscape and in security mode aRect is ok.
   314             // In landscape and in security mode aRect is ok.
   320             CCoeControl::SetRect( aRect );    
   315             CCoeControl::SetRect( aRect );    
   321             }
   316             }
   322         else
   317         else
   369 
   364 
   370         // Draw main area.
   365         // Draw main area.
   371         MAknsSkinInstance* skin = AknsUtils::SkinInstance();
   366         MAknsSkinInstance* skin = AknsUtils::SkinInstance();
   372         MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
   367         MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
   373         
   368         
   374         if ( iSecurityMode || 
   369         if ( !AknsDrawUtils::Background( skin, cc, this, gc, aRect ) )
   375             !AknsDrawUtils::Background( skin, cc, this, gc, aRect ) )
       
   376             {
   370             {
   377             gc.SetPenStyle(CGraphicsContext::ENullPen);
   371             gc.SetPenStyle(CGraphicsContext::ENullPen);
   378             gc.SetBrushColor( AKN_LAF_COLOR( 0 ) ); // 0 for white
   372             gc.SetBrushColor( AKN_LAF_COLOR( 0 ) ); // 0 for white
   379             gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
   373             gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
   380             gc.DrawRect( aRect ); 
   374             gc.DrawRect( aRect ); 
   500 // CPhoneView::SetSecurityMode
   494 // CPhoneView::SetSecurityMode
   501 // -----------------------------------------------------------------------------
   495 // -----------------------------------------------------------------------------
   502 //
   496 //
   503 void CPhoneView::SetSecurityMode ( TBool aStatus )
   497 void CPhoneView::SetSecurityMode ( TBool aStatus )
   504     {
   498     {
   505     if ( iSecurityMode != aStatus ) 
   499     iSecurityMode = aStatus;
   506         {
   500     }
   507         iSecurityMode = aStatus;
   501     
   508         SizeChanged();    
       
   509         }
       
   510     }
       
   511     
       
   512 // -----------------------------------------------------------------------------
       
   513 // CPhoneView::IsSecurityMode
       
   514 // -----------------------------------------------------------------------------
       
   515 //
       
   516 TBool CPhoneView::IsSecurityMode()    
       
   517     {
       
   518     return iSecurityMode;
       
   519     }
       
   520 
       
   521 // -----------------------------------------------------------------------------
   502 // -----------------------------------------------------------------------------
   522 // CPhoneView::GetActivatePreviousApp
   503 // CPhoneView::GetActivatePreviousApp
   523 // -----------------------------------------------------------------------------
   504 // -----------------------------------------------------------------------------
   524 //
   505 //
   525 TBool CPhoneView::GetActivatePreviousApp()
   506 TBool CPhoneView::GetActivatePreviousApp()