// ---------------------------------------------------------
// CSymTorrentStatusView::DoActivateL(...)
// 
// ---------------------------------------------------------
//
void CSymTorrentStatusView::DoActivateL(
   const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
   const TDesC8& /*aCustomMessage*/)
{
    static_cast<CSymTorrentAppUi*>(AppUi())->SetCurrentViewId(ESymTorrentStatusView);
    
	if (!iStatusContainer)
	{        
	    iStatusContainer = new (ELeave) CSymTorrentStatusContainer;
	    iStatusContainer->SetMopParent(this);
	    iStatusContainer->ConstructL( ClientRect(), iAppUi, iTorrentMgr );
	    AppUi()->AddToStackL( *this, iStatusContainer );
	    
        if (PREFERENCES->RightSoftkeyMode() == ESTSoftkeyHide)
        {
    		Cba()->SetCommandL(2, ESymTorrentCmdHide, KLitHideButtonText);        	
			Cba()->DrawDeferred(); 	
        }
        else         	
    	{
    		Cba()->SetCommandL(2, EAknSoftkeyExit, KLitExitButtonText);        	
			Cba()->DrawDeferred();
    	}
		
		iTorrentMgr->SetEngineStateObserverL(iStatusContainer);
	}
        
   static_cast<CSymTorrentAppUi*>(AppUi())->TitlePane()->SetTextToDefaultL();
}
void CAknFileSettingPage::UpdateCbaL(void)
{
    if(!DataValidity())
    {
        Cba()->SetCommandSetL(InvalidDataCbaResourceId());
    }
    else
    {
        Cba()->SetCommandSetL(DefaultCbaResourceId());
    }
    Cba()->DrawDeferred();
}
void CJavaDebugAgentFullScreenLogView::DoActivateL(const TVwsViewId&,
                                                   TUid,const TDesC8&)
{
    Cba()->MakeVisible(EFalse);
    StatusPane()->MakeVisible(EFalse);
    ShowLogScreenL();
}
Example #4
0
QT_BEGIN_NAMESPACE

/*!
  \class QS60MainAppUi
  \since 4.6
  \brief The QS60MainAppUi class is a helper class for S60 migration.

  \warning This class is provided only to get access to S60 specific
  functionality in the application framework classes. It is not
  portable. We strongly recommend against using it in new applications.

  The QS60MainAppUi provides a helper class for use in migrating from
  existing S60 based applications to Qt based applications. It is used
  in the exact same way as the \c CAknAppUi class from Symbian, but
  internally provides extensions used by Qt.

  When modifying old S60 applications that rely on implementing
  functions in \c CAknAppUi, the class should be modified to inherit
  from this class instead of \c CAknAppUi. Then the application can
  choose to override only certain functions.

  For more information on \c CAknAppUi, please see the S60
  documentation.

  Unlike other Qt classes, QS60MainAppUi behaves like an S60 class,
  and can throw Symbian leaves.

  \sa QS60MainDocument, QS60MainApplication
 */

/*!
 * \brief Second phase Symbian constructor.
 *
 * Constructs all the elements of the class that can cause a leave to happen.
 *
 * If you override this function, you should call the base class implementation as well.
 */
void QS60MainAppUi::ConstructL()
{
    // Cone's heap and handle checks on app destruction are not suitable for Qt apps, as many
    // objects can still exist in static data at that point. Instead we will print relevant information
    // so that comparative checks may be made for memory leaks, using ~SPrintExitInfo in corelib.
    iEikonEnv->DisableExitChecks(ETrue);

    // Initialise app UI with standard value.
    // ENoAppResourceFile and ENonStandardResourceFile makes UI to work without
    // resource files in most SDKs. S60 3rd FP1 public seems to require resource file
    // even these flags are defined
    TInt flags = CAknAppUi::EAknEnableSkin;
    if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes)) {
        flags |= CAknAppUi::ENoScreenFurniture | CAknAppUi::ENonStandardResourceFile;
    }
    BaseConstructL(flags);

    if (!QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes)) {
        CEikButtonGroupContainer* nativeContainer = Cba();
        nativeContainer->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY_WITH_IDS);
    }
}
Example #5
0
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CMovingBallAppUi::TimerExpired(void)
{
	if(iOkToContinue)
	{
		Cba()->SetCommandSetL(R_MYOPTEXIT_CBA);
		Cba()->DrawDeferred();	
		// Create view object
		iAppView = CMovingBallAppView::NewL( ClientRect(),Cba());
	
		delete iMySplashScreen;
		iMySplashScreen = NULL;
	}
	else
	{
		HandleCommandL(EAknSoftkeyExit);
	}
}
void CZXingBarcodeReaderAppUi::UseOptionsBackCbaL()
    {
    CEikButtonGroupContainer* cba = Cba();
    if (cba)
        {
        cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK);
        cba->DrawNow();
        }
    }
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CMgAppUi::ConstructL()
{
	BaseConstructL(CAknAppUi::EAknEnableSkin);
	
	iMainContainer = new(ELeave)CMainContainer(Cba());

	AddToStackL(iMainContainer);
	iMainContainer->SetMopParent(this);
	iMainContainer->ConstructL();
}
TBool CZXingBarcodeReaderAppUi::IsBackCBA()
    {
    CEikButtonGroupContainer* cba = Cba();
    // NOTE: There should be EAknSoftkeyBack in the application because
    // we use R_AVKON_SOFTKEYS_SELECT_BACK, but it seems that there is EAknSoftkeyCancel
    CCoeControl* back = cba->ControlOrNull(EAknSoftkeyBack);
    CCoeControl* cancel = cba->ControlOrNull(EAknSoftkeyCancel);
    if (back || cancel)
        return ETrue;
    else
        return EFalse;
    }
