phoneapp/phoneuivoipextension/src/cphonetransferdialercontroller.cpp
changeset 21 92ab7f8d0eab
parent 0 5f000ab63145
child 22 6bb1b21d2484
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
    21 
    21 
    22 #include <akntoolbar.h>
    22 #include <akntoolbar.h>
    23 #include <AknsItemID.h>
    23 #include <AknsItemID.h>
    24 #include <StringLoader.h>
    24 #include <StringLoader.h>
    25 
    25 
    26 #include <phoneui.mbg>
    26 
    27 #include <phoneui.rsg>
    27 // <-- QT PHONE START -->
    28 #include <phoneuivoip.rsg>
    28 //#include <phoneui.mbg>
    29 #include <data_caging_path_literals.hrh> // For KDC_APP_BITMAP_DIR
    29 #include "phoneresourceids.h"
       
    30 //#include <phoneui.rsg>
       
    31 //#include <phoneuivoip.rsg>
       
    32 // <-- QT PHONE END -->
    30 
    33 
    31 #include "phoneui.pan"
    34 #include "phoneui.pan"
    32 #include "phonelogger.h"
    35 #include "phonelogger.h"
       
    36 // <-- QT PHONE START -->
       
    37 //#include "cphonebubblewrapper.h" // For KDC_APP_BITMAP_DIR
       
    38 #include <data_caging_path_literals.hrh>
       
    39 // <-- QT PHONE END -->
       
    40 
    33 #include "cphonetransferdialercontroller.h"
    41 #include "cphonetransferdialercontroller.h"
    34 #include "cphonemainresourceresolver.h"
    42 #include "cphonemainresourceresolver.h"
    35 #include "phonerssvoip.h"
    43 #include "phonerssvoip.h"
    36 #include "phoneappcommands.hrh"
    44 #include "phoneappcommands.hrh"
    37 #include "phoneappvoipcommands.hrh"
    45 #include "phoneappvoipcommands.hrh"
    41 _LIT ( KPhoneMifFileName, "phoneui.mif" );
    49 _LIT ( KPhoneMifFileName, "phoneui.mif" );
    42 
    50 
    43 // Number of buttons 
    51 // Number of buttons 
    44 const TInt KButtonCount = 2;
    52 const TInt KButtonCount = 2;
    45 
    53 
       
    54 // <-- QT PHONE START -->
       
    55 /*
    46 class TPhoneDialerToolbarButton 
    56 class TPhoneDialerToolbarButton 
    47     {
    57     {
    48 public:
    58 public:
    49     TInt iIconIndex;
    59     TInt iIconIndex;
    50     TInt iMaskIndex;
    60     TInt iMaskIndex;
    60             { EMbmPhoneuiQgn_indi_dialer_contacts,
    70             { EMbmPhoneuiQgn_indi_dialer_contacts,
    61               EMbmPhoneuiQgn_indi_dialer_contacts_mask,
    71               EMbmPhoneuiQgn_indi_dialer_contacts_mask,
    62               EPhoneCmdTransferDialerSearch
    72               EPhoneCmdTransferDialerSearch
    63             }                 
    73             }                 
    64         };  
    74         };  
    65 
    75         
       
    76  */
       
    77 // <-- QT PHONE END -->
    66 // ================= MEMBER FUNCTIONS =======================
    78 // ================= MEMBER FUNCTIONS =======================
    67 
    79 
    68 // C++ default constructor can NOT contain any code, that
    80 // C++ default constructor can NOT contain any code, that
    69 // might leave.
    81 // might leave.
    70 //  
    82 //  
   114                 "Toolbar control count:=%d", 
   126                 "Toolbar control count:=%d", 
   115                 aToolbar.CountComponentControls());
   127                 aToolbar.CountComponentControls());
   116         iToolbar = &aToolbar;
   128         iToolbar = &aToolbar;
   117         // Create transfer specific buttons and add them to the 
   129         // Create transfer specific buttons and add them to the 
   118         // toolbar starting from index 0
   130         // toolbar starting from index 0
   119         CAknButton* button( NULL );
   131  // <-- QT PHONE START --> 
   120     
   132         //CAknButton* button( NULL );
       
   133   
       
   134  /*
   121         for( TInt i = 0; i < KButtonCount; i++ )
   135         for( TInt i = 0; i < KButtonCount; i++ )
   122             {
   136             {
       
   137            
   123             TAknsItemID skinId = SkinId( bArray[i].iIconIndex );
   138             TAknsItemID skinId = SkinId( bArray[i].iIconIndex );
   124             // Load tooltip text.
   139             // Load tooltip text.
   125             HBufC* tooltipText = GetTooltipTextL( bArray[i].iCommandId );  
   140             HBufC* tooltipText = GetTooltipTextL( bArray[i].iCommandId );  
   126             CleanupStack::PushL( tooltipText );
   141             CleanupStack::PushL( tooltipText );
   127             button = CreateButtonLC(
   142             button = CreateButtonLC(
   131                     skinId );
   146                     skinId );
   132             // Toolbar takes ownership of the button                    
   147             // Toolbar takes ownership of the button                    
   133             iToolbar->AddItemL( button, EAknCtButton, bArray[i].iCommandId, 0, i );
   148             iToolbar->AddItemL( button, EAknCtButton, bArray[i].iCommandId, 0, i );
   134             CleanupStack::Pop( button );
   149             CleanupStack::Pop( button );
   135             CleanupStack::PopAndDestroy( tooltipText );
   150             CleanupStack::PopAndDestroy( tooltipText );
   136             }      
   151             } 
       
   152             */
       
   153  // <-- QT PHONE END -->        
   137         iIsInitialized = ETrue;
   154         iIsInitialized = ETrue;
   138         }
   155         }
   139    
   156    
   140     iNumberEntryIsEmpty = ETrue;
   157     iNumberEntryIsEmpty = ETrue;
   141     }
   158     }
   207     __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
   224     __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
   208         "CPhoneTransferDialerController::ShowButtons()");
   225         "CPhoneTransferDialerController::ShowButtons()");
   209     __ASSERT_DEBUG( iToolbar, Panic( EPhoneCtrlInvariant ) );
   226     __ASSERT_DEBUG( iToolbar, Panic( EPhoneCtrlInvariant ) );
   210     for( TInt i = 0; i < KButtonCount; i++ )
   227     for( TInt i = 0; i < KButtonCount; i++ )
   211         {
   228         {
   212         iToolbar->HideItem( bArray[ i ].iCommandId, !aShow, EFalse );
   229 // <-- QT PHONE START -->   
   213         }    
   230         //iToolbar->HideItem( bArray[ i ].iCommandId, !aShow, EFalse );
   214     
   231         }
   215     if ( aShow )
   232     if ( aShow )
   216         {
   233         {
   217         iToolbar->SetItemDimmed( EPhoneCmdTransferDialerOk, ETrue, EFalse ); 
   234         iToolbar->SetItemDimmed( EPhoneCmdTransferDialerOk, ETrue, EFalse ); 
   218         iToolbar->SetItemDimmed( EPhoneCmdTransferDialerSearch, EFalse, EFalse ); 
   235         iToolbar->SetItemDimmed( EPhoneCmdTransferDialerSearch, EFalse, EFalse ); 
   219         iToolbar->SetItemDimmed( EPhoneDialerCmdClear, ETrue, EFalse ); 
   236         iToolbar->SetItemDimmed( EPhoneDialerCmdClear, ETrue, EFalse ); 
   220         }
   237         }
   221     
   238     
   222     iToolbar->DrawDeferred();
   239     //iToolbar->DrawDeferred();
       
   240 // <-- QT PHONE END --> 
   223     }
   241     }
   224 
   242 
   225 // ---------------------------------------------------------------------------
   243 // ---------------------------------------------------------------------------
   226 // PhoneTransferDialerController::CreateButtonLC
   244 // PhoneTransferDialerController::CreateButtonLC
   227 // ---------------------------------------------------------------------------
   245 // ---------------------------------------------------------------------------
   291 
   309 
   292 // ---------------------------------------------------------------------------
   310 // ---------------------------------------------------------------------------
   293 // CPhoneTransferDialerController::SkinId
   311 // CPhoneTransferDialerController::SkinId
   294 // ---------------------------------------------------------------------------
   312 // ---------------------------------------------------------------------------
   295 //    
   313 //    
   296 TAknsItemID CPhoneTransferDialerController::SkinId( TInt aIconIndex ) const
   314 TAknsItemID CPhoneTransferDialerController::SkinId( TInt /*aIconIndex*/ ) const
   297     {
   315     {
   298     TAknsItemID skinId;
   316     TAknsItemID skinId;
   299     
   317  // <-- QT PHONE START -->
       
   318  /*
   300     switch ( aIconIndex )
   319     switch ( aIconIndex )
   301         {
   320         {
       
   321         
   302         case EMbmPhoneuiQgn_indi_button_send_dtmf:
   322         case EMbmPhoneuiQgn_indi_button_send_dtmf:
   303             skinId = KAknsIIDQgnIndiButtonSendDtmf;
   323             skinId = KAknsIIDQgnIndiButtonSendDtmf;
   304             break;
   324             break;
   305         case EMbmPhoneuiQgn_indi_dialer_contacts:
   325         case EMbmPhoneuiQgn_indi_dialer_contacts:
   306             skinId = KAknsIIDQgnIndiDialerContacts;
   326             skinId = KAknsIIDQgnIndiDialerContacts;
   307             break;                     
   327             break;                     
   308         default:
   328         default:
   309             skinId = KAknsIIDNone;        
   329             skinId = KAknsIIDNone;        
   310             break;            
   330             break;            
   311         }
   331         }
   312     
   332   */
       
   333   skinId = KAknsIIDNone; 
       
   334 // <-- QT PHONE END -->     
   313     return skinId;  
   335     return skinId;  
   314     }
   336     }