本文整理汇总了C++中LLCtrlListInterface::setColumnLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ LLCtrlListInterface::setColumnLabel方法的具体用法?C++ LLCtrlListInterface::setColumnLabel怎么用?C++ LLCtrlListInterface::setColumnLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLCtrlListInterface
的用法示例。
在下文中一共展示了LLCtrlListInterface::setColumnLabel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleReply
void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
{
U32 request_flags;
U32 total_count;
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_RequestFlags, request_flags);
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_TotalObjectCount, total_count);
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_ReportType, mCurrentMode);
LLCtrlListInterface *list = childGetListInterface("objects_list");
if (!list) return;
S32 block_count = msg->getNumberOfBlocks("ReportData");
for (S32 block = 0; block < block_count; ++block)
{
U32 task_local_id;
U32 time_stamp = 0;
LLUUID task_id;
F32 location_x, location_y, location_z;
F32 score;
std::string name_buf;
std::string owner_buf;
F32 mono_score = 0.f;
bool have_extended_data = false;
msg->getU32Fast(_PREHASH_ReportData, _PREHASH_TaskLocalID, task_local_id, block);
msg->getUUIDFast(_PREHASH_ReportData, _PREHASH_TaskID, task_id, block);
msg->getF32Fast(_PREHASH_ReportData, _PREHASH_LocationX, location_x, block);
msg->getF32Fast(_PREHASH_ReportData, _PREHASH_LocationY, location_y, block);
msg->getF32Fast(_PREHASH_ReportData, _PREHASH_LocationZ, location_z, block);
msg->getF32Fast(_PREHASH_ReportData, _PREHASH_Score, score, block);
msg->getStringFast(_PREHASH_ReportData, _PREHASH_TaskName, name_buf, block);
msg->getStringFast(_PREHASH_ReportData, _PREHASH_OwnerName, owner_buf, block);
if(msg->getNumberOfBlocks("DataExtended"))
{
have_extended_data = true;
msg->getU32("DataExtended", "TimeStamp", time_stamp, block);
msg->getF32(_PREHASH_ReportData, "MonoScore", mono_score, block);
}
LLSD element;
element["id"] = task_id;
element["object_name"] = name_buf;
element["owner_name"] = owner_buf;
element["columns"][0]["column"] = "score";
element["columns"][0]["value"] = llformat("%0.3f", score);
element["columns"][0]["font"] = "SANSSERIF";
element["columns"][1]["column"] = "name";
element["columns"][1]["value"] = name_buf;
element["columns"][1]["font"] = "SANSSERIF";
element["columns"][2]["column"] = "owner";
element["columns"][2]["value"] = owner_buf;
element["columns"][2]["font"] = "SANSSERIF";
element["columns"][3]["column"] = "location";
element["columns"][3]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z);
element["columns"][3]["font"] = "SANSSERIF";
element["columns"][3]["column"] = "time";
element["columns"][3]["value"] = formatted_time((time_t)time_stamp);
element["columns"][3]["font"] = "SANSSERIF";
if (mCurrentMode == STAT_REPORT_TOP_SCRIPTS
&& have_extended_data)
{
element["columns"][4]["column"] = "Mono Time";
element["columns"][4]["value"] = llformat("%0.3f", mono_score);
element["columns"][4]["font"] = "SANSSERIF";
}
list->addElement(element);
mObjectListData.append(element);
mObjectListIDs.push_back(task_id);
mtotalScore += score;
}
if (total_count == 0 && list->getItemCount() == 0)
{
LLSD element;
element["id"] = LLUUID::null;
element["columns"][0]["column"] = "name";
element["columns"][0]["value"] = getString("none_descriptor");
element["columns"][0]["font"] = "SANSSERIF";
list->addElement(element);
}
else
{
list->selectFirstItem();
}
if (mCurrentMode == STAT_REPORT_TOP_SCRIPTS)
{
setTitle(getString("top_scripts_title"));
list->setColumnLabel("score", getString("scripts_score_label"));
LLUIString format = getString("top_scripts_text");
format.setArg("[COUNT]", llformat("%d", total_count));
//.........这里部分代码省略.........