LLInventoryFilter Class Reference

#include <llfolderview.h>

Collaboration diagram for LLInventoryFilter:

Collaboration graph
[legend]
List of all members.

Public Types

typedef enum LLInventoryFilter::e_folder_show EFolderShow
typedef enum LLInventoryFilter::e_filter_behavior EFilterBehavior
 SHOW_ALL_FOLDERS
 SHOW_NON_EMPTY_FOLDERS
 SHOW_NO_FOLDERS
 FILTER_NONE
 FILTER_RESTART
 FILTER_LESS_RESTRICTIVE
 FILTER_MORE_RESTRICTIVE
enum  e_folder_show { SHOW_ALL_FOLDERS, SHOW_NON_EMPTY_FOLDERS, SHOW_NO_FOLDERS }
enum  e_filter_behavior { FILTER_NONE, FILTER_RESTART, FILTER_LESS_RESTRICTIVE, FILTER_MORE_RESTRICTIVE }

Public Member Functions

 LLInventoryFilter (const LLString &name)
virtual ~LLInventoryFilter ()
void setFilterTypes (U32 types)
U32 getFilterTypes () const
void setFilterSubString (const LLString &string)
const LLString getFilterSubString (BOOL trim=FALSE)
void setFilterPermissions (PermissionMask perms)
PermissionMask getFilterPermissions () const
void setDateRange (U32 min_date, U32 max_date)
void setDateRangeLastLogoff (BOOL sl)
U32 getMinDate () const
U32 getMaxDate () const
void setHoursAgo (U32 hours)
U32 getHoursAgo () const
void setShowFolderState (EFolderShow state)
EFolderShow getShowFolderState ()
void setSortOrder (U32 order)
U32 getSortOrder ()
BOOL check (LLFolderViewItem *item)
std::string::size_type getStringMatchOffset () const
BOOL isActive ()
BOOL isNotDefault ()
BOOL isModified ()
BOOL isModifiedAndClear ()
BOOL isSinceLogoff ()
void clearModified ()
const LLString getName () const
LLString getFilterText ()
void setFilterCount (S32 count)
S32 getFilterCount ()
void decrementFilterCount ()
void markDefault ()
void resetDefault ()
BOOL isFilterWith (LLInventoryType::EType t)
S32 getCurrentGeneration () const
S32 getMinRequiredGeneration () const
S32 getMustPassGeneration () const
void setModified (EFilterBehavior behavior=FILTER_RESTART)
void toLLSD (LLSD &data)
void fromLLSD (LLSD &data)

Static Public Attributes

static const U32 SO_DATE = 1
static const U32 SO_FOLDERS_BY_NAME = 2
static const U32 SO_SYSTEM_FOLDERS_TO_TOP = 4

Protected Attributes

filter_ops mFilterOps
filter_ops mDefaultFilterOps
std::string::size_type mSubStringMatchOffset
LLString mFilterSubString
U32 mOrder
const LLString mName
S32 mFilterGeneration
S32 mMustPassGeneration
S32 mMinRequiredGeneration
S32 mFilterCount
S32 mNextFilterGeneration
EFilterBehavior mFilterBehavior

Private Attributes

U32 mLastLogoff
BOOL mModified
BOOL mNeedTextRebuild
LLString mFilterText

Classes

struct  filter_ops

Detailed Description

Definition at line 167 of file llfolderview.h.


Member Typedef Documentation

typedef enum LLInventoryFilter::e_filter_behavior LLInventoryFilter::EFilterBehavior

typedef enum LLInventoryFilter::e_folder_show LLInventoryFilter::EFolderShow


Member Enumeration Documentation

enum LLInventoryFilter::e_filter_behavior

Enumerator:
FILTER_NONE 
FILTER_RESTART 
FILTER_LESS_RESTRICTIVE 
FILTER_MORE_RESTRICTIVE 

Definition at line 177 of file llfolderview.h.

enum LLInventoryFilter::e_folder_show

