Пример #1
0
void COsmo4AppUi::TogglePlaylist()
{
	CEikButtonGroupContainer* cba= CEikButtonGroupContainer::Current();

#ifndef GPAC_GUI_ONLY
	switch (view_mode) {
	case 0:
		RemoveFromStack(iAppView);
		iAppView->ShowHide(0);
		AddToStackL(iPlaylist);
		if (cba) {
			cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK);
       		cba->DrawDeferred();	
		}
		view_was_max = StatusPane()->IsVisible() ? 0 : 1;
		if (view_was_max) StatusPane()->MakeVisible(ETrue);
		iPlaylist->ShowHide(1);
		view_mode = 1;
		break;
	case 1:
		RemoveFromStack(iPlaylist);
		iPlaylist->ShowHide(0);
		AddToStackL(iAppView);
		if (cba) {
			cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_EXIT);
       		cba->DrawDeferred();	
		}
		iAppView->ShowHide(1);
		if (view_was_max) StatusPane()->MakeVisible(EFalse);
		view_was_max = 0;
		view_mode = 0;
		break;
	}
#endif
}
void CNPRStoryListBoxView::SetupStatusPaneL()
	{
	// reset the context pane
	TUid contextPaneUid = TUid::Uid( EEikStatusPaneUidContext );
	CEikStatusPaneBase::TPaneCapabilities subPaneContext = 
		StatusPane()->PaneCapabilities( contextPaneUid );
	if ( subPaneContext.IsPresent() && subPaneContext.IsAppOwned() )
		{
		CAknContextPane* context = static_cast< CAknContextPane* > ( 
			StatusPane()->ControlL( contextPaneUid ) );
		context->SetPictureToDefaultL();
		}
	
	// setup the title pane
	TUid titlePaneUid = TUid::Uid( EEikStatusPaneUidTitle );
	CEikStatusPaneBase::TPaneCapabilities subPaneTitle = 
		StatusPane()->PaneCapabilities( titlePaneUid );
	if ( subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned() )
		{
		CAknTitlePane* title = static_cast< CAknTitlePane* >( 
			StatusPane()->ControlL( titlePaneUid ) );
		TResourceReader reader;
		iEikonEnv->CreateResourceReaderLC( reader, R_NPRSTORY_LIST_BOX_TITLE_RESOURCE );
		title->SetFromResourceL( reader );
		CleanupStack::PopAndDestroy(); // reader internal state
		}			
	}
Пример #3
0
// -----------------------------------------------------------------------
// Key Event Handler - Primarily to automate navigation through tab groups
// -----------------------------------------------------------------------
TKeyResponse CHindiDemoAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
  if (aType == EEventKey) 
  {
    if (iTabGroup == NULL)
    {
      return EKeyWasNotConsumed;
    } 
  }

  TInt active = iTabGroup->ActiveTabIndex();
  TInt count = iTabGroup->TabCount();

  switch (aKeyEvent.iCode) 
  {
    case EKeyLeftArrow:
      if (active > 0) 
      {
        // -----------------------------------------------------------------------
        // Change to usual layout
        // -----------------------------------------------------------------------
	TRect cr = ClientRect();
	if (cr.iTl.iY == Kqpn_height_status_pane_idle) 
        {
	  StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL);
	}

	active--;
	iTabGroup->SetActiveTabByIndex(active);
	ActivateLocalViewL(TUid::Uid(iTabGroup->TabIdFromIndex(active)));
	return EKeyWasConsumed;
      }
      break;

    case EKeyRightArrow:
      if((active + 1) < count) 
      {
        TRect cr = ClientRect();  
        if (cr.iTl.iY == Kqpn_height_status_pane_idle) 
        {
	  StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL);
        }

        active++;
        iTabGroup->SetActiveTabByIndex(active);
        ActivateLocalViewL(TUid::Uid(iTabGroup->TabIdFromIndex(active)));
        return EKeyWasConsumed;
      }
    break;

    default:
      break;
  }        

  return EKeyWasNotConsumed;
}
Пример #4
0
// ---------------------------------------------------------
// CSecModUIViewBase::DoAddNaviPaneL()
// Creates navi pane text
// ---------------------------------------------------------
//
void CSecModUIViewBase::DoAddNaviPaneL(TInt aResource)
    {
    TUid naviPaneUid;
    naviPaneUid.iUid = EEikStatusPaneUidNavi;
    CEikStatusPane* statusPane = StatusPane();
    CAknNavigationControlContainer* naviPane =
        (CAknNavigationControlContainer*) statusPane->ControlL(naviPaneUid);
    if(!iNaviDecorator)
        {
        // Let's try to create navipane
        CEikStatusPaneBase::TPaneCapabilities subPane =
        statusPane->PaneCapabilities(naviPaneUid);
    
        if (subPane.IsPresent() && subPane.IsAppOwned())
            {
            if (0 != aResource)
                {
                TResourceReader reader;
                iCoeEnv->CreateResourceReaderLC(reader, aResource);

                 // set the navigation pane label
                iNaviDecorator = naviPane->CreateNavigationLabelL(reader);
                CleanupStack::PopAndDestroy();
                }
             else
                {
                iNaviDecorator = naviPane->CreateNavigationLabelL();
                }
            }
        }
    if (iNaviDecorator)
        {
        naviPane->PushL(*iNaviDecorator);
        }
    }
