summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-06-15 13:35:39 -0700
committerRichard Linden <none@none>2012-06-15 13:35:39 -0700
commit379eec8841212665881569c69804fafd96152387 (patch)
treec650962a4e75ecd9dc10f7ce966f3fe8d5b4b26e /indra/newview/llinventorypanel.h
parent86103dd5d40a685c3ba0ad385e6585e005785e50 (diff)
CHUI-101 WIP Make LLFolderView general purpose
continuing fixing build errors renamed llfoldervieweventlistener.h to llfolderviewmodel.h
Diffstat (limited to 'indra/newview/llinventorypanel.h')
-rw-r--r--indra/newview/llinventorypanel.h86
1 files changed, 49 insertions, 37 deletions
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 7cf82bf268..467c508aa0 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -39,25 +39,58 @@
#include "lluictrlfactory.h"
#include <set>
-class LLFolderView;
-class LLFolderViewFolder;
-class LLFolderViewItem;
-class LLInventoryFilter;
-class LLInventoryModel;
class LLInvFVBridge;
class LLInventoryFVBridgeBuilder;
-class LLMenuBarGL;
-class LLCheckBoxCtrl;
-class LLSpinCtrl;
-class LLTextBox;
-class LLIconCtrl;
-class LLSaveFolderState;
-class LLFilterEditor;
-class LLTabContainer;
class LLInvPanelComplObserver;
+class LLFolderViewModelItemInventory
+ : public LLFolderViewModelItemCommon
+{
+public:
+ virtual const LLUUID& getUUID() const = 0;
+ virtual time_t getCreationDate() const = 0; // UTC seconds
+ virtual void setCreationDate(time_t creation_date_utc) = 0;
+ virtual PermissionMask getPermissionMask() const = 0;
+ virtual LLFolderType::EType getPreferredType() const = 0;
+ virtual void showProperties(void) = 0;
+ virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual.
+ virtual BOOL isUpToDate() const = 0;
+ virtual bool hasChildren() const = 0;
+ virtual LLInventoryType::EType getInventoryType() const = 0;
+ virtual void performAction(LLInventoryModel* model, std::string action) = 0;
+ virtual LLWearableType::EType getWearableType() const = 0;
+ virtual EInventorySortGroup getSortGroup() const = 0;
+ virtual LLInventoryObject* getInventoryObject() const = 0;
+};
+
+class LLInventorySort
+{
+public:
+ LLInventorySort(U32 order)
+ : mSortOrder(0),
+ mByDate(false),
+ mSystemToTop(false),
+ mFoldersByName(false)
+ {
+ mSortOrder = order;
+ mByDate = (order & LLInventoryFilter::SO_DATE);
+ mSystemToTop = (order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP);
+ mFoldersByName = (order & LLInventoryFilter::SO_FOLDERS_BY_NAME);
+ }
+
+ bool isByDate() { return mByDate; }
+ U32 getSortOrder() { return mSortOrder; }
+
+ bool operator()(const LLFolderViewModelItemInventory* const& a, const LLFolderViewModelItemInventory* const& b);
+private:
+ U32 mSortOrder;
+ bool mByDate;
+ bool mSystemToTop;
+ bool mFoldersByName;
+};
+
class LLFolderViewModelInventory
-: public LLFolderViewModel<LLInventorySort, LLFolderViewModelItemInventory, LLFolderViewModelItemInventory, LLInventoryFilter>
+ : public LLFolderViewModel<LLInventorySort, LLFolderViewModelItemInventory, LLFolderViewModelItemInventory, LLInventoryFilter>
{
typedef LLFolderViewModel<LLInventorySort, LLFolderViewModelItemInventory, LLFolderViewModelItemInventory, LLInventoryFilter> base_t;
@@ -200,8 +233,8 @@ public:
void setSelectionByID(const LLUUID& obj_id, BOOL take_keyboard_focus);
void updateSelection();
- LLFolderViewModelInventory* getViewModel() { return &mViewModel; }
- const LLFolderViewModelInventory* getViewModel() const { return &mViewModel; }
+ LLFolderViewModelInventory* getFolderViewModel() { return &mViewModel; }
+ const LLFolderViewModelInventory* getFolderViewModel() const { return &mViewModel; }
protected:
void openStartFolderOrMyInventory(); // open the first level of inventory
@@ -276,25 +309,4 @@ private:
LLUUID mStartFolderID;
};
-class LLFolderViewModelItemInventory
- : public LLFolderViewModelItemCommon
-{
-public:
- virtual const LLUUID& getUUID() const = 0;
- virtual time_t getCreationDate() const = 0; // UTC seconds
- virtual void setCreationDate(time_t creation_date_utc) = 0;
- virtual PermissionMask getPermissionMask() const = 0;
- virtual LLFolderType::EType getPreferredType() const = 0;
- virtual void previewItem( void ) = 0;
- virtual void showProperties(void) = 0;
- virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual.
- virtual BOOL isUpToDate() const = 0;
- virtual BOOL hasChildren() const = 0;
- virtual LLInventoryType::EType getInventoryType() const = 0;
- virtual void performAction(LLInventoryModel* model, std::string action) = 0;
- virtual LLWearableType::EType getWearableType() const = 0;
- virtual EInventorySortGroup getSortGroup() const;
- virtual void requestSort(const LLInventorySort& sorter);
-};
-
#endif // LL_LLINVENTORYPANEL_H