开发学院手机开发Symbian 开发 关于在symbian listbox中添加svg图片的问题 阅读

关于在symbian listbox中添加svg图片的问题

 2010-05-31 20:19:00 来源:WEB开发网   
核心提示:RArray< TInt >* CATestList2ListBox::GetSelectedListBoxItemsLC( CEikTextListBox* aListBox ){CAknFilteredTextListBoxModel* model =static_cast< CAknFilter

RArray< TInt >* CATestList2ListBox::GetSelectedListBoxItemsLC( CEikTextListBox* aListBox )

{

CAknFilteredTextListBoxModel* model =

static_cast< CAknFilteredTextListBoxModel *> ( aListBox->Model() );

if ( model->NumberOfItems() == 0 )

return NULL;

// get currently selected indices

const CListBoxView::CSelectionIndexArray* selectionIndexes =

aListBox->SelectionIndexes();

TInt selectedIndexesCount = selectionIndexes->Count();

if ( selectedIndexesCount == 0 )

return NULL;

// copy the indices and sort numerically

RArray* orderedSelectedIndices =

new (ELeave) RArray< TInt >( selectedIndexesCount );

// push the allocated array

CleanupStack::PushL( orderedSelectedIndices );

// dispose the array resource

CleanupClosePushL( *orderedSelectedIndices );

// see if the search field is enabled

CAknListBoxFilterItems* filter = model->Filter();

if ( filter != NULL )

{

// when filtering enabled, translate indices back to underlying model

for ( TInt idx = 0; idx < selectedIndexesCount; idx++ )

{

TInt filteredItem = ( *selectionIndexes ) [ idx ];

TInt actualItem = filter->FilteredItemIndex ( filteredItem );

orderedSelectedIndices->InsertInOrder( actualItem );

}

}

else

{

// the selection indices refer directly to the model

for ( TInt idx = 0; idx < selectedIndexesCount; idx++ )

orderedSelectedIndices->InsertInOrder( ( *selectionIndexes ) [ idx ] );

}

return orderedSelectedIndices;

}

// ]]] end generated function

// [[[ begin generated function: do not modify

上一页  14 15 16 17 18 19 20 21 22 23 24  下一页

Tags:关于 symbian listbox

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接