Exemplo n.º 1
0
// -----------------------------------------------------------------------
// Method managed by IDE to construct views
// Please do not edit this routine as its
// contents are regenerated upon new view creation.
// -----------------------------------------------------------------------
void CHindiDemoAppUi::InitViewsL()
{
  iHindiDemoView = CHindiDemoView::NewL();
  AddViewL( iHindiDemoView );
  iMainViewView = CMainViewView::NewL();
  AddViewL( iMainViewView );
}
Exemplo n.º 2
0
// [[[ begin generated function: do not modify
void CStarDictAppUi::InitializeContainersL()
	{
	iStarDictContainerView = CStarDictContainerView::NewL();
	AddViewL( iStarDictContainerView );
	SetDefaultViewL( *iStarDictContainerView );
	iDictMeaningContainerView = CDictMeaningContainerView::NewL();
	AddViewL( iDictMeaningContainerView );
	}
Exemplo n.º 3
0
// [[[ begin generated function: do not modify
void Csymbian_ua_guiAppUi::InitializeContainersL()
{
    iSymbian_ua_guiContainerView = Csymbian_ua_guiContainerView::NewL();
    AddViewL (iSymbian_ua_guiContainerView);
    iSymbian_ua_guiSettingItemListView = Csymbian_ua_guiSettingItemListView::NewL();
    AddViewL (iSymbian_ua_guiSettingItemListView);
    SetDefaultViewL (*iSymbian_ua_guiSettingItemListView);
}
Exemplo n.º 4
0
void CTestAppUi::CreateViewsL()
	{
	if (iViewsCreated)
		{
		RDebug::Print(_L("Views already created"));
		return;
		}

	AddViewL(VIEW_ONE);
	AddViewL(VIEW_TWO);
	STATIC_CAST(CTestView*,View(VIEW_TWO))->InitializeAsDefaultL();
	RDebug::Print(_L("All views created"));
	iViewsCreated=ETrue;
	}
