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


C++ LLPanelFriends::getSelectedIDs方法代码示例

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


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

示例1: onClickRemove

// static
void LLPanelFriends::onClickRemove(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	//llinfos << "LLPanelFriends::onClickRemove()" << llendl;
	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
	LLStringUtil::format_map_t args;
	if(ids.size() > 0)
	{
		std::string msgType = "RemoveFromFriends";
		if(ids.size() == 1)
		{
			LLUUID agent_id = ids[0];
			std::string first, last;
			if(gCacheName->getName(agent_id, first, last))
			{
				args["[FIRST_NAME]"] = first;
				args["[LAST_NAME]"] = last;	
			}
		}
		else
		{
			msgType = "RemoveMultipleFromFriends";
		}
		gViewerWindow->alertXml(msgType,
			args,
			&handleRemove,
			(void*)new LLDynamicArray<LLUUID>(ids));
	}
}
开发者ID:,项目名称:,代码行数:31,代码来源:

示例2: onClickIM

// static
void LLPanelFriends::onClickIM(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	//llinfos << "LLPanelFriends::onClickIM()" << llendl;
	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
	if(ids.size() > 0)
	{
		if(ids.size() == 1)
		{
			LLUUID agent_id = ids[0];
			const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(agent_id);
			std::string fullname;
			if(info && gCacheName->getFullName(agent_id, fullname))
			{
				gIMMgr->setFloaterOpen(TRUE);
				gIMMgr->addSession(fullname, IM_NOTHING_SPECIAL, agent_id);
			}		
		}
		else
		{
			gIMMgr->setFloaterOpen(TRUE);
			gIMMgr->addSession("Friends Conference", IM_SESSION_CONFERENCE_START, ids[0], ids);
		}
		make_ui_sound("UISndStartIM");
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:Sausages,代码行数:28,代码来源:llfloaterfriends.cpp

示例3: onClickRemove

// static
void LLPanelFriends::onClickRemove(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	//llinfos << "LLPanelFriends::onClickRemove()" << llendl;
	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
	LLSD args;
	if(ids.size() > 0)
	{
		std::string msgType = "RemoveFromFriends";
		if(ids.size() == 1)
		{
			LLUUID agent_id = ids[0];
			std::string first, last;
			if(gCacheName->getName(agent_id, first, last))
			{
				if (LLAvatarNameCache::useDisplayNames() && !gSavedSettings.getBOOL("LegacyNamesForFriends"))
				{
					LLAvatarName avatar_name;
					if (LLAvatarNameCache::get(agent_id, &avatar_name))
					{
						// Always show "Display Name [Legacy Name]" for security reasons
						first = avatar_name.getNames();
						size_t i = first.find(" ");
						if (i != std::string::npos)
						{
							last = first.substr(i + 1);
							first = first.substr(0, i);
						}
						else
						{
							last = "";
						}
					}
				}
				args["FIRST_NAME"] = first;
				args["LAST_NAME"] = last;	
			}
		}
		else
		{
			msgType = "RemoveMultipleFromFriends";
		}
		LLSD payload;

		for (LLDynamicArray<LLUUID>::iterator it = ids.begin();
			it != ids.end();
			++it)
		{
			payload["ids"].append(*it);
		}

		LLNotifications::instance().add(msgType,
			args,
			payload,
			&handleRemove);
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:Sausages,代码行数:59,代码来源:llfloaterfriends.cpp

示例4: onClickAssign

// static
void LLPanelFriends::onClickAssign(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;
	if (panelp)
	{
		LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
		ASFloaterContactGroups::show(ids);
	}
}
开发者ID:Kiera,项目名称:Crow,代码行数:10,代码来源:llfloaterfriends.cpp

示例5: onClickRemove

// static
void LLPanelFriends::onClickRemove(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	//llinfos << "LLPanelFriends::onClickRemove()" << llendl;
	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
	LLSD args;
	if(ids.size() > 0)
	{
		std::string msgType = "RemoveFromFriends";
		if(ids.size() == 1)
		{
			LLUUID agent_id = ids[0];
			// [Ansariel: Display name support]
			//std::string first, last;
			//if(gCacheName->getName(agent_id, first, last))
			//{
			//	args["FIRST_NAME"] = first;
			//	args["LAST_NAME"] = last;	
			//}

			LLAvatarName avatar_name;
			if (LLAvatarNameCache::get(agent_id, &avatar_name))
			{
				std::string fullname;
				static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
				switch (phoenix_name_system)
				{
					case 0 : fullname = avatar_name.getLegacyName(); break;
					case 1 : fullname = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
					case 2 : fullname = avatar_name.mDisplayName; break;
					default : fullname = avatar_name.getCompleteName(); break;
				}
				
				args["NAME"] = fullname;
			}
			// [/Ansariel: Display name support]
		}
		else
		{
			msgType = "RemoveMultipleFromFriends";
		}
		LLSD payload;

		for (LLDynamicArray<LLUUID>::iterator it = ids.begin();
			it != ids.end();
			++it)
		{
			payload["ids"].append(*it);
		}

		LLNotifications::instance().add(msgType,
			args,
			payload,
			&handleRemove);
	}
}
开发者ID:Kiera,项目名称:Crow,代码行数:58,代码来源:llfloaterfriends.cpp

示例6: onClickPay

// static
void LLPanelFriends::onClickPay(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
	if(ids.size() == 1)
	{	
		handle_pay_by_id(ids[0]);
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:Sausages,代码行数:11,代码来源:llfloaterfriends.cpp

示例7: onClickOfferTeleport

// static
void LLPanelFriends::onClickOfferTeleport(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
	if(ids.size() > 0)
	{	
		handle_lure(ids);
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:Sausages,代码行数:11,代码来源:llfloaterfriends.cpp

示例8: onClickPay

// static
void LLPanelFriends::onClickPay(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	std::vector<LLUUID> ids = panelp->getSelectedIDs();
	if(ids.size() == 1)
	{	
		LLAvatarActions::pay(ids[0]);
	}
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:11,代码来源:llfloaterfriends.cpp

示例9: onClickProfile

// static
void LLPanelFriends::onClickProfile(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	std::vector<LLUUID> ids = panelp->getSelectedIDs();
	if(ids.size() > 0)
	{
		LLUUID agent_id = ids[0];
		LLAvatarActions::showProfile(agent_id);
	}
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:12,代码来源:llfloaterfriends.cpp

示例10: onClickProfile

// static
void LLPanelFriends::onClickProfile(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	//llinfos << "LLPanelFriends::onClickProfile()" << llendl;
	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
	if(ids.size() > 0)
	{
		LLUUID agent_id = ids[0];
		BOOL online;
		online = LLAvatarTracker::instance().isBuddyOnline(agent_id);
		LLFloaterAvatarInfo::showFromFriend(agent_id, online);
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:Sausages,代码行数:15,代码来源:llfloaterfriends.cpp

示例11: onClickIM

// static
void LLPanelFriends::onClickIM(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	std::vector<LLUUID> ids = panelp->getSelectedIDs();
	if(ids.size() > 0)
	{
		if(ids.size() == 1)
		{
			LLAvatarActions::startIM(ids[0]);
		}
		else
		{
			LLAvatarActions::startConference(ids);
		}
	}
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:18,代码来源:llfloaterfriends.cpp

示例12: onClickRemove

// static
void LLPanelFriends::onClickRemove(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	//llinfos << "LLPanelFriends::onClickRemove()" << llendl;
	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
	LLSD args;
	if(ids.size() > 0)
	{
		std::string msgType = "RemoveFromFriends";
		if(ids.size() == 1)
		{
			LLUUID agent_id = ids[0];
			std::string first, last;
			if(gCacheName->getName(agent_id, first, last))
			{
				args["FIRST_NAME"] = first;
				args["LAST_NAME"] = last;	
			}
		}
		else
		{
			msgType = "RemoveMultipleFromFriends";
		}
		LLSD payload;

		for (LLDynamicArray<LLUUID>::iterator it = ids.begin();
			it != ids.end();
			++it)
		{
			payload["ids"].append(*it);
		}

		LLNotifications::instance().add(msgType,
			args,
			payload,
			&handleRemove);
	}
}
开发者ID:EmeraldViewer,项目名称:EmeraldViewer,代码行数:40,代码来源:llfloaterfriends.cpp

示例13: onClickOfferTeleport

// static
void LLPanelFriends::onClickOfferTeleport(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;
	LLAvatarActions::offerTeleport(panelp->getSelectedIDs());
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:6,代码来源:llfloaterfriends.cpp

示例14: onClickRemove

// static
void LLPanelFriends::onClickRemove(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;
	LLAvatarActions::removeFriendsDialog(panelp->getSelectedIDs());
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:6,代码来源:llfloaterfriends.cpp


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