Enumerator:
SHOW_ALL_FOLDERS 
SHOW_NON_EMPTY_FOLDERS 
SHOW_NO_FOLDERS 

Definition at line 170 of file llfolderview.h.


Constructor & Destructor Documentation

LLInventoryFilter::LLInventoryFilter ( const LLString name  ) 

---------------------------------------------------------------------------- Class LLInventoryFilter ----------------------------------------------------------------------------

Definition at line 4516 of file llfolderview.cpp.

References FILTER_NONE, LLControlGroup::getU32(), gSavedPerAccountSettings, mFilterBehavior, mFilterCount, mFilterGeneration, mFilterOps, mFilterSubString, LLInventoryFilter::filter_ops::mFilterTypes, LLInventoryFilter::filter_ops::mHoursAgo, mLastLogoff, LLInventoryFilter::filter_ops::mMaxDate, LLInventoryFilter::filter_ops::mMinDate, mMinRequiredGeneration, mMustPassGeneration, mNextFilterGeneration, mOrder, LLInventoryFilter::filter_ops::mPermissions, LLInventoryFilter::filter_ops::mShowFolderState, mSubStringMatchOffset, PERM_NONE, S32_MAX, SHOW_NON_EMPTY_FOLDERS, SO_FOLDERS_BY_NAME, and U32_MAX.

LLInventoryFilter::~LLInventoryFilter (  )  [virtual]

Definition at line 4542 of file llfolderview.cpp.


Member Function Documentation

BOOL LLInventoryFilter::check ( LLFolderViewItem item  ) 

Definition at line 4546 of file llfolderview.cpp.

References LLFolderViewEventListener::getCreationDate(), LLFolderViewEventListener::getInventoryType(), LLFolderViewItem::getListener(), LLFolderViewEventListener::getPermissionMask(), LLFolderViewItem::getSearchableLabel(), LLInventoryType::IT_NONE, mFilterOps, mFilterSubString, LLInventoryFilter::filter_ops::mFilterTypes, LLInventoryFilter::filter_ops::mHoursAgo, LLInventoryFilter::filter_ops::mMaxDate, LLInventoryFilter::filter_ops::mMinDate, LLInventoryFilter::filter_ops::mPermissions, mSubStringMatchOffset, and time_corrected().

void LLInventoryFilter::clearModified (  )  [inline]

Definition at line 222 of file llfolderview.h.

References FALSE, FILTER_NONE, mFilterBehavior, and mModified.

Referenced by LLFolderView::doIdle().

void LLInventoryFilter::decrementFilterCount (  )  [inline]

Definition at line 228 of file llfolderview.h.

References mFilterCount.

void LLInventoryFilter::fromLLSD ( LLSD data  ) 

Definition at line 5026 of file llfolderview.cpp.

References LLSD::has(), setDateRange(), setDateRangeLastLogoff(), setFilterPermissions(), setFilterSubString(), setFilterTypes(), setHoursAgo(), setShowFolderState(), and setSortOrder().

Referenced by LLInventoryView::init().

S32 LLInventoryFilter::getCurrentGeneration (  )  const [inline]

Definition at line 235 of file llfolderview.h.

References mFilterGeneration.

Referenced by LLFolderView::doIdle(), LLFolderView::draw(), LLFolderViewItem::draw(), and LLFolderViewFolder::hasFilteredDescendants().

S32 LLInventoryFilter::getFilterCount (  )  [inline]

Definition at line 227 of file llfolderview.h.

References mFilterCount.

PermissionMask LLInventoryFilter::getFilterPermissions (  )  const [inline]

Definition at line 199 of file llfolderview.h.

References mFilterOps, and LLInventoryFilter::filter_ops::mPermissions.

Referenced by LLFolderView::getFilterPermissions(), and toLLSD().

const LLString LLInventoryFilter::getFilterSubString ( BOOL  trim = FALSE  ) 

Definition at line 4568 of file llfolderview.cpp.

References mFilterSubString.

Referenced by LLFolderView::getFilterSubString(), toLLSD(), and LLInventoryViewFinder::updateElementsFromFilter().

