PageRenderTime 22ms CodeModel.GetById 14ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/indra/newview/llpanelprofileview.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 108 lines | 43 code | 18 blank | 47 comment | 0 complexity | ae5a8bf046d80c583e7f4872fc7ff0c5 MD5 | raw file
  1/** 
  2* @file llpanelprofileview.h
  3* @brief Side tray "Profile View" panel
  4*
  5* $LicenseInfo:firstyear=2009&license=viewerlgpl$
  6* Second Life Viewer Source Code
  7* Copyright (C) 2010, Linden Research, Inc.
  8* 
  9* This library is free software; you can redistribute it and/or
 10* modify it under the terms of the GNU Lesser General Public
 11* License as published by the Free Software Foundation;
 12* version 2.1 of the License only.
 13* 
 14* This library is distributed in the hope that it will be useful,
 15* but WITHOUT ANY WARRANTY; without even the implied warranty of
 16* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 17* Lesser General Public License for more details.
 18* 
 19* You should have received a copy of the GNU Lesser General Public
 20* License along with this library; if not, write to the Free Software
 21* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 22* 
 23* Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 24* $/LicenseInfo$
 25*/
 26
 27#ifndef LL_LLPANELPROFILEVIEW_H
 28#define LL_LLPANELPROFILEVIEW_H
 29
 30#include "llpanel.h"
 31#include "llpanelprofile.h"
 32#include "llavatarpropertiesprocessor.h"
 33#include "llagent.h"
 34#include "lltooldraganddrop.h"
 35
 36class LLAvatarName;
 37class LLPanelProfile;
 38class LLPanelProfileTab;
 39class LLTextBox;
 40class AvatarStatusObserver;
 41
 42/**
 43* Panel for displaying Avatar's profile. It consists of three sub panels - Profile,
 44* Picks and Notes.
 45*/
 46class LLPanelProfileView : public LLPanelProfile
 47{
 48	LOG_CLASS(LLPanelProfileView);
 49	friend class LLUICtrlFactory;
 50	friend class AvatarStatusObserver;
 51
 52public:
 53
 54	LLPanelProfileView();
 55
 56	/*virtual*/ ~LLPanelProfileView();
 57
 58	/*virtual*/ void onOpen(const LLSD& key);
 59	
 60	/*virtual*/ BOOL postBuild();
 61
 62	BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
 63						   BOOL drop, EDragAndDropType cargo_type,
 64						   void *cargo_data, EAcceptance *accept,
 65						   std::string& tooltip_msg)
 66	{
 67		LLToolDragAndDrop::handleGiveDragAndDrop(getAvatarId(), gAgent.getSessionID(), drop,
 68				 cargo_type, cargo_data, accept);
 69
 70		return TRUE;
 71	}
 72
 73
 74protected:
 75
 76	void onBackBtnClick();
 77	void onCopyToClipboard();
 78	bool isGrantedToSeeOnlineStatus();
 79
 80	/**
 81	 * Displays avatar's online status if possible.
 82	 *
 83	 * Requirements from EXT-3880:
 84	 * For friends:
 85	 * - Online when online and privacy settings allow to show
 86	 * - Offline when offline and privacy settings allow to show
 87	 * - Else: nothing
 88	 * For other avatars:
 89	 *  - Online when online and was not set in Preferences/"Only Friends & Groups can see when I am online"
 90	 *  - Else: Offline
 91	 */
 92	void updateOnlineStatus();
 93	void processOnlineStatus(bool online);
 94
 95private:
 96	// LLCacheName will call this function when avatar name is loaded from server.
 97	// This is required to display names that have not been cached yet.
 98//	void onNameCache(
 99//		const LLUUID& id, 
100//		const std::string& full_name,
101//		bool is_group);
102	void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
103
104	LLTextBox* mStatusText;
105	AvatarStatusObserver* mAvatarStatusObserver;
106};
107
108#endif //LL_LLPANELPROFILEVIEW_H