PageRenderTime 62ms CodeModel.GetById 53ms app.highlight 3ms RepoModel.GetById 5ms app.codeStats 0ms

/indra/newview/llpanelavatar.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 108 lines | 31 code | 20 blank | 57 comment | 0 complexity | b2e3ba1482f18f5e1278a6850c1bebe5 MD5 | raw file
  1/** 
  2 * @file llpanelavatar.h
  3 * @brief LLPanelAvatar and related class definitions
  4 *
  5 * $LicenseInfo:firstyear=2004&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_LLPANELAVATAR_H
 28#define LL_LLPANELAVATAR_H
 29
 30#include "llpanel.h"
 31#include "llavatarpropertiesprocessor.h"
 32#include "llcallingcard.h"
 33#include "llvoiceclient.h"
 34#include "llavatarnamecache.h"
 35
 36class LLComboBox;
 37class LLLineEditor;
 38
 39/**
 40* Base class for any Profile View.
 41*/
 42class LLPanelProfileTab
 43	: public LLPanel
 44	, public LLAvatarPropertiesObserver
 45{
 46public:
 47
 48	/**
 49	 * Sets avatar ID, sets panel as observer of avatar related info replies from server.
 50	 */
 51	virtual void setAvatarId(const LLUUID& id);
 52
 53	/**
 54	 * Returns avatar ID.
 55	 */
 56	virtual const LLUUID& getAvatarId() { return mAvatarId; }
 57
 58	/**
 59	 * Sends update data request to server.
 60	 */
 61	virtual void updateData() = 0;
 62
 63	/**
 64	 * Clears panel data if viewing avatar info for first time and sends update data request.
 65	 */
 66	virtual void onOpen(const LLSD& key);
 67
 68	/**
 69	 * Profile tabs should close any opened panels here.
 70	 *
 71	 * Called from LLPanelProfile::onOpen() before opening new profile.
 72	 * See LLPanelPicks::onClosePanel for example. LLPanelPicks closes picture info panel
 73	 * before new profile is displayed, otherwise new profile will 
 74	 * be hidden behind picture info panel.
 75	 */
 76	virtual void onClosePanel() {}
 77
 78	/**
 79	 * Resets controls visibility, state, etc.
 80	 */
 81	virtual void resetControls(){};
 82
 83	/**
 84	 * Clears all data received from server.
 85	 */
 86	virtual void resetData(){};
 87
 88	/*virtual*/ ~LLPanelProfileTab();
 89
 90protected:
 91
 92	LLPanelProfileTab();
 93
 94	/**
 95	 * Scrolls panel to top when viewing avatar info for first time.
 96	 */
 97	void scrollToTop();
 98
 99	virtual void onMapButtonClick();
100
101	virtual void updateButtons();
102
103private:
104
105	LLUUID mAvatarId;
106};
107
108#endif // LL_LLPANELAVATAR_H