void CJavaDebugAgentFullScreenLogView::DoActivateL(const TVwsViewId&,
                                                   TUid,const TDesC8&)
{
    Cba()->MakeVisible(EFalse);
    StatusPane()->MakeVisible(EFalse);
    ShowLogScreenL();
}
Пример #6
0
// -----------------------------------------------------------------------------
// CAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CAppUi::ConstructL()
{
    // Initialise app UI with no resource file.
    BaseConstructL( ENoAppResourceFile );

    // Hide S60 signal strength icons etc.
    StatusPane()->MakeVisible( EFalse );
}
Пример #7
0
// ----------------------------------------------------
// CCcorAppUi::SetTitleL
// Set title pane text from a resource.
// ----------------------------------------------------
//
void CTrkAppUi::SetTitleL(TInt aResourceId)
{
    // Set title
    CAknTitlePane* title = static_cast<CAknTitlePane*>(StatusPane()->ControlL(TUid::Uid(EEikStatusPaneUidTitle)));
    TResourceReader reader;
    iCoeEnv->CreateResourceReaderLC(reader, aResourceId);
    title->SetFromResourceL(reader);
    CleanupStack::PopAndDestroy();  // resource reader
}
Пример #8
0
// --------------------------------------------------------------------------
// CMSBaseView::SetTitlePaneTextL()
// Sets text to title pane.
// --------------------------------------------------------------------------
void CMSBaseView::SetTitlePaneTextL( const TDesC& aText )
    {
    LOG(_L("[MediaServant]\t CMSBaseView::SetTitlePaneTextL"));

    // Fetches pointer to the default title pane control.
    CAknTitlePane* titlePane = static_cast<CAknTitlePane*>(
        StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );

    titlePane->SetTextL( aText );
    }
	void DoActivateL(
					 const TVwsViewId& aPrevViewId,TUid /*aCustomMessageId*/,
				const TDesC8& /*aCustomMessage*/)
	{
		CALLSTACKITEM_N(_CL("CDynamicSettingsViewImpl"), _CL("DoActivateL"));
		iIsActivated=ETrue;
		MActiveErrorReporter* rep=AppContext().GetActiveErrorReporter();
		if (rep) rep->SetInHandlableEvent(ETrue);
#ifdef __WINS__
		TInt dummy;
		TBreakItem b(GetContext(), dummy);
#endif
		iPreviousViewId = aPrevViewId;

		{
			CEikStatusPane *sp = StatusPane();
			// Fetch pointer to the default navi pane control
			CAknNavigationControlContainer* naviPane = ( CAknNavigationControlContainer * )
				sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
			naviPane->PushDefaultL(ETrue);
		}

		if (!iContainer)
			{
				iContainer = CBgContainer::NewL( this, ClientRect() );
				
				if (!iListbox) {
					iListbox = new (ELeave) CAknSettingStyleListBox();
					iListbox->ConstructL( iContainer, EAknListBoxSelectionList );
						//iListbox->SetMopParent( iContainer );
					iListbox->SetContainerWindowL( *iContainer );
					iListbox->CreateScrollBarFrameL( ETrue );
					iListbox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, 
																		CEikScrollBarFrame::EAuto );
					iListbox->SetListBoxObserver( this );
					iSettingItemArray = new (ELeave) CAknSettingItemArray( 10, EFalse, 0);
					CTextListBoxModel* model = iListbox->Model();
					model->SetItemTextArray( iSettingItemArray );
					model->SetOwnershipType( ELbmDoesNotOwnItemArray );
				} 
			}
		
		UpdateListBoxL();
		
		iContainer->SetContentL( iListbox );

		AppUi()->AddToStackL( *this, iContainer );
		iContainer->SetRect(ClientRect());
		
		// 	CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
		// 	CAknNavigationControlContainer *np = (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)); 
		// 	np->PushDefaultL();
	
		iContainer->ActivateL();
	}