LLString LLInventoryFilter::getFilterText (  ) 

Definition at line 4843 of file llfolderview.cpp.

References LLInventoryModel::backgroundFetchActive(), FALSE, gInventory, isFilterWith(), isSinceLogoff(), LLInventoryType::IT_ANIMATION, LLInventoryType::IT_ATTACHMENT, LLInventoryType::IT_CALLINGCARD, LLInventoryType::IT_GESTURE, LLInventoryType::IT_LANDMARK, LLInventoryType::IT_LSL, LLInventoryType::IT_NOTECARD, LLInventoryType::IT_OBJECT, LLInventoryType::IT_SNAPSHOT, LLInventoryType::IT_SOUND, LLInventoryType::IT_TEXTURE, LLInventoryType::IT_WEARABLE, mFilterText, mNeedTextRebuild, S32, and TRUE.

Referenced by LLInventoryView::setFilterTextFromFilter().

U32 LLInventoryFilter::getFilterTypes (  )  const [inline]

Definition at line 193 of file llfolderview.h.

References mFilterOps, and LLInventoryFilter::filter_ops::mFilterTypes.

Referenced by LLFolderView::getFilterTypes(), toLLSD(), and LLInventoryViewFinder::updateElementsFromFilter().

U32 LLInventoryFilter::getHoursAgo (  )  const [inline]

Definition at line 207 of file llfolderview.h.

References mFilterOps, and LLInventoryFilter::filter_ops::mHoursAgo.

Referenced by toLLSD(), and LLInventoryViewFinder::updateElementsFromFilter().

U32 LLInventoryFilter::getMaxDate (  )  const [inline]

Definition at line 204 of file llfolderview.h.

References mFilterOps, and LLInventoryFilter::filter_ops::mMaxDate.

Referenced by toLLSD().

U32 LLInventoryFilter::getMinDate (  )  const [inline]

Definition at line 203 of file llfolderview.h.

References mFilterOps, and LLInventoryFilter::filter_ops::mMinDate.

Referenced by toLLSD().

S32 LLInventoryFilter::getMinRequiredGeneration (  )  const [inline]

Definition at line 236 of file llfolderview.h.

References mMinRequiredGeneration.

Referenced by LLFolderView::arrange(), LLFolderView::doIdle(), LLFolderView::draw(), LLFolderViewItem::getFiltered(), LLFolderViewFolder::potentiallyVisible(), and LLFolderViewItem::potentiallyVisible().

S32 LLInventoryFilter::getMustPassGeneration (  )  const [inline]

Definition at line 237 of file llfolderview.h.

References mMustPassGeneration.

Referenced by LLFolderView::draw().

const LLString LLInventoryFilter::getName ( void   )  const [inline]

Definition at line 223 of file llfolderview.h.

References mName.

Referenced by LLInventoryView::init(), LLInventoryViewFinder::updateElementsFromFilter(), and LLInventoryView::~LLInventoryView().

EFolderShow LLInventoryFilter::getShowFolderState (  )  [inline]

Definition at line 210 of file llfolderview.h.

References mFilterOps, and LLInventoryFilter::filter_ops::mShowFolderState.

Referenced by LLInventoryPanel::getShowFolderState(), LLFolderView::getShowFolderState(), toLLSD(), and LLInventoryViewFinder::updateElementsFromFilter().

U32 LLInventoryFilter::getSortOrder (  )  [inline]

Definition at line 213 of file llfolderview.h.

References mOrder.

Referenced by toLLSD().

std::string::size_type LLInventoryFilter::getStringMatchOffset (  )  const

Definition at line 4573 of file llfolderview.cpp.

References mSubStringMatchOffset.

BOOL LLInventoryFilter::isActive (  ) 

Definition at line 4589 of file llfolderview.cpp.

