本文整理汇总了C++中LLPanelDirBrowser::createLandSale方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPanelDirBrowser::createLandSale方法的具体用法?C++ LLPanelDirBrowser::createLandSale怎么用?C++ LLPanelDirBrowser::createLandSale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPanelDirBrowser
的用法示例。
在下文中一共展示了LLPanelDirBrowser::createLandSale方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processDirPlacesReply
void LLPanelDirBrowser::processDirPlacesReply(LLMessageSystem* msg, void**)
{
LLUUID agent_id;
LLUUID query_id;
LLUUID parcel_id;
std::string name;
BOOL is_for_sale;
BOOL is_auction;
F32 dwell;
msg->getUUID("AgentData", "AgentID", agent_id);
msg->getUUID("QueryData", "QueryID", query_id );
if (msg->getNumberOfBlocks("StatusData"))
{
U32 status;
msg->getU32("StatusData", "Status", status);
if (status & STATUS_SEARCH_PLACES_BANNEDWORD)
{
LLNotificationsUtil::add("SearchWordBanned");
}
}
LLPanelDirBrowser* self;
self = gDirBrowserInstances.getIfThere(query_id);
if (!self)
{
// data from an old query
return;
}
self->mHaveSearchResults = TRUE;
LLScrollListCtrl* list = self->findChild<LLScrollListCtrl>("results");
if (!list) return;
if (!list->getCanSelect())
{
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
self->mResultsContents = LLSD();
}
S32 count = msg->getNumberOfBlocks("QueryReplies");
self->mResultsReceived += count;
count = self->showNextButton(count);
for (S32 i = 0; i < count ; i++)
{
msg->getUUID("QueryReplies", "ParcelID", parcel_id, i);
msg->getString("QueryReplies", "Name", name, i);
msg->getBOOL("QueryReplies", "ForSale", is_for_sale, i);
msg->getBOOL("QueryReplies", "Auction", is_auction, i);
msg->getF32("QueryReplies", "Dwell", dwell, i);
if (parcel_id.isNull())
{
continue;
}
LLSD content;
S32 type;
LLSD row = self->createLandSale(parcel_id, is_auction, is_for_sale, name, &type);
content["type"] = type;
content["name"] = name;
std::string buffer = llformat("%.0f", (F64)dwell);
row["columns"][3]["column"] = "dwell";
row["columns"][3]["value"] = buffer;
row["columns"][3]["font"] = "SANSSERIF_SMALL";
list->addElement(row);
self->mResultsContents[parcel_id.asString()] = content;
}
list->sortByColumn(self->mCurrentSortColumn, self->mCurrentSortAscending);
self->updateResultCount();
// Poke the result received timer
self->mLastResultTimer.reset();
self->mDidAutoSelect = FALSE;
}