From 2ce7556e53544e50a4d4d28705976655cafa6992 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 21 Apr 2010 15:44:24 +0300 Subject: Implemented by SL EXT-6722(normal task) - Create modified inventory view for "my outfits" tab in top-level appearance sidebar (tier 1) llui: - Setting container panel for accordion tab control to dynamically add tabs to accordions. - Added method to dynamically remove accordion tabs. - Added LLIconCtrl image setter. newview: - Class LLOutfitsList - a list of agents's outfits from "My Outfits" inventory category which represents each outfit by an accordion tab with a list of items inside it. - Class LLWearableItemsList - a list of wearable items used in each accordion tab of "My Outfits" tab. - Class LLInventoryItemsList - a base class for LLWearableItemsList that represents inventory items by panels in LLFlatListView. - Class LLPanelInventoryItem - inventory item representation for a flat list. Item icon is set according to item type. - Class LLInventoryCategoriesObserver - an observer used in LLOutfitsList for monitoring changes to "My Outfits" inventory category and updating outfits accordion tabs and list of items for each outfit. Known issues: - Only first outfit tab is displayed in "My Outfits" until this tab is expanded. - Bottom bar buttons and filter field not functioning for "My Outfits" tab since LLOutfitsList still doesn't support selection, filtering and sorting. - "My Outfits" and "Wearing" tabs of "Appearance" side panel might need a common interface to use LLOutfitsList and LLinventoryPanel as tabs in LLPanelOutfitsInventory or "Wearing" tab should be replaces with LLOutfitsList class object i.e. a flat list. On review - https://codereview.productengine.com/secondlife/r/285/ --HG-- branch : product-engine --- indra/newview/llwearableitemslist.h | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 indra/newview/llwearableitemslist.h (limited to 'indra/newview/llwearableitemslist.h') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h new file mode 100644 index 0000000000..e3b011912b --- /dev/null +++ b/indra/newview/llwearableitemslist.h @@ -0,0 +1,56 @@ +/** + * @file llwearableitemslist.h + * @brief A flat list of wearable items. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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_LLWEARABLEITEMSLIST_H +#define LL_LLWEARABLEITEMSLIST_H + +#include "llpanel.h" + +#include "llassettype.h" + +#include "llinventorytype.h" + +// newview +#include "llinventoryitemslist.h" + +class LLWearableItemsList : public LLInventoryItemsList +{ +public: + virtual ~LLWearableItemsList(); + + void updateList(const LLUUID& category_id); + +protected: + friend class LLUICtrlFactory; + LLWearableItemsList(const LLFlatListView::Params& p); +}; + +#endif //LL_LLWEARABLEITEMSLIST_H -- cgit v1.2.3 From fbfc85176670f3f948e6e2f00c8d8e37c96d5299 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Mon, 26 Apr 2010 18:56:28 +0300 Subject: (EXT-6722) Create modified inventory view for "my outfits" tab in top-level appearance sidebar (tier 1) llui: - Setting container panel for accordion tab control to dynamically add tabs to accordions. - Added method to dynamically remove accordion tabs. - Added LLIconCtrl image setter. newview: - Class LLOutfitsList - a list of agents's outfits from "My Outfits" inventory category which represents each outfit by an accordion tab with a list of items inside it. - Class LLWearableItemsList - a list of wearable items used in each accordion tab of "My Outfits" tab. - Class LLInventoryItemsList - a base class for LLWearableItemsList that represents inventory items by panels in LLFlatListView. - Class LLPanelInventoryItem - inventory item representation for a flat list. Item icon is set according to item type. - Class LLInventoryCategoriesObserver - an observer used in LLOutfitsList for monitoring changes to "My Outfits" inventory category and updating outfits accordion tabs and list of items for each outfit. Reviewed by Mike Antipov https://codereview.productengine.com/secondlife/r/285/ --HG-- branch : product-engine --- indra/newview/llwearableitemslist.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'indra/newview/llwearableitemslist.h') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index e3b011912b..e7ccba8e6c 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -34,23 +34,32 @@ #include "llpanel.h" -#include "llassettype.h" - -#include "llinventorytype.h" - // newview #include "llinventoryitemslist.h" +/** + * @class LLWearableItemsList + * + * A flat list of wearable inventory items. + * Collects all items that can be a part of an outfit from + * an inventory category specified by UUID and displays them + * as a flat list. + */ class LLWearableItemsList : public LLInventoryItemsList { public: + struct Params : public LLInitParam::Block + { + Params(); + }; + virtual ~LLWearableItemsList(); void updateList(const LLUUID& category_id); protected: friend class LLUICtrlFactory; - LLWearableItemsList(const LLFlatListView::Params& p); + LLWearableItemsList(const LLWearableItemsList::Params& p); }; #endif //LL_LLWEARABLEITEMSLIST_H -- cgit v1.2.3 From e1cf84c9b670e764d39c4152df3ed8c705732735 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 28 Apr 2010 20:08:10 +0300 Subject: Fixed EXT-6550(major) - Edit Outfit: Fix alignment of in-line edit button and put proper icon on it Replaced LLPanelInventoryListItem with LLPanelInventoryListItem. This class is capable of showing widgets on left and right sides of panel. Implemented LLPanelClothingListItem and LLPanelBodyPartListItem - makes use of new LLPanelInventoryListItem and is able to show buttons specified in tickets. Buttons are shown on mouse_enter event and hidden on mouse_leave event. Buttons are - delete, move up, move down, lock, edit. It's item's user responsibility to control buttons visibility. Made LLInventoryItemsList::addNewItem virtual to allow inheritors create specific(non-default) items. Reviewed by Mike Antipov - https://codereview.productengine.com/secondlife/r/325/ --HG-- branch : product-engine --- indra/newview/llwearableitemslist.h | 83 +++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) (limited to 'indra/newview/llwearableitemslist.h') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index e7ccba8e6c..ae43b3f673 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -36,6 +36,89 @@ // newview #include "llinventoryitemslist.h" +#include "llinventorymodel.h" +#include "llwearabledictionary.h" + +/** + * @class LLPanelWearableListItem + * + * Extends LLPanelInventoryListItemBase: + * - makes side widgets show on mouse_enter and hide on + * mouse_leave events. + * - provides callback for button clicks + */ +class LLPanelWearableListItem : public LLPanelInventoryListItemBase +{ + LOG_CLASS(LLPanelWearableListItem); +public: + + /** + * Shows buttons when mouse is over + */ + /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask); + + /** + * Hides buttons when mouse is out + */ + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); + +protected: + + LLPanelWearableListItem(LLViewerInventoryItem* item); +}; + +/** + * @class LLPanelClothingListItem + * + * Provides buttons for editing, moving, deleting a wearable. + */ +class LLPanelClothingListItem : public LLPanelWearableListItem +{ + LOG_CLASS(LLPanelClothingListItem); +public: + + static LLPanelClothingListItem* create(LLViewerInventoryItem* item); + + virtual ~LLPanelClothingListItem(); + + /*virtual*/ void init(); + /*virtual*/ BOOL postBuild(); + + /** + * Make button visible during mouse over event. + */ + inline void setShowDeleteButton(bool show); + inline void setShowMoveUpButton(bool show); + inline void setShowMoveDownButton(bool show); + inline void setShowLockButton(bool show); + inline void setShowEditButton(bool show); + +protected: + + LLPanelClothingListItem(LLViewerInventoryItem* item); +}; + +class LLPanelBodyPartsListItem : public LLPanelWearableListItem +{ + LOG_CLASS(LLPanelBodyPartsListItem); +public: + + static LLPanelBodyPartsListItem* create(LLViewerInventoryItem* item); + + virtual ~LLPanelBodyPartsListItem(); + + /*virtual*/ void init(); + /*virtual*/ BOOL postBuild(); + + /** + * Make button visible during mouse over event. + */ + inline void setShowLockButton(bool show); + inline void setShowEditButton(bool show); + +protected: + LLPanelBodyPartsListItem(LLViewerInventoryItem* item); +}; /** * @class LLWearableItemsList -- cgit v1.2.3 From 02d6922727bd674025759a95df15a1f764b784fd Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 29 Apr 2010 19:06:13 +0300 Subject: Fixed EXT-7163(normal) - Create dummy inventory item panel (an item panel for unworn wearable types) Added new wearable list item - LLPanelDummyClothingListItem for not worn wearable types, it displays grayed wearable type icon, grayed title ' not worn' and 'add' button. Modified base class to be more flexible. Moved init() to protected section. Modified COF panel to use dummy item. Reviewed by Mike Antipov - https://codereview.productengine.com/secondlife/r/335/ --HG-- branch : product-engine --- indra/newview/llwearableitemslist.h | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'indra/newview/llwearableitemslist.h') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index ae43b3f673..c4a415dfbf 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -81,7 +81,6 @@ public: virtual ~LLPanelClothingListItem(); - /*virtual*/ void init(); /*virtual*/ BOOL postBuild(); /** @@ -96,6 +95,8 @@ public: protected: LLPanelClothingListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); }; class LLPanelBodyPartsListItem : public LLPanelWearableListItem @@ -107,7 +108,6 @@ public: virtual ~LLPanelBodyPartsListItem(); - /*virtual*/ void init(); /*virtual*/ BOOL postBuild(); /** @@ -118,6 +118,32 @@ public: protected: LLPanelBodyPartsListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); +}; + +/** + * @class LLPanelDummyClothingListItem + * + * A dummy item panel - displays grayed clothing icon, grayed title ' not worn' and 'add' button + */ +class LLPanelDummyClothingListItem : public LLPanelWearableListItem +{ +public: + static LLPanelDummyClothingListItem* create(EWearableType w_type); + + /*virtual*/ void updateItem(); + /*virtual*/ BOOL postBuild(); + +protected: + LLPanelDummyClothingListItem(EWearableType w_type); + + /*virtual*/ void init(); + + static std::string wearableTypeToString(EWearableType w_type); + +private: + EWearableType mWearableType; }; /** -- cgit v1.2.3 From 702efd72ab9e3a2c619b5313b481e0821d453070 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 30 Apr 2010 15:59:23 +0300 Subject: additional patch for EXT-6732 Create specialized view of inventory for "clothing" accordion tab of outfit editor * reimplemented button bars as static panels not as list items (creating accordion - button bar - list view - adaptor/container) * added management of items' buttons assording to inventory items' states * assigned actions to clothing/bodyparts items' buttons * got rid of separators as distinct items and made them as part of items * removed ad-hoc up/down buttons * removed "+" button from a button bar Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/322 --HG-- branch : product-engine --- indra/newview/llwearableitemslist.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'indra/newview/llwearableitemslist.h') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index c4a415dfbf..29532a15c1 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -86,11 +86,13 @@ public: /** * Make button visible during mouse over event. */ - inline void setShowDeleteButton(bool show); - inline void setShowMoveUpButton(bool show); - inline void setShowMoveDownButton(bool show); - inline void setShowLockButton(bool show); - inline void setShowEditButton(bool show); + inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } + inline void setShowMoveUpButton(bool show) { setShowWidget("btn_move_up", show); } + + inline void setShowMoveDownButton(bool show) { setShowWidget("btn_move_down", show); } + inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } + inline void setShowEditButton(bool show) { setShowWidget("btn_edit", show); } + protected: @@ -113,8 +115,8 @@ public: /** * Make button visible during mouse over event. */ - inline void setShowLockButton(bool show); - inline void setShowEditButton(bool show); + inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } + inline void setShowEditButton(bool show) { setShowWidget("btn_edit", show); } protected: LLPanelBodyPartsListItem(LLViewerInventoryItem* item); -- cgit v1.2.3 From adc0aba2dd206e76a41298727794ab80754d439b Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 11 May 2010 15:08:29 -0400 Subject: EXT-7305 : FIXED : Changed LLWearableDictionary to LLWearableType Refactored LLWearableDictionary to look more like LLAssetType/LLFolderType/etc. in terms of code design. This required a lot of superficial changes across many files. Overall functionality has not changed. --- indra/newview/llwearableitemslist.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llwearableitemslist.h') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 29532a15c1..14bca21b85 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -132,20 +132,20 @@ protected: class LLPanelDummyClothingListItem : public LLPanelWearableListItem { public: - static LLPanelDummyClothingListItem* create(EWearableType w_type); + static LLPanelDummyClothingListItem* create(LLWearableType::EType w_type); /*virtual*/ void updateItem(); /*virtual*/ BOOL postBuild(); protected: - LLPanelDummyClothingListItem(EWearableType w_type); + LLPanelDummyClothingListItem(LLWearableType::EType w_type); /*virtual*/ void init(); - static std::string wearableTypeToString(EWearableType w_type); + static std::string wearableTypeToString(LLWearableType::EType w_type); private: - EWearableType mWearableType; + LLWearableType::EType mWearableType; }; /** -- cgit v1.2.3 From bf8ee428136b4c38500fb72642d0f75b24057f60 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 11 May 2010 15:24:27 -0400 Subject: EXT-7305 : FIXED : Changed LLWearableDictionary to LLWearableType Name change LLWearableDictionary.h to LLWearableType.h. --- indra/newview/llwearableitemslist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llwearableitemslist.h') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 14bca21b85..41dc95cec6 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -37,7 +37,7 @@ // newview #include "llinventoryitemslist.h" #include "llinventorymodel.h" -#include "llwearabledictionary.h" +#include "llwearabletype.h" /** * @class LLPanelWearableListItem -- cgit v1.2.3 From 36e84baea4510369e1f947c46368d93995a1f9fb Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 12 May 2010 13:47:14 +0300 Subject: EXT-7204 FIXED added updating verbs and status (panel edit outfit) on base oufit changes --HG-- branch : product-engine --- indra/newview/llwearableitemslist.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'indra/newview/llwearableitemslist.h') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 29532a15c1..40773ed4dd 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -124,6 +124,29 @@ protected: /*virtual*/ void init(); }; + +class LLPanelDeletableWearableListItem : public LLPanelWearableListItem +{ + LOG_CLASS(LLPanelDeletableWearableListItem); +public: + + static LLPanelDeletableWearableListItem* create(LLViewerInventoryItem* item); + + virtual ~LLPanelDeletableWearableListItem(); + + /*virtual*/ BOOL postBuild(); + + /** + * Make button visible during mouse over event. + */ + inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } + +protected: + LLPanelDeletableWearableListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); +}; + /** * @class LLPanelDummyClothingListItem * -- cgit v1.2.3 From 2ab9fbf019b579e0130b75769bd3c862040480a8 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 13 May 2010 13:25:02 +0300 Subject: EXT-7218 FIXED added a delete button for attachment items (panel outfit edit) added a deletable wearable item, predecessor of a clothing item, which is used for attachment items Reviewed by Neal Orman and Mike Antipov at https://codereview.productengine.com/secondlife/r/377 --HG-- branch : product-engine --- indra/newview/llwearableitemslist.h | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'indra/newview/llwearableitemslist.h') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index b7f3fd0dff..5e3202c687 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -67,12 +67,35 @@ protected: LLPanelWearableListItem(LLViewerInventoryItem* item); }; + +class LLPanelDeletableWearableListItem : public LLPanelWearableListItem +{ + LOG_CLASS(LLPanelDeletableWearableListItem); +public: + + static LLPanelDeletableWearableListItem* create(LLViewerInventoryItem* item); + + virtual ~LLPanelDeletableWearableListItem() {}; + + /*virtual*/ BOOL postBuild(); + + /** + * Make button visible during mouse over event. + */ + inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } + +protected: + LLPanelDeletableWearableListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); +}; + /** * @class LLPanelClothingListItem * * Provides buttons for editing, moving, deleting a wearable. */ -class LLPanelClothingListItem : public LLPanelWearableListItem +class LLPanelClothingListItem : public LLPanelDeletableWearableListItem { LOG_CLASS(LLPanelClothingListItem); public: @@ -86,7 +109,6 @@ public: /** * Make button visible during mouse over event. */ - inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } inline void setShowMoveUpButton(bool show) { setShowWidget("btn_move_up", show); } inline void setShowMoveDownButton(bool show) { setShowWidget("btn_move_down", show); } @@ -125,28 +147,6 @@ protected: }; -class LLPanelDeletableWearableListItem : public LLPanelWearableListItem -{ - LOG_CLASS(LLPanelDeletableWearableListItem); -public: - - static LLPanelDeletableWearableListItem* create(LLViewerInventoryItem* item); - - virtual ~LLPanelDeletableWearableListItem(); - - /*virtual*/ BOOL postBuild(); - - /** - * Make button visible during mouse over event. - */ - inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } - -protected: - LLPanelDeletableWearableListItem(LLViewerInventoryItem* item); - - /*virtual*/ void init(); -}; - /** * @class LLPanelDummyClothingListItem * -- cgit v1.2.3