phoneuis/dialer/src/cdialer.cpp
branchRCL_3
changeset 10 ba54057fe027
parent 9 91c2fb4b78df
child 12 b68fcd923911
equal deleted inserted replaced
9:91c2fb4b78df 10:ba54057fe027
    33 #include <aknedsts.h>
    33 #include <aknedsts.h>
    34 #include <spsettings.h>
    34 #include <spsettings.h>
    35 #include <dialingextensioninterface.h>
    35 #include <dialingextensioninterface.h>
    36 #include <easydialingcommands.hrh>
    36 #include <easydialingcommands.hrh>
    37 #include <dialer.rsg>
    37 #include <dialer.rsg>
       
    38 #include <featmgr.h>
    38 
    39 
    39 #include "cdialer.h"
    40 #include "cdialer.h"
    40 #include "dialercommon.h"
    41 #include "dialercommon.h"
    41 #include "dialer.hrh"
    42 #include "dialer.hrh"
    42 #include "cdialerkeypadcontainer.h"
    43 #include "cdialerkeypadcontainer.h"
    79 // -----------------------------------------------------------------------------
    80 // -----------------------------------------------------------------------------
    80 //
    81 //
    81 EXPORT_C CDialer::~CDialer()
    82 EXPORT_C CDialer::~CDialer()
    82     {
    83     {
    83     DIALER_PRINT("CDialer::~CDialer<"); 
    84     DIALER_PRINT("CDialer::~CDialer<"); 
       
    85     #ifdef RD_SCALABLE_UI_V2
       
    86     iPeninputServer.RemovePenUiActivationHandler( this );
       
    87     iPeninputServer.Close();
       
    88     #endif
    84     AknsUtils::DeregisterControlPosition( this );
    89     AknsUtils::DeregisterControlPosition( this );
    85 
    90 
    86     delete iKeypadArea;
    91     delete iKeypadArea;
    87     delete iNumberEntry;
    92     delete iNumberEntry;
    88 
    93 
   132     SetRect( aRect );
   137     SetRect( aRect );
   133     
   138     
   134     SetComponentsToInheritVisibility( EFalse );
   139     SetComponentsToInheritVisibility( EFalse );
   135 
   140 
   136     ActivateL();
   141     ActivateL();
       
   142     #ifdef RD_SCALABLE_UI_V2
       
   143     if ( AknLayoutUtils::PenEnabled() )
       
   144         {
       
   145         User::LeaveIfError( iPeninputServer.Connect() );
       
   146         iPeninputServer.AddPenUiActivationHandler( this, EPluginInputModeAll ); 
       
   147         }
       
   148     #endif
   137     DIALER_PRINT("CDialer::ConstructL>");
   149     DIALER_PRINT("CDialer::ConstructL>");
   138     }
   150     }
   139 
   151 
   140 // -----------------------------------------------------------------------------
   152 // -----------------------------------------------------------------------------
   141 // CDialer::CDialer
   153 // CDialer::CDialer
   823 // ---------------------------------------------------------------------------
   835 // ---------------------------------------------------------------------------
   824 //
   836 //
   825 void CDialer::LoadEasyDialingPlugin()
   837 void CDialer::LoadEasyDialingPlugin()
   826     {
   838     {
   827     DIALER_PRINT( "CDialer::LoadEasyDialingPlugin" )
   839     DIALER_PRINT( "CDialer::LoadEasyDialingPlugin" )
   828     TRAPD( error, 
   840             
   829         {
   841     if ( FeatureManager::FeatureSupported( KFeatureIdProductIncludesHomeScreenEasyDialing ) )
   830         iEasyDialer = CDialingExtensionInterface::NewL();
   842         {
   831         iEasyDialer->InitializeL( *this );
   843         TRAPD( error, 
   832         
   844             {
   833         iDialingExtensionObserver = CDialingExtensionObserver::NewL( iEasyDialer, iNumberEntry, this );
   845             iEasyDialer = CDialingExtensionInterface::NewL();
   834         iEasyDialer->AddObserverL( iDialingExtensionObserver );
   846             iEasyDialer->InitializeL( *this );
   835         } );
   847             
   836 
   848             iDialingExtensionObserver = CDialingExtensionObserver::NewL( iEasyDialer, iNumberEntry, this );
   837     if ( error )
   849             iEasyDialer->AddObserverL( iDialingExtensionObserver );
   838         {
   850             } );
   839         DIALER_PRINT( "CDialer::LoadEasyDialingPlugin, load failed" )
   851     
   840                 
   852         if ( error )
   841         delete iEasyDialer;
   853             {
   842         iEasyDialer = NULL;
   854             DIALER_PRINT( "CDialer::LoadEasyDialingPlugin, load failed" )
   843         
   855                     
   844         delete iDialingExtensionObserver;
   856             delete iEasyDialer;
   845         iDialingExtensionObserver = NULL;
   857             iEasyDialer = NULL;
       
   858             
       
   859             delete iDialingExtensionObserver;
       
   860             iDialingExtensionObserver = NULL;
       
   861             }
   846         }
   862         }
   847     }
   863     }
   848 
   864 
   849 // ---------------------------------------------------------------------------
   865 // ---------------------------------------------------------------------------
   850 // CDialer::EasyDialingEnabled
   866 // CDialer::EasyDialingEnabled
   888         }
   904         }
   889 
   905 
   890     iNumberEntry->SetRect( neRect );
   906     iNumberEntry->SetRect( neRect );
   891     }
   907     }
   892 
   908 
       
   909 // ---------------------------------------------------------------------------
       
   910 // CDialer::OnPeninputUiDeactivated
       
   911 //
       
   912 // Gets called when the virtual keyboard editor is closed.
       
   913 // ---------------------------------------------------------------------------
       
   914 //
       
   915 void CDialer::OnPeninputUiDeactivated()
       
   916     {
       
   917     DIALER_PRINT( "CDialer::OnPeninputUiDeactivated" )
       
   918     FocusChanged( EDrawNow );
       
   919     }
       
   920 
       
   921 // ---------------------------------------------------------------------------
       
   922 // CDialer::OnPeninputUiActivated
       
   923 //
       
   924 // Gets called when the virtual keyboard editor is opened.
       
   925 // ---------------------------------------------------------------------------
       
   926 //
       
   927 void CDialer::OnPeninputUiActivated()
       
   928     {
       
   929     DIALER_PRINT( "CDialer::OnPeninputUiActivated" )
       
   930     }
   893 // End of File
   931 // End of File