void CSplashView::CheckGoToStart()
{
   iSearchingForIAP = EFalse;
   iMode = EShowLatestNewsImage;
   if (iWayFinderUI->iUrgentShutdown) {
      iWayFinderUI->HandleCommandL( EAknSoftkeyExit );
   } else if (iWayFinderUI->IsGoldVersion() && !iDontTimeout){
      /* Change view to startpage automatically. */
      iWayFinderUI->GotoStartViewL();
   } else if (iDontTimeout) {
      Cba()->MakeCommandVisible(EAknSoftkeyOk, ETrue);
   }
}
	void CDataQuotaView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,
								 TUid /*aCustomMessageId*/,
								 const TDesC8& /*aCustomMessage*/)
	{
	// Create container object
	if (!iContainer)
		{
		iContainer = new (ELeave) CDataQuotaContainer(this);
		iContainer->ConstructL(ClientRect());
		iContainer->SetMopParent(this);
		
		HBufC* refreshText(
			CCoeEnv::Static()->AllocReadResourceLC(R_DATAQUOTA_REFRESH));
		TInt pos(Cba()->PositionById(EAknSoftkeyExit));
		Cba()->RemoveCommandFromStack(pos, EAknSoftkeyExit);
		Cba()->SetCommandL(pos, EDataQuotaRefresh, *refreshText);
		CleanupStack::PopAndDestroy(refreshText);
		}

	// Add container to view control stack
	AppUi()->AddToStackL(*this, iContainer);
	iContainer->MakeVisible(ETrue);
	}
// ---------------------------------------------------------
// CSplashView::DoActivateL(...)
// ?implementation_description
// ---------------------------------------------------------
//
void CSplashView::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
                                  TUid aCustomMessageId,
                                  const TDesC8& /*aCustomMessage*/)
{
   iWayFinderUI->GetNavigationDecorator()->MakeScrollButtonVisible( EFalse );
   /* New policy 040712: Never show activate softkey. */
   // Cba()->MakeCommandVisible(EWayFinderSoftKeyUpgrade, EFalse);
   if( !iWayFinderUI->iUrgentShutdown && aCustomMessageId.iUid != EShutdown ){
      iShowNews = ETrue;
      if(aCustomMessageId.iUid == EShowNews) {
         /* Force news showing, the user wanted it. */
         iDontTimeout = ETrue;
         iMode = EShowLatestNewsImage;
      } else if (iWayFinderUI->GetIAP() < 0) {
         /* We need to look for a working IAP. */
         iMode = EShowIAPProgressBar;
         iDontTimeout = EFalse;
         // Always hide Activate CBAbutton.
      } else {
         /* Working IAP, show news as usual. */
         iMode = EShowLatestNewsImage;
         iDontTimeout = EFalse;
         if (iWayFinderUI->IsGoldVersion() ){
            /* Gold users are not forced to watch the latest news always. */
            iShowNews = EFalse;
         }
      }
   } else {
      /* Urgent shutdown. */
      iWayFinderUI->iUrgentShutdown = ETrue;
      iMode = EShowNothing;
   }
   if(!iContainer){
      /* Restart the container. */
      iContainer = new (ELeave) CSplashContainer(iLog);
      LOGNEW(iContainer, CSplashContainer);
      iContainer->SetMopParent(this);
#if defined NAV2_CLIENT_SERIES60_V3
      TRect rect = WFLayoutUtils::GetMainPaneRect();
      rect.iTl = TPoint(0, 0);
      iContainer->ConstructL( rect, iImageHandler, this );
#else
      iContainer->ConstructL( ClientRect(), iStartupImage, this );
#endif
      AppUi()->AddToStackL( *this, iContainer );
      iContainer->StartTimer();
   }
   Cba()->MakeCommandVisible(EAknSoftkeyOk, ETrue);
}
// ---------------------------------------------------------
// CSymTorrentMainView::DoActivateL(...)
// 
// ---------------------------------------------------------
//
void CSymTorrentMainView::DoActivateL(
   const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
   const TDesC8& /*aCustomMessage*/)
{
	static_cast<CSymTorrentAppUi*>(AppUi())->SetCurrentViewId(ESymTorrentMainView);
	
    if (!iMainContainer)
    {
        iMainContainer = new (ELeave) CSymTorrentMainContainer;
        iMainContainer->SetMopParent(this);
        iMainContainer->ConstructL( ClientRect() , iAppUi, iTorrentMgr);
        AppUi()->AddToStackL( *this, iMainContainer );
        
        if (PREFERENCES->RightSoftkeyMode() == ESTSoftkeyHide)
        {
    		Cba()->SetCommandL(2, ESymTorrentCmdHide, KLitHideButtonText);        	
			Cba()->DrawDeferred(); 	
        }
        else         	
    	{
    		Cba()->SetCommandL(2, EAknSoftkeyExit, KLitExitButtonText);        	
			Cba()->DrawDeferred();
    	}
    	
    	iTorrentMgr->AddTorrentObserverL(iMainContainer);  
	    for (TInt i=0; i<iTorrentMgr->TorrentCount(); i++)
	    {
	    	iMainContainer->InsertTorrentL(iTorrentMgr->Torrent(i), i);
	    }
    }

	if (iLastItemIndex != -1)
		iMainContainer->ListBox()->SetCurrentItemIndex(iLastItemIndex);
	
	static_cast<CSymTorrentAppUi*>(AppUi())->TitlePane()->SetTextToDefaultL();
}
void CSplashView::AskForIAPDone()
{
   iAskForIAP = EFalse;
   iSearchingForIAP = EFalse;
   iMode = EShowLatestNewsImage;
   delete iProgressDlg;
   iProgressDlg = NULL;
   if (iContainer) {
      iContainer->ShowStatusPane(EFalse);
      iContainer->AskForIAPDone();
      iContainer->StartTimer();
   }  
   /* Don't do anything. */
   if (iContainer) {
      Cba()->MakeCommandVisible(EAknSoftkeyOk, ETrue);
   }
}
Example #14
0
/**
 * Handle status pane size change for this view (override)
 */
