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/llsidepaneltaskinfo.h | 113 ++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 indra/newview/llsidepaneltaskinfo.h (limited to 'indra/newview/llsidepaneltaskinfo.h') diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h new file mode 100644 index 0000000000..2b9b4b66b6 --- /dev/null +++ b/indra/newview/llsidepaneltaskinfo.h @@ -0,0 +1,113 @@ +/** + * @file llsidepaneltaskinfo.h + * @brief LLSidepanelTaskInfo class header file + * + * $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_LLSIDEPANELTASKINFO_H +#define LL_LLSIDEPANELTASKINFO_H + +#include "llpanel.h" +#include "lluuid.h" + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLSidepanelTaskInfo +// +// Panel for permissions of an object. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLNameBox; + +class LLSidepanelTaskInfo : public LLPanel +{ +public: + LLSidepanelTaskInfo(); + virtual ~LLSidepanelTaskInfo(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void draw(); + /*virtual*/ void setVisible(BOOL visible); + +protected: + void refresh(); // refresh all labels as needed + + // statics + static void onClickClaim(void*); + static void onClickRelease(void*); + void onClickGroup(); + void cbGroupID(LLUUID group_id); + static void onClickDeedToGroup(void*); + + static void onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm); + + static void onCommitGroupShare(LLUICtrl *ctrl, void *data); + + static void onCommitEveryoneMove(LLUICtrl *ctrl, void *data); + static void onCommitEveryoneCopy(LLUICtrl *ctrl, void *data); + + static void onCommitNextOwnerModify(LLUICtrl* ctrl, void* data); + static void onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data); + static void onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data); + + static void onCommitName(LLUICtrl* ctrl, void* data); + static void onCommitDesc(LLUICtrl* ctrl, void* data); + + static void onCommitSaleInfo(LLUICtrl* ctrl, void* data); + static void onCommitSaleType(LLUICtrl* ctrl, void* data); + void setAllSaleInfo(); + + static void onCommitClickAction(LLUICtrl* ctrl, void*); + static void onCommitIncludeInSearch(LLUICtrl* ctrl, void*); + +private: + LLNameBox* mLabelGroupName; // group name + + LLUUID mCreatorID; + LLUUID mOwnerID; + LLUUID mLastOwnerID; + BOOL mDirty; // item properties need to be updated + +protected: + void onEditButtonClicked(); + void onSaveButtonClicked(); + void onCancelButtonClicked(); + void onOpenButtonClicked(); + void onBuildButtonClicked(); + void onBuyButtonClicked(); +private: + LLButton* mEditBtn; + LLButton* mSaveBtn; + LLButton* mCancelBtn; + LLButton* mOpenBtn; + LLButton* mBuildBtn; + LLButton* mBuyBtn; +}; + + +#endif // LL_LLSIDEPANELTASKINFO_H -- 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/llsidepaneltaskinfo.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'indra/newview/llsidepaneltaskinfo.h') diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index 2b9b4b66b6..aea65c1170 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -33,7 +33,7 @@ #ifndef LL_LLSIDEPANELTASKINFO_H #define LL_LLSIDEPANELTASKINFO_H -#include "llpanel.h" +#include "llsidepanelinventorysubpanel.h" #include "lluuid.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -44,18 +44,18 @@ class LLNameBox; -class LLSidepanelTaskInfo : public LLPanel +class LLSidepanelTaskInfo : public LLSidepanelInventorySubpanel { public: LLSidepanelTaskInfo(); virtual ~LLSidepanelTaskInfo(); /*virtual*/ BOOL postBuild(); - /*virtual*/ void draw(); - /*virtual*/ void setVisible(BOOL visible); protected: - void refresh(); // refresh all labels as needed + /*virtual*/ void refresh(); // refresh all labels as needed + /*virtual*/ void save(); + /*virtual*/ void updateVerbs(); // statics static void onClickClaim(void*); @@ -91,19 +91,12 @@ private: LLUUID mCreatorID; LLUUID mOwnerID; LLUUID mLastOwnerID; - BOOL mDirty; // item properties need to be updated protected: - void onEditButtonClicked(); - void onSaveButtonClicked(); - void onCancelButtonClicked(); void onOpenButtonClicked(); void onBuildButtonClicked(); void onBuyButtonClicked(); private: - LLButton* mEditBtn; - LLButton* mSaveBtn; - LLButton* mCancelBtn; LLButton* mOpenBtn; LLButton* mBuildBtn; LLButton* mBuyBtn; -- cgit v1.2.3 From 7615ec497e7b69c8eefbf8ef1a464eaa22e77bf1 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 4 Nov 2009 20:30:11 -0500 Subject: EXT-2216 : Task properties sidepanel EXT-2224 : Edit item then delete item -- edit panel still active EXT-2228 : Buy/Pay/Open buttons for Task sidepanel --HG-- branch : avatar-pipeline --- indra/newview/llsidepaneltaskinfo.h | 44 +++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'indra/newview/llsidepaneltaskinfo.h') diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index aea65c1170..25a9e2d577 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -35,6 +35,7 @@ #include "llsidepanelinventorysubpanel.h" #include "lluuid.h" +#include "llselectmgr.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLSidepanelTaskInfo @@ -43,6 +44,7 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLNameBox; +class LLCheckBoxCtrl; class LLSidepanelTaskInfo : public LLSidepanelInventorySubpanel { @@ -52,6 +54,8 @@ public: /*virtual*/ BOOL postBuild(); + void setObjectSelection(LLObjectSelectionHandle selection); + protected: /*virtual*/ void refresh(); // refresh all labels as needed /*virtual*/ void save(); @@ -62,29 +66,25 @@ protected: static void onClickRelease(void*); void onClickGroup(); void cbGroupID(LLUUID group_id); - static void onClickDeedToGroup(void*); - - static void onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm); - - static void onCommitGroupShare(LLUICtrl *ctrl, void *data); - static void onCommitEveryoneMove(LLUICtrl *ctrl, void *data); - static void onCommitEveryoneCopy(LLUICtrl *ctrl, void *data); + void onClickDeedToGroup(); + void onCommitPerm(LLCheckBoxCtrl* ctrl, U8 field, U32 perm); + void onCommitGroupShare(); + void onCommitEveryoneMove(); + void onCommitEveryoneCopy(); + void onCommitNextOwnerModify(); + void onCommitNextOwnerCopy(); + void onCommitNextOwnerTransfer(); + void onCommitName(); + void onCommitDesc(); + void onCommitSaleInfo(); + void onCommitSaleType(); + + void onCommitClickAction(U8 click_action); + void onCommitIncludeInSearch(); - static void onCommitNextOwnerModify(LLUICtrl* ctrl, void* data); - static void onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data); - static void onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data); - - static void onCommitName(LLUICtrl* ctrl, void* data); - static void onCommitDesc(LLUICtrl* ctrl, void* data); - - static void onCommitSaleInfo(LLUICtrl* ctrl, void* data); - static void onCommitSaleType(LLUICtrl* ctrl, void* data); void setAllSaleInfo(); - static void onCommitClickAction(LLUICtrl* ctrl, void*); - static void onCommitIncludeInSearch(LLUICtrl* ctrl, void*); - private: LLNameBox* mLabelGroupName; // group name @@ -94,12 +94,14 @@ private: protected: void onOpenButtonClicked(); - void onBuildButtonClicked(); + void onPayButtonClicked(); void onBuyButtonClicked(); private: LLButton* mOpenBtn; - LLButton* mBuildBtn; + LLButton* mPayBtn; LLButton* mBuyBtn; + + LLObjectSelectionHandle mObjectSelection; }; -- cgit v1.2.3 From 280e01729173e79e37939c3e764f9f3f674f79da Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 5 Nov 2009 15:00:36 -0500 Subject: EXT-2229 : Task SP : Update task on new selection Using activePanel hack to update selection when it changes. --HG-- branch : avatar-pipeline --- indra/newview/llsidepaneltaskinfo.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llsidepaneltaskinfo.h') diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index 25a9e2d577..b6dd4dfb2c 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -45,6 +45,7 @@ class LLNameBox; class LLCheckBoxCtrl; +class LLViewerObject; class LLSidepanelTaskInfo : public LLSidepanelInventorySubpanel { @@ -53,9 +54,14 @@ public: virtual ~LLSidepanelTaskInfo(); /*virtual*/ BOOL postBuild(); + /*virtual*/ void setVisible(BOOL visible); void setObjectSelection(LLObjectSelectionHandle selection); + const LLUUID& getSelectedUUID(); + LLViewerObject* getFirstSelectedObject(); + + static LLSidepanelTaskInfo *getActivePanel(); protected: /*virtual*/ void refresh(); // refresh all labels as needed /*virtual*/ void save(); @@ -102,6 +108,7 @@ private: LLButton* mBuyBtn; LLObjectSelectionHandle mObjectSelection; + static LLSidepanelTaskInfo* sActivePanel; }; -- cgit v1.2.3