当前位置: 首页>>代码示例>>C++>>正文


C++ CArrayPtr::AppendL方法代码示例

本文整理汇总了C++中CArrayPtr::AppendL方法的典型用法代码示例。如果您正苦于以下问题:C++ CArrayPtr::AppendL方法的具体用法?C++ CArrayPtr::AppendL怎么用?C++ CArrayPtr::AppendL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CArrayPtr的用法示例。


在下文中一共展示了CArrayPtr::AppendL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ResetSkinChooseItem

void CYCSettingList::ResetSkinChooseItem()
{
    CAknEnumeratedTextPopupSettingItem* item = (CAknEnumeratedTextPopupSettingItem*)(this->SettingItemArray()->At(ELTSettingSkinChosse));
    CArrayPtr<CAknEnumeratedText>* texts = item->EnumeratedTextArray();
    texts->ResetAndDestroy();

    HBufC* textDef = StringLoader::LoadLC(R_TEXT_DEFAULT);
    CAknEnumeratedText* enumTextDef = new (ELeave) CAknEnumeratedText(0, textDef);
    CleanupStack::Pop(textDef);
    CleanupStack::PushL(enumTextDef);
    texts->AppendL(enumTextDef);
    CleanupStack::Pop(enumTextDef);

    RPointerArray<SkinImageStruct>& skins = iScaner->GetSkins();
    for (TInt i=0; i<skins.Count(); i++)
    {
        pSkinImageStruct sk = skins[i];
        CAknEnumeratedText* enumText;

        HBufC* text = sk->iShortName.AllocLC();
        enumText = new (ELeave) CAknEnumeratedText(sk->iIndex+1, text);
        CleanupStack::Pop(text);
        CleanupStack::PushL(enumText);
        texts->AppendL(enumText);
        CleanupStack::Pop(enumText);
    }
}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:27,代码来源:YCSettingList.cpp

示例2: SetIconsArray

void CMessageListBox::SetIconsArray()
{
    CArrayPtr<CGulIcon>* iconArray = new (ELeave)
    CArrayPtrFlat<CGulIcon>(2);

    CleanupStack::PushL(iconArray);

    TBuf<128> path;
    path = CRippleVaultAppUi::ApplicationDriveAndPath();
    path.Append(KS80SmsMbmFileName);

    iconArray->AppendL(iEikonEnv->CreateIconL(path,
                       EMbmS80smsInbox, EMbmS80smsInboxm));

    iconArray->AppendL(iEikonEnv->CreateIconL(path,
                       EMbmS80smsSent, EMbmS80smsSentm));


    CleanupStack::Pop(); // iconArray

    // Set the listbox's first column to fill the listbox's whole width
    CColumnListBoxData* colData = iListbox->ItemDrawer()->ColumnData();
    if(colData)
    {
        colData->SetIconArray(iconArray);

        colData->SetGraphicsColumnL(0, ETrue);
        colData->SetColumnWidthPixelL(0, 30);
        colData->SetColumnAlignmentL(0, CGraphicsContext::ELeft);

        colData->SetColumnWidthPixelL(1, 100);
    }

    iListbox->SetItemHeightL(30);
}
开发者ID:deepakprabhakara,项目名称:ripplevault,代码行数:35,代码来源:messagelistbox.cpp

示例3: AddIconL

TInt CJuikIconManagerImpl::AddIconL(TInt aProviderId, CGulIcon* aIcon)
{
	CALLSTACKITEM_N(_CL("CJuikIconManagerImpl"), _CL("AddIconL"));
	auto_ptr<CGulIcon> icon( aIcon );
	CArrayFix<TInt>& map = ProviderIconIndexL(aProviderId);
	
	TInt ix = KErrNotFound;
	if ( iEmptySlotCount > 0 )
		ix = FindEmptySlotL();
	
	if ( ix == KErrNotFound )
		{
			iIconArray->AppendL( icon.release() );					   
			map.AppendL( LastIndex( *iIconArray ) );
		}
	else
		{
			iEmptySlotCount--;
			if ( iEmptySlotCount < 0 ) Bug( _L("Empty slot count underflow") ).Raise();
			
			(*iIconArray)[ix] = icon.release();
			map.AppendL( ix );
		}
	return LastIndex( map );
}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:25,代码来源:juik_iconmanager.cpp