Пример #10
0
void COsmo4AppUi::SetTitleInfo(const char *title)
{
#if 1
    CEikStatusPane* statusPane = StatusPane();
    CAknTitlePane *iTitlePane = (CAknTitlePane*) statusPane->ControlL(TUid::Uid(EEikStatusPaneUidTitle));

	if (!title) title = "Osmo4";

	HBufC *htitle = HBufC::NewL( strlen(title)+1);
	htitle->Des().Copy( TPtrC8(( TText8* ) title) );
	iTitlePane->SetText(htitle);
#endif
}
Пример #11
0
// --------------------------------------------------------------------------
// CMSBaseView::SetNavigationPaneTextL()
// Sets navigation pane text.
// --------------------------------------------------------------------------
//
void CMSBaseView::SetNavigationPaneTextL(const TDesC& aText )
    {
    // old decorator is popped and deleted
    ClearCurrentNaviPaneText();

    if ( !iNaviPane )
        {
        iNaviPane = static_cast<CAknNavigationControlContainer*>
            ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
                // ownership of decorator is transfered to application
        }

    iNaviDecorator = iNaviPane->CreateNavigationLabelL( aText );
    iNaviPane->PushL( *iNaviDecorator );
    }
Пример #12
0
//
// CTrkAppUi::HandleResourceChangeL
//
void CTrkAppUi::HandleResourceChangeL( TInt aType )
{
	CAknViewAppUi::HandleResourceChangeL(aType);
	
	if (aType == KEikDynamicLayoutVariantSwitch ||
		aType == KEikMessageUnfadeWindows ||
		aType == KEikMessageWindowsFadeChange ) 
	{
		iAppView->HandleSizeChange();
		iSettingsView->HandleSizeChange();
		
	  	CEikStatusPane* pane = StatusPane();
    	if (pane)
        {
        	pane->HandleResourceChange(aType);
        }
	}
}
	void DoDeactivate()
	{
		if (!iIsActivated) {
			iIsActivated=EFalse;
			MActiveErrorReporter* rep=AppContext().GetActiveErrorReporter();
			if (rep) rep->SetInHandlableEvent(ETrue);
		}
		CALLSTACKITEM_N(_CL("CDynamicSettingsViewImpl"), _CL("DoDeactivate"));
		RemoveContainerL();

		{
			CEikStatusPane *sp = StatusPane();
			// Fetch pointer to the default navi pane control
			CAknNavigationControlContainer* naviPane = ( CAknNavigationControlContainer * )
				sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
			naviPane->Pop();
		}

	}
void CBuddycloudAccountSettingsView::DoActivateL(const TVwsViewId& /*aPrevViewId*/, TUid aCustomMessageId, const TDesC8& /*aCustomMessage*/) {
	if (!iList) {
		CAknTitlePane* aTitlePane = static_cast<CAknTitlePane*>(StatusPane()->ControlL(TUid::Uid( EEikStatusPaneUidTitle)));
		HBufC* aTitle = iEikonEnv->AllocReadResourceLC(R_LOCALIZED_STRING_ACCOUNTSETTINGS_TITLE);
		aTitlePane->SetTextL(*aTitle);
		CleanupStack::PopAndDestroy(); // aTitle

		iList = new (ELeave) CBuddycloudAccountSettingsList(iBuddycloudLogic);
		iList->ConstructL(ClientRect());
		iList->SetMopParent(this);

		TResourceReader aReader;
		iEikonEnv->CreateResourceReaderLC(aReader, R_ACCOUNT_SETTINGS_ITEM_LIST);
		iList->ConstructFromResourceL(aReader);
		CleanupStack::PopAndDestroy(); // aReader

		AppUi()->AddToViewStackL(*this, iList);
		iList->ActivateL(aCustomMessageId.iUid);
	}
}
Пример #15
0
// --------------------------------------------------------------------------
// CMSBaseView::SetTitlePaneTextL()
// Sets text to title pane.
// --------------------------------------------------------------------------
void CMSBaseView::SetTitlePaneTextL( TInt aResourceId )
    {
    LOG(_L("[MediaServant]\t CMSBaseView::SetTitlePaneTextL"));

    // Fetches pointer to the default title pane control.
    CAknTitlePane* titlePane = static_cast<CAknTitlePane*>(
        StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );

    // Makes and sets text which is used title pane.
    if ( aResourceId == KMSDefaultTitleId )
        {
        titlePane->SetTextToDefaultL();
        }
    else
        {
        TBuf<KMSTitleBufLength> titleText( 0 );
        iCoeEnv->ReadResourceL( titleText, aResourceId );
        titlePane->SetTextL( titleText );
        }
    }
