// ---------------------------------------------------------------------------- // CCreate2WayVideoSessionDialog::PreLayoutDynInitL() // . // ---------------------------------------------------------------------------- // void CCreate2WayVideoSessionDialog::PreLayoutDynInitL() { CEikEdwin* edwinPoCAddress = static_cast<CEikEdwin*>( Control( ESessionDialog2WayVideoRecipientAddress ) ); TBuf<KBufLength> defaultAddress; defaultAddress.Copy(iParams->iRecipentAddress); edwinPoCAddress->SetTextL(&defaultAddress); edwinPoCAddress->SetCursorPosL(defaultAddress.Length(),EFalse); CAknPopupFieldText* popupFieldText = static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoVideoCodec)); popupFieldText->SetCurrentValueIndex(0); popupFieldText = static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoAudioCodec)); popupFieldText->SetCurrentValueIndex(0); popupFieldText = static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoViewFinder)); popupFieldText->SetCurrentValueIndex(0); popupFieldText = static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoCamera)); popupFieldText->SetCurrentValueIndex(0); CAknForm::PreLayoutDynInitL(); }
/* * Initialize the Layout for the form1. */ void CYPagesForm1::PreLayoutDynInitL() { CAknPopupFieldText* popupFieldText = static_cast <CAknPopupFieldText*> (ControlOrNull(EYPagesPopup)); if (popupFieldText) { popupFieldText->SetCurrentValueIndex (0); } }
/* * Initialize the Layout for the form. */ void CYPagesForm::PreLayoutDynInitL() { TInt currCityIndex = 0; // TInt for storing index of City. CAknPopupFieldText* popupFieldText = static_cast <CAknPopupFieldText*> (ControlOrNull(EYPagesPopup)); if (popupFieldText) { popupFieldText->SetCurrentValueIndex (currCityIndex); } }
/* * Save Form data, function to be executed when save option is selected. * Creates the second form which allows for selecting the category. */ TBool CYPagesForm1::SaveFormDataL() { CAknPopupFieldText* popupFieldText = static_cast <CAknPopupFieldText*> (ControlOrNull(EYPagesPopup)); if (popupFieldText) { TInt categoryIndex = popupFieldText->CurrentValueIndex(); TBuf <30> KMyTextFile; KMyTextFile.Format(_L("D:\\YPages\\%d%d.txt"), iColor, categoryIndex); RFs fileServer; User :: LeaveIfError (fileServer.Connect()); RFile file; User::LeaveIfError(file.Open(fileServer, KMyTextFile, EFileRead|EFileStreamText)); CleanupClosePushL(file); TFileText fileText; fileText.Set(file); TBuf<100> buffer; buffer = _L(""); RBuf rBuf; rBuf.Create(buffer); rBuf.CleanupClosePushL(); TInt err = KErrNone; while(err != KErrEof) { err = fileText.Read(buffer); if ((err != KErrNone) && (err != KErrEof)) { User :: Leave(err); } if (KErrNone == err) { rBuf.ReAllocL(rBuf.Length() + buffer.Length()+2); rBuf.Append(buffer); rBuf.Append(_L("\n")); } } CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(rBuf); dlg->PrepareLC(R_ABOUT_HEADING_PANE); dlg->SetHeaderTextL(_L("")); dlg->RunLD(); CleanupStack::PopAndDestroy(&rBuf); CleanupStack::PopAndDestroy(&file); fileServer.Close(); } return ETrue; }
void CStopwatchForm::PreLayoutDynInitL() { CEikDurationEditor* durationEd = (CEikDurationEditor*)Control( EStopwatchSettingDuration ); durationEd->SetDuration( iData->iDuration ); CAknPopupFieldText* popupFieldTextWhen = (CAknPopupFieldText*)Control( EStopwatchSettingPlayWhen ); popupFieldTextWhen->SetCurrentValueIndex( iData->iPlayWhenIndex ); CAknPopupFieldText* popupFieldTextWhat = (CAknPopupFieldText*)Control( EStopwatchSettingPlayWhat ); popupFieldTextWhat->SetCurrentValueIndex( iData->iPlayWhatIndex ); }
TBool CStopwatchForm::SaveFormDataL() { CEikDurationEditor* durationEd = (CEikDurationEditor*)Control( EStopwatchSettingDuration ); iData->iDuration=durationEd->Duration(); CAknPopupFieldText* popupFieldTextWhen = (CAknPopupFieldText*)Control( EStopwatchSettingPlayWhen ); iData->iPlayWhenIndex=(TStopwatchData::TPlayWhen)popupFieldTextWhen->CurrentValueIndex(); CAknPopupFieldText* popupFieldTextWhat = (CAknPopupFieldText*)Control( EStopwatchSettingPlayWhat ); iData->iPlayWhatIndex=(TStopwatchData::TPlayWhat)popupFieldTextWhat->CurrentValueIndex(); return ETrue; }
/* * Save Form data, function to be executed when save option is selected. * Creates the second form which allows for selecting the category. */ TBool CYPagesForm::SaveFormDataL() { _LIT(KMessage,"Error!!"); CAknPopupFieldText* popupFieldText = static_cast <CAknPopupFieldText*> (ControlOrNull(EYPagesPopup)); if (popupFieldText) { if(popupFieldText->CurrentValueIndex()< KNumCities && popupFieldText->CurrentValueIndex()>=0 ) { TInt cityIndex; cityIndex = popupFieldText->CurrentValueIndex(); CYPagesForm1* form = CYPagesForm1::NewL(iText,cityIndex); form->ExecuteLD(R_YPAGES_DIALOG_A); } else { iEikonEnv->AlertWin(KMessage); } } return ETrue; }
TBool CEmTubeVideoUploadDialog::SaveFormDataL() { TBuf<KUploadVideoMaxFieldLength> data; CEikEdwin* editor; editor = static_cast <CEikEdwin*> (Control(EUploadVideoFieldTitle)); editor->GetText( data ); iQueueEntry->SetTitleL( data ); editor = static_cast <CEikEdwin*> (Control(EUploadVideoFieldDescription)); editor->GetText( data ); iQueueEntry->SetDescriptionL( data ); editor = static_cast <CEikEdwin*> (Control(EUploadVideoFieldTags)); editor->GetText( data ); iQueueEntry->SetTagsL( data ); CAknPopupFieldText* popup = static_cast<CAknPopupFieldText*>(ControlOrNull(EUploadVideoFieldPublic)); switch ( popup->CurrentValueIndex() ) { case 0: iQueueEntry->SetPublic( ETrue ); break; case 1: iQueueEntry->SetPublic( EFalse ); break; } popup = static_cast<CAknPopupFieldText*>(ControlOrNull(EUploadVideoFieldCategory)); iQueueEntry->SetCategory( KCategories[ popup->CurrentValueIndex() ] ); return ETrue; }
TBool CCreate2WayVideoSessionDialog::OkToExitL( TInt aKey ) { if ( aKey == EEikCmdCanceled ) { // Cancel pressed. Just exit. return ETrue; } CEikEdwin* edwinRecipientAddress = static_cast<CEikEdwin*>( Control( ESessionDialog2WayVideoRecipientAddress ) ); TBuf<KBufLength> buffer; edwinRecipientAddress->GetText(buffer); iParams->iRecipentAddress = buffer; CAknPopupFieldText* popupFieldText = static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoVideoCodec)); TInt index = popupFieldText->CurrentValueIndex(); if(index == 0) { iParams->iVideoCodec = TSessionParams::EMceCodecSingle; } else if ( index == 1 ) { iParams->iVideoCodec = TSessionParams::EMceCodecAll; } else { iParams->iVideoCodec = TSessionParams::EMceCodecMultipleModes; } popupFieldText = static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoAudioCodec)); index = popupFieldText->CurrentValueIndex(); if(index == 0) { iParams->iAudioCodec = TSessionParams::EMceCodecSingle; } else if (index == 1) { iParams->iAudioCodec = TSessionParams::EMceCodecAll; } else { iParams->iAudioCodec = TSessionParams::EMceCodecNone; } popupFieldText = static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoViewFinder)); index = popupFieldText->CurrentValueIndex(); if(index == 0) { iParams->videoSinkDisplay = TSessionParams::EMceViewFinderDisabled; } else { iParams->videoSinkDisplay = TSessionParams::EMceViewFinderEnabled; } popupFieldText = static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoCamera)); index = popupFieldText->CurrentValueIndex(); if(index == 0) { iParams->iCameraSetting = TSessionParams::EMceCameraPrimary; } else { iParams->iCameraSetting = TSessionParams::EMceCameraSecondary; } return ETrue; }