OpenMW
Public Member Functions | Static Public Attributes | Private Attributes
MWGui::SortFilterItemModel Class Reference

#include <sortfilteritemmodel.hpp>

List of all members.

Public Member Functions

 SortFilterItemModel (ItemModel *sourceModel)
virtual void update ()
bool filterAccepts (const ItemStack &item)
virtual ItemStack getItem (ModelIndex index)
 throws for invalid index
virtual size_t getItemCount ()
void addDragItem (const MWWorld::Ptr &dragItem, size_t count)
 Dragged items are not displayed.
void clearDragItems ()
void setCategory (int category)
void setFilter (int filter)
void setShowEquipped (bool show)

Static Public Attributes

static const int Category_Weapon = (1<<1)
static const int Category_Apparel = (1<<2)
static const int Category_Misc = (1<<3)
static const int Category_Magic = (1<<4)
static const int Category_All = 255
static const int Filter_OnlyIngredients = (1<<0)
static const int Filter_OnlyEnchanted = (1<<1)
static const int Filter_OnlyEnchantable = (1<<2)
static const int Filter_OnlyChargedSoulstones = (1<<3)

Private Attributes

std::vector< ItemStackmItems
std::vector< std::pair
< MWWorld::Ptr, size_t > > 
mDragItems
int mCategory
int mFilter
bool mShowEquipped

Constructor & Destructor Documentation


Member Function Documentation

void MWGui::SortFilterItemModel::addDragItem ( const MWWorld::Ptr dragItem,
size_t  count 
)

Dragged items are not displayed.

throws for invalid index

Implements MWGui::ItemModel.

Implements MWGui::ItemModel.

void MWGui::SortFilterItemModel::setShowEquipped ( bool  show) [inline]

Implements MWGui::ItemModel.


Member Data Documentation

const int MWGui::SortFilterItemModel::Category_All = 255 [static]
const int MWGui::SortFilterItemModel::Category_Apparel = (1<<2) [static]
const int MWGui::SortFilterItemModel::Category_Magic = (1<<4) [static]
const int MWGui::SortFilterItemModel::Category_Misc = (1<<3) [static]
const int MWGui::SortFilterItemModel::Category_Weapon = (1<<1) [static]
std::vector<std::pair<MWWorld::Ptr, size_t> > MWGui::SortFilterItemModel::mDragItems [private]

The documentation for this class was generated from the following files: