本文整理汇总了C++中CDesCArrayFlat::AppendL方法的典型用法代码示例。如果您正苦于以下问题:C++ CDesCArrayFlat::AppendL方法的具体用法?C++ CDesCArrayFlat::AppendL怎么用?C++ CDesCArrayFlat::AppendL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDesCArrayFlat
的用法示例。
在下文中一共展示了CDesCArrayFlat::AppendL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestSettingpagesRadioButtonHandlePointerEventLL
// -----------------------------------------------------------------------------
// CTestSDKSettingPages::TestSettingpagesRadioButtonHandlePointerEventLL
// -----------------------------------------------------------------------------
//
TInt CTestSDKSettingPages::TestSettingpagesRadioButtonHandlePointerEventLL( CStifItemParser& /*aItem*/ )
{
CDesCArrayFlat* mArr = new( ELeave ) CDesCArrayFlat( KSize );
CleanupStack::PushL( mArr );
TBuf<KBufSize> tom( KTom );
TBuf<KBufSize> jack( KJack );
TBuf<KBufSize> mary( KMary );
mArr->AppendL( tom );
mArr->AppendL( jack );
mArr->AppendL( mary );
TInt optin( KZero );
TBuf< KBufSize > buffer( KTestString );
CAknRadioButtonSettingPage* dialog =
new (ELeave) CAknRadioButtonSettingPage( &buffer, KOne, EAknCtPopupSettingList,
R_EXAMPLE_EDITOR_CONTROL, R_EXAMPLE_SETTING_PAGE, optin, mArr );
CleanupStack::PushL( dialog );
dialog->ConstructL();
TPointerEvent event;
event.iType = TPointerEvent::EButton1Down;
event.iModifiers = 0;
TPoint eventPos( 10, 30 );
event.iPosition = eventPos;
event.iParentPosition = eventPos;
dialog->HandlePointerEventL( event );
CleanupStack::PopAndDestroy( KTwo );
return KErrNone;
}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:35,代码来源:testsdksettingpagesblocksaknradiobuttonsettingpage.cpp
示例2: SetData
// Set data to the listbox.
void CPhotoModeListBox::SetData()
{
iListbox->HandleItemRemovalL();
SetIconsArray();
CDesCArrayFlat* listItems = new (ELeave) CDesCArrayFlat(2);
CleanupStack::PushL(listItems);
TBuf<KArrayItemMaxLength> item;
_LIT(KTab, "\t");
item.Copy(_L("0"));
item.Append(KTab);
item.Append(_L("Phone"));
listItems->AppendL(item);
item.Copy(_L("1"));
item.Append(KTab);
item.Append(_L("Memory"));
listItems->AppendL(item);
CleanupStack::Pop(listItems);
CTextListBoxModel* model = iListbox->Model();
model->SetItemTextArray(listItems);
// Set ListBox model responsible for deleting the listItems array
model->SetOwnershipType(ELbmOwnsItemArray);
iListbox->HandleItemAdditionL();
DrawDeferred();
}
示例3: TestSettingpagesRadioButtonListBoxControlL
// -----------------------------------------------------------------------------
// CTestSDKSettingPages::TestSettingpagesRadioButtonListBoxControlL
// -----------------------------------------------------------------------------
//
TInt CTestSDKSettingPages::TestSettingpagesRadioButtonListBoxControlL( CStifItemParser& /*aItem*/ )
{
CDesCArrayFlat* mArr = new( ELeave ) CDesCArrayFlat( KSize );
CleanupStack::PushL( mArr );
TBuf<KBufSize> tom( KTom );
TBuf<KBufSize> jack( KJack );
TBuf<KBufSize> mary( KMary );
mArr->AppendL( tom );
mArr->AppendL( jack );
mArr->AppendL( mary );
TInt optin( KZero );
CAknRadioButtonSettingPage* dialog =
new (ELeave) CAknRadioButtonSettingPage( R_EXAMPLE_SETTING_PAGE,
optin, mArr );
CleanupStack::PushL( dialog );
CAknSetStyleListBox* editorControl = dialog->ListBoxControl();
STIF_ASSERT_NULL( editorControl );
dialog->ConstructL();
editorControl = dialog->ListBoxControl();
STIF_ASSERT_NOT_NULL( editorControl );
CleanupStack::PopAndDestroy( KTwo );
return KErrNone;
}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:33,代码来源:testsdksettingpagesblocksaknradiobuttonsettingpage.cpp
示例4: TestSettingpagesRadioButtonWriteInternalStateLL
// -----------------------------------------------------------------------------
// CTestSDKSettingPages::TestSettingpagesRadioButtonWriteInternalStateLL
// -----------------------------------------------------------------------------
//
TInt CTestSDKSettingPages::TestSettingpagesRadioButtonWriteInternalStateLL( CStifItemParser& /*aItem*/ )
{
CDesCArrayFlat* mArr = new( ELeave ) CDesCArrayFlat( KSize );
CleanupStack::PushL( mArr );
TBuf<KBufSize> tom( KTom );
TBuf<KBufSize> jack( KJack );
TBuf<KBufSize> mary( KMary );
mArr->AppendL( tom );
mArr->AppendL( jack );
mArr->AppendL( mary );
TInt optin( KZero );
TBuf< KBufSize > buffer( KTestString );
CTestRadioButtonSettingPage* dialog =
new (ELeave) CTestRadioButtonSettingPage( &buffer, KOne, EAknCtPopupSettingList,
R_EXAMPLE_EDITOR_CONTROL, R_EXAMPLE_SETTING_PAGE, optin, mArr );
CleanupStack::PushL( dialog );
dialog->ConstructL();
RDesWriteStream stream;
CleanupClosePushL( stream );
HBufC8* hbuf = HBufC8::NewL( KHBufSize );
CleanupStack::PushL( hbuf );
TPtr8 ptr = hbuf->Des();
stream.Open( ptr );
dialog->DoWriteInternalStateL( stream );
stream.CommitL();
stream.Close();
CleanupStack::PopAndDestroy( KFour );
return KErrNone;
}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:35,代码来源:testsdksettingpagesblocksaknradiobuttonsettingpage.cpp
示例5: SetData
// Set data to the listbox.
void CMessageListBox::SetData()
{
iListbox->HandleItemRemovalL();
SetIconsArray();
CDesCArrayFlat* listItems = new (ELeave) CDesCArrayFlat(2);
CleanupStack::PushL(listItems);
TBuf<KArrayItemMaxLength> item;
_LIT(KTab, "\t");
item.Copy(_L("0"));
item.Append(KTab);
item.Append(*iEikonEnv->AllocReadResourceL(R_TAB_INBOX));
listItems->AppendL(item);
item.Copy(_L("1"));
item.Append(KTab);
item.Append(*iEikonEnv->AllocReadResourceL(R_TAB_SENTITEMS));
listItems->AppendL(item);
CleanupStack::Pop(listItems);
CTextListBoxModel* model = iListbox->Model();
model->SetItemTextArray(listItems);
// Set ListBox model responsible for deleting the listItems array
model->SetOwnershipType(ELbmOwnsItemArray);
iListbox->HandleItemAdditionL();
DrawDeferred();
}
示例6: CreateVCardTestL
//********************************************************************************************
void CVersitCardTest::CreateVCardTestL()
//
//
//
{
CVersitParser* parser = CParserVCard::NewL();
CleanupStack::PushL(parser);
// Add Name
{
CDesCArrayFlat* nameArray = new(ELeave) CDesCArrayFlat(2);
CleanupStack::PushL(nameArray);
nameArray->AppendL(_L("Wibble"));
nameArray->AppendL(_L("Wobble"));
//
CParserPropertyValue* propNameValue = new(ELeave) CParserPropertyValueCDesCArray(nameArray);
CleanupStack::Pop(nameArray);
CleanupStack::PushL(propNameValue);
CParserProperty* propName = CParserProperty::NewL(*propNameValue, KVersitTokenN, NULL);
CleanupStack::Pop(propNameValue);
parser->AddPropertyL(propName);
}
// Add Sound
{
CDesCArrayFlat* soundArray = new(ELeave) CDesCArrayFlat(2);
CleanupStack::PushL(soundArray);
soundArray->AppendL(_L("Sound1"));
soundArray->AppendL(_L("Sound2"));
//
CParserPropertyValue* propSoundValue = new(ELeave) CParserPropertyValueCDesCArray(soundArray);
CleanupStack::Pop(soundArray);
CleanupStack::PushL(propSoundValue);
CParserProperty* propSound = CParserProperty::NewL(*propSoundValue, KVersitTokenSOUND, NULL);
CleanupStack::Pop(propSoundValue);
//
CParserParam* param = CParserParam::NewL(KSoundExtensionPropertyParameterName, KNullDesC8);
CleanupStack::PushL(param);
propSound->AddParamL(param);
CleanupStack::Pop(param);
//
parser->AddPropertyL(propSound);
}
// Export vCard
_LIT(KFileName, "C:\\JapaneseSound.vcf");
RFile file;
User::LeaveIfError(file.Replace(TheFsSession, KFileName, EFileWrite));
CleanupClosePushL(file);
parser->ExternalizeL(file);
CleanupStack::PopAndDestroy(&file);
// Test
CParserVCard* importedCard = CVersitCardTest::InternalizeCardLC(KFileName);
CheckNumberOfSoundPropertiesL(KFileName, *importedCard, 2);
CleanupStack::PopAndDestroy(importedCard);
// Tidy up
CleanupStack::PopAndDestroy(parser);
}
示例7: TestSettingpagesRadioButtonSelectCurrentItemLL
// -----------------------------------------------------------------------------
// CTestSDKSettingPages::TestSettingpagesRadioButtonSelectCurrentItemLL
// -----------------------------------------------------------------------------
//
TInt CTestSDKSettingPages::TestSettingpagesRadioButtonSelectCurrentItemLL( CStifItemParser& /*aItem*/ )
{
CDesCArrayFlat* mArr = new( ELeave ) CDesCArrayFlat( KSize );
CleanupStack::PushL( mArr );
TBuf<KBufSize> tom( KTom );
TBuf<KBufSize> jack( KJack );
TBuf<KBufSize> mary( KMary );
mArr->AppendL( tom );
mArr->AppendL( jack );
mArr->AppendL( mary );
TInt optin( KZero );
TBuf< KBufSize > buffer( KTestString );
CTestRadioButtonSettingPage* dialog =
new (ELeave) CTestRadioButtonSettingPage( &buffer, KOne, EAknCtPopupSettingList,
R_EXAMPLE_EDITOR_CONTROL, R_EXAMPLE_SETTING_PAGE, optin, mArr );
CleanupStack::PushL( dialog );
dialog->ConstructL();
dialog->DoSelectCurrentItemL();
CleanupStack::PopAndDestroy( KTwo );
return KErrNone;
}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:29,代码来源:testsdksettingpagesblocksaknradiobuttonsettingpage.cpp
示例8: TestGridsGridmNumberOfItemsL
// -----------------------------------------------------------------------------
// CTestSDKGrids::TestGridsGridmNumberOfItemsL
// -----------------------------------------------------------------------------
//
TInt CTestSDKGrids::TestGridsGridmNumberOfItemsL( CStifItemParser& /*aItem*/ )
{
CAknGridM* grid = new( ELeave ) CAknGridM;
CleanupStack::PushL( grid );
CDesCArrayFlat* arr = new( ELeave ) CDesCArrayFlat( KSize );
CleanupStack::PushL( arr );
HBufC* buf1 = KTom().AllocLC();
HBufC* buf2 = KJack().AllocLC();
HBufC* buf3 = KMary().AllocLC();
arr->AppendL(*buf1);
arr->AppendL(*buf2);
arr->AppendL(*buf3);
grid->SetItemTextArray( arr );
TInt numberofitem = grid->NumberOfItems();
STIF_ASSERT_EQUALS( numberofitem, KThree );
grid->SetStartCells( KThree );
numberofitem = grid->NumberOfItems();
STIF_ASSERT_EQUALS( KSix, numberofitem );
CleanupStack::PopAndDestroy( buf3 );
CleanupStack::PopAndDestroy( buf2 );
CleanupStack::PopAndDestroy( buf1 );
CleanupStack::Pop( arr );
CleanupStack::PopAndDestroy( grid );
return KErrNone;
}
示例9: RemoveL
// ----------------------------------------------------------------------------------------------------------
// Remove an item from the collection database using the given path
// ----------------------------------------------------------------------------------------------------------
//
void CTestCollectionPlugin::RemoveL (const CMPXCollectionPath& aPath)
{
LOG1(_L("CTestCollectionPlugin::RemoveL"));
LogPath( aPath );
CDesCArrayFlat* fp = new (ELeave) CDesCArrayFlat(8);
CleanupStack::PushL( fp );
switch( aPath.Levels() )
{
case 2:
if(aPath.Id() == 14)
{ // Test0091
iObs->HandleRemove( *fp, KErrNotFound );
}
break;
case 3:
if(aPath.Id() == 212)
{ // Test0090
fp->AppendL( _L("\\song3121.ts") );
fp->AppendL( _L("\\song3122.ts") );
fp->AppendL( _L("\\song3123.tp") );
iObs->HandleRemove( *fp, KErrNone );
}
break;
case 4:
if(aPath.Id() == 3111)
{ // Test0088
fp->AppendL( _L("\\song3111.ts") );
iObs->HandleRemove( *fp, KErrNone );
}
break;
default:
User::Panic(_L("CTestCollectionPlugin::RemoveL panic"), 1); // magic number
}
CleanupStack::PopAndDestroy( fp );
}
示例10: TestSettingpagesRadioButtonHandleListBoxEventLL
// -----------------------------------------------------------------------------
// CTestSDKSettingPages::TestSettingpagesRadioButtonHandleListBoxEventLL
// -----------------------------------------------------------------------------
//
TInt CTestSDKSettingPages::TestSettingpagesRadioButtonHandleListBoxEventLL( CStifItemParser& /*aItem*/ )
{
CDesCArrayFlat* mArr = new( ELeave ) CDesCArrayFlat( KSize );
CleanupStack::PushL( mArr );
TBuf<KBufSize> tom( KTom );
TBuf<KBufSize> jack( KJack );
TBuf<KBufSize> mary( KMary );
mArr->AppendL( tom );
mArr->AppendL( jack );
mArr->AppendL( mary );
TInt optin( KZero );
TBuf< KBufSize > buffer( KTestString );
CAknRadioButtonSettingPage* dialog =
new (ELeave) CAknRadioButtonSettingPage( &buffer, KOne, EAknCtPopupSettingList,
R_EXAMPLE_EDITOR_CONTROL, R_EXAMPLE_SETTING_PAGE, optin, mArr );
CleanupStack::PushL( dialog );
dialog->ConstructL();
dialog->HandleListBoxEventL( dialog->ListBoxControl(), MEikListBoxObserver::EEventItemActioned );
dialog->HandleListBoxEventL( dialog->ListBoxControl(), MEikListBoxObserver::EEventItemClicked );
dialog->HandleListBoxEventL( dialog->ListBoxControl(), MEikListBoxObserver::EEventPenDownOnItem );
CleanupStack::PopAndDestroy( KTwo );
return KErrNone;
}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:31,代码来源:testsdksettingpagesblocksaknradiobuttonsettingpage.cpp
示例11: PopulateListbox
void CDefaultNumbersPopupList::PopulateListbox()
{
CALLSTACKITEM_N(_CL("CDefaultNumbersPopupList"), _CL("PopulateListbox"));
TBuf<200> phone;
phone.Append(*iPhoneDefault);
phone.Append(_L("\t"));
if( aItem->DefaultPhoneNumberField() != 0)
{
phone.Append(aItem->DefaultPhoneNumberField()->Label());
}
else
{
phone.Append(*iNoDefault);
}
iArrayItems->AppendL(phone);
TBuf<200> sms;
sms.Append(*iSmsDefault);
sms.Append(_L("\t"));
if( aItem->DefaultSmsField() != 0)
{
sms.Append(aItem->DefaultSmsField()->Label());
}
else
{
sms.Append(*iNoDefault);
}
iArrayItems->AppendL(sms);
TBuf<200> mms;
mms.Append(*iMmsDefault);
mms.Append(_L("\t"));
if( aItem->DefaultMmsField() != 0)
{
mms.Append(aItem->DefaultMmsField()->Label());
}
else
{
mms.Append(*iNoDefault);
}
iArrayItems->AppendL(mms);
TBuf<200> email;
email.Append(*iEmailDefault);
email.Append(_L("\t"));
if( aItem->DefaultEmailField () != 0)
{
email.Append(aItem->DefaultEmailField()->Label());
}
else
{
email.Append(*iNoDefault);
}
iArrayItems->AppendL(email);
}
示例12: CreateCDesCArrayL
/** Creates a CDesCArray property
@return CDesCArray parser Property value
*/
CParserPropertyValue* CContactsPBAPExportUtilityClass::CreateCDesCArrayL()
{
CDesCArrayFlat* desArray = new (ELeave)CDesCArrayFlat(4);
CleanupStack::PushL(desArray);
desArray->AppendL(KAddr1);
desArray->AppendL(KAddr2);
desArray->AppendL(KAddr3);
CParserPropertyValue* propertyValue = new (ELeave) CParserPropertyValueCDesCArray(desArray);
CleanupStack::Pop(); // desArray
return propertyValue;
}
示例13: TestLqdlgPublishDialogL
// -----------------------------------------------------------------------------
// CTestSDKQueries::TestLqdlgPublishDialogL
// -----------------------------------------------------------------------------
//
TInt CTestSDKQueries::TestLqdlgPublishDialogL( CStifItemParser& /*aItem*/ )
{
TInt selectedOption( KZero );
CDesCArrayFlat* mArray = new (ELeave) CDesCArrayFlat(KTen);
CleanupStack::PushL( mArray );
TBuf< KTen > palabra;
for (TInt num = KZero; num< KTen; num++)
{
palabra.Format(_L("option %d"), num);
mArray->AppendL(palabra);
}
CAknListQueryDialog* dlg = new( ELeave ) CAknListQueryDialog( &selectedOption );
dlg->PrepareLC( R_UPDATE_QUERY_MSG_DIALOG );
dlg->SetItemTextArray( mArray );
dlg->SetOwnershipType( ELbmDoesNotOwnItemArray );
CArrayFixFlat< TInt >* selArray = new( ELeave )CArrayFixFlat< TInt >( KFive );
CleanupStack::PushL( selArray );
selArray->AppendL( KOne );
selArray->AppendL( KThree );
TInt err = KErrNone;
TRAP( err, dlg->PublishDialogL( KOne, KNullUid, selArray ));
CleanupStack::Pop( KOne );
CleanupStack::PopAndDestroy( KTwo );
return KErrNone;
}
示例14: TestLqdlgFindBoxL
// -----------------------------------------------------------------------------
// CTestSDKQueries::TestLqdlgFindBoxL
// -----------------------------------------------------------------------------
//
TInt CTestSDKQueries::TestLqdlgFindBoxL( CStifItemParser& /*aItem*/ )
{
TInt selectedOption( KZero );
CTestCAknListQueryDialog* dlg = new( ELeave ) CTestCAknListQueryDialog( &selectedOption );
CAknSearchField* findBox = dlg->FindBox();
STIF_ASSERT_NULL( findBox );
CDesCArrayFlat* mArray = new (ELeave) CDesCArrayFlat( KTen );
CleanupStack::PushL( mArray );
TBuf< KTen > palabra;
for (TInt num = KZero; num< KTen; num++)
{
palabra.Format(_L("option %d"), num);
mArray->AppendL(palabra);
}
dlg->PrepareLC( R_UPDATE_QUERY_DIALOG );
dlg->SetItemTextArray( mArray );
dlg->SetOwnershipType( ELbmDoesNotOwnItemArray );
findBox = dlg->FindBox();
STIF_ASSERT_NULL( findBox );
CleanupStack::PopAndDestroy( dlg );
CleanupStack::PopAndDestroy( mArray );
return KErrNone;
}
示例15: TestLqdlgHandleResourceChangeL
//There is a problm here
// -----------------------------------------------------------------------------
// CTestSDKQueries::TestLqdlgHandleResourceChangeL
// -----------------------------------------------------------------------------
//
TInt CTestSDKQueries::TestLqdlgHandleResourceChangeL( CStifItemParser& /*aItem*/ )
{
TInt selectedOption( KZero );
CDesCArrayFlat* mArray = new (ELeave) CDesCArrayFlat(KTen);
CleanupStack::PushL( mArray );
TBuf< KTen > palabra;
for (TInt num = KZero; num< KTen; num++)
{
palabra.Format(_L("option %d"), num);
mArray->AppendL(palabra);
}
CTestCAknListQueryDialog* dlg = new( ELeave ) CTestCAknListQueryDialog( &selectedOption );
dlg->PrepareLC( R_UPDATE_QUERY_MSG_DIALOG );
dlg->SetItemTextArray( mArray );
dlg->SetOwnershipType( ELbmDoesNotOwnItemArray );
dlg->PreLayoutDynInitL();
dlg->HandleResourceChange( KEikDynamicLayoutVariantSwitch );
CleanupStack::PopAndDestroy( dlg );
CleanupStack::PopAndDestroy( mArray );
return KErrNone;
}