本文整理汇总了C++中LLAvatarListItem::getAvatarId方法的典型用法代码示例。如果您正苦于以下问题:C++ LLAvatarListItem::getAvatarId方法的具体用法?C++ LLAvatarListItem::getAvatarId怎么用?C++ LLAvatarListItem::getAvatarId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLAvatarListItem
的用法示例。
在下文中一共展示了LLAvatarListItem::getAvatarId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateParticipantsVoiceState
void LLCallFloater::updateParticipantsVoiceState()
{
uuid_vec_t speakers_list;
// Get a list of participants from VoiceClient
uuid_vec_t speakers_uuids;
get_voice_participants_uuids(speakers_uuids);
// Updating the status for each participant already in list.
std::vector<LLPanel*> items;
mAvatarList->getItems(items);
std::vector<LLPanel*>::const_iterator
it = items.begin(),
it_end = items.end();
for(; it != it_end; ++it)
{
LLAvatarListItem *item = dynamic_cast<LLAvatarListItem*>(*it);
if (!item) continue;
const LLUUID participant_id = item->getAvatarId();
bool found = false;
uuid_vec_t::iterator speakers_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), participant_id);
LL_DEBUGS("Voice") << "processing speaker: " << item->getAvatarName() << ", " << item->getAvatarId() << LL_ENDL;
// If an avatarID assigned to a panel is found in a speakers list
// obtained from VoiceClient we assign the JOINED status to the owner
// of this avatarID.
if (speakers_iter != speakers_uuids.end())
{
setState(item, STATE_JOINED);
LLPointer<LLSpeaker> speaker = mSpeakerManager->findSpeaker(participant_id);
if (speaker.isNull())
continue;
speaker->mHasLeftCurrentCall = FALSE;
speakers_uuids.erase(speakers_iter);
found = true;
}
if (!found)
{
updateNotInVoiceParticipantState(item);
}
}
}
示例2: updateLastInteractionTimes
// Refresh shown time of our last interaction with all listed avatars.
void LLAvatarList::updateLastInteractionTimes()
{
S32 now = (S32) LLDate::now().secondsSinceEpoch();
std::vector<LLPanel*> items;
getItems(items);
for( std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++)
{
// *TODO: error handling
LLAvatarListItem* item = static_cast<LLAvatarListItem*>(*it);
S32 secs_since = now - (S32) LLRecentPeople::instance().getDate(item->getAvatarId()).secondsSinceEpoch();
if (secs_since >= 0)
item->setLastInteractionTime(secs_since);
}
}
示例3: onAvatarListDoubleClicked
void LLParticipantList::onAvatarListDoubleClicked(LLUICtrl* ctrl)
{
LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(ctrl);
if(!item)
{
return;
}
LLUUID clicked_id = item->getAvatarId();
if (clicked_id.isNull() || clicked_id == gAgent.getID())
return;
LLAvatarActions::startIM(clicked_id);
}
示例4: initParticipantsVoiceState
void LLCallFloater::initParticipantsVoiceState()
{
// Set initial status for each participant in the list.
std::vector<LLPanel*> items;
mAvatarList->getItems(items);
std::vector<LLPanel*>::const_iterator
it = items.begin(),
it_end = items.end();
uuid_vec_t speakers_uuids;
get_voice_participants_uuids(speakers_uuids);
for(; it != it_end; ++it)
{
LLAvatarListItem *item = dynamic_cast<LLAvatarListItem*>(*it);
if (!item) continue;
LLUUID speaker_id = item->getAvatarId();
uuid_vec_t::const_iterator speaker_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), speaker_id);
// If an avatarID assigned to a panel is found in a speakers list
// obtained from VoiceClient we assign the JOINED status to the owner
// of this avatarID.
if (speaker_iter != speakers_uuids.end())
{
setState(item, STATE_JOINED);
}
else
{
LLPointer<LLSpeaker> speakerp = mSpeakerManager->findSpeaker(speaker_id);
// If someone has already left the call before, we create his
// avatar row panel with HAS_LEFT status and remove it after
// the timeout, otherwise we create a panel with INVITED status
if (speakerp.notNull() && speakerp.get()->mHasLeftCurrentCall)
{
setState(item, STATE_LEFT);
}
else
{
setState(item, STATE_INVITED);
}
}
}
}
示例5: updateExtraData
void LLAvatarList::updateExtraData() // S21
{
if(mShowLastInteractionTime)
{
updateLastInteractionTimes();
}
else if(!mExtraDataSignal.empty())
{
std::vector<LLPanel*> items;
getItems(items);
for( std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++)
{
LLAvatarListItem* item = static_cast<LLAvatarListItem*>(*it);
item->setExtraInformation(*mExtraDataSignal(item->getAvatarId()));
}
}
}