summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-07-02 17:57:29 -0700
committerRichard Linden <none@none>2012-07-02 17:57:29 -0700
commit1bd52dfbdc3607bbd9ea86c715ce63b17d5a557f (patch)
tree6fffd9003c6c9f9a6421603f3552082ec7f12e4a /indra/newview/llinventorypanel.h
parent062cae9a4880f7672df7f6189e01b2bff15f42f1 (diff)
CHUI-101 WIP Make LLFolderView general purpose
refactored source files, moving logic into llfolderviewmodel*.cpp filter logic tweaks purging and moving inventory now properly cleans up view model
Diffstat (limited to 'indra/newview/llinventorypanel.h')
-rw-r--r--indra/newview/llinventorypanel.h78
1 files changed, 1 insertions, 77 deletions
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 3195d9a369..a62b97aa7d 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -31,6 +31,7 @@
#include "llassetstorage.h"
#include "lldarray.h"
#include "llfolderviewitem.h"
+#include "llfolderviewmodelinventory.h"
#include "llfloater.h"
#include "llinventory.h"
#include "llinventoryfilter.h"
@@ -42,83 +43,6 @@
class LLInvFVBridge;
class LLInventoryFVBridgeBuilder;
class LLInvPanelComplObserver;
-class LLFolderViewModelInventory;
-
-class LLFolderViewModelItemInventory
- : public LLFolderViewModelItemCommon
-{
-public:
- LLFolderViewModelItemInventory()
- : mRootViewModel(NULL)
- {}
- void setRootViewModel(LLFolderViewModelInventory* root_view_model)
- {
- mRootViewModel = root_view_model;
- }
- 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;
- virtual void requestSort();
- virtual bool potentiallyVisible();
- virtual bool passedFilter(S32 filter_generation = -1);
- virtual bool descendantsPassedFilter(S32 filter_generation = -1);
- virtual void setPassedFilter(bool filtered, bool filtered_folder, S32 filter_generation);
- virtual bool filter( LLFolderViewFilter& filter);
- virtual bool filterChildItem( LLFolderViewModelItem* item, LLFolderViewFilter& filter);
-protected:
- LLFolderViewModelInventory* mRootViewModel;
-};
-
-class LLInventorySort
-{
-public:
- LLInventorySort(U32 order = 0)
- : mSortOrder(order),
- mByDate(false),
- mSystemToTop(false),
- mFoldersByName(false)
- {
- mByDate = (order & LLInventoryFilter::SO_DATE);
- mSystemToTop = (order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP);
- mFoldersByName = (order & LLInventoryFilter::SO_FOLDERS_BY_NAME);
- }
-
- bool isByDate() const { return mByDate; }
- U32 getSortOrder() const { return mSortOrder; }
-
- bool operator()(const LLFolderViewModelItemInventory* const& a, const LLFolderViewModelItemInventory* const& b) const;
-private:
- U32 mSortOrder;
- bool mByDate;
- bool mSystemToTop;
- bool mFoldersByName;
-};
-
-class LLFolderViewModelInventory
- : public LLFolderViewModel<LLInventorySort, LLFolderViewModelItemInventory, LLFolderViewModelItemInventory, LLInventoryFilter>
-{
-public:
- typedef LLFolderViewModel<LLInventorySort, LLFolderViewModelItemInventory, LLFolderViewModelItemInventory, LLInventoryFilter> base_t;
-
- virtual ~LLFolderViewModelInventory() {}
-
- void sort(LLFolderViewFolder* folder);
-
- bool contentsReady();
-
-};
-
class LLInventoryPanel : public LLPanel
{