PageRenderTime 38ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1
  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. #ifndef LL_LLPANELPROFILEVIEW_H
  27. #define LL_LLPANELPROFILEVIEW_H
  28. #include "llpanel.h"
  29. #include "llpanelprofile.h"
  30. #include "llavatarpropertiesprocessor.h"
  31. #include "llagent.h"
  32. #include "lltooldraganddrop.h"
  33. class LLAvatarName;
  34. class LLPanelProfile;
  35. class LLPanelProfileTab;
  36. class LLTextBox;
  37. class AvatarStatusObserver;
  38. /**
  39. * Panel for displaying Avatar's profile. It consists of three sub panels - Profile,
  40. * Picks and Notes.
  41. */
  42. class LLPanelProfileView : public LLPanelProfile
  43. {
  44. LOG_CLASS(LLPanelProfileView);
  45. friend class LLUICtrlFactory;
  46. friend class AvatarStatusObserver;
  47. public:
  48. LLPanelProfileView();
  49. /*virtual*/ ~LLPanelProfileView();
  50. /*virtual*/ void onOpen(const LLSD& key);
  51. /*virtual*/ BOOL postBuild();
  52. BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
  53. BOOL drop, EDragAndDropType cargo_type,
  54. void *cargo_data, EAcceptance *accept,
  55. std::string& tooltip_msg)
  56. {
  57. LLToolDragAndDrop::handleGiveDragAndDrop(getAvatarId(), gAgent.getSessionID(), drop,
  58. cargo_type, cargo_data, accept);
  59. return TRUE;
  60. }
  61. protected:
  62. void onBackBtnClick();
  63. void onCopyToClipboard();
  64. bool isGrantedToSeeOnlineStatus();
  65. /**
  66. * Displays avatar's online status if possible.
  67. *
  68. * Requirements from EXT-3880:
  69. * For friends:
  70. * - Online when online and privacy settings allow to show
  71. * - Offline when offline and privacy settings allow to show
  72. * - Else: nothing
  73. * For other avatars:
  74. * - Online when online and was not set in Preferences/"Only Friends & Groups can see when I am online"
  75. * - Else: Offline
  76. */
  77. void updateOnlineStatus();
  78. void processOnlineStatus(bool online);
  79. private:
  80. // LLCacheName will call this function when avatar name is loaded from server.
  81. // This is required to display names that have not been cached yet.
  82. // void onNameCache(
  83. // const LLUUID& id,
  84. // const std::string& full_name,
  85. // bool is_group);
  86. void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
  87. LLTextBox* mStatusText;
  88. AvatarStatusObserver* mAvatarStatusObserver;
  89. };
  90. #endif //LL_LLPANELPROFILEVIEW_H