// ---------------------------------------------------------
// CTrialContainer::ConstructL(const TRect& aRect)
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CTrialContainer::ConstructL( const TRect& aRect, 
                                  class CTrialView* aView )
{
   CreateWindowL();

   iNormalTopLeft = aRect.iTl;

   iView = aView;

   // Create a periodic timer but don't start it yet
   iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
   LOGNEW(iPeriodicTimer, CPeriodic);
   SetTimerTick(1000);

   class TResourceReader reader;
   iCoeEnv->CreateResourceReaderLC( reader, R_WAYFINDER_TRIAL_LIST );
   iListBox = new( ELeave ) CAknDoubleStyleListBox();
   LOGNEW(iListBox, CAknDoubleStyleListBox);
   iListBox->SetContainerWindowL(*this);
   iListBox->ConstructFromResourceL(reader);
   iListBox->SetListBoxObserver( this );
   CleanupStack::PopAndDestroy(/*reader*/);  // Resource reader

   iListBox->SetExtent( LISTBOX_POS, iListBox->MinimumSize() );
   if (iView->SearchingForIAP()) {
      /* Don't show selection list. */
      iListBox->MakeVisible(EFalse);
   }
   ResetItems(iView->ShowTrialEntryInTrialView());

   SetRect(aRect);
   ActivateL();
}
예제 #2
0
CCallObserver* CCallObserver::NewLC(class CWayFinderAppUi* aAppUi )
{
    CCallObserver* self = new (ELeave) CCallObserver();
    LOGNEW(self, CCallObserver);
    CleanupStack::PushL(self);
    self->ConstructL( aAppUi );
    return self;
}
// ----------------------------------------------------------------------------
// CNewDestDialog::NewL()
// Two-phased constructor.
// ----------------------------------------------------------------------------
//
CNewDestDialog* CNewDestDialog::NewL( CNewDestView* aView, isab::Log* aLog )
{
   CNewDestDialog* self = new (ELeave) CNewDestDialog( aLog );
   CleanupStack::PushL(self);
   LOGNEW(self, CNewDestDialog);
   self->ConstructL( aView );
   CleanupStack::Pop();
   return self;
}
예제 #4
0
// ---------------------------------------------------------
// 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);
}
// ---------------------------------------------------------
// CGuideContainer::ConstructL(const TRect& aRect)
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CGuideContainer::ConstructL( CWayFinderAppUi* appUi,
      const TRect& aRect, CGuideView* aView )
{
   iAppUI = appUi;
   
   iView = aView;

   CreateWindowL();
	
   iNextStreetLabel = new (ELeave) CEikLabel;
   LOGNEW(iNextStreetLabel, CEikLabel);
   iNextStreetLabel->SetContainerWindowL( *this );
   iNextStreetLabel->SetBufferReserveLengthL( KBuf256Length );
   iNextStreetLabel->SetTextL( _L("") );

   iCurrStreetLabel = new (ELeave) CEikLabel;
   LOGNEW(iCurrStreetLabel, CEikLabel);
   iCurrStreetLabel->SetContainerWindowL( *this );
   iCurrStreetLabel->SetBufferReserveLengthL( KBuf256Length );
   iCurrStreetLabel->SetTextL( _L("") );

   iDistanceLabel = new (ELeave) CEikLabel;
   LOGNEW(iDistanceLabel, CEikLabel);
   iDistanceLabel->SetContainerWindowL( *this );
   iDistanceLabel->SetTextL( _L("           ") );

   InitTTSContainer();    
   GetTalkingLabel()->SetContainerWindowL(*this);

    
#ifdef NAV2_CLIENT_SERIES60_V3
   if (WFLayoutUtils::LandscapeMode()) {
      CalculateLandscapeLayout();
   } else {
      CalculatePortraitLayout();
   }
#else

   // FIXME hfasth, use CImageHandler here to! Then we can migrate
   // v2 and v3.

   iGuidePicture = new (ELeave) CGuidePicture( iLog );
   LOGNEW(iGuidePicture, CGuidePicture);
   iGuidePicture->ConstructL( TRect( GUIDE_PICTURE_POS, TSize( 100, 100 ) ), this );

   iProgressBar = CGuideProgressBar::NewL(*this, 
                                          TRect(PROGRESS_BAR_POS, TSize(40, 90)), 
                                          iView->GetMbmName(), 
                                          EMbmWficonsGpb_triangle,
                                          EMbmWficonsGpb_triangle_active,
                                          EMbmWficonsGpb_triangle_mask,
                                          EMbmWficonsGpb_rect,
                                          EMbmWficonsGpb_rect_active,
                                          EMbmWficonsGpb_rect_mask);

   iNextTurnPicture = new (ELeave) CGuidePicture( iLog );
   LOGNEW(iNextTurnPicture, CGuidePicture);
   iNextTurnPicture->ConstructL(TRect(NEXT_TURN_PICTURE_POS, TSize(24, 24)), 
                                this);

   iDetourPicture = new (ELeave) CGuidePicture( iLog );
   LOGNEW(iDetourPicture, CGuidePicture);
   iDetourPicture->ConstructL(TRect(DETOUR_PICTURE_POS, TSize(24, 24)), 
                              this);

   iDetourPicture->OpenBitmapFromMbm(iView->GetMbmName(), 
                                     EMbmWficonsSmall_detour);
   iDetourPicture->SetShow(EFalse);

   iSpeedCamPicture = new (ELeave) CGuidePicture( iLog );
   LOGNEW(iSpeedCamPicture, CGuidePicture);
   iSpeedCamPicture->ConstructL(TRect(SPEEDCAM_PICTURE_POS, TSize(24, 24)), 
                                this);

   iSpeedCamPicture->OpenBitmapFromMbm(iView->GetMbmName(), 
                                       EMbmWficonsSmall_speedcam);
   iSpeedCamPicture->SetShow(EFalse);


   iExitPicture = new (ELeave) CGuidePicture( iLog );
   LOGNEW(iExitPicture, CGuidePicture);
   iExitPicture->ConstructL( TRect( EXIT_PICTURE_POS, TSize( 26, 16 ) ), this );
   iExitPicture->SetShow(EFalse);
#endif

   SetRect(aRect);

   ActivateL();
}