/indra/newview/llpanelplaces.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 159 lines · 87 code · 35 blank · 37 comment · 0 complexity · 627b1856c26432d16cfaf18fb4b1fcaf MD5 · raw file

  1. /**
  2. * @file llpanelplaces.h
  3. * @brief Side Bar "Places" 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_LLPANELPLACES_H
  27. #define LL_LLPANELPLACES_H
  28. #include "lltimer.h"
  29. #include "llpanel.h"
  30. class LLInventoryItem;
  31. class LLFilterEditor;
  32. class LLLandmark;
  33. class LLPanelLandmarkInfo;
  34. class LLPanelPlaceProfile;
  35. class LLPanelPickEdit;
  36. class LLPanelPlaceInfo;
  37. class LLPanelPlacesTab;
  38. class LLParcelSelection;
  39. class LLPlacesInventoryObserver;
  40. class LLPlacesParcelObserver;
  41. class LLRemoteParcelInfoObserver;
  42. class LLTabContainer;
  43. class LLToggleableMenu;
  44. class LLMenuButton;
  45. typedef std::pair<LLUUID, std::string> folder_pair_t;
  46. class LLPanelPlaces : public LLPanel
  47. {
  48. public:
  49. LLPanelPlaces();
  50. virtual ~LLPanelPlaces();
  51. /*virtual*/ BOOL postBuild();
  52. /*virtual*/ void onOpen(const LLSD& key);
  53. // Called on parcel selection change to update place information.
  54. void changedParcelSelection();
  55. // Called once on agent inventory first change to find out when inventory gets usable
  56. // and to create "My Landmarks" and "Teleport History" tabs.
  57. void createTabs();
  58. // Called when we receive the global 3D position of a parcel.
  59. void changedGlobalPos(const LLVector3d &global_pos);
  60. // Opens landmark info panel when agent creates or receives landmark.
  61. void showAddedLandmarkInfo(const uuid_vec_t& items);
  62. void setItem(LLInventoryItem* item);
  63. LLInventoryItem* getItem() { return mItem; }
  64. std::string getPlaceInfoType() { return mPlaceInfoType; }
  65. bool tabsCreated() { return mTabsCreated;}
  66. /*virtual*/ S32 notifyParent(const LLSD& info);
  67. private:
  68. void onLandmarkLoaded(LLLandmark* landmark);
  69. void onFilterEdit(const std::string& search_string, bool force_filter);
  70. void onTabSelected();
  71. void onTeleportButtonClicked();
  72. void onShowOnMapButtonClicked();
  73. void onEditButtonClicked();
  74. void onSaveButtonClicked();
  75. void onCancelButtonClicked();
  76. void onOverflowButtonClicked();
  77. void onOverflowMenuItemClicked(const LLSD& param);
  78. bool onOverflowMenuItemEnable(const LLSD& param);
  79. void onCreateLandmarkButtonClicked(const LLUUID& folder_id);
  80. void onBackButtonClicked();
  81. void onProfileButtonClicked();
  82. void toggleMediaPanel();
  83. void togglePickPanel(BOOL visible);
  84. void togglePlaceInfoPanel(BOOL visible);
  85. /*virtual*/ void handleVisibilityChange(BOOL new_visibility);
  86. void updateVerbs();
  87. LLPanelPlaceInfo* getCurrentInfoPanel();
  88. LLFilterEditor* mFilterEditor;
  89. LLPanelPlacesTab* mActivePanel;
  90. LLTabContainer* mTabContainer;
  91. LLPanelPlaceProfile* mPlaceProfile;
  92. LLPanelLandmarkInfo* mLandmarkInfo;
  93. LLPanelPickEdit* mPickPanel;
  94. LLToggleableMenu* mPlaceMenu;
  95. LLToggleableMenu* mLandmarkMenu;
  96. LLButton* mPlaceProfileBackBtn;
  97. LLButton* mTeleportBtn;
  98. LLButton* mShowOnMapBtn;
  99. LLButton* mEditBtn;
  100. LLButton* mSaveBtn;
  101. LLButton* mCancelBtn;
  102. LLButton* mCloseBtn;
  103. LLMenuButton* mOverflowBtn;
  104. LLButton* mPlaceInfoBtn;
  105. LLPlacesInventoryObserver* mInventoryObserver;
  106. LLPlacesParcelObserver* mParcelObserver;
  107. LLRemoteParcelInfoObserver* mRemoteParcelObserver;
  108. // Pointer to a landmark item or to a linked landmark
  109. LLPointer<LLInventoryItem> mItem;
  110. // Absolute position of the location for teleport, may not
  111. // be available (hence zero)
  112. LLVector3d mPosGlobal;
  113. // Sets a period of time during which the requested place information
  114. // is expected to be updated and doesn't need to be reset.
  115. LLTimer mResetInfoTimer;
  116. // Information type currently shown in Place Information panel
  117. std::string mPlaceInfoType;
  118. bool isLandmarkEditModeOn;
  119. // Holds info whether "My Landmarks" and "Teleport History" tabs have been created.
  120. bool mTabsCreated;
  121. LLSafeHandle<LLParcelSelection> mParcel;
  122. boost::signals2::connection mAgentParcelChangedConnection;
  123. };
  124. #endif //LL_LLPANELPLACES_H