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


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

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


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

示例1: onAvatarNameCache

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

    if (agent_id == mAvatarID)
    {
        getChild<LLUICtrl>("user_name")->setValue(av_name.getDisplayName());
        getChild<LLUICtrl>("user_name_small")->setValue(av_name.getDisplayName());
        getChild<LLUICtrl>("user_slid")->setValue(av_name.getUserName());
        mAvatarName = av_name;

        // show smaller display name if too long to display in regular size
        if (getChild<LLTextBox>("user_name")->getTextPixelWidth() > getChild<LLTextBox>("user_name")->getRect().getWidth())
        {
            getChild<LLUICtrl>("user_name_small")->setVisible( true );
            getChild<LLUICtrl>("user_name")->setVisible( false );
        }
        else
        {
            getChild<LLUICtrl>("user_name_small")->setVisible( false );
            getChild<LLUICtrl>("user_name")->setVisible( true );

        }

    }
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:28,代码来源:llinspectavatar.cpp

示例2: enableUnmute

bool LLInspectAvatar::enableUnmute()
{
		bool is_linden = LLStringUtil::endsWith(mAvatarName.getDisplayName(), " Linden");
		bool is_self = mAvatarID == gAgent.getID();

		if (!is_linden && !is_self && LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName.getDisplayName()))
		{
			return true;
		}
		else
		{
			return false;
		}
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:14,代码来源:llinspectavatar.cpp

示例3: filterNames

// Checked: 2010-12-08 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c
void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy)
{
	uuid_vec_t idAgents;
	LLWorld::getInstance()->getAvatars(&idAgents, NULL);
	for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++)
	{
		LLAvatarName avName;
		if (LLAvatarNameCache::get(idAgents[idxAgent], &avName))
		{
			const std::string& strDisplayName = escape_for_regex(avName.getDisplayName());
			bool fFilterDisplay = (strDisplayName.length() > 2);
			const std::string& strLegacyName = avName.getLegacyName();
			fFilterLegacy &= (strLegacyName.length() > 2);
			const std::string& strAnonym = RlvStrings::getAnonym(avName);

			// If the display name is a subset of the legacy name we need to filter that first, otherwise it's the other way around
			if (boost::icontains(strLegacyName, strDisplayName))
			{
				if (fFilterLegacy)
					boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strLegacyName + "\\b", boost::regex::icase), strAnonym);
				if (fFilterDisplay)
					boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strDisplayName + "\\b", boost::regex::icase), strAnonym);
			}
			else
			{
				if (fFilterDisplay)
					boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strDisplayName + "\\b", boost::regex::icase), strAnonym);
				if (fFilterLegacy)
					boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strLegacyName + "\\b", boost::regex::icase), strAnonym);
			}
		}
	}
}
开发者ID:hades187,项目名称:singu,代码行数:34,代码来源:rlvcommon.cpp

示例4: onAvatarNameCache