Пример #16
0
// -----------------------------------------------------------------------
// 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
}
Пример #17
0
void CPodcastAppUi::ConstructL()
    {
    DP("CPodcastAppUi::ConstructL() BEGIN");
    BaseConstructL(CAknAppUi::EAknEnableSkin | CAknAppUi::EAknEnableMSK | CAknAppUi::EAknSingleClickCompatible); 

    iPodcastModel->ConnectionEngine().AddObserver(this);
    
    DP("Constructing FeedView");
	iFeedView = CPodcastFeedView::NewL(*iPodcastModel);
	this->AddViewL(iFeedView);

    DP("Constructing ShowsView");
	iShowsView = CPodcastShowsView::NewL(*iPodcastModel);
	this->AddViewL(iShowsView);

    DP("Constructing QueueView");
    iQueueView = CPodcastQueueView::NewL(*iPodcastModel);
	this->AddViewL(iQueueView);

    DP("Constructing SearchView");
	iSearchView = CPodcastSearchView::NewL(*iPodcastModel);
	this->AddViewL(iSearchView);
	
    DP("Constructing SettingsView");
	iSettingsView = CPodcastSettingsView::NewL(*iPodcastModel);
	this->AddViewL(iSettingsView);
	
	iNaviPane =( CAknNavigationControlContainer * ) StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
	NaviShowTabGroupL();
	
	// start a timer to let ConstructL finish before we display any dialogs or start downloading
	// this provides another entry point in HandleTimeout below
	iStartTimer = CTimeout::NewL(*this);
	iStartTimer->After(KDelayLaunch);
    DP("CPodcastAppUi::ConstructL() END");
    }
Пример #18
0
// 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);
}
Пример #19
0
    CleanupClosePushL(rfrs);
        settings.InternalizeL(rfrs);
        CleanupStack::PopAndDestroy();
    }
    CleanupStack::PopAndDestroy();
         );

    iLineStatusHandler->SetPrefs(settings.iPreCycleTime,settings.iCycleTime,settings.iStartMinute);


    AddViewL(iAboutAppView);
    AddViewL(iSettingsView); // transfer ownership to base class
    AddViewL(iHelpAppView);
    AddViewL(iAppView);    // transfer ownership to base class

    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);
        //ActivateViewL(TVwsViewId(KUidIncallertApp,TUid::Uid(iTabGroup->ActiveTabId())));
    }
Пример #20
0
// ----------------------------------------------------------------------------
// CAknExQueryView::SetTitlePane( TInt aOutlineId )
// Sets text of title pane. 
// ----------------------------------------------------------------------------
//
void CAknExQueryView::SetTitlePaneL( TInt aOutlineId )
    {
    TInt titleId( KAknExQueryInitId );
    TBool defaultFlg( EFalse );

    iContainer->DeleteLabelL();
    iContainer->DeleteListBoxL();
    iCurrentOutline = aOutlineId; // Set current display outlinenumber

    switch ( aOutlineId )
        {
        case EAknExQueryNoOutline:
            defaultFlg = ETrue;
            break;
        case EAknExQueryOutline1:
            titleId = R_AKNEXQUERY_OUTLINE1;
            break;
        case EAknExQueryOutline4:
            titleId = R_AKNEXQUERY_OUTLINE4;
            break;
        case EAknExQueryOutline8:
            titleId = R_AKNEXQUERY_OUTLINE8;
            break;
        case EAknExQueryOutline10:
            titleId = R_AKNEXQUERY_OUTLINE10;
            break;
        case EAknExQueryOutline16:
            titleId = R_AKNEXQUERY_OUTLINE16;
            break;
        case EAknExQueryOutline44:
            titleId = R_AKNEXQUERY_OUTLINE44;
            break;
        case EAknExQueryOutline48:
            titleId = R_AKNEXQUERY_OUTLINE48;
            break;
        case EAknExQueryOutline52:
            titleId = R_AKNEXQUERY_OUTLINE52;
            break;
        case EAknExQueryOutline54:
            titleId = R_AKNEXQUERY_OUTLINE54;
            break;
        case EAknExQueryOutline61:
            titleId = R_AKNEXQUERY_OUTLINE61;
            break;
        default:
            defaultFlg = ETrue;
            break;
        }

    // Fetches pointer to the default title pane control.
    CAknTitlePane* titlePane = 
        static_cast<CAknTitlePane*>
            ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );

    if ( !defaultFlg )
        {
        // Makes and sets text whitch is used title pane.
        TBuf<KAknExQueryTitleBufLength> MessageText( KAknExQueryBufferEmpty );
        iCoeEnv->ReadResource( MessageText, titleId );
        titlePane->SetTextL( MessageText );
        }
    else
        {
        titlePane->SetTextToDefaultL();
        }
    }
