本文整理汇总了C++中LLWearableItemsList::hasMatchedItems方法的典型用法代码示例。如果您正苦于以下问题:C++ LLWearableItemsList::hasMatchedItems方法的具体用法?C++ LLWearableItemsList::hasMatchedItems怎么用?C++ LLWearableItemsList::hasMatchedItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLWearableItemsList
的用法示例。
在下文中一共展示了LLWearableItemsList::hasMatchedItems方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyFilterToTab
void LLOutfitsList::applyFilterToTab(
const LLUUID& category_id,
LLAccordionCtrlTab* tab,
const std::string& filter_substring)
{
if (!tab) return;
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
if (!list) return;
std::string title = tab->getTitle();
LLStringUtil::toUpper(title);
std::string cur_filter = filter_substring;
LLStringUtil::toUpper(cur_filter);
tab->setTitle(tab->getTitle(), cur_filter);
if (std::string::npos == title.find(cur_filter))
{
// hide tab if its title doesn't pass filter
// and it has no visible items
tab->setVisible(list->hasMatchedItems());
// remove title highlighting because it might
// have been previously highlighted by less restrictive filter
tab->setTitle(tab->getTitle());
// Remove the tab from selection.
deselectOutfit(category_id);
}
else
{
// Try restoring the tab selection.
restoreOutfitSelection(tab, category_id);
}
if (tab->getVisible())
{
// Open tab if it has passed the filter.
tab->setDisplayChildren(true);
}
else
{
// Set force refresh flag to refresh not visible list
// when some changes occur in it.
list->setForceRefresh(true);
}
}