void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
									   const LLAvatarName& av_name,
									   std::string suffix,
									   LLHandle<LLNameListItem> item)
{
	avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(agent_id);
	if (it != mAvatarNameCacheConnections.end())
	{
		if (it->second.connected())
		{
			it->second.disconnect();
		}
		mAvatarNameCacheConnections.erase(it);
	}

	std::string name;
	if (mShortNames)
		name = av_name.getDisplayName();
	else
		name = av_name.getCompleteName();

	// Append optional suffix.
	if (!suffix.empty())
	{
		name.append(suffix);
	}

	LLNameListItem* list_item = item.get();
	if (list_item && list_item->getUUID() == agent_id)
	{
		LLScrollListCell* cell = list_item->getColumn(mNameColumnIndex);
		if (cell)
		{
			cell->setValue(name);
			setNeedsSort();
		}
	}
	
	//////////////////////////////////////////////////////////////////////////
	// BAKER - FIX NameListCtrl
 	//if (mPendingLookupsRemaining <= 0)
 	{
 		// We might get into a state where mPendingLookupsRemaining might
 		//	go negative.  So just reset it right now and figure out if it's
 		//	possible later :)
 		//mPendingLookupsRemaining = 0;
		
 		mNameListCompleteSignal(true);
 	}
 	//else
 	{
 	//	mPendingLookupsRemaining--;
 	}
	//////////////////////////////////////////////////////////////////////////

	dirtyColumns();
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:57,代码来源:llnamelistctrl.cpp

示例5: on_avatar_name_cache_start_call

static void on_avatar_name_cache_start_call(const LLUUID& agent_id,
											const LLAvatarName& av_name)
{
	std::string name = av_name.getDisplayName();
	LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id, true);
	if (session_id != LLUUID::null)
	{
		gIMMgr->startCall(session_id);
	}
	make_ui_sound("UISndStartIM");
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:11,代码来源:llavataractions.cpp

示例6: on_avatar_name_cache_start_im

static void on_avatar_name_cache_start_im(const LLUUID& agent_id,
										  const LLAvatarName& av_name)
{
	std::string name = av_name.getDisplayName();
	LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id);
	if (session_id != LLUUID::null)
	{
		LLFloaterIMContainer::getInstance()->showConversation(session_id);
	}
	make_ui_sound("UISndStartIM");
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:11,代码来源:llavataractions.cpp

示例7: onToggleMute

void LLInspectAvatar::onToggleMute()
{
	LLMute mute(mAvatarID, mAvatarName.getDisplayName(), LLMute::AGENT);

	if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName))
	{
		LLMuteList::getInstance()->remove(mute);
	}
	else
	{
		LLMuteList::getInstance()->add(mute);
	}

	LLPanelBlockedList::showPanelAndSelect(mute.mID);
	closeFloater();
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:16,代码来源:llinspectavatar.cpp

示例8: updateVolumeSlider

void LLInspectAvatar::updateVolumeSlider()
{
    bool voice_enabled = LLVoiceClient::getInstance()->getVoiceEnabled(mAvatarID);

    // Do not display volume slider and mute button if it
    // is ourself or we are not in a voice channel together
    if (!voice_enabled || (mAvatarID == gAgent.getID()))
    {
        getChild<LLUICtrl>("mute_btn")->setVisible(false);
        getChild<LLUICtrl>("volume_slider")->setVisible(false);
    }

    else
    {
        getChild<LLUICtrl>("mute_btn")->setVisible(true);
        getChild<LLUICtrl>("volume_slider")->setVisible(true);

        // By convention, we only display and toggle voice mutes, not all mutes
        bool is_muted = LLAvatarActions::isVoiceMuted(mAvatarID);

        LLUICtrl* mute_btn = getChild<LLUICtrl>("mute_btn");

        bool is_linden = LLStringUtil::endsWith(mAvatarName.getDisplayName(), " Linden");

        mute_btn->setEnabled( !is_linden);
        mute_btn->setValue( is_muted );

        LLUICtrl* volume_slider = getChild<LLUICtrl>("volume_slider");
        volume_slider->setEnabled( !is_muted );

        F32 volume;

        if (is_muted)
        {
            // it's clearer to display their volume as zero
            volume = 0.f;
        }
        else
        {
            // actual volume
            volume = LLVoiceClient::getInstance()->getUserVolume(mAvatarID);
        }
        volume_slider->setValue( (F64)volume );
    }

}
开发者ID:Belxjander,项目名称:Kirito,代码行数:46,代码来源:llinspectavatar.cpp

示例9: onClickMuteVolume