References mFilterOps, mFilterSubString, LLInventoryFilter::filter_ops::mFilterTypes, LLInventoryFilter::filter_ops::mHoursAgo, LLInventoryFilter::filter_ops::mMaxDate, LLInventoryFilter::filter_ops::mMinDate, LLInventoryFilter::filter_ops::mPermissions, PERM_NONE, and U32_MAX.

Referenced by LLInventoryView::onFilterSelected().

BOOL LLInventoryFilter::isFilterWith ( LLInventoryType::EType  t  ) 

Definition at line 4838 of file llfolderview.cpp.

References mFilterOps, and LLInventoryFilter::filter_ops::mFilterTypes.

Referenced by getFilterText().

BOOL LLInventoryFilter::isModified (  ) 

Definition at line 4599 of file llfolderview.cpp.

References mModified.

Referenced by LLInventoryPanel::setSortOrder().

BOOL LLInventoryFilter::isModifiedAndClear (  ) 

Definition at line 4604 of file llfolderview.cpp.

References FALSE, and mModified.

BOOL LLInventoryFilter::isNotDefault (  ) 

Definition at line 4579 of file llfolderview.cpp.

References mDefaultFilterOps, mFilterOps, mFilterSubString, LLInventoryFilter::filter_ops::mFilterTypes, LLInventoryFilter::filter_ops::mHoursAgo, LLInventoryFilter::filter_ops::mMaxDate, LLInventoryFilter::filter_ops::mMinDate, and LLInventoryFilter::filter_ops::mPermissions.

Referenced by LLFolderView::doIdle(), LLFolderView::isFilterModified(), and setModified().

BOOL LLInventoryFilter::isSinceLogoff (  ) 

Definition at line 4720 of file llfolderview.cpp.

References mFilterOps, mLastLogoff, LLInventoryFilter::filter_ops::mMaxDate, LLInventoryFilter::filter_ops::mMinDate, and U32_MAX.

Referenced by getFilterText(), LLInventoryPanel::getSinceLogoff(), setDateRangeLastLogoff(), toLLSD(), and LLInventoryViewFinder::updateElementsFromFilter().

void LLInventoryFilter::markDefault (  ) 

Definition at line 4780 of file llfolderview.cpp.

References mDefaultFilterOps, and mFilterOps.

Referenced by LLInventoryView::init(), LLFloaterLandmark::LLFloaterLandmark(), LLFloaterNetwork2080::LLFloaterNetwork2080(), and LLFloaterTexturePicker::LLFloaterTexturePicker().

void LLInventoryFilter::resetDefault (  ) 

Definition at line 4785 of file llfolderview.cpp.

References mDefaultFilterOps, mFilterOps, and setModified().

Referenced by LLResetFilter::handleEvent().

void LLInventoryFilter::setDateRange ( U32  min_date,
U32  max_date 
)

Definition at line 4691 of file llfolderview.cpp.

References llmax(), mFilterOps, LLInventoryFilter::filter_ops::mHoursAgo, LLInventoryFilter::filter_ops::mMaxDate, LLInventoryFilter::filter_ops::mMinDate, and setModified().

Referenced by fromLLSD(), and setDateRangeLastLogoff().

void LLInventoryFilter::setDateRangeLastLogoff ( BOOL  sl  ) 

Definition at line 4706 of file llfolderview.cpp.

References isSinceLogoff(), mLastLogoff, setDateRange(), setModified(), and U32_MAX.

Referenced by fromLLSD(), and LLInventoryPanel::setSinceLogoff().

void LLInventoryFilter::setFilterCount ( S32  count  )  [inline]

Definition at line 226 of file llfolderview.h.

References mFilterCount.

void LLInventoryFilter::setFilterPermissions ( PermissionMask  perms  ) 

Definition at line 4666 of file llfolderview.cpp.

References FILTER_LESS_RESTRICTIVE, FILTER_MORE_RESTRICTIVE, FILTER_RESTART, mFilterOps, LLInventoryFilter::filter_ops::mPermissions, and setModified().

Referenced by fromLLSD(), LLInventoryPanel::setFilterPermMask(), and LLFolderView::setFilterPermMask().

