PageRenderTime 33ms CodeModel.GetById 16ms RepoModel.GetById 0ms 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
Possible License(s): LGPL-2.1
  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. #ifndef LL_LLPANELAVATAR_H
  27. #define LL_LLPANELAVATAR_H
  28. #include "llpanel.h"
  29. #include "llavatarpropertiesprocessor.h"
  30. #include "llcallingcard.h"
  31. #include "llvoiceclient.h"
  32. #include "llavatarnamecache.h"
  33. class LLComboBox;
  34. class LLLineEditor;
  35. /**
  36. * Base class for any Profile View.
  37. */
  38. class LLPanelProfileTab
  39. : public LLPanel
  40. , public LLAvatarPropertiesObserver
  41. {
  42. public:
  43. /**
  44. * Sets avatar ID, sets panel as observer of avatar related info replies from server.
  45. */
  46. virtual void setAvatarId(const LLUUID& id);
  47. /**
  48. * Returns avatar ID.
  49. */
  50. virtual const LLUUID& getAvatarId() { return mAvatarId; }
  51. /**
  52. * Sends update data request to server.
  53. */
  54. virtual void updateData() = 0;
  55. /**
  56. * Clears panel data if viewing avatar info for first time and sends update data request.
  57. */
  58. virtual void onOpen(const LLSD& key);
  59. /**
  60. * Profile tabs should close any opened panels here.
  61. *
  62. * Called from LLPanelProfile::onOpen() before opening new profile.
  63. * See LLPanelPicks::onClosePanel for example. LLPanelPicks closes picture info panel
  64. * before new profile is displayed, otherwise new profile will
  65. * be hidden behind picture info panel.
  66. */
  67. virtual void onClosePanel() {}
  68. /**
  69. * Resets controls visibility, state, etc.
  70. */
  71. virtual void resetControls(){};
  72. /**
  73. * Clears all data received from server.
  74. */
  75. virtual void resetData(){};
  76. /*virtual*/ ~LLPanelProfileTab();
  77. protected:
  78. LLPanelProfileTab();
  79. /**
  80. * Scrolls panel to top when viewing avatar info for first time.
  81. */
  82. void scrollToTop();
  83. virtual void onMapButtonClick();
  84. virtual void updateButtons();
  85. private:
  86. LLUUID mAvatarId;
  87. };
  88. #endif // LL_LLPANELAVATAR_H