PageRenderTime 118ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llsidepaneliteminfo.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 92 lines | 45 code | 15 blank | 32 comment | 0 complexity | a36b095a43db9f80c08acb18ab29341b MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llsidepaneliteminfo.h
  3. * @brief A panel which shows an inventory item's properties.
  4. *
  5. * $LicenseInfo:firstyear=2002&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_LLSIDEPANELITEMINFO_H
  27. #define LL_LLSIDEPANELITEMINFO_H
  28. #include "llsidepanelinventorysubpanel.h"
  29. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  30. // Class LLSidepanelItemInfo
  31. // Object properties for inventory side panel.
  32. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33. class LLButton;
  34. class LLViewerInventoryItem;
  35. class LLItemPropertiesObserver;
  36. class LLObjectInventoryObserver;
  37. class LLViewerObject;
  38. class LLPermissions;
  39. class LLSidepanelItemInfo : public LLSidepanelInventorySubpanel
  40. {
  41. public:
  42. LLSidepanelItemInfo(const LLPanel::Params& p = getDefaultParams());
  43. virtual ~LLSidepanelItemInfo();
  44. /*virtual*/ BOOL postBuild();
  45. /*virtual*/ void reset();
  46. void setObjectID(const LLUUID& object_id);
  47. void setItemID(const LLUUID& item_id);
  48. void setEditMode(BOOL edit);
  49. const LLUUID& getObjectID() const;
  50. const LLUUID& getItemID() const;
  51. protected:
  52. /*virtual*/ void refresh();
  53. /*virtual*/ void save();
  54. LLViewerInventoryItem* findItem() const;
  55. LLViewerObject* findObject() const;
  56. void refreshFromItem(LLViewerInventoryItem* item);
  57. private:
  58. void startObjectInventoryObserver();
  59. void stopObjectInventoryObserver();
  60. LLUUID mItemID; // inventory UUID for the inventory item.
  61. LLUUID mObjectID; // in-world task UUID, or null if in agent inventory.
  62. LLItemPropertiesObserver* mPropertiesObserver; // for syncing changes to item
  63. LLObjectInventoryObserver* mObjectInventoryObserver; // for syncing changes to items inside an object
  64. //
  65. // UI Elements
  66. //
  67. protected:
  68. void onClickCreator();
  69. void onClickOwner();
  70. void onCommitName();
  71. void onCommitDescription();
  72. void onCommitPermissions();
  73. void onCommitSaleInfo();
  74. void onCommitSaleType();
  75. void updateSaleInfo();
  76. };
  77. #endif // LL_LLSIDEPANELITEMINFO_H