本文整理汇总了C++中LLFolderViewItem::getLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFolderViewItem::getLabel方法的具体用法?C++ LLFolderViewItem::getLabel怎么用?C++ LLFolderViewItem::getLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFolderViewItem
的用法示例。
在下文中一共展示了LLFolderViewItem::getLabel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildNewViews
void LLInventoryPanel::buildNewViews(const LLUUID& id)
{
LLFolderViewItem* itemp = NULL;
LLInventoryObject* objectp = gInventory.getObject(id);
if (objectp)
{
if (objectp->getType() <= LLAssetType::AT_NONE ||
objectp->getType() >= LLAssetType::AT_COUNT)
{
llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == "
<< ((S32) objectp->getType())
<< " (shouldn't happen)" << llendl;
}
else if (objectp->getType() == LLAssetType::AT_CATEGORY) // build new view for category
{
LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(objectp->getType(),
LLInventoryType::IT_CATEGORY,
this,
objectp->getUUID());
if (new_listener)
{
LLFolderViewFolder* folderp = new LLFolderViewFolder(new_listener->getDisplayName(),
new_listener->getIcon(),
mFolders,
new_listener);
folderp->setItemSortOrder(mFolders->getSortOrder());
itemp = folderp;
}
}
else // build new view for item
{
LLInventoryItem* item = (LLInventoryItem*)objectp;
LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(
item->getType(),
item->getInventoryType(),
this,
item->getUUID(),
item->getFlags());
if (new_listener)
{
itemp = new LLFolderViewItem(new_listener->getDisplayName(),
new_listener->getIcon(),
new_listener->getCreationDate(),
mFolders,
new_listener);
}
}
LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolders->getItemByID(objectp->getParentUUID());
if (itemp)
{
if (parent_folder)
{
itemp->addToFolder(parent_folder, mFolders);
}
else
{
llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl;
delete itemp;
}
}
}
if ((id.isNull() ||
(objectp && objectp->getType() == LLAssetType::AT_CATEGORY)))
{
LLViewerInventoryCategory::cat_array_t* categories;
LLViewerInventoryItem::item_array_t* items;
mInventory->lockDirectDescendentArrays(id, categories, items);
if(categories)
{
S32 count = categories->count();
for(S32 i = 0; i < count; ++i)
{
LLInventoryCategory* cat = categories->get(i);
buildNewViews(cat->getUUID());
}
}
if(items)
{
S32 count = items->count();
for(S32 i = 0; i < count; ++i)
{
LLInventoryItem* item = items->get(i);
buildNewViews(item->getUUID());
}
}
mInventory->unlockDirectDescendentArrays(id);
}
}
示例2: buildNewViews
void LLBuildNewViewsScheduler::buildNewViews(LLInventoryPanel* panelp, LLInventoryObject* objectp)
{
LLFolderViewItem* itemp = NULL;
if (objectp)
{
if (objectp->getType() <= LLAssetType::AT_NONE ||
objectp->getType() >= LLAssetType::AT_COUNT)
{
llwarns << "called with objectp->mType == "
<< ((S32) objectp->getType())
<< " (shouldn't happen)" << llendl;
}
else if (objectp->getType() == LLAssetType::AT_CATEGORY) // build new view for category
{
LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(objectp->getType(),
LLInventoryType::IT_CATEGORY,
panelp,
objectp->getUUID());
if (new_listener)
{
LLFolderViewFolder* folderp = new LLFolderViewFolder(new_listener->getDisplayName(),
new_listener->getIcon(),
panelp->getRootFolder(),
new_listener);
folderp->setItemSortOrder(panelp->getSortOrder());
itemp = folderp;
}
}
else // build new view for item
{
LLInventoryItem* item = (LLInventoryItem*)objectp;
LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(
item->getType(),
item->getInventoryType(),
panelp,
item->getUUID(),
item->getFlags());
if (new_listener)
{
itemp = new LLFolderViewItem(new_listener->getDisplayName(),
new_listener->getIcon(),
new_listener->getCreationDate(),
panelp->getRootFolder(),
new_listener);
}
}
LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)panelp->getRootFolder()->getItemByID(objectp->getParentUUID());
if (itemp)
{
itemp->mDelayedDelete = TRUE;
if (parent_folder)
{
itemp->addToFolder(parent_folder, panelp->getRootFolder());
}
else
{
llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl;
delete itemp;
}
}
}
if (!objectp || (objectp && (objectp->getType() == LLAssetType::AT_CATEGORY)))
{
LLViewerInventoryCategory::cat_array_t* categories;
LLViewerInventoryItem::item_array_t* items;
panelp->getModel()->lockDirectDescendentArrays((objectp != NULL) ? objectp->getUUID() : LLUUID::null, categories, items);
if(categories)
{
S32 count = categories->count();
for(S32 i = 0; i < count; ++i)
{
LLInventoryCategory* cat = categories->get(i);
addJob(panelp, cat);
}
}
if(items)
{
S32 count = items->count();
for(S32 i = 0; i < count; ++i)
{
LLInventoryItem* item = items->get(i);
addJob(panelp, item);
}
}
panelp->getModel()->unlockDirectDescendentArrays(objectp->getUUID());
}
}