当前位置: 首页>>代码示例>>C++>>正文


C++ LLAvatarName::getNSName方法代码示例

本文整理汇总了C++中LLAvatarName::getNSName方法的典型用法代码示例。如果您正苦于以下问题:C++ LLAvatarName::getNSName方法的具体用法?C++ LLAvatarName::getNSName怎么用?C++ LLAvatarName::getNSName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLAvatarName的用法示例。


在下文中一共展示了LLAvatarName::getNSName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: onAvatarNameCache

void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
{
	mAvatarNameCacheConnection.disconnect();

	if (mObjectID == avatar_id)
	{
		mOwnerName = av_name.getNSName();
		getChild<LLUICtrl>("owner_name")->setValue(av_name.getNSName());
		getChild<LLUICtrl>("object_name")->setValue(av_name.getNSName());
		getChild<LLUICtrl>("abuser_name_edit")->setValue(av_name.getNSName());
	}
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:12,代码来源:llfloaterreporter.cpp

示例2: onAvatarNameLookup

void LLFloaterIMPanel::onAvatarNameLookup(const LLAvatarName& avatar_name)
{
	setTitle(avatar_name.getNSName());
	const S32& ns(gSavedSettings.getS32("IMNameSystem"));
	std::string title(avatar_name.getNSName(ns));
	if (!ns || ns == 3) // Remove Resident, if applicable.
	{
		size_t pos(title.find(" Resident"));
		if (pos != std::string::npos && !gSavedSettings.getBOOL("LiruShowLastNameResident"))
			title.erase(pos, 9);
	}
	setShortTitle(title);
	if (LLMultiFloater* mf = dynamic_cast<LLMultiFloater*>(getParent()))
		mf->updateFloaterTitle(this);
}
开发者ID:SimFederal,项目名称:SingularityViewer,代码行数:15,代码来源:llimpanel.cpp

示例3: onAvatarNameCache

void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
{
	mAvatarNameCacheConnection.disconnect();

	if (mObjectID == avatar_id)
	{
		mOwnerName = av_name.getNSName();
		const std::string& name(((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && RlvUtil::isNearbyAgent(avatar_id)) ? RlvStrings::getString(RLV_STRING_HIDDEN) : mOwnerName);
		getChild<LLUICtrl>("owner_name")->setValue(name);
		getChild<LLUICtrl>("object_name")->setValue(name);
		getChild<LLUICtrl>("abuser_name_edit")->setValue(name);
	}
}
开发者ID:GODOFMINECRAFT4,项目名称:SingularityViewer,代码行数:13,代码来源:llfloaterreporter.cpp

示例4: on_avatar_name_cache_notify

static void on_avatar_name_cache_notify(const LLUUID& agent_id,
					const LLAvatarName& av_name,
					bool online,
					LLSD payload)
{
	// Popup a notify box with online status of this agent

	// Use display name only because this user is your friend
	LLSD args;
	args["NAME"] = av_name.getNSName(friend_name_system());
	args["STATUS"] = online ? LLTrans::getString("OnlineStatus") : LLTrans::getString("OfflineStatus");

	std::string name = args["NAME"];
	boost::algorithm::trim(name);
	xantispam_check(agent_id.asString(), (online ? "&-ExecFriendIsOnline!" : "&-ExecFriendIsOffline!"), (online ? name + " is online" : name + " is offline"));

	// do not pop up a notification when disabled for this agent
	if(!xantispam_check(agent_id.asString(), (online ? "!StatusFriendIsOnline" : "!StatusFriendIsOffline"), name))
		{
			return;
		}
	// / xantispam

	// Popup a notify box with online status of this agent
	LLNotificationPtr notification;
	if (online)
		{
			notification =
				LLNotifications::instance().add("FriendOnlineOffline",
								args,
								payload,
								boost::bind(&LLAvatarActions::startIM, agent_id));
		}
	else
		{
			notification =
				LLNotifications::instance().add("FriendOnlineOffline", args, payload);
		}

	// If there's an open IM session with this agent, send a notification there too.
	LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id);
	if (LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(session_id))
		{
			std::string notify_msg = notification->getMessage();
			if (!notify_msg.empty())
				floater->addHistoryLine(notify_msg, gSavedSettings.getColor4("SystemChatColor"));
		}
}
开发者ID:Ratany,项目名称:SingularityViewer,代码行数:48,代码来源:llcallingcard.cpp

示例5: on_avatar_name_cache_teleport_request

// static
void LLAvatarActions::on_avatar_name_cache_teleport_request(const LLUUID& id, const LLAvatarName& av_name)
{
	LLSD notification;
	notification["uuid"] = id;
	std::string name;
// [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6)
	if (!RlvActions::canShowName(RlvActions::SNC_TELEPORTREQUEST))
		name = RlvStrings::getAnonym(av_name.getLegacyName());
	else
// [RLVa:KB]
		name = av_name.getNSName();
	notification["NAME"] = name;
	LLSD payload;

	LLNotificationsUtil::add("TeleportRequestPrompt", notification, payload, teleport_request_callback);
}
开发者ID:Ratany,项目名称:SingularityViewer,代码行数:17,代码来源:llavataractions.cpp

示例6: on_avatar_name_cache_notify

static void on_avatar_name_cache_notify(const LLUUID& agent_id,
										const LLAvatarName& av_name,
										bool online,
										LLSD payload)
{
	// Popup a notify box with online status of this agent
	// Use display name only because this user is your friend
	LLSD args;
	args["NAME"] = av_name.getNSName(friend_name_system());
	args["STATUS"] = online ? LLTrans::getString("OnlineStatus") : LLTrans::getString("OfflineStatus");

	// Popup a notify box with online status of this agent
	LLNotificationPtr notification;
	static const LLCachedControl<S32> behavior(gSavedSettings, "LiruOnlineNotificationBehavior", 1);
	if (online && behavior)
	{
		notification =
			LLNotifications::instance().add("FriendOnlineOffline",
									 args,
									 payload,
									 behavior == 1 ? boost::bind(&LLAvatarActions::startIM, agent_id) : (LLNotificationResponder)boost::bind(LLAvatarActions::showProfile, agent_id, false));
	}
	else
	{
		notification =
			LLNotifications::instance().add("FriendOnlineOffline", args, payload);
	}

	// If there's an open IM session with this agent, send a notification there too.
	LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id);
	if (LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(session_id))
	{
		std::string notify_msg = notification->getMessage();
		if (!notify_msg.empty())
			floater->addHistoryLine(notify_msg, gSavedSettings.getColor4("SystemChatColor"));
	}
}
开发者ID:HanHeld,项目名称:SingularityViewerFeb2016,代码行数:37,代码来源:llcallingcard.cpp


注:本文中的LLAvatarName::getNSName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。