void LLInventoryFilter::setFilterSubString ( const LLString string  ) 

Definition at line 4639 of file llfolderview.cpp.

References FILTER_LESS_RESTRICTIVE, FILTER_MORE_RESTRICTIVE, FILTER_RESTART, mFilterSubString, setModified(), LLStringBase< char >::toUpper(), and LLStringBase< char >::trimHead().

Referenced by fromLLSD(), and LLInventoryPanel::setFilterSubString().

void LLInventoryFilter::setFilterTypes ( U32  types  ) 

Definition at line 4611 of file llfolderview.cpp.

References FILTER_LESS_RESTRICTIVE, FILTER_MORE_RESTRICTIVE, FILTER_RESTART, mFilterOps, LLInventoryFilter::filter_ops::mFilterTypes, and setModified().

Referenced by fromLLSD(), and LLInventoryPanel::setFilterTypes().

void LLInventoryFilter::setHoursAgo ( U32  hours  ) 

Definition at line 4725 of file llfolderview.cpp.

References FILTER_LESS_RESTRICTIVE, FILTER_MORE_RESTRICTIVE, FILTER_RESTART, mFilterOps, LLInventoryFilter::filter_ops::mHoursAgo, LLInventoryFilter::filter_ops::mMaxDate, LLInventoryFilter::filter_ops::mMinDate, setModified(), and U32_MAX.

Referenced by fromLLSD(), and LLInventoryPanel::setHoursAgo().

void LLInventoryFilter::setModified ( EFilterBehavior  behavior = FILTER_RESTART  ) 

Definition at line 4791 of file llfolderview.cpp.

References FILTER_LESS_RESTRICTIVE, FILTER_MORE_RESTRICTIVE, FILTER_NONE, FILTER_RESTART, isNotDefault(), llendl, llerrs, llmin(), mFilterBehavior, mFilterGeneration, mMinRequiredGeneration, mModified, mMustPassGeneration, mNeedTextRebuild, mNextFilterGeneration, S32_MAX, and TRUE.

Referenced by resetDefault(), setDateRange(), setDateRangeLastLogoff(), setFilterPermissions(), setFilterSubString(), setFilterTypes(), setHoursAgo(), setShowFolderState(), and setSortOrder().

void LLInventoryFilter::setShowFolderState ( EFolderShow  state  ) 

Definition at line 4749 of file llfolderview.cpp.

References FILTER_LESS_RESTRICTIVE, FILTER_MORE_RESTRICTIVE, mFilterOps, LLInventoryFilter::filter_ops::mShowFolderState, setModified(), SHOW_ALL_FOLDERS, and SHOW_NON_EMPTY_FOLDERS.

Referenced by fromLLSD(), LLFloaterNetwork2080::LLFloaterNetwork2080(), LLPanelInventory::reset(), and LLInventoryPanel::setShowFolderState().

void LLInventoryFilter::setSortOrder ( U32  order  ) 

Definition at line 4771 of file llfolderview.cpp.

References mOrder, and setModified().

Referenced by fromLLSD(), LLFloaterNetwork2080::LLFloaterNetwork2080(), and LLInventoryPanel::setSortOrder().

void LLInventoryFilter::toLLSD ( LLSD data  ) 

Definition at line 5013 of file llfolderview.cpp.

References getFilterPermissions(), getFilterSubString(), getFilterTypes(), getHoursAgo(), getMaxDate(), getMinDate(), getShowFolderState(), getSortOrder(), and isSinceLogoff().

Referenced by LLInventoryView::~LLInventoryView().


Member Data Documentation

filter_ops LLInventoryFilter::mDefaultFilterOps [protected]

Definition at line 256 of file llfolderview.h.

Referenced by isNotDefault(), markDefault(), and resetDefault().

EFilterBehavior LLInventoryFilter::mFilterBehavior [protected]

Definition at line 266 of file llfolderview.h.

Referenced by clearModified(), LLInventoryFilter(), and setModified().

S32 LLInventoryFilter::mFilterCount [protected]

