OpenMW
|
#include <sortfilteritemmodel.hpp>
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< ItemStack > | mItems |
std::vector< std::pair < MWWorld::Ptr, size_t > > | mDragItems |
int | mCategory |
int | mFilter |
bool | mShowEquipped |
MWGui::SortFilterItemModel::SortFilterItemModel | ( | ItemModel * | sourceModel | ) |
void MWGui::SortFilterItemModel::addDragItem | ( | const MWWorld::Ptr & | dragItem, |
size_t | count | ||
) |
Dragged items are not displayed.
bool MWGui::SortFilterItemModel::filterAccepts | ( | const ItemStack & | item | ) |
ItemStack MWGui::SortFilterItemModel::getItem | ( | ModelIndex | index | ) | [virtual] |
throws for invalid index
Implements MWGui::ItemModel.
size_t MWGui::SortFilterItemModel::getItemCount | ( | ) | [virtual] |
Implements MWGui::ItemModel.
void MWGui::SortFilterItemModel::setCategory | ( | int | category | ) |
void MWGui::SortFilterItemModel::setFilter | ( | int | filter | ) |
void MWGui::SortFilterItemModel::setShowEquipped | ( | bool | show | ) | [inline] |
void MWGui::SortFilterItemModel::update | ( | ) | [virtual] |
Implements MWGui::ItemModel.
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] |
const int MWGui::SortFilterItemModel::Filter_OnlyChargedSoulstones = (1<<3) [static] |
const int MWGui::SortFilterItemModel::Filter_OnlyEnchantable = (1<<2) [static] |
const int MWGui::SortFilterItemModel::Filter_OnlyEnchanted = (1<<1) [static] |
const int MWGui::SortFilterItemModel::Filter_OnlyIngredients = (1<<0) [static] |
int MWGui::SortFilterItemModel::mCategory [private] |
std::vector<std::pair<MWWorld::Ptr, size_t> > MWGui::SortFilterItemModel::mDragItems [private] |
int MWGui::SortFilterItemModel::mFilter [private] |
std::vector<ItemStack> MWGui::SortFilterItemModel::mItems [private] |
bool MWGui::SortFilterItemModel::mShowEquipped [private] |