Skip to content
Snippets Groups Projects
Commit fbfc8517 authored by Sergei Litovchuk's avatar Sergei Litovchuk
Browse files

(EXT-6722) Create modified inventory view for "my outfits" tab in top-level...

(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
parent 4a975bd1
No related branches found
No related tags found
No related merge requests found
...@@ -329,7 +329,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view) ...@@ -329,7 +329,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(view); LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(view);
if(!accordion_tab) if(!accordion_tab)
return; return;
if(std::find(getChildList()->begin(),getChildList()->end(),accordion_tab) == getChildList()->end()) if(std::find(beginChild(), endChild(), accordion_tab) == endChild())
addChild(accordion_tab); addChild(accordion_tab);
mAccordionTabs.push_back(accordion_tab); mAccordionTabs.push_back(accordion_tab);
...@@ -343,7 +343,7 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view) ...@@ -343,7 +343,7 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
if(!accordion_tab) if(!accordion_tab)
return; return;
if(std::find(getChildList()->begin(),getChildList()->end(),accordion_tab) != getChildList()->end()) if(std::find(beginChild(), endChild(), accordion_tab) != endChild())
removeChild(accordion_tab); removeChild(accordion_tab);
for (std::vector<LLAccordionCtrlTab*>::iterator iter = mAccordionTabs.begin(); for (std::vector<LLAccordionCtrlTab*>::iterator iter = mAccordionTabs.begin();
......
...@@ -554,6 +554,7 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info) ...@@ -554,6 +554,7 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info)
} }
//LLAccordionCtrl should rearrange accodion tab if one of accordion change its size //LLAccordionCtrl should rearrange accodion tab if one of accordion change its size
if (getParent()) // A parent may not be set if tabs are added dynamically.
getParent()->notifyParent(info); getParent()->notifyParent(info);
return 1; return 1;
} }
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
* @file llinventoryitemslist.cpp * @file llinventoryitemslist.cpp
* @brief A list of inventory items represented by LLFlatListView. * @brief A list of inventory items represented by LLFlatListView.
* *
* Class LLInventoryItemsList implements a flat list of inventory items.
* Class LLPanelInventoryListItem displays inventory item as an element
* of LLInventoryItemsList.
*
* $LicenseInfo:firstyear=2010&license=viewergpl$ * $LicenseInfo:firstyear=2010&license=viewergpl$
* *
* Copyright (c) 2010, Linden Research, Inc. * Copyright (c) 2010, Linden Research, Inc.
...@@ -39,33 +43,31 @@ ...@@ -39,33 +43,31 @@
#include "lliconctrl.h" #include "lliconctrl.h"
#include "llinventoryfunctions.h" #include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "lltextutil.h" #include "lltextutil.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
LLPanelInventoryItem::LLPanelInventoryItem(LLAssetType::EType asset_type, // static
LLInventoryType::EType inventory_type, LLPanelInventoryListItem* LLPanelInventoryListItem::createItemPanel(const LLViewerInventoryItem* item)
U32 wearable_type,
const std::string &item_name,
const std::string &hl)
: LLPanel()
,mItemName(item_name)
,mHighlightedText(hl)
,mIcon(NULL)
,mTitle(NULL)
{ {
mItemIcon = get_item_icon(asset_type, inventory_type, wearable_type, FALSE); if (item)
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml"); return new LLPanelInventoryListItem(item);
}
else
{
return NULL;
}
} }
LLPanelInventoryItem::~LLPanelInventoryItem() LLPanelInventoryListItem::~LLPanelInventoryListItem()
{} {}
//virtual //virtual
BOOL LLPanelInventoryItem::postBuild() BOOL LLPanelInventoryListItem::postBuild()
{ {
mIcon = getChild<LLIconCtrl>("item_icon"); mIcon = getChild<LLIconCtrl>("item_icon");
mTitle = getChild<LLTextBox>("item_name"); mTitle = getChild<LLTextBox>("item_name");
...@@ -76,14 +78,14 @@ BOOL LLPanelInventoryItem::postBuild() ...@@ -76,14 +78,14 @@ BOOL LLPanelInventoryItem::postBuild()
} }
//virtual //virtual
void LLPanelInventoryItem::setValue(const LLSD& value) void LLPanelInventoryListItem::setValue(const LLSD& value)
{ {
if (!value.isMap()) return; if (!value.isMap()) return;
if (!value.has("selected")) return; if (!value.has("selected")) return;
childSetVisible("selected_icon", value["selected"]); childSetVisible("selected_icon", value["selected"]);
} }
void LLPanelInventoryItem::updateItem() void LLPanelInventoryListItem::updateItem()
{ {
if (mItemIcon.notNull()) if (mItemIcon.notNull())
mIcon->setImage(mItemIcon); mIcon->setImage(mItemIcon);
...@@ -95,28 +97,47 @@ void LLPanelInventoryItem::updateItem() ...@@ -95,28 +97,47 @@ void LLPanelInventoryItem::updateItem()
mHighlightedText); mHighlightedText);
} }
void LLPanelInventoryItem::onMouseEnter(S32 x, S32 y, MASK mask) void LLPanelInventoryListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{ {
childSetVisible("hovered_icon", true); childSetVisible("hovered_icon", true);
LLPanel::onMouseEnter(x, y, mask); LLPanel::onMouseEnter(x, y, mask);
} }
void LLPanelInventoryItem::onMouseLeave(S32 x, S32 y, MASK mask) void LLPanelInventoryListItem::onMouseLeave(S32 x, S32 y, MASK mask)
{ {
childSetVisible("hovered_icon", false); childSetVisible("hovered_icon", false);
LLPanel::onMouseLeave(x, y, mask); LLPanel::onMouseLeave(x, y, mask);
} }
LLPanelInventoryListItem::LLPanelInventoryListItem(const LLViewerInventoryItem* item)
: LLPanel()
,mIcon(NULL)
,mTitle(NULL)
{
mItemName = item->getName();
mItemIcon = get_item_icon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE);
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml");
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
LLInventoryItemsList::LLInventoryItemsList(const LLFlatListView::Params& p) LLInventoryItemsList::Params::Params()
{}
LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p)
: LLFlatListView(p) : LLFlatListView(p)
, mNeedsRefresh(false) , mNeedsRefresh(false)
{} {
// TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView
// but reset to true in all derived classes. This settings might need to
// be added to LLFlatListView::Params() and/or set to "true" by default.
setCommitOnSelectionChange(true);
}
// virtual // virtual
LLInventoryItemsList::~LLInventoryItemsList() LLInventoryItemsList::~LLInventoryItemsList()
...@@ -196,10 +217,15 @@ void LLInventoryItemsList::computeDifference( ...@@ -196,10 +217,15 @@ void LLInventoryItemsList::computeDifference(
void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item) void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item)
{ {
llassert(item); if (!item)
{
llwarns << "No inventory item. Couldn't create flat list item." << llendl;
llassert(!"No inventory item. Couldn't create flat list item.");
}
LLPanelInventoryItem *list_item = new LLPanelInventoryItem(item->getType(), LLPanelInventoryListItem *list_item = LLPanelInventoryListItem::createItemPanel(item);
item->getInventoryType(), item->getFlags(), item->getName(), LLStringUtil::null); if (!list_item)
return;
if (!addItem(list_item, item->getUUID())) if (!addItem(list_item, item->getUUID()))
{ {
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
* @file llinventoryitemslist.h * @file llinventoryitemslist.h
* @brief A list of inventory items represented by LLFlatListView. * @brief A list of inventory items represented by LLFlatListView.
* *
* Class LLInventoryItemsList implements a flat list of inventory items.
* Class LLPanelInventoryListItem displays inventory item as an element
* of LLInventoryItemsList.
*
* $LicenseInfo:firstyear=2010&license=viewergpl$ * $LicenseInfo:firstyear=2010&license=viewergpl$
* *
* Copyright (c) 2010, Linden Research, Inc. * Copyright (c) 2010, Linden Research, Inc.
...@@ -32,28 +36,23 @@ ...@@ -32,28 +36,23 @@
#ifndef LL_LLINVENTORYITEMSLIST_H #ifndef LL_LLINVENTORYITEMSLIST_H
#define LL_LLINVENTORYITEMSLIST_H #define LL_LLINVENTORYITEMSLIST_H
#include "llpanel.h" #include "lldarray.h"
#include "llassettype.h"
#include "llinventorytype.h" #include "llpanel.h"
// newview // newview
#include "llflatlistview.h" #include "llflatlistview.h"
#include "llinventorymodel.h"
class LLIconCtrl; class LLIconCtrl;
class LLTextBox; class LLTextBox;
class LLViewerInventoryItem;
class LLPanelInventoryItem : public LLPanel class LLPanelInventoryListItem : public LLPanel
{ {
public: public:
LLPanelInventoryItem(LLAssetType::EType asset_type, static LLPanelInventoryListItem* createItemPanel(const LLViewerInventoryItem* item);
LLInventoryType::EType inventory_type,
U32 wearable_type, virtual ~LLPanelInventoryListItem();
const std::string &item_name,
const std::string &hl);
virtual ~LLPanelInventoryItem();
/*virtual*/ BOOL postBuild(); /*virtual*/ BOOL postBuild();
/*virtual*/ void setValue(const LLSD& value); /*virtual*/ void setValue(const LLSD& value);
...@@ -63,6 +62,9 @@ class LLPanelInventoryItem : public LLPanel ...@@ -63,6 +62,9 @@ class LLPanelInventoryItem : public LLPanel
void onMouseEnter(S32 x, S32 y, MASK mask); void onMouseEnter(S32 x, S32 y, MASK mask);
void onMouseLeave(S32 x, S32 y, MASK mask); void onMouseLeave(S32 x, S32 y, MASK mask);
protected:
LLPanelInventoryListItem(const LLViewerInventoryItem* item);
private: private:
LLIconCtrl* mIcon; LLIconCtrl* mIcon;
LLTextBox* mTitle; LLTextBox* mTitle;
...@@ -72,13 +74,17 @@ class LLPanelInventoryItem : public LLPanel ...@@ -72,13 +74,17 @@ class LLPanelInventoryItem : public LLPanel
std::string mHighlightedText; std::string mHighlightedText;
}; };
class LLInventoryItemsList : public LLFlatListView class LLInventoryItemsList : public LLFlatListView
{ {
public: public:
struct Params : public LLInitParam::Block<Params, LLFlatListView::Params>
{
Params();
};
virtual ~LLInventoryItemsList(); virtual ~LLInventoryItemsList();
void refreshList(const LLInventoryModel::item_array_t item_array); void refreshList(const LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array);
/** /**
* Let list know items need to be refreshed in next draw() * Let list know items need to be refreshed in next draw()
...@@ -91,7 +97,7 @@ class LLInventoryItemsList : public LLFlatListView ...@@ -91,7 +97,7 @@ class LLInventoryItemsList : public LLFlatListView
protected: protected:
friend class LLUICtrlFactory; friend class LLUICtrlFactory;
LLInventoryItemsList(const LLFlatListView::Params& p); LLInventoryItemsList(const LLInventoryItemsList::Params& p);
uuid_vec_t& getIDs() { return mIDs; } uuid_vec_t& getIDs() { return mIDs; }
......
...@@ -658,11 +658,13 @@ void LLInventoryCategoriesObserver::changed(U32 mask) ...@@ -658,11 +658,13 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
for (category_map_t::iterator iter = mCategoryMap.begin(); for (category_map_t::iterator iter = mCategoryMap.begin();
iter != mCategoryMap.end(); iter != mCategoryMap.end();
iter++) ++iter)
{ {
// Inventory category version is used to find out if some changes LLViewerInventoryCategory* category = gInventory.getCategory((*iter).first);
// to a category have been made. if (!category)
S32 version = gInventory.getCategory((*iter).first)->getVersion(); continue;
S32 version = category->getVersion();
if (version != (*iter).second.mVersion) if (version != (*iter).second.mVersion)
{ {
// Update category version in map. // Update category version in map.
...@@ -674,11 +676,27 @@ void LLInventoryCategoriesObserver::changed(U32 mask) ...@@ -674,11 +676,27 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
void LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb) void LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb)
{ {
S32 version = gInventory.getCategory(cat_id)->getVersion(); S32 version;
LLViewerInventoryCategory* category = gInventory.getCategory(cat_id);
if (category)
{
// Inventory category version is used to find out if some changes
// to a category have been made.
version = category->getVersion();
}
else
{
// If category could not be retrieved it might mean that
// inventory is unusable at the moment so the category is
// stored with VERSION_UNKNOWN and it may be updated later.
version = LLViewerInventoryCategory::VERSION_UNKNOWN;
}
version = category->getVersion();
mCategoryMap.insert(category_map_value_t(cat_id, LLCategoryData(cb, version))); mCategoryMap.insert(category_map_value_t(cat_id, LLCategoryData(cb, version)));
} }
void LLInventoryCategoriesObserver::removeCategory(const LLUUID& cat_id) void LLInventoryCategoriesObserver::removeCategory(const LLUUID& cat_id)
{ {
mCategoryMap.erase(mCategoryMap.find(cat_id)); mCategoryMap.erase(cat_id);
} }
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
#include "lloutfitslist.h" #include "lloutfitslist.h"
// llcommon
#include "llcommonutils.h"
#include "llaccordionctrl.h" #include "llaccordionctrl.h"
#include "llaccordionctrltab.h" #include "llaccordionctrltab.h"
#include "llinventoryfunctions.h" #include "llinventoryfunctions.h"
...@@ -45,7 +48,12 @@ LLOutfitsList::LLOutfitsList() ...@@ -45,7 +48,12 @@ LLOutfitsList::LLOutfitsList()
: LLPanel() : LLPanel()
, mAccordion(NULL) , mAccordion(NULL)
, mListCommands(NULL) , mListCommands(NULL)
{} {
mCategoriesObserver = new LLInventoryCategoriesObserver();
gInventory.addObserver(mCategoriesObserver);
gInventory.addObserver(this);
}
LLOutfitsList::~LLOutfitsList() LLOutfitsList::~LLOutfitsList()
{ {
...@@ -65,11 +73,6 @@ BOOL LLOutfitsList::postBuild() ...@@ -65,11 +73,6 @@ BOOL LLOutfitsList::postBuild()
{ {
mAccordion = getChild<LLAccordionCtrl>("outfits_accordion"); mAccordion = getChild<LLAccordionCtrl>("outfits_accordion");
mCategoriesObserver = new LLInventoryCategoriesObserver();
gInventory.addObserver(mCategoriesObserver);
gInventory.addObserver(this);
return TRUE; return TRUE;
} }
...@@ -79,15 +82,15 @@ void LLOutfitsList::changed(U32 mask) ...@@ -79,15 +82,15 @@ void LLOutfitsList::changed(U32 mask)
if (!gInventory.isInventoryUsable()) if (!gInventory.isInventoryUsable())
return; return;
// Start observing changes in "My Outfits" category.
const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
mCategoriesObserver->addCategory(outfits,
boost::bind(&LLOutfitsList::refreshList, this, outfits));
LLViewerInventoryCategory* category = gInventory.getCategory(outfits); LLViewerInventoryCategory* category = gInventory.getCategory(outfits);
if (!category) if (!category)
return; return;
// Start observing changes in "My Outfits" category.
mCategoriesObserver->addCategory(outfits,
boost::bind(&LLOutfitsList::refreshList, this, outfits));
// Fetch "My Outfits" contents and refresh the list to display // Fetch "My Outfits" contents and refresh the list to display
// initially fetched items. If not all items are fetched now // initially fetched items. If not all items are fetched now
// the observer will refresh the list as soon as the new items // the observer will refresh the list as soon as the new items
...@@ -121,7 +124,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) ...@@ -121,7 +124,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
// Creating a vector of newly collected sub-categories UUIDs. // Creating a vector of newly collected sub-categories UUIDs.
for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin(); for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin();
iter != cat_array.end(); iter != cat_array.end();
iter++) ++iter)
{ {
vnew.push_back((*iter)->getUUID()); vnew.push_back((*iter)->getUUID());
} }
...@@ -131,35 +134,21 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) ...@@ -131,35 +134,21 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
// Creating a vector of currently displayed sub-categories UUIDs. // Creating a vector of currently displayed sub-categories UUIDs.
for (outfits_map_t::const_iterator iter = mOutfitsMap.begin(); for (outfits_map_t::const_iterator iter = mOutfitsMap.begin();
iter != mOutfitsMap.end(); iter != mOutfitsMap.end();
iter++) ++iter)
{ {
vcur.push_back((*iter).first); vcur.push_back((*iter).first);
} }
// Sorting both vectors to compare.
std::sort(vcur.begin(), vcur.end());
std::sort(vnew.begin(), vnew.end());
uuid_vec_t vadded; uuid_vec_t vadded;
uuid_vec_t vremoved; uuid_vec_t vremoved;
uuid_vec_t::iterator it; // Create added and removed items vectors.
size_t maxsize = llmax(vcur.size(), vnew.size()); LLCommonUtils::computeDifference(vnew, vcur, vadded, vremoved);
vadded.resize(maxsize);
vremoved.resize(maxsize);
// what to remove
it = set_difference(vcur.begin(), vcur.end(), vnew.begin(), vnew.end(), vremoved.begin());
vremoved.erase(it, vremoved.end());
// what to add
it = set_difference(vnew.begin(), vnew.end(), vcur.begin(), vcur.end(), vadded.begin());
vadded.erase(it, vadded.end());
// Handle added tabs. // Handle added tabs.
for (uuid_vec_t::const_iterator iter = vadded.begin(); for (uuid_vec_t::const_iterator iter = vadded.begin();
iter != vadded.end(); iter != vadded.end();
iter++) ++iter)
{ {
const LLUUID cat_id = (*iter); const LLUUID cat_id = (*iter);
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
...@@ -185,6 +174,9 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) ...@@ -185,6 +174,9 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
LLWearableItemsList* list = tab->getChild<LLWearableItemsList>("wearable_items_list"); LLWearableItemsList* list = tab->getChild<LLWearableItemsList>("wearable_items_list");
mCategoriesObserver->addCategory(cat_id, boost::bind(&LLWearableItemsList::updateList, list, cat_id)); mCategoriesObserver->addCategory(cat_id, boost::bind(&LLWearableItemsList::updateList, list, cat_id));
// Setting drop down callback to monitor currently selected outfit.
tab->setDropDownStateChangedCallback(boost::bind(&LLOutfitsList::onTabExpandedCollapsed, this, list));
// Fetch the new outfit contents. // Fetch the new outfit contents.
cat->fetch(); cat->fetch();
...@@ -252,6 +244,14 @@ void LLOutfitsList::updateOutfitTab(const LLUUID& category_id) ...@@ -252,6 +244,14 @@ void LLOutfitsList::updateOutfitTab(const LLUUID& category_id)
} }
} }
void LLOutfitsList::onTabExpandedCollapsed(LLWearableItemsList* list)
{
if (!list)
return;
// TODO: Add outfit selection handling.
}
void LLOutfitsList::setFilterSubString(const std::string& string) void LLOutfitsList::setFilterSubString(const std::string& string)
{ {
mFilterSubString = string; mFilterSubString = string;
......
...@@ -41,6 +41,17 @@ class LLAccordionCtrl; ...@@ -41,6 +41,17 @@ class LLAccordionCtrl;
class LLAccordionCtrlTab; class LLAccordionCtrlTab;
class LLWearableItemsList; class LLWearableItemsList;
/**
* @class LLOutfitsList
*
* A list of agents's outfits from "My Outfits" inventory category
* which displays each outfit in an accordion tab with a flat list
* of items inside it.
* Uses LLInventoryCategoriesObserver to monitor changes to "My Outfits"
* inventory category and refresh the outfits listed in it.
* This class is derived from LLInventoryObserver to know when inventory
* becomes usable and it is safe to request data from inventory model.
*/
class LLOutfitsList : public LLPanel, public LLInventoryObserver class LLOutfitsList : public LLPanel, public LLInventoryObserver
{ {
public: public:
...@@ -56,6 +67,8 @@ class LLOutfitsList : public LLPanel, public LLInventoryObserver ...@@ -56,6 +67,8 @@ class LLOutfitsList : public LLPanel, public LLInventoryObserver
// Update tab displaying outfit identified by category_id. // Update tab displaying outfit identified by category_id.
void updateOutfitTab(const LLUUID& category_id); void updateOutfitTab(const LLUUID& category_id);
void onTabExpandedCollapsed(LLWearableItemsList* list);
void setFilterSubString(const std::string& string); void setFilterSubString(const std::string& string);
private: private:
......
...@@ -62,7 +62,10 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat, ...@@ -62,7 +62,10 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat,
static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list"); static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list");
LLWearableItemsList::LLWearableItemsList(const LLFlatListView::Params& p) LLWearableItemsList::Params::Params()
{}
LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p)
: LLInventoryItemsList(p) : LLInventoryItemsList(p)
{} {}
......
...@@ -34,23 +34,32 @@ ...@@ -34,23 +34,32 @@
#include "llpanel.h" #include "llpanel.h"
#include "llassettype.h"
#include "llinventorytype.h"
// newview // newview
#include "llinventoryitemslist.h" #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 class LLWearableItemsList : public LLInventoryItemsList
{ {
public: public:
struct Params : public LLInitParam::Block<Params, LLInventoryItemsList::Params>
{
Params();
};
virtual ~LLWearableItemsList(); virtual ~LLWearableItemsList();
void updateList(const LLUUID& category_id); void updateList(const LLUUID& category_id);
protected: protected:
friend class LLUICtrlFactory; friend class LLUICtrlFactory;
LLWearableItemsList(const LLFlatListView::Params& p); LLWearableItemsList(const LLWearableItemsList::Params& p);
}; };
#endif //LL_LLWEARABLEITEMSLIST_H #endif //LL_LLWEARABLEITEMSLIST_H
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> <!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder-->
<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume--> <!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtime-->
<accordion_tab <accordion_tab
display_children="false" display_children="false"
follows="all" follows="all"
height="40" height="45"
layout="topleft" layout="topleft"
name="Mockup Tab" name="Mockup Tab"
title="Mockup Tab" title="Mockup Tab"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment