PageRenderTime 49ms CodeModel.GetById 20ms app.highlight 6ms RepoModel.GetById 14ms 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
 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
27#ifndef LL_LLSIDEPANELITEMINFO_H
28#define LL_LLSIDEPANELITEMINFO_H
29
30#include "llsidepanelinventorysubpanel.h"
31
32//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33// Class LLSidepanelItemInfo
34// Object properties for inventory side panel.
35//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
37class LLButton;
38class LLViewerInventoryItem;
39class LLItemPropertiesObserver;
40class LLObjectInventoryObserver;
41class LLViewerObject;
42class LLPermissions;
43
44class LLSidepanelItemInfo : public LLSidepanelInventorySubpanel
45{
46public:
47	LLSidepanelItemInfo(const LLPanel::Params& p = getDefaultParams());
48	virtual ~LLSidepanelItemInfo();
49	
50	/*virtual*/ BOOL postBuild();
51	/*virtual*/ void reset();
52
53	void setObjectID(const LLUUID& object_id);
54	void setItemID(const LLUUID& item_id);
55	void setEditMode(BOOL edit);
56
57	const LLUUID& getObjectID() const;
58	const LLUUID& getItemID() const;
59
60protected:
61	/*virtual*/ void refresh();
62	/*virtual*/ void save();
63
64	LLViewerInventoryItem* findItem() const;
65	LLViewerObject*  findObject() const;
66	
67	void refreshFromItem(LLViewerInventoryItem* item);
68
69private:
70	void startObjectInventoryObserver();
71	void stopObjectInventoryObserver();
72
73	LLUUID mItemID; 	// inventory UUID for the inventory item.
74	LLUUID mObjectID; 	// in-world task UUID, or null if in agent inventory.
75	LLItemPropertiesObserver* mPropertiesObserver; // for syncing changes to item
76	LLObjectInventoryObserver* mObjectInventoryObserver; // for syncing changes to items inside an object
77	
78	//
79	// UI Elements
80	// 
81protected:
82	void 						onClickCreator();
83	void 						onClickOwner();
84	void 						onCommitName();
85	void 						onCommitDescription();
86	void 						onCommitPermissions();
87	void 						onCommitSaleInfo();
88	void 						onCommitSaleType();
89	void 						updateSaleInfo();
90};
91
92#endif // LL_LLSIDEPANELITEMINFO_H