uifw/AvKon/src/aknmessagequerydialog.cpp
branchRCL_3
changeset 4 8ca85d2f0db7
parent 0 2f259fa3e83a
child 9 aabf2c525e0f
equal deleted inserted replaced
0:2f259fa3e83a 4:8ca85d2f0db7
    39 #include <aknlayoutscalable_avkon.cdl.h>
    39 #include <aknlayoutscalable_avkon.cdl.h>
    40 #include <touchfeedback.h>
    40 #include <touchfeedback.h>
    41 
    41 
    42 #include <AknTasHook.h> // for testability hooks
    42 #include <AknTasHook.h> // for testability hooks
    43 #include "AknHeadingPaneTouchObserver.h"
    43 #include "AknHeadingPaneTouchObserver.h"
    44 
    44 #include "akntrace.h"
    45 
    45 
    46 // CONSTANTS
    46 // CONSTANTS
    47 const TInt KMaxLinks = 64;
    47 const TInt KMaxLinks = 64;
    48 
    48 
    49 const TInt KLinkStartTagLength = 22;
    49 const TInt KLinkStartTagLength = 22;
   126     };
   126     };
   127     
   127     
   128 
   128 
   129 EXPORT_C CAknMessageQueryDialog* CAknMessageQueryDialog::NewL( TDesC& aMessage, const TTone& aTone )
   129 EXPORT_C CAknMessageQueryDialog* CAknMessageQueryDialog::NewL( TDesC& aMessage, const TTone& aTone )
   130     {
   130     {
       
   131 	_AKNTRACE_FUNC_ENTER;
   131     CAknMessageQueryDialog* self = new ( ELeave ) CAknMessageQueryDialog( aTone );
   132     CAknMessageQueryDialog* self = new ( ELeave ) CAknMessageQueryDialog( aTone );
   132     CleanupStack::PushL( self );
   133     CleanupStack::PushL( self );
   133     self->SetMessageTextL( aMessage );
   134     self->SetMessageTextL( aMessage );
   134     CleanupStack::Pop(); //self
   135     CleanupStack::Pop(); //self
   135     AKNTASHOOK_ADDL( self, "CAknMessageQueryDialog" );
   136     AKNTASHOOK_ADDL( self, "CAknMessageQueryDialog" );
       
   137     _AKNTRACE_FUNC_EXIT;
   136     return self;
   138     return self;
   137     }
   139     }
   138 
   140 
   139 //@deprecated
   141 //@deprecated
   140 EXPORT_C CAknMessageQueryDialog::CAknMessageQueryDialog() : CAknQueryDialog( ENoTone )
   142 EXPORT_C CAknMessageQueryDialog::CAknMessageQueryDialog() : CAknQueryDialog( ENoTone )
   146 #endif
   148 #endif
   147     }
   149     }
   148 
   150 
   149 EXPORT_C CAknMessageQueryDialog::CAknMessageQueryDialog( const TTone aTone ) : CAknQueryDialog( aTone )
   151 EXPORT_C CAknMessageQueryDialog::CAknMessageQueryDialog( const TTone aTone ) : CAknQueryDialog( aTone )
   150     {
   152     {
       
   153 	_AKNTRACE_FUNC_ENTER;
   151 #ifndef RD_NO_DIALOG_BORDERS
   154 #ifndef RD_NO_DIALOG_BORDERS
   152     iBorder = AknBorderId::EAknBorderNotePopup;
   155     iBorder = AknBorderId::EAknBorderNotePopup;
   153 #else
   156 #else
   154     iBorder = TGulBorder::ENone;
   157     iBorder = TGulBorder::ENone;
   155 #endif
   158 #endif
       
   159     _AKNTRACE_FUNC_EXIT;
   156     }
   160     }
   157 
   161 
   158 //@deprecated
   162 //@deprecated
   159 EXPORT_C CAknMessageQueryDialog::CAknMessageQueryDialog( TDesC* aMessage, TDesC* aHeader ) 
   163 EXPORT_C CAknMessageQueryDialog::CAknMessageQueryDialog( TDesC* aMessage, TDesC* aHeader ) 
   160     : CAknQueryDialog( ENoTone ), iMessage( aMessage ), iHeader( aHeader )
   164     : CAknQueryDialog( ENoTone ), iMessage( aMessage ), iHeader( aHeader )
   199 #endif
   203 #endif
   200     }
   204     }
   201 
   205 
   202 EXPORT_C CAknMessageQueryDialog::~CAknMessageQueryDialog()
   206 EXPORT_C CAknMessageQueryDialog::~CAknMessageQueryDialog()
   203     {
   207     {
       
   208 	_AKNTRACE( "[%s][%s] Enter", "CAknMessageQueryDialog", "~CAknMessageQueryDialog" );
   204     AKNTASHOOK_REMOVE();
   209     AKNTASHOOK_REMOVE();
   205     delete iMessage;
   210     delete iMessage;
   206     delete iHeader;
   211     delete iHeader;
   207     delete iHeaderImage;
   212     delete iHeaderImage;
   208     RegisterPointerEventObserver( EFalse ); 
   213     RegisterPointerEventObserver( EFalse ); 
   209     delete iMsgQueryExtension;
   214     delete iMsgQueryExtension;
       
   215     _AKNTRACE( "[%s][%s] Exit", "CAknMessageQueryDialog", "~CAknMessageQueryDialog" );
   210     }
   216     }
   211 
   217 
   212 EXPORT_C void CAknMessageQueryDialog::SetMessageTextL( const TDesC& aMessage )
   218 EXPORT_C void CAknMessageQueryDialog::SetMessageTextL( const TDesC& aMessage )
   213     {
   219     {
   214     delete iMessage;
   220     delete iMessage;
   353     iHeader = aHeader;
   359     iHeader = aHeader;
   354     }
   360     }
   355 
   361 
   356 EXPORT_C void CAknMessageQueryDialog::PreLayoutDynInitL()
   362 EXPORT_C void CAknMessageQueryDialog::PreLayoutDynInitL()
   357     {
   363     {
       
   364     _AKNTRACE_FUNC_ENTER;
   358     if ( !iMsgQueryExtension )
   365     if ( !iMsgQueryExtension )
   359         {
   366         {
   360         CreateExtensionL();
   367         CreateExtensionL();
   361         }      
   368         }      
   362         
   369         
   423     if (headingPane)
   430     if (headingPane)
   424         {
   431         {
   425         headingPane->SetLayout(CAknPopupHeadingPane::EMessageQueryHeadingPane); // Use message query heading layout.    
   432         headingPane->SetLayout(CAknPopupHeadingPane::EMessageQueryHeadingPane); // Use message query heading layout.    
   426         headingPane->SetTouchObserver( iMsgQueryExtension );
   433         headingPane->SetTouchObserver( iMsgQueryExtension );
   427         }
   434         }
       
   435     _AKNTRACE_FUNC_EXIT;
   428     }
   436     }
   429 
   437 
   430    
   438    
   431 EXPORT_C void CAknMessageQueryDialog::SetSizeAndPosition( const TSize& aSize )
   439 EXPORT_C void CAknMessageQueryDialog::SetSizeAndPosition( const TSize& aSize )
   432     {
   440     {
   984 * the link execution.
   992 * the link execution.
   985 */    
   993 */    
   986     
   994     
   987 TBool CAknMessageQueryDialog::ExecuteLinkL()
   995 TBool CAknMessageQueryDialog::ExecuteLinkL()
   988     {
   996     {
   989     CAknMessageQueryControl* control = STATIC_CAST( CAknMessageQueryControl*, Control( EAknMessageQueryContentId ) );
   997 	_AKNTRACE_FUNC_ENTER;
       
   998 	CAknMessageQueryControl* control = STATIC_CAST( CAknMessageQueryControl*, Control( EAknMessageQueryContentId ) );
   990     if( !control )
   999     if( !control )
   991         {
  1000         {
       
  1001 		_AKNTRACE_FUNC_EXIT;
   992         return EFalse;
  1002         return EFalse;
   993         }
  1003         }
   994     if( !control->LinkHighLighted() )
  1004     if( !control->LinkHighLighted() )
   995         {
  1005         {
       
  1006 		_AKNTRACE_FUNC_EXIT;
   996         return EFalse;
  1007         return EFalse;
   997         }
  1008         }
   998     TInt curLink = control->CurrentLink();
  1009     TInt curLink = control->CurrentLink();
   999     /**
  1010     /**
  1000     * The local @c destroyed variable keeps track of the object destroyed state.
  1011     * The local @c destroyed variable keeps track of the object destroyed state.
  1009     User::LeaveIfError( err );
  1020     User::LeaveIfError( err );
  1010     if ( !destroyed )
  1021     if ( !destroyed )
  1011         {
  1022         {
  1012         control->DehighlightLink();
  1023         control->DehighlightLink();
  1013         }
  1024         }
       
  1025     _AKNTRACE_FUNC_EXIT;
  1014     return ETrue;
  1026     return ETrue;
  1015     }
  1027     }
  1016 
  1028 
  1017 //  End of File     
  1029 //  End of File