示例4: DecodeSequenceLC

// -----------------------------------------------------------------------------
// CCMSX509GeneralNames::DecodeL
// Decrypts raw data to this instance
// -----------------------------------------------------------------------------
void CCMSX509GeneralNames::DecodeL( const TDesC8& aRawData )
	{
    CArrayPtr< TASN1DecGeneric >* nameData =
        DecodeSequenceLC( aRawData );
    TInt nameCount = nameData->Count();
    if( nameCount == 0 )
        {
        User::Leave( KErrArgument );
        }
    CArrayPtr< CCMSX509GeneralName >* names =
        new( ELeave ) CArrayPtrFlat< CCMSX509GeneralName >( nameCount );
    CleanupStack::PushL( names );
    for( TInt i = 0; i < nameCount; i++ )
        {
        CCMSX509GeneralName* name = CCMSX509GeneralName::NewL( );
        CleanupStack::PushL( name );
        name->DecodeL( nameData->At( i )->Encoding() );
        names->AppendL( name );
        }
    CleanupStack::Pop( nameCount ); // names
    CleanupStack::Pop( names );
    CleanupStack::PopAndDestroy( nameData );
    if( iGeneralNames )
        {
        iGeneralNames->ResetAndDestroy();
        delete iGeneralNames;
        }
    iGeneralNames = names;
	}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:33,代码来源:CCMSX509GeneralNames.cpp

示例5: new

// -----------------------------------------------------------------------------
// CCMSX509GeneralNames::SetGeneralNamesL
// GeneralNames setter
// -----------------------------------------------------------------------------
EXPORT_C void CCMSX509GeneralNames::SetGeneralNamesL(
	const CArrayPtr< CCMSX509GeneralName >& aGeneralNames )
	{
    TInt nameCount = aGeneralNames.Count();
    if( nameCount == 0 )
        {
        User::Leave ( KErrArgument );
        }
    CArrayPtr< CCMSX509GeneralName >* names =
        new( ELeave ) CArrayPtrFlat< CCMSX509GeneralName >( nameCount );
    CleanupStack::PushL( names );
    for( TInt i = 0; i < nameCount; i++ )
        {
        CCMSX509GeneralName* origName = aGeneralNames[ i ];
        CCMSX509GeneralName* name =
            CCMSX509GeneralName::NewL( origName->Tag(), origName->Data() );
        CleanupStack::PushL( name );
        names->AppendL( name );
        }
    CleanupStack::Pop( nameCount ); // names
    CleanupStack::Pop( names );
    if( iGeneralNames )
        {
        iGeneralNames->ResetAndDestroy();
        delete iGeneralNames;
        }
    iGeneralNames = names;
	}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:32,代码来源:CCMSX509GeneralNames.cpp

示例6: CreateSkinChooseItem

CAknSettingItem* CYCSettingList::CreateSkinChooseItem(TInt aSettingId)
{
    TBool isNumberedStyle = this->IsNumberedStyle();
    CArrayPtr<CGulIcon>* icons = this->ListBox()->ItemDrawer()->FormattedCellData()->IconArray();

    CAknEnumeratedTextPopupSettingItem* item = new (ELeave) CAknEnumeratedTextPopupSettingItem(aSettingId, iSkinChoose);
    CleanupStack::PushL(item);

    HBufC* textResource= NULL;
    textResource = StringLoader::LoadLC(R_TEXT_SETTING_SKIN_CHOOSE);
    // The same resource id can be used for multiple enumerated text setting pages.
    item->ConstructL(isNumberedStyle, aSettingId, textResource->Des(), icons,
                     R_ENUMERATEDTEXT_SETTING_PAGE, -1, 0, R_POPUP_SETTING_TEXTS);

    // Load texts dynamically.
    CArrayPtr<CAknEnumeratedText>* texts = item->EnumeratedTextArray();
    texts->ResetAndDestroy();

    HBufC* textDef = StringLoader::LoadLC(R_TEXT_DEFAULT);
    CAknEnumeratedText* enumTextDef = new (ELeave) CAknEnumeratedText(0, textDef);
    CleanupStack::Pop(textDef);
    CleanupStack::PushL(enumTextDef);
    texts->AppendL(enumTextDef);
    CleanupStack::Pop(enumTextDef);

    RPointerArray<SkinImageStruct>& skins = iScaner->GetSkins();
    for (TInt i=0; i<skins.Count(); i++)
    {
        pSkinImageStruct sk = skins[i];
        CAknEnumeratedText* enumText;

        HBufC* text = sk->iShortName.AllocLC();
        enumText = new (ELeave) CAknEnumeratedText(sk->iIndex+1, text);
        CleanupStack::Pop(text);
        CleanupStack::PushL(enumText);
        texts->AppendL(enumText);
        CleanupStack::Pop(enumText);
    }

    this->SettingItemArray()->AppendL(item);

    CleanupStack::PopAndDestroy(textResource);

    CleanupStack::Pop(item);

    return item;
}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:47,代码来源:YCSettingList.cpp