void LLInspectAvatar::onClickMuteVolume()
{
    // By convention, we only display and toggle voice mutes, not all mutes
    LLMuteList* mute_list = LLMuteList::getInstance();
    bool is_muted = mute_list->isMuted(mAvatarID, LLMute::flagVoiceChat);

    LLMute mute(mAvatarID, mAvatarName.getDisplayName(), LLMute::AGENT);
    if (!is_muted)
    {
        mute_list->add(mute, LLMute::flagVoiceChat);
    }
    else
    {
        mute_list->remove(mute, LLMute::flagVoiceChat);
    }

    updateVolumeSlider();
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:18,代码来源:llinspectavatar.cpp

示例10: onModeratorNameCache

void FSFloaterVoiceControls::onModeratorNameCache(const LLAvatarName& av_name)
{
	std::string name;
	name = av_name.getDisplayName();

	if(mSpeakerManager && gAgent.isInGroup(mSpeakerManager->getSessionID()))
	{
		// This method can be called when LLVoiceChannel.mState == STATE_NO_CHANNEL_INFO
		// in this case there are not any speakers yet.
		if (mSpeakerManager->findSpeaker(gAgentID))
		{
			// Agent is Moderator
			if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator)

			{
				const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); 
				name += " " + moderator_indicator;
			}
		}
	}
	mAgentPanel->getChild<LLUICtrl>("user_text")->setValue(name);
}
开发者ID:gabeharms,项目名称:firestorm,代码行数:22,代码来源:fsfloatervoicecontrols.cpp

示例11: onBtnCopyToClipboard

// Checked: 2011-05-26 (RLVa-1.3.1c) | Added: RLVa-1.3.1c
void RlvFloaterBehaviours::onBtnCopyToClipboard() const
{
	std::ostringstream strRestrictions;

	strRestrictions << RlvStrings::getVersion() << "\n";

	const RlvHandler::rlv_object_map_t* pObjects = gRlvHandler.getObjectMap();
	for (RlvHandler::rlv_object_map_t::const_iterator itObj = pObjects->begin(), endObj = pObjects->end(); itObj != endObj; ++itObj)
	{
		strRestrictions << "\n" << rlvGetItemNameFromObjID(itObj->first) << ":\n";

		const rlv_command_list_t* pCommands = itObj->second.getCommandList();
		for (rlv_command_list_t::const_iterator itCmd = pCommands->begin(), endCmd = pCommands->end(); itCmd != endCmd; ++itCmd)
		{
			std::string strOption; LLUUID idOption;
			if ( (itCmd->hasOption()) && (idOption.set(itCmd->getOption(), FALSE)) && (idOption.notNull()) )
			{
				LLAvatarName avName;
				if (gObjectList.findObject(idOption))
					strOption = rlvGetItemNameFromObjID(idOption, true);
				else if (LLAvatarNameCache::get(idOption, &avName))
					strOption = (!avName.getAccountName().empty()) ? avName.getAccountName() : avName.getDisplayName();
				else if (!gCacheName->getGroupName(idOption, strOption))
					strOption = itCmd->getOption();
			}

			strRestrictions << "  -> " << itCmd->asString();
			if ( (!strOption.empty()) && (strOption != itCmd->getOption()) )
				strRestrictions << "  [" << strOption << "]";
			if (RLV_RET_SUCCESS != itCmd->getReturnType())
				strRestrictions << "  (" << RlvStrings::getStringFromReturnCode(itCmd->getReturnType()) << ")";
			strRestrictions << "\n";
		}
	}

	LLWString wstrRestrictions = utf8str_to_wstring(strRestrictions.str());
	gClipboard.copyFromSubstring(wstrRestrictions, 0, wstrRestrictions.length());
}
开发者ID:HanHeld,项目名称:SingularityViewerFeb2016,代码行数:39,代码来源:rlvfloaters.cpp

示例12: getName