Пример #21
0
// ---------------------------------------------------------------------------
// CBCTestAppFrmView::AppFrmView_StatusPane
// ---------------------------------------------------------------------------
//
void CBCTestAppFrmView::AppFrmView_StatusPane()
    {
    StatusPane();
    }
Пример #22
0
// ----------------------------------------------------
// CTrkAppUi::SetTitleL
// Set title pane text from a descriptor.
// ----------------------------------------------------
//
void CTrkAppUi::SetTitleL(const TDesC& aText)
{
    CAknTitlePane* title = static_cast<CAknTitlePane*>(StatusPane()->ControlL(TUid::Uid(EEikStatusPaneUidTitle)));
    title->SetTextL(aText);
}
Пример #23
0
void COsmo4AppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
{
	CEikMenuPaneItem::SData item;

	if (aResourceId==R_OSMO4_MENU) {
        
		aMenuPane->Reset();

		if (view_mode==1) {
#ifndef GPAC_GUI_ONLY
			Bool is_file = iPlaylist->SelectionIsFile();
			Bool in_pl = (is_file && iPlaylist->IsInPlaylist()) ? 1 : 0;

			if (iPlaylist->PlaylistMode()) {
				DECLARE_MENU_ITEM(_L("Up"), EOsmo4PlayListMoveUp, 0, 0, 0);
				DECLARE_MENU_ITEM(_L("Down"), EOsmo4PlayListMoveDown, 0, 0, 0);
				DECLARE_MENU_ITEM(_L("Remove"), EOsmo4PlayListRem, 0, 0, 0);
				DECLARE_MENU_ITEM(_L("Clear"), EOsmo4PlayListClear, 0, 0, 1);
			} else if (!in_pl) {
				DECLARE_MENU_ITEM(_L("Add to PlayList"), EOsmo4PlayListAdd, 0, 0, 1);
			} else if (is_file) {
				DECLARE_MENU_ITEM(_L("Remove from Playlist"), EOsmo4PlayListRem, 0, 0, 1);
			}

			if (! iPlaylist->PlaylistMode()) {
				DECLARE_MENU_ITEM(iPlaylist->ViewAllFiles() ? _L("View known files") : _L("View all files"), EOsmo4PlayListAllFiles, 0, 0, 1);
			} else {
				DECLARE_MENU_ITEM(_L("Sort"), 0, 0, R_OSMO4_SM1, 1);
			}
			DECLARE_MENU_ITEM(iPlaylist->PlaylistMode() ? _L("Browse") : _L("Playlist"), EOsmo4PlayListMode, 0, 0, 0);
#endif
		} else {
			/*open*/
			DECLARE_MENU_ITEM(_L("File"), 0, 0, R_OSMO4_SM1, 0);
			DECLARE_MENU_ITEM(_L("View"), 0, 0, R_OSMO4_SM2, 0);
			DECLARE_MENU_ITEM(_L("Options"), 0, 0, R_OSMO4_SM3, 0);
			//DECLARE_MENU_ITEM(_L("Exit"), EEikCmdExit, 0, 0, 0);
		}
		smenu_id = 0;
		return;
	} 
	else if (aResourceId==R_OSMO4_SM1) {
		aMenuPane->Reset();
		/*sort menu*/
		if (view_mode==1) {
		} 
		/*file menu*/
		else {
			DECLARE_MENU_ITEM(_L("Open local"), EOsmo4PlayListView, 0, 0, 0);
			DECLARE_MENU_ITEM(_L("Open URL"), EOsmo4OpenURL, 0, 0, 1);
#ifndef GPAC_GUI_ONLY
			if (gf_cfg_get_key_name(iAppView->m_user.config, "RecentFiles", 0) != NULL) {
				DECLARE_MENU_ITEM(_L("Recent"), 0, 0, R_OSMO4_SSM1, 0);
			}
#endif
		}
		smenu_id = 1;
		return;
	} 
	/*not used*/
	if (view_mode==1) return;
	
	/*View menu*/
	if (aResourceId==R_OSMO4_SM2) {
		aMenuPane->Reset();
#ifndef GPAC_GUI_ONLY
		/*content view menu*/
		if (gf_term_get_option(iAppView->m_term, GF_OPT_NAVIGATION_TYPE) != GF_NAVIGATE_TYPE_NONE) {
			DECLARE_MENU_ITEM(_L("Navigate"), 0, 0, R_OSMO4_SSM1, 1);
		}
#endif
		DECLARE_MENU_ITEM(_L("Fullscreen"), EOsmo4Fullscreen, 0, 0, 0);
		/*don't allow content AR modification by user*/
		//DECLARE_MENU_ITEM(_L("Aspect Ratio"), 0, 0, R_OSMO4_SSM2, 1);
		DECLARE_MENU_ITEM(_L("Maximize size"), EOsmo4ViewMaxSize, (StatusPane()->IsVisible() ? 0 : 1), 0, 1);
		DECLARE_MENU_ITEM(_L("CPU Usage"), EOsmo4ViewRTI, iAppView->show_rti, 0, 0);
		smenu_id = 2;
		return;
	}
	/*Option menu*/
	if (aResourceId==R_OSMO4_SM3) {
#ifndef GPAC_GUI_ONLY
		const char *opt = gf_cfg_get_key(iAppView->m_user.config, "Compositor", "ForceOpenGL");
		DECLARE_MENU_ITEM(_L("Use 2D OpenGL"), EOsmo4OptOpenGL, (opt && !strcmp(opt, "yes")) ? 1 : 0, 0, 0);
		opt = gf_cfg_get_key(iAppView->m_user.config, "Compositor", "DirectDraw");
		DECLARE_MENU_ITEM(_L("Direct Draw"), EOsmo4OptDirectDraw, (opt && !strcmp(opt, "yes")) ? 1 : 0, 0, 0);
		opt = gf_cfg_get_key(iAppView->m_user.config, "SAXLoader", "Progressive");
		DECLARE_MENU_ITEM(_L("Progressive XML"), EOsmo4OptXMLProgressive, (opt && !strcmp(opt, "yes")) ? 1 : 0, 0, 0);

#endif
		
		DECLARE_MENU_ITEM(_L("Enable Logs"), EOsmo4OptEnableLogs, iAppView->do_log, 0, 0);
		return;
	}
	
	if (aResourceId==R_OSMO4_SSM1) {
		aMenuPane->Reset();
		if (smenu_id == 1) {
			u32 i = 0;
#ifndef GPAC_GUI_ONLY
			while (1) {
				const char *opt = gf_cfg_get_key_name(iAppView->m_user.config, "RecentFiles", i);
				if (!opt) break;
				const char *sep = strrchr(opt, '\\');
				if (!sep) sep = strrchr(opt, '/');
				if (!sep) sep = opt;
				else sep += 1;
				item.iText.Copy( TPtrC8(( TText8* ) sep)  );
				item.iCommandId = EOsmo4OpenRecentFirst + i;
				item.iFlags = 0; item.iCascadeId = 0;
				aMenuPane->AddMenuItemL(item);
				i++;
				if (i>=10) break;
			}
			if (!i) {
				DECLARE_MENU_ITEM(_L("_"), 0, 0, 0, 0);
			}
#endif
		} else if (smenu_id == 2) {
			DECLARE_MENU_ITEM(_L("Reset"), EOsmo4NavReset, 0, 0, 1);
			DECLARE_MENU_ITEM(_L("None"), EOsmo4NavNone, 0, 0, 0);
			DECLARE_MENU_ITEM(_L("Slide"), EOsmo4NavSlide, 0, 0, 0);

#ifndef GPAC_GUI_ONLY
			if (gf_term_get_option(iAppView->m_term, GF_OPT_NAVIGATION_TYPE) == GF_NAVIGATE_TYPE_3D) {
				DECLARE_MENU_ITEM(_L("Walk"), EOsmo4NavWalk, 0, 0, 0);
				DECLARE_MENU_ITEM(_L("Fly"), EOsmo4NavFly, 0, 0, 0);
				DECLARE_MENU_ITEM(_L("Examine"), EOsmo4NavExamine, 0, 0, 1);
				DECLARE_MENU_ITEM(_L("Headlight"), EOsmo4NavHeadlight, 0, 0, 0);
				DECLARE_MENU_ITEM(_L("Gravity"), EOsmo4NavGravity, 0, 0, 0);
			}
#endif
		}
		return;
	}
	
	if (aResourceId==R_OSMO4_SSM2) {
		aMenuPane->Reset();
		DECLARE_MENU_ITEM(_L("Keep Original"), EOsmo4AROriginal, 0, 0, 0);
		DECLARE_MENU_ITEM(_L("Fill Screen"), EOsmo4ARFillScreen, 0, 0, 0);
		DECLARE_MENU_ITEM(_L("Ratio 4-3"), EOsmo4AR4_3, 0, 0, 0);
		DECLARE_MENU_ITEM(_L("Ratio 16-9"), EOsmo4AR16_9, 0, 0, 0);
		return;
	}
}
Пример #24
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();
}
Пример #25
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);		
}
Пример #26
0
// -----------------------------------------------------------------------------
// COsmo4AppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void COsmo4AppUi::HandleCommandL( TInt aCommand )
{
	GF_Err e;
#ifndef GPAC_GUI_ONLY
	switch( aCommand ) {
	case EAknSoftkeyBack:
		if (view_mode==1) TogglePlaylist();
		break;
    case EEikCmdExit:
    case EAknSoftkeyExit:
        iAppView->Shutdown();
		Exit();
        break;
	/*PLAYLIST commands*/
	case EOsmo4PlayListAdd:
		iPlaylist->PlaylistAct(Osmo4PLAdd);
		break;
	case EOsmo4PlayListRem:
		iPlaylist->PlaylistAct(Osmo4PLRem);
		break;
	case EOsmo4PlayListMoveUp:
		iPlaylist->PlaylistAct(Osmo4PLMoveUp);
		break;
	case EOsmo4PlayListMoveDown:
		iPlaylist->PlaylistAct(Osmo4PLMoveDown);
		break;
	case EOsmo4PlayListClear:
		iPlaylist->PlaylistAct(Osmo4PLClear);
		break;
	case EOsmo4PlayListMode:
		iPlaylist->PlaylistAct(Osmo4PLToggleMode);
		break;
	case EOsmo4PlayListAllFiles:
		iPlaylist->PlaylistAct(Osmo4PLToggleAllFiles);
		break;

	/*FILE menu command*/
	case EOsmo4PlayListView:
		TogglePlaylist();
		break;
	case EOsmo4OpenURL:
		break;
	case EOsmo4Fullscreen:
		break;
	case EOsmo4ViewMaxSize:
	{
		CEikStatusPane* statusPane = StatusPane();
		if (statusPane->IsVisible()) statusPane->MakeVisible(EFalse);
		else statusPane->MakeVisible(ETrue);
	}
		break;
	case EOsmo4AROriginal:
		gf_term_set_option(iAppView->m_term, GF_OPT_ASPECT_RATIO, GF_ASPECT_RATIO_KEEP);
		break;
	case EOsmo4ARFillScreen:
		gf_term_set_option(iAppView->m_term, GF_OPT_ASPECT_RATIO, GF_ASPECT_RATIO_FILL_SCREEN);
		break;
	case EOsmo4AR4_3:
		gf_term_set_option(iAppView->m_term, GF_OPT_ASPECT_RATIO, GF_ASPECT_RATIO_4_3);
		break;
	case EOsmo4AR16_9:
		gf_term_set_option(iAppView->m_term, GF_OPT_ASPECT_RATIO, GF_ASPECT_RATIO_16_9);
		break;

	case EOsmo4NavReset:
		gf_term_set_option(iAppView->m_term, GF_OPT_NAVIGATION_TYPE, 0);
		break;
	case EOsmo4NavNone:
		gf_term_set_option(iAppView->m_term, GF_OPT_NAVIGATION, GF_NAVIGATE_NONE);
		break;
	case EOsmo4NavSlide:
		e = gf_term_set_option(iAppView->m_term, GF_OPT_NAVIGATION, GF_NAVIGATE_SLIDE);
		if (e) {
			GF_LOG(GF_LOG_ERROR, GF_LOG_CORE, ("Cannot set navigation: %s", gf_error_to_string(e) ));
		}
		break;
	case EOsmo4NavWalk:
		gf_term_set_option(iAppView->m_term, GF_OPT_NAVIGATION, GF_NAVIGATE_WALK);
		break;
	case EOsmo4NavFly:
		gf_term_set_option(iAppView->m_term, GF_OPT_NAVIGATION, GF_NAVIGATE_FLY);
		break;
	case EOsmo4NavExamine:
		gf_term_set_option(iAppView->m_term, GF_OPT_NAVIGATION, GF_NAVIGATE_EXAMINE);
		break;
	case EOsmo4NavHeadlight:
		gf_term_set_option(iAppView->m_term, GF_OPT_HEADLIGHT, !gf_term_get_option(iAppView->m_term, GF_OPT_HEADLIGHT) );
		break;
	case EOsmo4CollideNone:
		gf_term_set_option(iAppView->m_term, GF_OPT_COLLISION, GF_COLLISION_NONE);
		break;
	case EOsmo4CollideSimple:
		gf_term_set_option(iAppView->m_term, GF_OPT_COLLISION, GF_COLLISION_NORMAL);
		break;
	case EOsmo4CollideDisp:
		gf_term_set_option(iAppView->m_term, GF_OPT_COLLISION, GF_COLLISION_DISPLACEMENT);
		break;
	case EOsmo4NavGravity:
		gf_term_set_option(iAppView->m_term, GF_OPT_GRAVITY, !gf_term_get_option(iAppView->m_term, GF_OPT_GRAVITY));
		break;
	case EOsmo4ViewRTI:
		iAppView->show_rti = !iAppView->show_rti;
		break;

    case EOsmo4OptEnableLogs:
    {
		const char *opt = gf_cfg_get_key(iAppView->m_user.config, "General", "Logs");
		if (opt && !stricmp(opt, "@debug")) {
			gf_cfg_set_key(iAppView->m_user.config, "General", "Logs", "all@error");
		} else {
			gf_cfg_set_key(iAppView->m_user.config, "General", "Logs", "all@debug");
		}
		iAppView->SetupLogs();
    }
        break;
	case EOsmo4OptOpenGL:
	{
		const char *opt = gf_cfg_get_key(iAppView->m_user.config, "Compositor", "ForceOpenGL");
		Bool use_gl = (opt && !strcmp(opt, "yes")) ? 1 : 0;
		gf_cfg_set_key(iAppView->m_user.config, "Compositor", "ForceOpenGL", use_gl ? "no" : "yes");
		gf_term_set_option(iAppView->m_term, GF_OPT_USE_OPENGL, !use_gl);
	}
		break;
	case EOsmo4OptDirectDraw:
	{
		const char *opt = gf_cfg_get_key(iAppView->m_user.config, "Compositor", "DirectDraw");
		Bool use_dd = (opt && !strcmp(opt, "yes")) ? 1 : 0;
		gf_cfg_set_key(iAppView->m_user.config, "Compositor", "DirectDraw", use_dd ? "no" : "yes");
		gf_term_set_option(iAppView->m_term, GF_OPT_DIRECT_DRAW, !use_dd);
	}
		break;
	case EOsmo4OptXMLProgressive:
	{
		const char *opt = gf_cfg_get_key(iAppView->m_user.config, "SAXLoader", "Progressive");
		Bool use_prog = (opt && !strcmp(opt, "yes")) ? 1 : 0;
		gf_cfg_set_key(iAppView->m_user.config, "SAXLoader", "Progressive", use_prog ? "no" : "yes");
		gf_cfg_set_key(iAppView->m_user.config, "SAXLoader", "MaxDuration", "100");
	}
		break;

    default:
		if ((aCommand>=EOsmo4OpenRecentFirst) && (aCommand<=EOsmo4OpenRecentLast)) {
			const char *sOpt = gf_cfg_get_key_name(iAppView->m_user.config, "RecentFiles", aCommand - EOsmo4OpenRecentFirst);
			if (sOpt) iAppView->Connect(sOpt);
		} else {
			iAppView->MessageBox("Unandled command - panic", "Osmo4");
			Panic( EOsmo4Ui );
		}
        break;
    }
#endif
}
Пример #27
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);
	}
}