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(); );
// [[[ 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); }
// [[[ begin generated function: do not modify void CStarDictAppUi::InitializeContainersL() { iStarDictContainerView = CStarDictContainerView::NewL(); AddViewL( iStarDictContainerView ); SetDefaultViewL( *iStarDictContainerView ); iDictMeaningContainerView = CDictMeaningContainerView::NewL(); AddViewL( iDictMeaningContainerView ); }
void CUiLoftAppUi::InnerConstructL() { CALLSTACKITEM_N(_CL("CUiLoftAppUi"), _CL("InnerConstructL")); BaseConstructL(EAknEnableSkin); // iAppView = CUiLoftAppView::NewL(ClientRect()); iListView = CListView::NewL();//KListView); AddViewL( iListView ); SetDefaultViewL(*iListView); }
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(); }
// ConstructL is called by the application framework void CMeaningAppAppUi::InnerConstructL() { BaseConstructL(EAknEnableSkin); iLayout = CJuikLayout::NewL(); GetContext()->TakeOwnershipL( iLayout ); GetContext()->SetLayout( iLayout ); iObserver=new (ELeave) TDummyObserver; iPresenceMaintainer=CPresenceMaintainer::NewL(AppContext(), 0, 0, 0, 0); iMediaRunner=CMediaRunner::NewL(this, iPresenceMaintainer, &iNextView, *iObserver, *iObserver); iMediaRunner->CreateSettingsViewsL(); SetDefaultViewL(*(iMediaRunner->MediaView())); iEikonEnv->SetSystem(ETrue); }
// 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... }
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... }
// ----------------------------------------------------------------------- // Constructs AppUI Object // ----------------------------------------------------------------------- void CHindiDemoAppUi::ConstructL() { BaseConstructL(); InitViewsL(); #ifdef WITH_TAB_GROUP // ----------------------------------------------------------------------- // Show tabs for main views from resources // ----------------------------------------------------------------------- CEikStatusPane* sp = StatusPane(); iNaviPane = (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)); sp->SetDimmed(ETrue); // ------------------------------------------------------------------------------- // Tabgroup has been read from resource and it was 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(); } if (iTabGroup) { ActivateLocalViewL(TUid::Uid(iTabGroup->ActiveTabId())); } #else // ----------------------------------------------------------------------- // Set default view // ----------------------------------------------------------------------- SetDefaultViewL(*iMainViewView); #endif }
// // 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); }
void CSetupGisWeatherAppUi::InitializeContainersL() { iSetupGisWeatherSettingItemListView = CSetupGisWeatherSettingItemListView::NewL(); AddViewL( iSetupGisWeatherSettingItemListView ); SetDefaultViewL( *iSetupGisWeatherSettingItemListView ); }
// [[[ begin generated function: do not modify void CAlarmSwitcherAppUi::InitializeContainersL() { iMainView = CMainView::NewL(); AddViewL( iMainView ); SetDefaultViewL( *iMainView ); }
// [[[ begin generated function: do not modify void CTap2CloseAppUi::InitializeContainersL() { iMainView = CMainView::NewL(); AddViewL( iMainView ); SetDefaultViewL( *iMainView ); }
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--"); };
// ================= 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); }
// Second-phase constructor void CPuttyAppUi::ConstructL() { #ifdef PUTTY_S60V3 #ifdef PUTTY_SYM3 BaseConstructL(CAknAppUi::EAknEnableSkin | EAknTouchCompatible | EAknSingleClickCompatible); #else BaseConstructL(CAknAppUi::EAknEnableSkin); #endif #else BaseConstructL(); #endif // Determine profile, data and font directories based on the executable // installation location. The files are on the same drive as the // executable, except if the exe is in ROM (z:), in which case profiles and // data use c:. TFileName name; name = RProcess().FileName(); TParse parsa; parsa.SetNoWild(name, NULL, NULL); TUint drive = parsa.Drive()[0]; // Font directory -- "<drv>:\resource\puttyfonts\" iFontDirectory.Format(KFontDirFormat, drive); // Fix drive for profiles and data if ( (drive == 'z') || (drive == 'Z') ) { drive = 'c'; } // Data directory -- "<drv>:\private\<SID>\data\" // If the data directory doesn't exist, create it and attempt to migrate // host keys from a previous installation iDataDirectory.Format(KDataDirFormat, drive, RProcess().SecureId().iId); RFs &fs = CEikonEnv::Static()->FsSession(); if ( !BaflUtils::FolderExists(fs, iDataDirectory) ) { BaflUtils::EnsurePathExistsL(fs, iDataDirectory); if ( BaflUtils::FileExists(fs, KOldHostKeysFile) ) { name = iDataDirectory; name.Append(KNewHostKeysFile); BaflUtils::CopyFile(fs, KOldHostKeysFile, name); } } // Profile directory -- "<drv>:\private\<SID>\profiles\" // If the profile directory doesn't exist, create it and attempt to migrate // default settings from a previous installation iProfileDirectory.Format(KProfileDirFormat, drive, RProcess().SecureId().iId); if ( !BaflUtils::FolderExists(fs, iProfileDirectory) ) { BaflUtils::EnsurePathExistsL(fs, iProfileDirectory); if ( BaflUtils::FileExists(fs, KOldSettingsFile) ) { name = iProfileDirectory; name.Append(KNewDefaultProfileFile); BaflUtils::CopyFile(fs, KOldSettingsFile, name); } } // Create navi pane iNaviPane = (CAknNavigationControlContainer*) (StatusPane()->ControlL(TUid::Uid(EEikStatusPaneUidNavi))); // Build a list of available fonts iFonts = new CDesC16ArrayFlat(8); CDir *dir; User::LeaveIfError( CEikonEnv::Static()->FsSession().GetDir(iFontDirectory, KEntryAttNormal, ESortByName, dir)); CleanupStack::PushL(dir); for ( TInt i = 0; i < dir->Count(); i++ ) { parsa.SetNoWild((*dir)[i].iName, NULL, NULL); iFonts->AppendL(parsa.Name()); } CleanupStack::PopAndDestroy(); //dir // Build views iProfileListView = CProfileListView::NewL(); AddViewL(iProfileListView); iProfileEditView = CProfileEditView::NewL(); AddViewL(iProfileEditView); iTerminalView = CTerminalView::NewL(); AddViewL(iTerminalView); // Start from the profile list view. SetDefaultViewL(*iProfileListView); }
// ================= 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(); }