From b7d020e744e69749dc946ce63fdb18d613a18e0a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 3 Nov 2009 16:28:52 -0500 Subject: EXT-2168 : Rename ObjectInfo to ItemInfo Renaming for better clarity as to what llsidepaneliteminfo does. Also fixed an error where Edit was not enabling the panel. Also did some superficial cleanup and reorganization of llsidepanel- files. --HG-- branch : avatar-pipeline --- indra/newview/llsidepaneliteminfo.h | 107 ++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 indra/newview/llsidepaneliteminfo.h (limited to 'indra/newview/llsidepaneliteminfo.h') diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h new file mode 100644 index 0000000000..21ca63894c --- /dev/null +++ b/indra/newview/llsidepaneliteminfo.h @@ -0,0 +1,107 @@ +/** + * @file llsidepaneliteminfo.h + * @brief A panel which shows an inventory item's properties. + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLSIDEPANELITEMINFO_H +#define LL_LLSIDEPANELITEMINFO_H + +#include +#include "llmultifloater.h" +#include "lliconctrl.h" + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLSidepanelItemInfo +// Object properties for inventory side panel. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLButton; +class LLInventoryItem; +class LLItemPropertiesObserver; + +class LLSidepanelItemInfo : public LLPanel +{ +public: + LLSidepanelItemInfo(); + virtual ~LLSidepanelItemInfo(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void draw(); + + void setObjectID(const LLUUID& object_id); + void setItemID(const LLUUID& item_id); + void setEditMode(BOOL edit); + + void reset(); + void dirty(); + +protected: + LLInventoryItem* findItem() const; + void refresh(); + void refreshFromItem(LLInventoryItem* item); + void updateVerbs(); + +private: + // The item id of the inventory item in question. + LLUUID mItemID; + + // mObjectID will have a value if it is associated with a task in + // the world, and will be == LLUUID::null if it's in the agent + // inventory. + LLUUID mObjectID; + + BOOL mDirty; + BOOL mEditMode; + + LLItemPropertiesObserver* mPropertiesObserver; + + // + // UI Elements + // +protected: + void onEditButtonClicked(); + void onSaveButtonClicked(); + void onCancelButtonClicked(); + void onClickCreator(); + void onClickOwner(); + void onCommitName(); + void onCommitDescription(); + void onCommitPermissions(); + void onCommitSaleInfo(); + void onCommitSaleType(); + void updateSaleInfo(); +private: + LLButton* mEditBtn; + LLButton* mSaveBtn; + LLButton* mCancelBtn; +}; + +#endif // LL_LLSIDEPANELITEMINFO_H -- cgit v1.2.3 From 7383cfe14bd1522d921b96c6ab0804f888f8c5c0 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 4 Nov 2009 13:18:29 -0500 Subject: EXT-2216 : Task properties sidepanel Guts of task properteis sidepanel created. --HG-- branch : avatar-pipeline --- indra/newview/llsidepaneliteminfo.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'indra/newview/llsidepaneliteminfo.h') diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h index 21ca63894c..9f5ab402ea 100644 --- a/indra/newview/llsidepaneliteminfo.h +++ b/indra/newview/llsidepaneliteminfo.h @@ -36,6 +36,7 @@ #include #include "llmultifloater.h" #include "lliconctrl.h" +#include "llpermissions.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLSidepanelItemInfo @@ -45,6 +46,7 @@ class LLButton; class LLInventoryItem; class LLItemPropertiesObserver; +class LLViewerObject; class LLSidepanelItemInfo : public LLPanel { @@ -65,31 +67,24 @@ public: protected: LLInventoryItem* findItem() const; + LLViewerObject* findObject() const; void refresh(); void refreshFromItem(LLInventoryItem* item); + void refreshFromPermissions(const LLPermissions& perm); void updateVerbs(); + BOOL isUpdatingObject() const; private: - // The item id of the inventory item in question. - LLUUID mItemID; - - // mObjectID will have a value if it is associated with a task in - // the world, and will be == LLUUID::null if it's in the agent - // inventory. - LLUUID mObjectID; - - BOOL mDirty; - BOOL mEditMode; - - LLItemPropertiesObserver* mPropertiesObserver; + LLUUID mItemID; // inventory UUID for the inventory item. + LLUUID mObjectID; // in-world task UUID, or null if in agent inventory. + BOOL mDirty; // item properties need to be updated + BOOL mEditMode; // if we're in edit mode + LLItemPropertiesObserver* mPropertiesObserver; // for syncing changes to item // // UI Elements // protected: - void onEditButtonClicked(); - void onSaveButtonClicked(); - void onCancelButtonClicked(); void onClickCreator(); void onClickOwner(); void onCommitName(); @@ -98,6 +93,11 @@ protected: void onCommitSaleInfo(); void onCommitSaleType(); void updateSaleInfo(); + +protected: + void onEditButtonClicked(); + void onSaveButtonClicked(); + void onCancelButtonClicked(); private: LLButton* mEditBtn; LLButton* mSaveBtn; -- cgit v1.2.3 From ec9da605c120b9df648eb163dc8647f955275f5f Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 4 Nov 2009 16:25:13 -0500 Subject: EXT-2216 : Task properties sidepanel Subclassing sidepanel item/task info with llsidepanelinventorysubpanel. Some bug fixing and cleanup. --HG-- branch : avatar-pipeline --- indra/newview/llsidepaneliteminfo.h | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) (limited to 'indra/newview/llsidepaneliteminfo.h') diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h index 9f5ab402ea..b348b5cceb 100644 --- a/indra/newview/llsidepaneliteminfo.h +++ b/indra/newview/llsidepaneliteminfo.h @@ -33,10 +33,7 @@ #ifndef LL_LLSIDEPANELITEMINFO_H #define LL_LLSIDEPANELITEMINFO_H -#include -#include "llmultifloater.h" -#include "lliconctrl.h" -#include "llpermissions.h" +#include "llsidepanelinventorysubpanel.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLSidepanelItemInfo @@ -47,38 +44,34 @@ class LLButton; class LLInventoryItem; class LLItemPropertiesObserver; class LLViewerObject; +class LLPermissions; -class LLSidepanelItemInfo : public LLPanel +class LLSidepanelItemInfo : public LLSidepanelInventorySubpanel { public: LLSidepanelItemInfo(); virtual ~LLSidepanelItemInfo(); /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ void draw(); + /*virtual*/ void reset(); void setObjectID(const LLUUID& object_id); void setItemID(const LLUUID& item_id); void setEditMode(BOOL edit); - void reset(); - void dirty(); - protected: + /*virtual*/ void refresh(); + /*virtual*/ void save(); + /*virtual*/ void updateVerbs(); + LLInventoryItem* findItem() const; LLViewerObject* findObject() const; - void refresh(); + void refreshFromItem(LLInventoryItem* item); - void refreshFromPermissions(const LLPermissions& perm); - void updateVerbs(); - BOOL isUpdatingObject() const; private: LLUUID mItemID; // inventory UUID for the inventory item. LLUUID mObjectID; // in-world task UUID, or null if in agent inventory. - BOOL mDirty; // item properties need to be updated - BOOL mEditMode; // if we're in edit mode LLItemPropertiesObserver* mPropertiesObserver; // for syncing changes to item // @@ -93,15 +86,6 @@ protected: void onCommitSaleInfo(); void onCommitSaleType(); void updateSaleInfo(); - -protected: - void onEditButtonClicked(); - void onSaveButtonClicked(); - void onCancelButtonClicked(); -private: - LLButton* mEditBtn; - LLButton* mSaveBtn; - LLButton* mCancelBtn; }; #endif // LL_LLSIDEPANELITEMINFO_H -- cgit v1.2.3