uiservicetab/vimpstui/src/cvimpstuitermsofusedlg.cpp
branchRCL_3
changeset 14 9fdee5e1da30
parent 10 78867dafe7eb
child 27 2b7283837edb
equal deleted inserted replaced
13:796276a1bdcc 14:9fdee5e1da30
    53 #include    <utf.h>
    53 #include    <utf.h>
    54 #include    <txtetext.h>
    54 #include    <txtetext.h>
    55 
    55 
    56 #include    <StringLoader.h>
    56 #include    <StringLoader.h>
    57 #include    "vimpstui.hrh"
    57 #include    "vimpstui.hrh"
       
    58 #include "uiservicetabtracer.h"
    58 const TInt KTextMargin = 100;  // normal text margin in twips
    59 const TInt KTextMargin = 100;  // normal text margin in twips
    59 const TInt KSpaceBefore = 10;  // space before each paragraph (twips)
    60 const TInt KSpaceBefore = 10;  // space before each paragraph (twips)
    60 const TInt KPixelsBetweenLines = 5; // pixels between text lines
    61 const TInt KPixelsBetweenLines = 5; // pixels between text lines
    61 
    62 
    62 
    63 
   104 // CVIMPSTUiTermsOfUseDlg::ConstructL()
   105 // CVIMPSTUiTermsOfUseDlg::ConstructL()
   105 // ---------------------------------------------------------
   106 // ---------------------------------------------------------
   106 //
   107 //
   107 void CVIMPSTUiTermsOfUseDlg::ConstructL( )
   108 void CVIMPSTUiTermsOfUseDlg::ConstructL( )
   108     {
   109     {
   109     
   110 	TRACER_AUTO;
   110     iBgContext = CAknsBasicBackgroundControlContext::NewL( 
   111     iBgContext = CAknsBasicBackgroundControlContext::NewL( 
   111         KAknsIIDQsnBgAreaMainMessage, Rect(), ETrue );
   112         KAknsIIDQsnBgAreaMainMessage, Rect(), ETrue );
   112     
   113     
   113     iItemFinder = CItemFinder::NewL();
   114     iItemFinder = CItemFinder::NewL();
   114     iItemFinder->AddObserver( *this );
   115     iItemFinder->AddObserver( *this );
   158 // CVIMPSTUiTermsOfUseDlg::PreLayoutDynInitL()
   159 // CVIMPSTUiTermsOfUseDlg::PreLayoutDynInitL()
   159 // (other items were commented in a header).
   160 // (other items were commented in a header).
   160 // ---------------------------------------------------------
   161 // ---------------------------------------------------------
   161 //
   162 //
   162 void CVIMPSTUiTermsOfUseDlg::PreLayoutDynInitL()
   163 void CVIMPSTUiTermsOfUseDlg::PreLayoutDynInitL()
   163 	{						
   164 	{
       
   165 	TRACER_AUTO;
   164 	CAknDialog::PreLayoutDynInitL();
   166 	CAknDialog::PreLayoutDynInitL();
   165     AknsUtils::RegisterControlPosition( this );
   167     AknsUtils::RegisterControlPosition( this );
   166     
   168     
   167     iEditor = static_cast<CEikRichTextEditor*>( Control( ETOURichEditorId ) );   
   169     iEditor = static_cast<CEikRichTextEditor*>( Control( ETOURichEditorId ) );   
   168 
   170 
   201 // (other items were commented in a header).
   203 // (other items were commented in a header).
   202 // -----------------------------------------------------------------------------
   204 // -----------------------------------------------------------------------------
   203 //
   205 //
   204 void CVIMPSTUiTermsOfUseDlg::PostLayoutDynInitL()
   206 void CVIMPSTUiTermsOfUseDlg::PostLayoutDynInitL()
   205     {
   207     {
       
   208 	TRACER_AUTO;
   206     CAknDialog::PostLayoutDynInitL();
   209     CAknDialog::PostLayoutDynInitL();
   207     
   210     
   208    
   211    
   209     iItemFinder->SetEditor( &iEditor );
   212     iItemFinder->SetEditor( &iEditor );
   210     
   213     
   271 // -----------------------------------------------------------------------------
   274 // -----------------------------------------------------------------------------
   272 //
   275 //
   273 TKeyResponse CVIMPSTUiTermsOfUseDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent,
   276 TKeyResponse CVIMPSTUiTermsOfUseDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent,
   274                                                    TEventCode aType )
   277                                                    TEventCode aType )
   275 	{
   278 	{
       
   279 	TRACER_AUTO;
   276     if( aType != EEventKey )
   280     if( aType != EEventKey )
   277         {
   281         {
   278         return EKeyWasNotConsumed;
   282         return EKeyWasNotConsumed;
   279         }
   283         }
   280 
   284 
   326         }
   330         }
   327     }
   331     }
   328 
   332 
   329 void CVIMPSTUiTermsOfUseDlg::HandleScrollEventL(CEikScrollBar* aScrollBar, TEikScrollEvent aEventType)
   333 void CVIMPSTUiTermsOfUseDlg::HandleScrollEventL(CEikScrollBar* aScrollBar, TEikScrollEvent aEventType)
   330     {
   334     {
   331 
   335 	TRACER_AUTO;
   332     if( !aScrollBar )
   336     if( !aScrollBar )
   333         {
   337         {
   334         return ;
   338         return ;
   335         }
   339         }
   336     switch( aEventType )
   340     switch( aEventType )
   455 // (other items were commented in a header).
   459 // (other items were commented in a header).
   456 // ---------------------------------------------------------
   460 // ---------------------------------------------------------
   457 //
   461 //
   458 void CVIMPSTUiTermsOfUseDlg::SetNewTitleTextL()
   462 void CVIMPSTUiTermsOfUseDlg::SetNewTitleTextL()
   459     {
   463     {
       
   464 	TRACER_AUTO;
   460     CAknTitlePane* title = GetTitlePaneInstanceL();
   465     CAknTitlePane* title = GetTitlePaneInstanceL();
   461     
   466     
   462     // Store old one
   467     // Store old one
   463     HBufC* tmp = title->Text()->AllocL();
   468     HBufC* tmp = title->Text()->AllocL();
   464     delete iOldTitleText;
   469     delete iOldTitleText;
   486 // (other items were commented in a header).
   491 // (other items were commented in a header).
   487 // ---------------------------------------------------------
   492 // ---------------------------------------------------------
   488 //
   493 //
   489 CAknTitlePane* CVIMPSTUiTermsOfUseDlg::GetTitlePaneInstanceL() const
   494 CAknTitlePane* CVIMPSTUiTermsOfUseDlg::GetTitlePaneInstanceL() const
   490     {
   495     {
       
   496 	TRACER_AUTO;
   491     CAknTitlePane* title = static_cast< CAknTitlePane* >
   497     CAknTitlePane* title = static_cast< CAknTitlePane* >
   492         ( CEikonEnv::Static()->AppUiFactory()->StatusPane()->ControlL(
   498         ( CEikonEnv::Static()->AppUiFactory()->StatusPane()->ControlL(
   493                                         TUid::Uid( EEikStatusPaneUidTitle ) ) );
   499                                         TUid::Uid( EEikStatusPaneUidTitle ) ) );
   494 	if ( !title )
   500 	if ( !title )
   495 		{
   501 		{
   504 // (other items were commented in a header).
   510 // (other items were commented in a header).
   505 // ---------------------------------------------------------
   511 // ---------------------------------------------------------
   506 //
   512 //
   507 void CVIMPSTUiTermsOfUseDlg::RestoreTitlePaneTextL() const
   513 void CVIMPSTUiTermsOfUseDlg::RestoreTitlePaneTextL() const
   508     {
   514     {
       
   515 	TRACER_AUTO;
   509     CAknTitlePane* title = GetTitlePaneInstanceL();
   516     CAknTitlePane* title = GetTitlePaneInstanceL();
   510 
   517 
   511     if ( iOldTitleText )
   518     if ( iOldTitleText )
   512         {
   519         {
   513         title->SetTextL( *iOldTitleText );
   520         title->SetTextL( *iOldTitleText );
   533 // (other items were commented in a header).
   540 // (other items were commented in a header).
   534 // ---------------------------------------------------------
   541 // ---------------------------------------------------------
   535 //
   542 //
   536 void CVIMPSTUiTermsOfUseDlg::UpdateCbaL()
   543 void CVIMPSTUiTermsOfUseDlg::UpdateCbaL()
   537     {
   544     {
       
   545 	TRACER_AUTO;
   538     TInt cbaRes = R_CNUI_TERMS_OF_USE_DIALOG_CBA;  
   546     TInt cbaRes = R_CNUI_TERMS_OF_USE_DIALOG_CBA;  
   539     CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
   547     CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
   540     cba->SetCommandSetL( cbaRes );
   548     cba->SetCommandSetL( cbaRes );
   541     cba->DrawNow();
   549     cba->DrawNow();
   542     }
   550     }
   546 // (other items were commented in a header).
   554 // (other items were commented in a header).
   547 // ---------------------------------------------------------
   555 // ---------------------------------------------------------
   548 //
   556 //
   549 void CVIMPSTUiTermsOfUseDlg::UpdateTextColorL()
   557 void CVIMPSTUiTermsOfUseDlg::UpdateTextColorL()
   550     {
   558     {
       
   559 	TRACER_AUTO;
   551     if( !iEditor )
   560     if( !iEditor )
   552         {
   561         {
   553         return;
   562         return;
   554         }
   563         }
   555         
   564