Ejemplo n.º 1
0
void CConverterDialog::PreLayoutDynInitL()
	{
	// set choice list with destination types
	CDesCArrayFlat* array = new (ELeave) CDesCArrayFlat(4);
	CleanupStack::PushL(array);
	// get array of conversion types
	iMediaClientEngine.DestinationTypesL(iFileName, *array);
	// set choicelist
    CEikChoiceList* typesList = static_cast<CEikChoiceList*>(Control(ECvtTypeField));
	typesList->SetArrayL(array);
	CleanupStack::Pop(array);
	}
Ejemplo n.º 2
0
void CFormatOptionsDialog::TUintChoiceList(TInt aResourceId, const RArray<TUint>& aArray)
	{
	CEikChoiceList* list = static_cast<CEikChoiceList*>(Control(aResourceId));
	if (aArray.Count()==0) 
		{
		list->MakeVisible(EFalse);
		return;
		}
	TBuf <10> buf;
	CDesCArrayFlat* array = new (ELeave) CDesCArrayFlat(4);
	CleanupStack::PushL(array);
	for (TInt i=0; i<aArray.Count(); i++)
		{
		buf.Num(aArray[i]);
		array->AppendL(buf);
		}
	list->SetArrayL(array);	
	CleanupStack::Pop(); //array
	}
Ejemplo n.º 3
0
void CFormatOptionsDialog::PreLayoutDynInitL()
	{
	// Set dialog fields - these 3 are all TUint lists
	TUintChoiceList(EBitRates, iBitRates);
	TUintChoiceList(ESampleRates, iSampleRates);
	TUintChoiceList(EChannels, iChannels);
	// Codecs list is more complicated
	CDesCArrayFlat* array = new (ELeave) CDesCArrayFlat(4);
	CleanupStack::PushL(array);
	HBufC8* buf8 = HBufC8::NewLC(10);
	TPtr8 ptr = buf8->Des();
	TBuf<5> buf;
	for (TInt i=0; i<iDataTypes.Count(); i++)
		{
		iDataTypes[i].FourCC(&ptr);
		buf.Copy(ptr);
		array->AppendL(buf);
		}
    CEikChoiceList* list = static_cast<CEikChoiceList*>(Control(ECodecs));
	list->SetArrayL(array);	
	CleanupStack::PopAndDestroy(); //buf8
	CleanupStack::Pop(); //array
	}