Exemplo n.º 5
0
void CMpAppUi::ConstructL()
{
	BaseConstructL();

	//// Initialize graphics
	//iSpriteHandler = CSpriteHandler::NewL();

	CView1* view1 = new (ELeave) CView1;

	CleanupStack::PushL( view1 );
	view1->ConstructL();
	AddViewL( view1 );      // transfer ownership to CAknViewAppUi
	CleanupStack::Pop();    // view1

	CView2* view2 = new (ELeave) CView2;

	CleanupStack::PushL( view2 );
	view2->ConstructL();
	AddViewL( view2 );
	CleanupStack::Pop(); 

	CView3* view3 = new (ELeave) CView3;

	CleanupStack::PushL( view3 );
	view3->ConstructL();
	AddViewL( view3 );
	CleanupStack::Pop(); 

	CView4* view4 = new (ELeave) CView4;

	CleanupStack::PushL( view4 );
	view4->ConstructL();
	AddViewL( view4 );
	CleanupStack::Pop(); 

	CSplashView* splash = new (ELeave) CSplashView;

	CleanupStack::PushL( splash );
	splash->ConstructL();
	AddViewL( splash );     
	CleanupStack::Pop();  

	//SetDefaultViewL(*view1);
	SetDefaultViewL(*splash);

	// Initialize graphics
	iSpriteHandler = CSpriteHandler::NewL();
}
Exemplo n.º 6
0
void CMLauncherAppUi::CreateStopwatchViewL(void)
{
    LOG(ELogGeneral,1,"AppUi::CreateStopwatchViewL: start");

    //first, display the form to the user
    //create & initialie the data
    TStopwatchData stopwatchData;
    //TODO: initialize from preferences

    // Launch the dialog to edit data
    CAknForm* dlg = CStopwatchForm::NewL(stopwatchData);
    if(dlg->ExecuteLD(R_STOPWATCH_FORM_DIALOG))
    {
        //user did not dismissed the dialog, create the view
        if(iStopwatchView==NULL)
        {
            //create the view and switch to it
            iStopwatchView=CStopwatchView::NewLC();
            iStopwatchView->iStopwatchData=stopwatchData;
            AddViewL(iStopwatchView);//transfers ownership
            CleanupStack::Pop(iStopwatchView);
        };
        iCurrentView=iStopwatchView;
        iActiveViews|=EStopwatchViewActive;
        //ChangeExitWithNaviL(KStopwatchViewId);
        ActivateLocalViewL(TUid::Uid(KStopwatchViewId));
    };

    LOG(ELogGeneral,-1,"AppUi::CreateStopwatchViewL: end");
};
Exemplo n.º 7
0
void CMLauncherAppUi::CreateMusicPlayerViewL(CPlaylist *aPlaylist, TBool aIsPreview, TBool aStartPlaying)
{
	LOG(ELogGeneral,1,"AppUi::CreateMusicPlayerViewL: start");
	
	//check if we need to load this playlist
	TRAPD(err,aPlaylist->LoadPlaylistL(MyDoc()));
	if(err)
	{
		LOG(ELogGeneral,-1,"AppUi::CreateMusicPlayerViewL: end (error loading playlist: %d)",err);
		return;
	};

	if(iMusicPlayerView==NULL)
	{
		//create the view and switch to it
		iMusicPlayerView=CMusicPlayerView::NewLC();
		AddViewL(iMusicPlayerView);//transfers ownership
		CleanupStack::Pop(iMusicPlayerView);
	};
	iCurrentView=iMusicPlayerView;
	iActiveViews|=EMusicPlayerViewActive;
	ActivateLocalViewL(TUid::Uid(KMusicPlayerViewId));
	err=iMusicPlayerView->StartPlaylistL(aPlaylist,aIsPreview,aStartPlaying);
	if(err)
		CloseMusicPlayerViewL();
	LOG(ELogGeneral,-1,"AppUi::CreateMusicPlayerViewL: end");
};
void CUshahidiAppUi::ConstructL()
    {
    // Initialise app UI
    BaseConstructL(EAknEnableSkin);

    _LIT(KEmptyStr,"");

    iIncidentCreParams = new (ELeave) CDesC16ArrayFlat(1);
	 for(TInt i=0;i<NIncident_params;i++) //populate fields
		 iIncidentCreParams->AppendL(KEmptyStr);

	 iPhotoUploadParams = new (ELeave) CDesC16ArrayFlat(1);
	 for(TInt i=0;i<NPhoto_params;i++) //populate fields
		 iPhotoUploadParams->AppendL(KEmptyStr);


    iAppView = CUshahidiView::NewL();


    // Transfer ownership to base class
    AddViewL( iAppView );


    SetDefaultViewL( *iAppView );


    ///construct engine stuff
    TRAPD(err,
    	iAzqInternalGPSReader = CAzqInternalGPSReader::NewL(*this);
    	iAzqInternalGPSReader->StartL();
    	);
Exemplo n.º 9
0
// member functions
void CAppUi::ConstructL()
{
  BaseConstructL();
  CSplashView *splashView = CSplashView::NewLC();
  AddViewL(splashView);
  CleanupStack::Pop(splashView);

  CCamView *camView = CCamView::NewLC();
  AddViewL(camView);
  CleanupStack::Pop(camView);

  CPlaybackView *playbackView = CPlaybackView::NewLC();
  AddViewL(playbackView);
  CleanupStack::Pop(playbackView);

  SetDefaultViewL(*splashView);
}
// -----------------------------------------------------------------------------
// CDesktopHotKeyAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CDesktopHotKeyAppUi::ConstructL()
	{
	// Initialise app UI with standard value.
	BaseConstructL(CAknAppUi::EAknEnableSkin);

	// Create view object
	iAppView = CDesktopHotKeyAppView::NewL();
	AddViewL(iAppView);
	
	iHelpView = CHelpView::NewL();
	AddViewL(iHelpView);
	iLogoView = CLogoView::NewL();
	AddViewL(iLogoView);
	
	SetDefaultViewL(*iAppView);

	//add your code here...

	}
Exemplo n.º 11
0
void COokjorAppUi::ConstructL()
    {

#ifdef EKA2
  BaseConstructL(EAknEnableSkin);
#else
  //BaseConstructL(KEnableSkinFlag | KLayoutAwareFlag);
  BaseConstructL(0x08 | 0x1000);
#endif
/*
	CEikStatusPane* sp = StatusPane();
iNaviPane = (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
sp->SetDimmed(ETrue);

	iDecoratedTabGroup = iNaviPane->ResourceDecorator();

if (iDecoratedTabGroup)
   {
   iTabGroup = (CAknTabGroup*) iDecoratedTabGroup->DecoratedControl();
   }

if (iTabGroup)
   {
	iTabGroup->SetActiveTabById(ENavigationPaneStatusViewId);
   }
*/

  //we dont use autostart in this app
 iAppView = COokjorAppView::NewL(this);
 iAboutAppView = CAboutAppView::NewL( ENavigationPaneAboutViewId);

 AddViewL(iAboutAppView);
 AddViewL(iAppView);    // transfer ownership to base class
 SetDefaultViewL(*iAppView);







    }
// -----------------------------------------------------------------------------
// CThemeChangeAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CThemeChangeAppUi::ConstructL()
	{
	// Initialise app UI with standard value.
	BaseConstructL(CAknAppUi::EAknEnableSkin);

	iDataModel = COKCModel::NewL();
	iUIMgr = CUIManager::NewL();
	// Create view object
	appView= CThemeChangeAppView::NewL();
	AddViewL(appView);
	helpView = CHelpView::NewL();
	AddViewL(helpView);
	settingView = CNormalSettingView::NewL();
	AddViewL(settingView);
	
	SetDefaultViewL(*appView);

	//add your code here...

	}
Exemplo n.º 13
0
// ---------------------------------------------------------------------------
// symbian 2nd phase ctor
// ---------------------------------------------------------------------------
//
void CBCTestEditorAppUi::ConstructL()
    {
    BaseConstructL();
    AknsUtils::SetAvkonSkinEnabledL( ETrue );

    // init view
    CBCTestEditorView* view = CBCTestEditorView::NewL();
    CleanupStack::PushL( view );
    AddViewL( view );
    CleanupStack::Pop( view );    
    
    ActivateLocalViewL( view->Id() );
    }
void CUiLoftAppUi::InnerConstructL()
{
	CALLSTACKITEM_N(_CL("CUiLoftAppUi"), _CL("InnerConstructL"));
	
    BaseConstructL(EAknEnableSkin);
	
//     iAppView = CUiLoftAppView::NewL(ClientRect());    

	
	
	iListView = CListView::NewL();//KListView);
	AddViewL( iListView ); 
	SetDefaultViewL(*iListView);
}
Exemplo n.º 15
0
// ----------------------------------------------------------------------------
// void CBCTestQueryAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// Creates view class object.
// ----------------------------------------------------------------------------
void CBCTestQueryAppUi::ConstructL()
    {
    BaseConstructL();
    AknsUtils::SetAvkonSkinEnabledL( ETrue );
    
    iTestUtil = CBCTestUtil::NewL();
    
    CBCTestQueryView* view = CBCTestQueryView::NewL( iTestUtil );
    CleanupStack::PushL( view );
    AddViewL( view );
    CleanupStack::Pop( view );    
    
    ActivateLocalViewL( view->Id() );
    
    }
Exemplo n.º 16
0
//
// CTrkAppUi::ConstructL
//
void CTrkAppUi::ConstructL()
{
    BaseConstructL(EAknEnableSkin);
	
    TInt err = iTrkSession.ConnectToServer();
    if(err)
    {
        CAknGlobalNote* errNote = CAknGlobalNote::NewL();
        CleanupStack::PushL( errNote );
        TInt noteid = errNote->ShowNoteL(EAknGlobalErrorNote, KErrorNotification);
        CleanupStack::PopAndDestroy();  
        User::Leave(err);
    }
   	iSettingsData = CTrkSettingsData::NewL(iTrkSession); 

	iAppView = CTrkAppView::NewL(iSettingsData, iTrkSession);
	AddViewL(iAppView);

	iSettingsView = CTrkSettingsView::NewL(iSettingsData);
	AddViewL(iSettingsView);

	//set the main app view as the default view
	SetDefaultViewL(*iAppView);
}
Exemplo n.º 17
0
void CMLauncherAppUi::CreateMyFilesViewL()
{
	LOG(ELogGeneral,1,"AppUi::CreateMyFilesView: start");

	if(iMyFilesView==NULL)
	{
		//create the view and switch to it
		iMyFilesView=CMyFilesView::NewLC();
		AddViewL(iMyFilesView);//transfers ownership
		CleanupStack::Pop(iMyFilesView);
	};
	iCurrentView=iMyFilesView;
	iActiveViews|=EMyFilesViewActive;
	ActivateLocalViewL(TUid::Uid(KMyFilesViewId));
	LOG(ELogGeneral,-1,"AppUi::CreateMyFilesView: end");
}
Exemplo n.º 18
0
void CMLauncherAppUi::CreateSourcesViewL()
{
	LOG(ELogGeneral,1,"AppUi::CreateSourcesViewL: start");

	if(iSourcesView==NULL)
	{
		//create the view and switch to it
		iSourcesView=CSourcesView::NewLC();
		AddViewL(iSourcesView);//transfers ownership
		CleanupStack::Pop(iSourcesView);
	};
	iCurrentView=iSourcesView;
	//iActiveViews|=ESourcesViewActive;//no need to set this view as active, because we can not switch away from it anyway
	ActivateLocalViewL(TUid::Uid(KSourcesViewId));
	LOG(ELogGeneral,-1,"AppUi::CreateSourcesViewL: end");
};
Exemplo n.º 19
0
void CMLauncherAppUi::NewTransferL(const TInt aNrFiles, const TInt aTotalSize, const RArray<TInt> &aFileSizes)
{
	LOG(ELogGeneral,1,"AppUi::NewTransferL: start");
	if(iFiletransferView==NULL)
	{
		//create the view and switch to it
		iFiletransferView=CFiletransferView::NewLC();
		AddViewL(iFiletransferView);//transfers ownership
	    CleanupStack::Pop(iFiletransferView);
	};
	iFiletransferView->NewTransferL(aNrFiles,aTotalSize,aFileSizes);
	iCurrentView=iFiletransferView;
	iActiveViews|=EFiletransferViewActive;
	//ChangeExitWithNaviL(KFiletransferViewId);
	ActivateLocalViewL(TUid::Uid(KFiletransferViewId));
	LOG(ELogGeneral,-1,"AppUi::NewTransferL: end");
};
Exemplo n.º 20
0
// -----------------------------------------------------------------------------
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CPixelMetricsMapperAppUi::ConstructL()
    {
    BaseConstructL();

    CEikonEnv& eikEnv = *CEikonEnv::Static();

    eikEnv.WsSession().ComputeMode(
        RWsSession::EPriorityControlDisabled );
    RThread().SetProcessPriority( EPriorityHigh );

    CPixelMetricsMapperView* view = new( ELeave ) CPixelMetricsMapperView;
    CleanupStack::PushL( view );
    view->ConstructL();
    CleanupStack::Pop();    // view
    AddViewL(view);    // transfer ownership to CAknViewAppUi
    iView = view;
    }
Exemplo n.º 21
0
/*
-----------------------------------------------------------------------------

  CSAEXAppUi::ConstructL()                          
  
  2nd phase constructor

-----------------------------------------------------------------------------
*/
void CSAEXAppUi::ConstructL()
    {

    BaseConstructL();                                   // init this AppUi with standard values

	iSession=NULL;	
	iSession=CMsvSession::OpenSyncL(*this);

    iRecipient=HBufC::NewL(KMaxTelephoneNumberLength);  // for recipient sms number
    iRecipient->Des() = _L("09416043351");                             

    // Create SendUi
    iSUI = CSendAppUi::NewL(ESAEXCmdSendUi); 

    // Series60 view launching
    CSAEXAppView* view = CSAEXAppView::NewLC(); 
    AddViewL(view);                     // add created view to this AppUi
    ActivateLocalViewL( view->Id() );   // activate view
    CleanupStack::Pop(); // view
    }
Exemplo n.º 22
0
// --------------------------------------------------------------------------
// symbian 2nd phase ctor
// --------------------------------------------------------------------------
//
void CBCTestButtonAppUi::ConstructL()
    {
    BaseConstructL();
    AknsUtils::SetAvkonSkinEnabledL( ETrue );

	// init test util
	iTestUtil = CBCTestUtil::NewL();

    // init view
    CBCTestButtonView* view = CBCTestButtonView::NewL(iTestUtil);
    CleanupStack::PushL( view );
    AddViewL( view );
    CleanupStack::Pop( view );    
    
    ActivateLocalViewL( view->Id() );

	// Add test case here.
    iTestUtil->AddTestCaseL( CBCTestButtonCase::NewL( view->Container() ),
        _L("AknButton test case") );
    }
Exemplo n.º 23
0
// ---------------------------------------------------------------------------
// symbian 2nd phase ctor
// ---------------------------------------------------------------------------
//
void CBCTestVolumeAppUi::ConstructL()
    {
    BaseConstructL();
    AknsUtils::SetAvkonSkinEnabledL( ETrue );

    // Creates CBCTestVolumeView class object.
    CBCTestVolumeView* view = CBCTestVolumeView::NewL();
    CleanupStack::PushL( view );
    AddViewL( view ); // transfer ownership to CAknViewAppUi.
    CleanupStack::Pop(); // view

    ActivateLocalViewL( view->Id() );

    // init bc test framework    
    iTestUtil = CBCTestUtil::NewL();

    // add all test cases....
    iTestUtil->AddTestCaseL( CTestVolumeSettingPage::NewL(view), _L("CTestVolumeSettingPage") );
    iTestUtil->AddTestCaseL( CTestVolumeNaviPane::NewL(view), _L("CTestVolumeNaviPane") );
	iTestUtil->AddTestCaseL( CTestOthers::NewL(view), _L("CTestOthers") );
    }
Exemplo n.º 24
0
void CVwsSession::AddViewL(const RMessage2& aMessage)
	{
	TVwsViewId viewId(ViewIdFromMessageL(aMessage));

	if (iAppUid.iUid==0)
		{
		iAppUid.iUid=viewId.iAppUid.iUid;
#ifdef __DO_LOGGING__
		TBuf<64> queueName;
		queueName.Format(_L("Session Queue for \"%x\""),iAppUid.iUid);
		iEventQueue->SetName(queueName);
#endif
		}
	else if (iAppUid!=viewId.iAppUid)
		{
		// All views added by the same client should have the same app uid.
		PanicClient(aMessage,EVwsInvalidViewUid);
		}

	LOG4(CVwsLog::ENormal,_L("Adding view \"%x,%x\""),viewId.iAppUid.iUid,viewId.iViewUid.iUid);
	AddViewL(viewId);
	}
Exemplo n.º 25
0
// -----------------------------------------------------------------------------
// CAknExNoteAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CAknExNoteAppUi::ConstructL()
    {

    // Initialise app UI with standard value.
    BaseConstructL( EAknEnableSkin );

    // Creates CAknExNoteView class object.
    CAknExNoteView* view = new( ELeave ) CAknExNoteView;

    // Push CAknExNoteView's pointer into CleanUpStack for safety object construction.
    CleanupStack::PushL( view );

    //Construct View
    view->ConstructL();
    
     // View is constructed correctly , Pop it's pointer from CleanUpStack
    CleanupStack::Pop();

    // Transfer ownership to CAknViewAppUi.
    AddViewL( view ); 

    ActivateLocalViewL( view->Id() );
    }
Exemplo n.º 26
0
void CVwsSession::ServiceL(const RMessage2& aMessage)
	{
	TBool completeMessage=ETrue;
	switch (aMessage.Function())
		{
		case EVwsAsynchronousMessageForServerToPanicClientWith:
			iPanicMessage=aMessage;
			completeMessage=EFalse;
			break;
		case EVwsClose:
			CActiveScheduler::Stop();
			break;
		case EVwsAddView:
			AddViewL(aMessage);
			break;
		case EVwsSetSystemDefaultView:
			SetSystemDefaultViewL(aMessage);
			break;
		case EVwsGetSystemDefaultView:
			GetSystemDefaultViewL(aMessage);
			break;
		case EVwsRemoveView:
			RemoveViewL(aMessage);
			break;
		case EVwsRequestViewEvent:
			RequestViewEventL(aMessage);
			completeMessage=EFalse;
			break;
		case EVwsRequestViewEventCancel:
			CancelRequestViewEvent();
			break;
		case EVwsActivateView:
			ActivateViewL(aMessage,ECompleteRequest);
			completeMessage=EFalse;
			break;
		case EVwsCreateActivateViewEvent:
			ActivateViewL(aMessage,EDoNotCompleteRequest);
			break;
		case EVwsRequestCustomMessage:
			RequestCustomMessageL(aMessage);
			break;
		case EVwsStartApp:
			StartAppL(aMessage);
			completeMessage=EFalse;
			break;
		case EVwsDeactivateActiveView:
			DeactivateActiveViewL(aMessage,ECompleteRequest);
			completeMessage=EFalse;
			break;
		case EVwsDeactivateActiveViewIfOwnerMatch:
 			DeactivateActiveViewIfOwnerMatchL(aMessage,ECompleteRequest);
 			completeMessage=EFalse;
 			break;
		case EVwsCreateDeactivateViewEvent:
			DeactivateActiveViewL(aMessage,EDoNotCompleteRequest);
			break;
		case EVwsNotifyNextDeactivation:
			NotifyNextDeactivationL(aMessage);
			break;
		case EVwsNotifyNextActivation:
			NotifyNextActivationL(aMessage);
			break;
		case EVwsSetClientRequestTimeOut:
			SetClientRequestTimeOut(aMessage);
			break;
		case EVwsSetServerEventTimeOut:
			SetServerEventTimeOut(aMessage);
			break;
		case EVwsEnableServerEventTimeOut:
			EnableServerEventTimeOut(aMessage);
			break;
		case EVwsCheckSourceOfViewSwitch:
			CheckSourceOfViewSwitchL(aMessage);
			break;
		case EVwsPriority:
			GetPriorityForActiveObjectL(aMessage);
			break; 
		case EVwsEnableServerBlankScreen:
			EnableServerBlankScreen(aMessage);
			break;
		case EVwsSetProtected:
			SetProtectedL(aMessage);
			break;
		case EVwsSetCrossCheckUid:
			iServer.SetCrossCheckUid(aMessage);
			break;
		case EVwsSetWindowBackgroundColor:
			iServer.SetWindowBackgroundColor(aMessage);
			break;
		case EVwsCurrentActiveViewId:
			GetCurrentActiveViewIdL(aMessage);
			break;
		default:
			PanicClient(aMessage,EVwsBadRequest);
		}
	if (completeMessage && !aMessage.IsNull())
		{
		LOG3(CVwsLog::ENormal,_L("Auto completing with %d"),KErrNone);
		aMessage.Complete(KErrNone);
		}
	}
Exemplo n.º 27
0
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CMobileOfficeAppUi::ConstructL()
// 
// ----------------------------------------------------------
//
void CMobileOfficeAppUi::ConstructL()
{
	BaseConstructL(EAknEnableSkin);

	iOpenDocument = COpenDocument::NewL();
	
	#ifndef FREEVERSION
		TBuf<50> nein;
		#ifndef __WINSCW__
			CIMEIRetriever::GetIMEIL(nein);	
		#endif

		licMan.SetIMEI(nein);
		licMan.Start(this);
	#endif	

	//SetOrientationL(EAppUiOrientationLandscape);

    // Show tabs for main views from resources
    CEikStatusPane* sp = StatusPane();

    // Fetch pointer to the default navi pane control
    iNaviPane = (CAknNavigationControlContainer*)sp->ControlL( 
        TUid::Uid(EEikStatusPaneUidNavi));

    // Tabgroup has been read from resource and it were pushed to the navi pane. 
    // Get pointer to the navigation decorator with the ResourceDecorator() function. 
    // Application owns the decorator and it has responsibility to delete the object.
    iDecoratedTabGroup = iNaviPane->ResourceDecorator();
    if (iDecoratedTabGroup)
        {
        iTabGroup = (CAknTabGroup*) iDecoratedTabGroup->DecoratedControl();
		iTabGroup->SetObserver( this );
		}

		
    CMobileOfficeView* view1 = new (ELeave) CMobileOfficeView;

    CleanupStack::PushL( view1 );
    view1->ConstructL();
    AddViewL( view1 );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // view1

    CMobileOfficeView2* view2 = new (ELeave) CMobileOfficeView2;

    CleanupStack::PushL( view2 );
    view2->ConstructL();
    AddViewL( view2 );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // view2

	
	CEditorViewView* view3 = new (ELeave) CEditorViewView;

    CleanupStack::PushL( view3 );
    view3->ConstructL();
    AddViewL( view3 );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // view2

	
	CViewImageView* view4 = new (ELeave) CViewImageView;

    CleanupStack::PushL( view4 );
    view4->ConstructL();
    AddViewL( view4 );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // view2

    SetDefaultViewL(*view1);
	CheckDemo();
}
Exemplo n.º 28
0
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CSymellaAppUi::ConstructL()
// ?implementation_description
// ----------------------------------------------------------
//
void CSymellaAppUi::ConstructL()
{
  BaseConstructL( EAknEnableSkin );

    // Show tabs for main views from resources
    CEikStatusPane* sp = StatusPane();

    // Fetch pointer to the default navi pane control
    iNaviPane = (CAknNavigationControlContainer*)sp->ControlL( 
        TUid::Uid(EEikStatusPaneUidNavi));

    // Tabgroup has been read from resource and it were pushed to the navi pane. 
    // Get pointer to the navigation decorator with the ResourceDecorator() function. 
    // Application owns the decorator and it has responsibility to delete the object.
    iDecoratedTabGroup = iNaviPane->ResourceDecorator();
    if (iDecoratedTabGroup)
        {
        iTabGroup = (CAknTabGroup*) iDecoratedTabGroup->DecoratedControl();
        }

	CSymellaConnectionsView* connectionsView = new (ELeave) CSymellaConnectionsView;

    CleanupStack::PushL( connectionsView );
    connectionsView->ConstructL();
    AddViewL( connectionsView );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // connectionsView

    CSymellaSearchView* searchView = new (ELeave) CSymellaSearchView;

    CleanupStack::PushL( searchView );
    searchView->ConstructL();
    AddViewL( searchView );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // searchView

    CSymellaTransfersView* transfersView = new (ELeave) CSymellaTransfersView;

    CleanupStack::PushL( transfersView );
    transfersView->ConstructL();
    AddViewL( transfersView );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // transfersView

#if defined(CONSOLE)
    CSymellaConsoleView* consoleView = new (ELeave) CSymellaConsoleView;

    CleanupStack::PushL( consoleView );
    consoleView->ConstructL();
    AddViewL( consoleView );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // consoleView
#endif

	SetDefaultViewL(*connectionsView);

	CSymellaSettingsView* settingsView = new (ELeave) CSymellaSettingsView;
	CleanupStack::PushL( settingsView );
	settingsView->ConstructL();
	AddViewL(settingsView);
	CleanupStack::Pop();    // settingsView

#if defined(CONSOLE)
	LOG->SetObserver(consoleView);
#endif

	CSymellaWebCacheView* webcacheView = new (ELeave) CSymellaWebCacheView;
    CleanupStack::PushL( webcacheView );
    webcacheView->ConstructL(this);
    AddViewL( webcacheView );      
    CleanupStack::Pop();

	CTR->NetMgr()->SetAccesPointSupplier(this);
	CTR->DlManager()->SetSearchResultsObserver(searchView);
	CTR->DlManager()->SetDownloadObserver(transfersView);
	CTR->SetConnectionObserverL(connectionsView);		
}
Exemplo n.º 29
0
void CMLauncherAppUi::ConstructL()
{
    // Initialise app UI with standard value.
	LOG(ELogGeneral,1,"CMLauncherAppUi::ConstructL++");
    TInt flags(EAknEnableSkin);
#ifdef _FLL_SDK_VERSION_50_
    flags|=EAknTouchCompatible;
#endif
    
#ifdef __MSK_ENABLED__
    flags|=EAknEnableMSK;
#endif
    BaseConstructL(flags);
    
    iCurrentView=iListView=CFFListView::NewLC(/*iDocument*/);
    
    iNoteId=-1;
    /* This moved to a "job", so we can discover sources at the same time the user reads the message
    if(MyDoc().iPreferences->iCFlags&CMLauncherPreferences::ENoPreferencesFileFound)
    {
#ifdef __TOUCH_ENABLED__
    	if(AknLayoutUtils::PenEnabled())
    		DisplayQueryOrNoteL(EMsgBigNote,R_FFLIST_HELP_TEXT_TOUCH,R_FFLIST_HELP_HEADER);//touch UI  
    	else
#endif
    		DisplayQueryOrNoteL(EMsgBigNote,R_FFLIST_HELP_TEXT_NONTOUCH,R_FFLIST_HELP_HEADER);//non-touch UI
    }
    else if(MyDoc().iPreferences->iStartingDirs.Count()==0)
    {
    	//there are preferences, but there is no source folder. We will try to discover them.
    		
    	//verific daca iPreferences->iSources.Count() e zero, si daca e pun o nota in care sa zic
    	//ca se cauta sursele. Schimb si nota de deasupra, ca sa se intample ceva in background
    	 
    			
    }*/
    LOG0("List vew constructed");
    AddViewL(iListView);//transfers ownership
    CleanupStack::Pop(iListView);

#ifndef __WINS__
    if(MyDoc().iCrashLogFound)
    	iListView->UploadCrashLogFileL();
#endif

    //check if we should open a playlist and play it
    if(MyDoc().iCurrentPlaylist && MyDoc().iPreferences->iPFlags&CMLauncherPreferences::EPreferencesUseInternalMusicPlayer)
    	CreateMusicPlayerViewL(MyDoc().iCurrentPlaylist,EFalse,EFalse);
   
    //no need to initialize the other views at this time
    SetDefaultViewL(*iListView);
    iActiveViews|=EFFListViewActive;
    
#ifndef __WINS__
    CCommReceiver::GetInstanceL()->ListenL(this);
#endif
    
    ScheduleWorkerL(EJobSubfolders | EJobStartDiscoveringSourcesAndParsingMetadata);
    
    LOG(ELogGeneral,-1,"CMLauncherAppUi::ConstructL--");
};
void CContextLocaAppUi::ConstructL()
{
	CALLSTACKITEM_N(_CL("CContextLocaAppUi"), _CL("ConstructL"));

#ifndef __WINS__
	bool wins=false;
	{
		TInt err;
		TRAP(err, SetSilentL());
	}
#else
	bool wins=true;
	TInt ignore;
	TBreakItem i(GetContext(), ignore);

#if 0
	BBSession()->DeleteL(KListener, ETrue);
	BBSession()->DeleteL(KLocaErrorTuple, 
		KNullDesC, ETrue);
	BBSession()->DeleteL(KListenerStop, 
		KNullDesC, ETrue);
	BBSession()->DeleteL(KLocaScriptTuple, 
		KNullDesC, ETrue);
	BBSession()->DeleteL(KLocaMessageStatusTuple, 
		KNullDesC, ETrue);

	//Settings().WriteSettingL(SETTING_CONTEXTNW_HOST, _L("10.1.0.1"));
	Settings().WriteSettingL(SETTING_CONTEXTNW_HOST, _L("loca.hiit.fi"));
	Settings().WriteSettingL(SETTING_CONTEXTNW_PORT, 5000);
	Settings().WriteSettingL(SETTING_CONTEXTNW_ENABLED, ETrue);
	Settings().WriteSettingL(SETTING_PUBLISH_AUTHOR,
		_L("Loca@South hall"));
	Settings().WriteSettingL(SETTING_PUBLISH_PASSWORD,
		_L("emulator"));
	Settings().WriteSettingL(SETTING_BT_SCAN_INTERVAL, 5);
	Settings().WriteSettingL(SETTING_ENABLE_LOCA_BLUEJACK, ETrue);
	Settings().WriteSettingL(SETTING_LOCA_BLUEJACK_MESSAGE_TIMEOUT, 90);
	Settings().WriteSettingL(SETTING_LOCA_BLUEJACK_CONNECT_COUNT, 7);
#endif

#endif

	CContextLogAppUiBase::ConstructL();
	state=_L("subscribeL");

#ifndef DONT_LOG_EVENTS_TO_FILE

	iLog->SubscribeL(KCellIdTuple);
#ifdef __WINS__
	iLog->SubscribeL(KBluetoothTuple);
	iLog->SubscribeL(KLocaMessageStatusTuple);
#endif
	iLog->SubscribeL(KOwnBluetoothTuple);
	iLog->SubscribeL(KBatteryTuple);
	iLog->SubscribeL(KNetworkTuple);
	iLog->SubscribeL(KChargerTuple);
	iLog->SubscribeL(KAppEventTuple);

#else
	// we always want errors to be logged
	iLog->SubscribeL(KAppEventTuple);
#endif

	state=_L("bbl");

	{
		TBool logging_enabled;
		Settings().GetSettingL(SETTING_LOGGING_ENABLE, logging_enabled);
		TInt notif_err;
		CC_TRAP(notif_err, iLoggingRunning=CNotifyState::NewL(AppContext(), KIconFile));
		if (logging_enabled) {
			if(iLoggingRunning) iLoggingRunning->SetCurrentState( EMbmContextlocaL, EMbmContextlocaL );
		} else {
			if(iLoggingRunning) iLoggingRunning->SetCurrentState( EMbmContextlocaL_not, EMbmContextlocaL_not );
		}
	}

	state=_L("LocaSender");
	iLocaSender=CLocaSender::NewL(AppContext());

	state=_L("notify");

	Settings().NotifyOnChange(SETTING_LOGGING_ENABLE, this);

	state=_L("sms status");
	if (smsh) iSmsStatus=CSmsStatusReplier::NewL(AppContext(), smsh);

	ConstructAfterPresenceMaintainerL();

	TInt ap;
	TRAPD(err, ap=CreateAPL(_L("cingular"),
		_L("WAP.CINGULAR"),
		_L("*****@*****.**"),
		_L("CINGULAR1")));
#ifndef __WINS__
	if (err==KErrNone) 
		Settings().WriteSettingL(SETTING_IP_AP, ap);
#endif

#ifndef __WINS__
	TRAP(err, SyncTimeL(EFalse));
	if (err!=KErrNone) {
		TBuf<50> msg=_L("Failed to sync time: ");
		msg.AppendNum(err);
		LogAppEvent(msg);
	}
#else
	TimeSynced(ETrue);
#endif

	state=_L("create transferer");
	transferer=CSendUITransfer::NewL(AppContext(), this, 
		Econtext_logCmdSendAppUi, DataDir(), AppDir());
	transferer->add_filesL(_L("log*txt"), true);
	transferer->add_filesL(_L("starter*txt"), true);
	transferer->add_filesL(_L("book*txt"), true);
	transferer->add_filesL(_L("calllog*txt"), true);
	transferer->add_filesL(_L("comm*txt"), false);
	transferer->add_filesL(_L("rec*amr"), false);
	transferer->add_filesL(_L("cellid_names_trans.txt"), false);
	transferer->add_filesL(_L("mms*.*"), false);

	state=_L("create settings view");

	{
		auto_ptr<CSettingsView> iSettingsView(CSettingsView::NewL(KSettingsViewId, AppContext(), 
			TLocalAppSettings::GetEnabledSettingsArray()));
		AddViewL(iSettingsView.get());
		iSettingsView.release();
	}

	FinalConstructL();
/*
	TBBLocaMsgStatus msg;
	msg.iAtTime()=GetTime();
	msg.iMessageId()=15;
	msg.iRecipientAddress=TBBBluetoothAddress( TPtrC8((TUint8*)"\0\0\0\0\0\x01", 6),
		_L("myphone"));
	TTime exp; exp=GetTime(); exp+=TTimeIntervalHours(12);
	BBSession()->PutL(KLocaMessageStatusTuple, KNullDesC,
		&msg, exp);
	CErrorLogger* e=CErrorLogger::NewL();
	e->LogFormatted(_L("Example of a terrible error"));
	delete e;
	CBBDumper* d=CBBDumper::NewL();
*/
}