summaryrefslogtreecommitdiff
path: root/indra/newview/llwearableitemslist.h
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-06-29 20:07:33 +0300
committerSergei Litovchuk <slitovchuk@productengine.com>2010-06-29 20:07:33 +0300
commita7fba99d55f335f3f366cac351b782b803cdf349 (patch)
tree4aea46312faa29e23581283f1268ed22ca1a8117 /indra/newview/llwearableitemslist.h
parentb54fd9d6855c8547ce03beacf1ef04eb6396e75e (diff)
EXT-7676 FIXED Added items sorting from gear menu for 'Add Wearable'.
- Added new gear menu when 'Add Wearable' panel is open in 'Edit Outfit'. - Added wearable items list comparator to sort by wearable creation date. - Added storing sorting type in viewer settings. Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/661/. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llwearableitemslist.h')
-rw-r--r--indra/newview/llwearableitemslist.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index d16a2a89c8..b6d210b4fe 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -311,6 +311,19 @@ private:
};
/**
+ * @class LLWearableItemCreationDateComparator
+ *
+ * Comparator for sorting wearable list items by creation date (newest go first).
+ */
+class LLWearableItemCreationDateComparator : public LLWearableItemNameComparator
+{
+ LOG_CLASS(LLWearableItemCreationDateComparator);
+
+protected:
+ /*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* item1, const LLPanelInventoryListItemBase* item2) const;
+};
+
+/**
* @class LLWearableItemsList
*
* A flat list of wearable inventory items.
@@ -362,6 +375,13 @@ public:
Params();
};
+ typedef enum e_sort_order {
+ // Values should be compatible with InventorySortOrder setting.
+ E_SORT_BY_NAME = 0,
+ E_SORT_BY_MOST_RECENT = 1,
+ E_SORT_BY_TYPE = 2,
+ } ESortOrder;
+
virtual ~LLWearableItemsList();
/*virtual*/ void addNewItem(LLViewerInventoryItem* item, bool rearrange = true);
@@ -376,6 +396,10 @@ public:
bool isStandalone() const { return mIsStandalone; }
+ ESortOrder getSortOrder() const { return mSortOrder; }
+
+ void setSortOrder(ESortOrder sort_order, bool sort_now = true);
+
protected:
friend class LLUICtrlFactory;
LLWearableItemsList(const LLWearableItemsList::Params& p);
@@ -384,6 +408,8 @@ protected:
bool mIsStandalone;
bool mWornIndicationEnabled;
+
+ ESortOrder mSortOrder;
};
#endif //LL_LLWEARABLEITEMSLIST_H