示例7: AddEnumeratedLanguageL

void AddEnumeratedLanguageL(CArrayPtr<CAknEnumeratedText>& aArray,
                            TInt aEnum, HBufC* aText)
{
   CAknEnumeratedText* text = new (ELeave) CAknEnumeratedText(aEnum, aText);
   CleanupStack::PushL(text);
   aArray.AppendL(text);
   CleanupStack::Pop(text);
}
开发者ID:VLjs,项目名称:Wayfinder-S60-Navigator,代码行数:8,代码来源:LanguageSettingItem.cpp

示例8: ConstructL

// ---------------------------------------------------------
// CSymTorrentSearchContainer::ConstructL
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CSymTorrentSearchContainer::ConstructL(const TRect& aRect, 
	CSymTorrentAppUi* aAppUi, CSTTorrentManager* aTorrentMgr)
{
	iAppUi=aAppUi;
	iTorrentMgr=aTorrentMgr;
    CreateWindowL();

    iListBox = new (ELeave) CAknDoubleGraphicStyleListBox();
    iListBox->SetMopParent(this);
	iListBox->ConstructL(this, EAknListBoxSelectionList);
	iListBox->SetContainerWindowL(*this);
	
	iListBox->View()->SetListEmptyTextL(_L("(empty)"));

	//create scrollbar
	iListBox->CreateScrollBarFrameL();
	iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
		CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
	
	CArrayPtr<CGulIcon>* icons = new (ELeave) CAknIconArray(1);  // must be initialized with the number of icons used by the list!
	CleanupStack::PushL(icons);

	#ifdef EKA2
	{
		CGulIcon* chainLinkIcon = CGulIcon::NewL();
		CleanupStack::PushL(chainLinkIcon);
		
		CFbsBitmap* chainLinkBmp = NULL;
		CFbsBitmap* chainLinkMask = NULL;
		AknIconUtils::CreateIconLC(chainLinkBmp, chainLinkMask, KBitmapFile,
			EMbmSymtorrentChainlink, EMbmSymtorrentChainlink_mask);	
		chainLinkIcon->SetBitmap(chainLinkBmp);
		chainLinkIcon->SetMask(chainLinkMask);
		CleanupStack::Pop(2);
		icons->InsertL(0, chainLinkIcon);
		CleanupStack::Pop();				
	}
	#else
	{
		CEikonEnv* eikEnv = CEikonEnv::Static();
		
		icons->AppendL(eikEnv->CreateIconL(KBitmapFile, 
			EMbmSymtorrentChainlink, EMbmSymtorrentChainlink_mask));	
	}
	#endif
			
	CleanupStack::Pop(icons); // icons
	iListBox->ItemDrawer()->ColumnData()->SetIconArray(icons);

    SetRect(aRect);
    
    CDesCArray* itemArray = static_cast<CDesCArray*>
		(iListBox->Model()->ItemTextArray());
	itemArray->InsertL(0, _L("0\tFirst line\tSecond line"));			
    
   
    ActivateL();
}
开发者ID:Nokia700,项目名称:SymTorrent,代码行数:63,代码来源:SymTorrentSearchContainer.cpp

示例9: AddItemL

void CMainMenuGridContainer::AddItemL(TInt aBitmapId, TInt aMaskId, 
                                      TInt aIndex) 
{
   CArrayPtr<CGulIcon>* icons = 
      iGrid->ItemDrawer()->FormattedCellData()->IconArray();
   if (!icons) {
      icons = new ( ELeave ) CAknIconArray(9);
      iGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL(icons);
   }
   CleanupStack::PushL(icons);

   CFbsBitmap* bitmap;
   CFbsBitmap* mask;

#ifdef NAV2_CLIENT_SERIES60_V3
   AknIconUtils::CreateIconL(bitmap, mask, iView->GetMbmName(), 
                             aBitmapId, aMaskId);
   AknIconUtils::SetSize(bitmap, iIconRect.Size(),
                         EAspectRatioPreservedAndUnusedSpaceRemoved);
#else
   bitmap = iEikonEnv->CreateBitmapL(iView->GetMbmName(), aBitmapId);
   mask = iEikonEnv->CreateBitmapL(iView->GetMbmName(), aMaskId);
#endif

   CleanupStack::PushL(bitmap);
   CleanupStack::PushL(mask);

   if (aIndex >= 0 && aIndex < icons->Count()) {
      icons->InsertL(aIndex, CGulIcon::NewL(bitmap, mask));
   } else {
      icons->AppendL(CGulIcon::NewL(bitmap, mask));
   }
   CleanupStack::Pop(mask);
   CleanupStack::Pop(bitmap);
   CleanupStack::Pop(icons);

   _LIT(KItem, "%d\t\t0");
   TBuf<8> buf;
   MDesCArray* array = iGrid->Model()->ItemTextArray();
   CDesCArray* cArray = (CDesCArray*)array;
   if (aIndex >= 0 && aIndex < icons->Count()) {
      buf.Format(KItem, aIndex);
      cArray->InsertL(aIndex, buf);
      aIndex++;
      //We need to delete and re-index the array since we inserted
      //a new icon in the icon array.
      cArray->Delete(aIndex, icons->Count() - aIndex);
      for (TInt i = aIndex; i < icons->Count(); i++) {
         buf.Format(KItem, i);
         cArray->AppendL(buf);
      }
   } else {
      buf.Format(KItem, (icons->Count() - 1));
      cArray->AppendL(buf);
   }
   //Inform list box that data was added.
   iGrid->HandleItemAdditionL();
}
开发者ID:VLjs,项目名称:Wayfinder-S60-Navigator,代码行数:58,代码来源:MainMenuGridContainer.cpp

示例10: PostLayoutDynInitL

void CFileSelectDialog::PostLayoutDynInitL()
	{
	CAknListQueryDialog::PostLayoutDynInitL();
	CArrayPtr<CGulIcon>* icons;
	icons=new (ELeave) CAknIconArray(1);
    CGulIcon* icon = AknsUtils::CreateGulIconL(AknsUtils::SkinInstance(),KAknsIIDQgnPropEmpty, AknIconUtils::AvkonIconFileName(),EMbmAvkonQgn_prop_empty,EMbmAvkonQgn_prop_empty_mask);	
	icon->SetBitmapsOwnedExternally(EFalse);
	icons->AppendL(icon);
	SetIconArrayL(icons);
	Update();
	Show();
	}
开发者ID:kolayuk,项目名称:ActiveJack,代码行数:12,代码来源:FileSelectDialog.cpp

示例11: SetBearerListL

