PageRenderTime 15ms CodeModel.GetById 1ms app.highlight 10ms RepoModel.GetById 2ms app.codeStats 0ms

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