本文整理汇总了C++中LLNotificationFormPtr::getIgnored方法的典型用法代码示例。如果您正苦于以下问题:C++ LLNotificationFormPtr::getIgnored方法的具体用法?C++ LLNotificationFormPtr::getIgnored怎么用?C++ LLNotificationFormPtr::getIgnored使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLNotificationFormPtr
的用法示例。
在下文中一共展示了LLNotificationFormPtr::getIgnored方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildLists
void LLPanelMsgs::buildLists() //void LLFloaterPreference::buildPopupLists() in v3
{
LLScrollListCtrl& disabled_popups =
getChildRef<LLScrollListCtrl>("disabled_popups");
LLScrollListCtrl& enabled_popups =
getChildRef<LLScrollListCtrl>("enabled_popups");
disabled_popups.deleteAllItems();
enabled_popups.deleteAllItems();
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
iter != LLNotifications::instance().templatesEnd();
++iter)
{
LLNotificationTemplatePtr templatep = iter->second;
LLNotificationFormPtr formp = templatep->mForm;
LLNotificationForm::EIgnoreType ignore = formp->getIgnoreType();
if (ignore == LLNotificationForm::IGNORE_NO)
continue;
LLSD params;
params["name"] = (*iter).first;
LLNotificationPtr notification = LLNotificationPtr(new LLNotification(params));
LLSD row;
std::string ignore_msg = formp->getIgnoreMessage();
LLStringUtil::format(ignore_msg,notification->getSubstitutions());
row["columns"][0]["value"] = ignore_msg;
row["columns"][0]["font"] = "SANSSERIF_SMALL";
row["columns"][0]["width"] = 300;
LLScrollListItem* item = NULL;
bool show_popup = !formp->getIgnored();
if (!show_popup)
{
if (ignore == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE)
{
LLSD last_response = LLUI::sConfigGroup->getLLSD("Default" + templatep->mName);
if (!last_response.isUndefined())
{
for (LLSD::map_const_iterator it = last_response.beginMap();
it != last_response.endMap();
++it)
{
if (it->second.asBoolean())
{
row["columns"][1]["value"] = formp->getElement(it->first)["ignore"].asString();
break;
}
}
}
row["columns"][1]["font"] = "SANSSERIF_SMALL";
row["columns"][1]["width"] = 160;
}
item = disabled_popups.addElement(row,
ADD_SORTED);
}
else
{
item = enabled_popups.addElement(row,
ADD_SORTED);
}
if (item)
{
item->setUserdata((void*)&iter->first);
}
}
}
示例2: buildPopupLists
void LLFloaterPreference::buildPopupLists()
{
LLScrollListCtrl& disabled_popups =
getChildRef<LLScrollListCtrl>("disabled_popups");
LLScrollListCtrl& enabled_popups =
getChildRef<LLScrollListCtrl>("enabled_popups");
disabled_popups.deleteAllItems();
enabled_popups.deleteAllItems();
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
iter != LLNotifications::instance().templatesEnd();
++iter)
{
LLNotificationTemplatePtr templatep = iter->second;
LLNotificationFormPtr formp = templatep->mForm;
LLNotificationForm::EIgnoreType ignore = formp->getIgnoreType();
if (ignore == LLNotificationForm::IGNORE_NO)
continue;
LLSD row;
row["columns"][0]["value"] = formp->getIgnoreMessage();
row["columns"][0]["font"] = "SANSSERIF_SMALL";
row["columns"][0]["width"] = 400;
LLScrollListItem* item = NULL;
bool show_popup = formp->getIgnored();
if (!show_popup)
{
if (ignore == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE)
{
LLSD last_response = LLUI::sSettingGroups["config"]->getLLSD("Default" + templatep->mName);
if (!last_response.isUndefined())
{
for (LLSD::map_const_iterator it = last_response.beginMap();
it != last_response.endMap();
++it)
{
if (it->second.asBoolean())
{
row["columns"][1]["value"] = formp->getElement(it->first)["ignore"].asString();
break;
}
}
}
row["columns"][1]["font"] = "SANSSERIF_SMALL";
row["columns"][1]["width"] = 360;
}
item = disabled_popups.addElement(row);
}
else
{
item = enabled_popups.addElement(row);
}
if (item)
{
item->setUserdata((void*)&iter->first);
}
}
}