uiservicetab/vimpstui/src/cvimpstuisearchview.cpp
branchRCL_3
changeset 9 9fdee5e1da30
parent 6 78867dafe7eb
child 21 2b7283837edb
equal deleted inserted replaced
8:796276a1bdcc 9:9fdee5e1da30
    76 #include <eikbtgpc.h>
    76 #include <eikbtgpc.h>
    77 #include <eikmenup.h>
    77 #include <eikmenup.h>
    78 #include <avkon.hrh>
    78 #include <avkon.hrh>
    79 #include <eikspane.h>
    79 #include <eikspane.h>
    80 #include <StringLoader.h>
    80 #include <StringLoader.h>
       
    81 #include "uiservicetabtracer.h"
    81 
    82 
    82 // help launch
    83 // help launch
    83 #include <hlplch.h>
    84 #include <hlplch.h>
    84 #include <coehelp.h>
    85 #include <coehelp.h>
    85 #include "meco.hlp.hrh"
    86 #include "meco.hlp.hrh"
   116 // CVIMPSTUiSearchView::ConstructL
   117 // CVIMPSTUiSearchView::ConstructL
   117 // --------------------------------------------------------------------------
   118 // --------------------------------------------------------------------------
   118 //
   119 //
   119 void CVIMPSTUiSearchView::ConstructL()
   120 void CVIMPSTUiSearchView::ConstructL()
   120     {
   121     {
       
   122 	TRACER_AUTO;
   121     ViewBaseConstructL( KIMCONTACTSEXTNIMPLEMENTATIONUID, iSearchViewId ); 
   123     ViewBaseConstructL( KIMCONTACTSEXTNIMPLEMENTATIONUID, iSearchViewId ); 
   122     
   124     
   123     //Get SearchMgr
   125     //Get SearchMgr
   124 	MVIMPSTEngineExtentionFeatures* feature = iEngine.ExtentionFeatures(TVIMPSTEnums::ESearch);
   126 	MVIMPSTEngineExtentionFeatures* feature = iEngine.ExtentionFeatures(TVIMPSTEnums::ESearch);
   125 	if (feature)
   127 	if (feature)
   199 // This class handles all commands from menu
   201 // This class handles all commands from menu
   200 // ---------------------------------------------------------
   202 // ---------------------------------------------------------
   201 //
   203 //
   202 void CVIMPSTUiSearchView::HandleCommandL( TInt aCommand )
   204 void CVIMPSTUiSearchView::HandleCommandL( TInt aCommand )
   203     {
   205     {
   204 	
   206 	TRACER_AUTO;
   205    	switch ( aCommand ) 
   207    	switch ( aCommand ) 
   206 		{
   208 		{
   207 		//Next two commands have same function
   209 		//Next two commands have same function
   208 		case EAknSoftkeyBack:
   210 		case EAknSoftkeyBack:
   209 			{
   211 			{
   296 // ---------------------------------------------------------
   298 // ---------------------------------------------------------
   297 //
   299 //
   298 void CVIMPSTUiSearchView::DynInitMenuPaneL( TInt aResourceId,
   300 void CVIMPSTUiSearchView::DynInitMenuPaneL( TInt aResourceId,
   299 									 CEikMenuPane* aMenuPane )
   301 									 CEikMenuPane* aMenuPane )
   300 	{
   302 	{
       
   303 	TRACER_AUTO;
   301     if( aResourceId == R_EXTENSION_MANAGER_MENU)
   304     if( aResourceId == R_EXTENSION_MANAGER_MENU)
   302 	    {
   305 	    {
   303 	    //add search view menu items 
   306 	    //add search view menu items 
   304 	    aMenuPane->AddMenuItemsL( R_SERVTAB_SEARCH_VIEW_MENU ); 
   307 	    aMenuPane->AddMenuItemsL( R_SERVTAB_SEARCH_VIEW_MENU ); 
   305 	    //add general menu items - help and exit 
   308 	    //add general menu items - help and exit 
   360 //
   363 //
   361 void CVIMPSTUiSearchView::DoActivateViewL( const TVwsViewId& aPrevViewId,
   364 void CVIMPSTUiSearchView::DoActivateViewL( const TVwsViewId& aPrevViewId,
   362         									TUid /*aCustomMessageId*/, 
   365         									TUid /*aCustomMessageId*/, 
   363         									const TDesC8&  /*aCustomMessage*/ )
   366         									const TDesC8&  /*aCustomMessage*/ )
   364     {
   367     {
       
   368 	TRACER_AUTO;
   365     // the title pane is set to " Basic Search" 
   369     // the title pane is set to " Basic Search" 
   366     // which is same as Search Form s  title pane text 
   370     // which is same as Search Form s  title pane text 
   367  
   371  
   368     HBufC* titleText = StringLoader::LoadLC( R_QTN_SERVTAB_SEARCH_BASIC );
   372     HBufC* titleText = StringLoader::LoadLC( R_QTN_SERVTAB_SEARCH_BASIC );
   369     
   373     
   420 // (other items were commented in a header).
   424 // (other items were commented in a header).
   421 // ---------------------------------------------------------
   425 // ---------------------------------------------------------
   422 //
   426 //
   423 void CVIMPSTUiSearchView::DoDeactivate()
   427 void CVIMPSTUiSearchView::DoDeactivate()
   424 	{
   428 	{
       
   429 	TRACER_AUTO;
   425 	// set this flag to Efalse because  user cant initiate a search from search view
   430 	// set this flag to Efalse because  user cant initiate a search from search view
   426 	iSearchInitiated = EFalse;
   431 	iSearchInitiated = EFalse;
   427  	if (iContainer)
   432  	if (iContainer)
   428         {
   433         {
   429         CCoeEnv::Static()->AppUi()->RemoveFromStack( iContainer );
   434         CCoeEnv::Static()->AppUi()->RemoveFromStack( iContainer );
   469 //
   474 //
   470 
   475 
   471 void CVIMPSTUiSearchView::CommandFinishedL(
   476 void CVIMPSTUiSearchView::CommandFinishedL(
   472                 const MVIMPSTCmd& aCommand )
   477                 const MVIMPSTCmd& aCommand )
   473 {
   478 {
   474 
   479 	TRACER_AUTO;
   475 	//handle the observer for commands issues through HandleCommandL()
   480 	//handle the observer for commands issues through HandleCommandL()
   476 	
   481 	
   477 	switch (aCommand.CommandId())
   482 	switch (aCommand.CommandId())
   478         {
   483         {
   479          
   484          
   533 // (other items were commented in a header).
   538 // (other items were commented in a header).
   534 // ---------------------------------------------------------
   539 // ---------------------------------------------------------
   535 //
   540 //
   536 TBool CVIMPSTUiSearchView::HideAddToContactsL() const
   541 TBool CVIMPSTUiSearchView::HideAddToContactsL() const
   537 	{
   542 	{
       
   543 	TRACER_AUTO;
   538 	TBool hide(ETrue);
   544 	TBool hide(ETrue);
   539 	TInt curIndex = iContainer->ListBox()->CurrentItemIndex();
   545 	TInt curIndex = iContainer->ListBox()->CurrentItemIndex();
   540 	if( curIndex >=0)
   546 	if( curIndex >=0)
   541 		{
   547 		{
   542 		HBufC* contactId = iContainer->GetFocusedContactLC() ;
   548 		HBufC* contactId = iContainer->GetFocusedContactLC() ;
   554 // CVIMPSTUiSearchView::SearchContactsL
   560 // CVIMPSTUiSearchView::SearchContactsL
   555 // --------------------------------------------------------------------------
   561 // --------------------------------------------------------------------------
   556 //
   562 //
   557 void CVIMPSTUiSearchView:: SearchContactsL()
   563 void CVIMPSTUiSearchView:: SearchContactsL()
   558 	{
   564 	{
       
   565 	TRACER_AUTO;
   559 	if( iContainer )
   566 	if( iContainer )
   560 		{
   567 		{
   561 		iContainer->UpdateCbaL( ETrue );	
   568 		iContainer->UpdateCbaL( ETrue );	
   562 		}
   569 		}
   563 		
   570 		
   643 // CVIMPSTUiSearchView::UpdateNaviPaneTextL()
   650 // CVIMPSTUiSearchView::UpdateNaviPaneTextL()
   644 // ---------------------------------------------------------
   651 // ---------------------------------------------------------
   645 //
   652 //
   646 void CVIMPSTUiSearchView::UpdateNaviPaneTextL( )
   653 void CVIMPSTUiSearchView::UpdateNaviPaneTextL( )
   647 	{
   654 	{
       
   655 	TRACER_AUTO;
   648 	// Change the navigation pane from tabs to text label    
   656 	// Change the navigation pane from tabs to text label    
   649     CEikStatusPane* sp = CEikonEnv::Static()->AppUiFactory()->StatusPane();
   657     CEikStatusPane* sp = CEikonEnv::Static()->AppUiFactory()->StatusPane();
   650     CAknNavigationControlContainer* np =
   658     CAknNavigationControlContainer* np =
   651     						static_cast<CAknNavigationControlContainer*>(
   659     						static_cast<CAknNavigationControlContainer*>(
   652     									sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
   660     									sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
   701 // @params: Reference to a descriptor, serves as context.
   709 // @params: Reference to a descriptor, serves as context.
   702 // ---------------------------------------------------------
   710 // ---------------------------------------------------------
   703 //
   711 //
   704 void CVIMPSTUiSearchView::LaunchHelpL( const TDesC& aContext )
   712 void CVIMPSTUiSearchView::LaunchHelpL( const TDesC& aContext )
   705     {
   713     {
       
   714 	TRACER_AUTO;
   706     CArrayFix< TCoeHelpContext >* cntx = new( ELeave ) CArrayFixFlat< TCoeHelpContext >( KHelpContextSize );
   715     CArrayFix< TCoeHelpContext >* cntx = new( ELeave ) CArrayFixFlat< TCoeHelpContext >( KHelpContextSize );
   707     CleanupStack::PushL( cntx );
   716     CleanupStack::PushL( cntx );
   708 
   717 
   709     TUid KHelpUid = { KHELPUID };
   718     TUid KHelpUid = { KHELPUID };
   710     cntx->AppendL( TCoeHelpContext( KHelpUid, aContext ) );
   719     cntx->AppendL( TCoeHelpContext( KHelpUid, aContext ) );
   718 // CVIMPSTUiSearchView::SearchCallbackL()
   727 // CVIMPSTUiSearchView::SearchCallbackL()
   719 // ---------------------------------------------------------
   728 // ---------------------------------------------------------
   720 //
   729 //
   721 TInt CVIMPSTUiSearchView::SearchCallbackL(TAny* aInstance)
   730 TInt CVIMPSTUiSearchView::SearchCallbackL(TAny* aInstance)
   722     {
   731     {
       
   732 	TRACER_AUTO;
   723     static_cast<CVIMPSTUiSearchView*> (aInstance)->SearchContactsL();
   733     static_cast<CVIMPSTUiSearchView*> (aInstance)->SearchContactsL();
   724     return 0; // ignored by CAsychCallBack
   734     return 0; // ignored by CAsychCallBack
   725     }
   735     }
   726 	
   736 	
   727 //  End of File  
   737 //  End of File