diff options
Diffstat (limited to 'indra/newview/llparticipantlist.h')
-rw-r--r-- | indra/newview/llparticipantlist.h | 66 |
1 files changed, 2 insertions, 64 deletions
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index aaf1e070a5..3a3ae76604 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -1,6 +1,6 @@ /** * @file llparticipantlist.h - * @brief LLParticipantList intended to update view(LLAvatarList) according to incoming messages + * @brief LLParticipantList : model of a conversation session with added speaker events handling * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code @@ -28,13 +28,9 @@ #define LL_PARTICIPANTLIST_H #include "llviewerprecompiledheaders.h" -#include "llevent.h" -#include "llavatarlist.h" // for LLAvatarItemRecentSpeakerComparator -#include "lllistcontextmenu.h" #include "llconversationmodel.h" class LLSpeakerMgr; -class LLAvatarList; class LLUICtrl; class LLAvalineUpdater; @@ -45,20 +41,8 @@ public: typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t; - LLParticipantList(LLSpeakerMgr* data_source, - LLAvatarList* avatar_list, - LLFolderViewModelInterface& root_view_model, - bool use_context_menu = true, - bool exclude_agent = true, - bool can_toggle_icons = true); + LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model); ~LLParticipantList(); - void setSpeakingIndicatorsVisible(BOOL visible); - - enum EParticipantSortOrder - { - E_SORT_BY_NAME = 0, - E_SORT_BY_RECENT_SPEAKERS = 1, - }; /** * Adds specified avatar ID to the existing list if it is not Agent's ID @@ -68,12 +52,6 @@ public: void addAvatarIDExceptAgent(const LLUUID& avatar_id); /** - * Set and sort Avatarlist by given order - */ - void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME); - const EParticipantSortOrder getSortOrder() const; - - /** * Refreshes the participant list. */ void update(); @@ -99,11 +77,6 @@ protected: bool onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); /** - * Sorts the Avatarlist by stored order - */ - void sort(); - - /** * List of listeners implementing LLOldEvents::LLSimpleListener. * There is no way to handle all the events in one listener as LLSpeakerMgr registers * listeners in such a way that one listener can handle only one type of event @@ -159,25 +132,7 @@ protected: /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); }; - /** - * Comparator for comparing avatar items by last spoken time - */ - class LLAvatarItemRecentSpeakerComparator : public LLAvatarItemNameComparator, public LLRefCount - { - LOG_CLASS(LLAvatarItemRecentSpeakerComparator); - public: - LLAvatarItemRecentSpeakerComparator(LLParticipantList& parent):mParent(parent){}; - virtual ~LLAvatarItemRecentSpeakerComparator() {}; - protected: - virtual bool doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const; - private: - LLParticipantList& mParent; - }; - private: - void onAvatarListDoubleClicked(LLUICtrl* ctrl); - void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); - void onAvalineCallerFound(const LLUUID& participant_id); void onAvalineCallerRemoved(const LLUUID& participant_id); @@ -188,10 +143,7 @@ private: */ void adjustParticipant(const LLUUID& speaker_id); - bool isHovered(); - LLSpeakerMgr* mSpeakerMgr; - LLAvatarList* mAvatarList; std::set<LLUUID> mModeratorList; std::set<LLUUID> mModeratorToRemoveList; @@ -203,20 +155,6 @@ private: LLPointer<SpeakerModeratorUpdateListener> mSpeakerModeratorListener; LLPointer<SpeakerMuteListener> mSpeakerMuteListener; - /** - * This field manages an adding a new avatar_id in the mAvatarList - * If true, then agent_id wont be added into mAvatarList - * Also by default this field is controlling a sort procedure, @c sort() - */ - bool mExcludeAgent; - - // boost::connections - boost::signals2::connection mAvatarListDoubleClickConnection; - boost::signals2::connection mAvatarListRefreshConnection; - boost::signals2::connection mAvatarListReturnConnection; - boost::signals2::connection mAvatarListToggleIconsConnection; - - LLPointer<LLAvatarItemRecentSpeakerComparator> mSortByRecentSpeakers; validate_speaker_callback_t mValidateSpeakerCallback; LLAvalineUpdater* mAvalineUpdater; }; |