std::string LLUrlEntryAgentDisplayName::getName(const LLAvatarName& avatar_name)
{
	return avatar_name.getDisplayName();
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:4,代码来源:llurlentry.cpp

示例13: refreshAll

// Checked: 2011-05-23 (RLVa-1.3.1c) | Modified: RLVa-1.3.1c
void RlvFloaterBehaviours::refreshAll()
{
	LLCtrlListInterface* pBhvrList = childGetListInterface("behaviour_list");
	LLCtrlListInterface* pExceptList = childGetListInterface("exception_list");
	if ( (!pBhvrList) || (!pExceptList) )
		return;
	pBhvrList->operateOnAll(LLCtrlListInterface::OP_DELETE);
	pExceptList->operateOnAll(LLCtrlListInterface::OP_DELETE);

	if (!isAgentAvatarValid())
		return;

	//
	// Set-up a row we can just reuse
	//
	LLSD sdBhvrRow; LLSD& sdBhvrColumns = sdBhvrRow["columns"];
	sdBhvrColumns[0] = LLSD().with("column", "behaviour").with("type", "text");
	sdBhvrColumns[1] = LLSD().with("column", "issuer").with("type", "text");

	LLSD sdExceptRow; LLSD& sdExceptColumns = sdExceptRow["columns"];
	sdExceptColumns[0] = LLSD().with("column", "behaviour").with("type", "text");
	sdExceptColumns[1] = LLSD().with("column", "option").with("type", "text");
	sdExceptColumns[2] = LLSD().with("column", "issuer").with("type", "text");

	//
	// List behaviours
	//
	const RlvHandler::rlv_object_map_t* pObjects = gRlvHandler.getObjectMap();
	for (RlvHandler::rlv_object_map_t::const_iterator itObj = pObjects->begin(), endObj = pObjects->end(); itObj != endObj; ++itObj)
	{
		const std::string strIssuer = rlvGetItemNameFromObjID(itObj->first);

		const rlv_command_list_t* pCommands = itObj->second.getCommandList();
		for (rlv_command_list_t::const_iterator itCmd = pCommands->begin(), endCmd = pCommands->end(); itCmd != endCmd; ++itCmd)
		{
			std::string strOption; LLUUID idOption;
			if ( (itCmd->hasOption()) && (idOption.set(itCmd->getOption(), FALSE)) && (idOption.notNull()) )
			{
				LLAvatarName avName;
				if (gObjectList.findObject(idOption))
				{
					strOption = rlvGetItemNameFromObjID(idOption, true);
				}
				else if (LLAvatarNameCache::get(idOption, &avName))
				{
					strOption = (!avName.getAccountName().empty()) ? avName.getAccountName() : avName.getDisplayName();
				}
				else if (!gCacheName->getGroupName(idOption, strOption))
				{
					if (m_PendingLookup.end() == std::find(m_PendingLookup.begin(), m_PendingLookup.end(), idOption))
					{
						LLAvatarNameCache::get(idOption, boost::bind(&RlvFloaterBehaviours::onAvatarNameLookup, this, _1, _2));
						m_PendingLookup.push_back(idOption);
					}
					strOption = itCmd->getOption();
				}
			}

			if ( (itCmd->hasOption()) && (rlvGetShowException(itCmd->getBehaviourType())) )
			{
				// List under the "Exception" tab
				sdExceptRow["enabled"] = gRlvHandler.isException(itCmd->getBehaviourType(), idOption);
				sdExceptColumns[0]["value"] = itCmd->getBehaviour();
				sdExceptColumns[1]["value"] = strOption;
				sdExceptColumns[2]["value"] = strIssuer;
				pExceptList->addElement(sdExceptRow, ADD_BOTTOM);
			}
			else
			{
				// List under the "Restrictions" tab
				sdBhvrRow["enabled"] = (RLV_RET_SUCCESS == itCmd->getReturnType());
				sdBhvrColumns[0]["value"] = (strOption.empty()) ? itCmd->asString() : itCmd->getBehaviour() + ":" + strOption;
				sdBhvrColumns[1]["value"] = strIssuer;
				pBhvrList->addElement(sdBhvrRow, ADD_BOTTOM);
			}
		}
	}
}
开发者ID:HanHeld,项目名称:SingularityViewerFeb2016,代码行数:79,代码来源:rlvfloaters.cpp

示例14: onClickFindOnMap

void LLInspectAvatar::onClickFindOnMap()
{
	gFloaterWorldMap->trackAvatar(mAvatarID, mAvatarName.getDisplayName());
	LLFloaterReg::showInstance("world_map");
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:5,代码来源:llinspectavatar.cpp

示例15: onClickAddFriend

void LLInspectAvatar::onClickAddFriend()
{
	LLAvatarActions::requestFriendshipDialog(mAvatarID, mAvatarName.getDisplayName());
	closeFloater();
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:5,代码来源:llinspectavatar.cpp


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