void CpjsuaContainerView::HandleStatusPaneSizeChange()
{
    CAknView::HandleStatusPaneSizeChange();

    // this may fail, but we're not able to propagate exceptions here
    TVwsViewId view;
    AppUi()->GetActiveViewId( view );
    if ( view.iViewUid == Id() )
    {
        TInt result;
        TRAP( result, SetupStatusPaneL() );
    }

    // Hide menu
    Cba()->MakeVisible(EFalse);

    //PutMessage("HandleStatusPaneSizeChange()");

    // [[[ begin generated region: do not modify [Generated Code]
    // ]]] end generated region [Generated Code]

}
// ---------------------------------------------------------------------------
// CBCTestAppFrmView::AppFrmView_cba
// ---------------------------------------------------------------------------
//  
void CBCTestAppFrmView::AppFrmView_cba()
    {
    Cba();
    }
Example #16
0
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CMgAppUi::TimerExpired()
{
	if(iOkToContinue)
	{    
        if(KAppIsTrial){
        
            TBuf<255> trialBuff;
            TBool isFirstTime(EFalse);
            TInt hoursLeft(0);
            if(CTrialHandler::IsNowOkL(isFirstTime,hoursLeft)){
                CTrialHandler::SetDateNowL();
                
                trialBuff.Copy(_L("You have "));
                trialBuff.AppendNum(hoursLeft);
                trialBuff.Append(_L("hours left on your Trial."));   
                
                ShowNoteL(trialBuff);
            }else{
                trialBuff.Copy(KtxTrialSMSMessage1);
                trialBuff.Append(KtxtApplicationName);
                trialBuff.Append(KtxTrialSMSMessage2);
                trialBuff.Append(KtxTrialOviLink);
                CAknQueryDialog* dlg = CAknQueryDialog::NewL();
                if(dlg->ExecuteLD(R_QUERY,trialBuff))
                {
                    OpenOviSiteL(KtxTrialOviLink);
                }
            }
        }
    
		if(iMySplashScreen)
		{
			RemoveFromStack(iMySplashScreen);
		}
	
		if(iMainContainer)
		{
			RemoveFromStack(iMainContainer);
		}
	
		delete iMainContainer;
		iMainContainer = NULL;
	
		if(StatusPane()->CurrentLayoutResId() != R_AVKON_STATUS_PANE_LAYOUT_USUAL)
		{
			StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL);
		}
	
		StatusPane()->DrawNow();
	
		iMainContainer = new(ELeave)CMainContainer(Cba());
		iMainContainer->SetMopParent(this);
		AddToStackL(iMainContainer);
		iMainContainer->ConstructL();
	
		delete iMySplashScreen;
		iMySplashScreen = NULL;
	}
	else
	{
		HandleCommandL(EQuickExit);
	}
}
// -----------------------------------------------------------------------------
// CTestSettingPage::TestCba
// -----------------------------------------------------------------------------
//
CEikButtonGroupContainer* CTestSettingPage::TestCba() const 
    {
    return Cba();
    }
void CEmTubeSearchView::SetCbaL( TInt aCbaResource )
	{
	Cba()->SetCommandSetL( aCbaResource );
	Cba()->DrawDeferred();
	}