Definition at line 264 of file llfolderview.h.

Referenced by decrementFilterCount(), getFilterCount(), LLInventoryFilter(), and setFilterCount().

S32 LLInventoryFilter::mFilterGeneration [protected]

Definition at line 261 of file llfolderview.h.

Referenced by getCurrentGeneration(), LLInventoryFilter(), and setModified().

filter_ops LLInventoryFilter::mFilterOps [protected]

Definition at line 255 of file llfolderview.h.

Referenced by check(), getFilterPermissions(), getFilterTypes(), getHoursAgo(), getMaxDate(), getMinDate(), getShowFolderState(), isActive(), isFilterWith(), isNotDefault(), isSinceLogoff(), LLInventoryFilter(), markDefault(), resetDefault(), setDateRange(), setFilterPermissions(), setFilterTypes(), setHoursAgo(), and setShowFolderState().

LLString LLInventoryFilter::mFilterSubString [protected]

Definition at line 258 of file llfolderview.h.

Referenced by check(), getFilterSubString(), isActive(), isNotDefault(), LLInventoryFilter(), and setFilterSubString().

LLString LLInventoryFilter::mFilterText [private]

Definition at line 272 of file llfolderview.h.

Referenced by getFilterText().

U32 LLInventoryFilter::mLastLogoff [private]

Definition at line 269 of file llfolderview.h.

Referenced by isSinceLogoff(), LLInventoryFilter(), and setDateRangeLastLogoff().

S32 LLInventoryFilter::mMinRequiredGeneration [protected]

Definition at line 263 of file llfolderview.h.

Referenced by getMinRequiredGeneration(), LLInventoryFilter(), and setModified().

BOOL LLInventoryFilter::mModified [private]

Definition at line 270 of file llfolderview.h.

Referenced by clearModified(), isModified(), isModifiedAndClear(), and setModified().

S32 LLInventoryFilter::mMustPassGeneration [protected]

Definition at line 262 of file llfolderview.h.

Referenced by getMustPassGeneration(), LLInventoryFilter(), and setModified().

const LLString LLInventoryFilter::mName [protected]

Definition at line 260 of file llfolderview.h.

Referenced by getName().

BOOL LLInventoryFilter::mNeedTextRebuild [private]

Definition at line 271 of file llfolderview.h.

Referenced by getFilterText(), and setModified().

S32 LLInventoryFilter::mNextFilterGeneration [protected]

Definition at line 265 of file llfolderview.h.

Referenced by LLInventoryFilter(), and setModified().

U32 LLInventoryFilter::mOrder [protected]

Definition at line 259 of file llfolderview.h.

Referenced by getSortOrder(), LLInventoryFilter(), and setSortOrder().

std::string::size_type LLInventoryFilter::mSubStringMatchOffset [protected]

Definition at line 257 of file llfolderview.h.

Referenced by check(), getStringMatchOffset(), and LLInventoryFilter().

const U32 LLInventoryFilter::SO_DATE = 1 [static]

Definition at line 185 of file llfolderview.h.

Referenced by LLFolderView::checkTreeResortForModelChanged(), LLSetSortBy::handleEvent(), LLInventoryView::init(), LLFloaterNetwork2080::LLFloaterNetwork2080(), LLFolderViewFolder::sortBy(), and LLInventorySort::updateSort().

const U32 LLInventoryFilter::SO_FOLDERS_BY_NAME = 2 [static]

Definition at line 186 of file llfolderview.h.

Referenced by LLFloaterNetwork2080::addNode(), LLFolderView::checkTreeResortForModelChanged(), LLSetSortBy::handleEvent(), LLInventoryView::init(), LLInventoryFilter(), and LLInventorySort::updateSort().

const U32 LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP = 4 [static]

Definition at line 187 of file llfolderview.h.

Referenced by LLFloaterNetwork2080::addNode(), LLSetSortBy::handleEvent(), LLInventoryView::init(), and LLInventorySort::updateSort().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:25 2010 for Second Life Viewer by  doxygen 1.4.7