void CDirectPrintPrinterSettingView::SetBearerListL(CAknEnumeratedTextPopupSettingItem* item)
	{
	TInt err = GetBearerMgr()->GetProtocolNames(iBearerList);
	if (!err)
		{
		CArrayPtr<CAknEnumeratedText>* textArray = item->EnumeratedTextArray();
		textArray->ResetAndDestroy();

		TInt count = iBearerList.Count();
		for (TInt i=0; i<count; i++)
			{
			CAknEnumeratedText* enumText = new (ELeave) CAknEnumeratedText(i, iBearerList[i].iName.AllocLC());
			CleanupStack::Pop();
			CleanupStack::PushL(enumText);
			textArray->AppendL(enumText);
			CleanupStack::Pop();
			}
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:19,代码来源:directprintsettingview.cpp

示例12: ReplaceIconL

void CJuikIconManagerImpl::ReplaceIconL(TInt aProviderId, TInt aIconId, CGulIcon* aIcon)
{
	CALLSTACKITEM_N(_CL("CJuikIconManagerImpl"), _CL("ReplaceIconL"));
	auto_ptr<CGulIcon> icon( aIcon );
	CArrayFix<TInt>& map = ProviderIconIndexL(aProviderId);
	AssertIndexL( map, aIconId );

	TInt ix = map.At( aIconId );
	if ( ix != KErrNotFound ) 
		{
			AssertIndexL( *iIconArray, ix );	
			delete (*iIconArray)[ix];
			(*iIconArray)[ix] = icon.release();
		}
	else
		{
			iIconArray->AppendL( icon.release() );					   
			map[aIconId] = LastIndex( *iIconArray );
		}
}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:20,代码来源:juik_iconmanager.cpp

示例13: TestLqdlgSetIconArrayL

// -----------------------------------------------------------------------------
// CTestSDKQueries::TestLqdlgSetIconArrayL
// -----------------------------------------------------------------------------
//
TInt CTestSDKQueries::TestLqdlgSetIconArrayL( 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_DIALOG );
    dlg->SetItemTextArray( mArray );
    dlg->SetOwnershipType( ELbmDoesNotOwnItemArray );
    
    TFileName file( KTestMbmFile );
    User::LeaveIfError( CompleteWithAppPath( file ) ); 
    
    CArrayPtr<CGulIcon>* mIcons = new(ELeave) CAknIconArray( KFive ); 
    CleanupStack::PushL(mIcons); 
    
    CFbsBitmap* bitmap = NULL;
    CFbsBitmap* mask = NULL;

    AknIconUtils::CreateIconLC( bitmap, mask, file, EMbmAvkonQgn_indi_mic, EMbmAvkonQgn_indi_mic_mask );
    CGulIcon* mIcon = CGulIcon::NewL( bitmap, mask );
    CleanupStack::PushL( mIcon );
    mIcons->AppendL( mIcon );
    
    dlg->SetIconArrayL( mIcons );
    
    CleanupStack::Pop( mIcon );
    CleanupStack::Pop( KThree );
    CleanupStack::PopAndDestroy( dlg );
    CleanupStack::Pop( KOne );
    return KErrNone;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:45,代码来源:testsdkqueriesblockslistquerydlg.cpp

示例14: BuildTopLevelRtNodesListLC

void CDmAdEngine::BuildTopLevelRtNodesListLC(CArrayPtr<CDmAdRtNode>*     aRtNodes,
                                             CArrayPtr<CDmAdRtNode>*&    aTopLevelRtNodes)
    {
    CArrayPtr<CDmAdRtNode>* rtNodesList;
    rtNodesList = new (ELeave) CArrayPtrFlat<CDmAdRtNode>(4);
    CleanupStack::PushL(TCleanupItem(CDmAdRtNode::CleanupOperationDeleteCArrayPtr,
                                     rtNodesList));
    
    for (TInt i=0; i < aRtNodes->Count(); i++)
        {
        CDmAdRtNode* rtNode = aRtNodes->At(i);
        if (iDdfApi->IsTopLevelRtNode(rtNode->Uri()))
            {
            rtNodesList->AppendL(rtNode);
            aRtNodes->Delete(i);
            i--;
            }
        }
    
    aTopLevelRtNodes = rtNodesList;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:21,代码来源:dmadengine.cpp

示例15: BuildChildRtNodesListLC

void CDmAdEngine::BuildChildRtNodesListLC(CArrayPtr<CDmAdRtNode>*     aRtNodes,
                                           const TDesC8&               aSomeParentUri,
                                           CArrayPtr<CDmAdRtNode>*&    aChildRtNodes)
    {
    CArrayPtr<CDmAdRtNode>* rtNodesList;
    rtNodesList = new (ELeave) CArrayPtrFlat<CDmAdRtNode>(4);
    CleanupStack::PushL(TCleanupItem(CDmAdRtNode::CleanupOperationDeleteCArrayPtr,
                                     rtNodesList));
    
    for (TInt i=0; i < aRtNodes->Count(); i++)
        {
        CDmAdRtNode* rtNode = aRtNodes->At(i);
        if (rtNode->IsSomeChild(aSomeParentUri))
            {
            rtNodesList->AppendL(rtNode);
            aRtNodes->Delete(i);
            i--;
            }
        }
    
    aChildRtNodes = rtNodesList;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:22,代码来源:dmadengine.cpp


注:本文中的CArrayPtr::AppendL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。