OpenMW
|
The container item model supports multiple item sources, which are needed for making NPCs sell items from containers owned by them. More...
#include <containeritemmodel.hpp>
Public Member Functions | |
ContainerItemModel (const std::vector< MWWorld::Ptr > &itemSources, const std::vector< MWWorld::Ptr > &worldItems) | |
ContainerItemModel (const MWWorld::Ptr &source) | |
virtual ItemStack | getItem (ModelIndex index) |
throws for invalid index | |
virtual ModelIndex | getIndex (ItemStack item) |
virtual size_t | getItemCount () |
virtual void | copyItem (const ItemStack &item, size_t count) |
virtual void | removeItem (const ItemStack &item, size_t count) |
virtual void | update () |
Private Attributes | |
std::vector< MWWorld::Ptr > | mItemSources |
std::vector< MWWorld::Ptr > | mWorldItems |
std::vector< ItemStack > | mItems |
The container item model supports multiple item sources, which are needed for making NPCs sell items from containers owned by them.
MWGui::ContainerItemModel::ContainerItemModel | ( | const std::vector< MWWorld::Ptr > & | itemSources, |
const std::vector< MWWorld::Ptr > & | worldItems | ||
) |
MWGui::ContainerItemModel::ContainerItemModel | ( | const MWWorld::Ptr & | source | ) |
void MWGui::ContainerItemModel::copyItem | ( | const ItemStack & | item, |
size_t | count | ||
) | [virtual] |
Implements MWGui::ItemModel.
ItemModel::ModelIndex MWGui::ContainerItemModel::getIndex | ( | ItemStack | item | ) | [virtual] |
Implements MWGui::ItemModel.
ItemStack MWGui::ContainerItemModel::getItem | ( | ModelIndex | index | ) | [virtual] |
throws for invalid index
Implements MWGui::ItemModel.
size_t MWGui::ContainerItemModel::getItemCount | ( | ) | [virtual] |
Implements MWGui::ItemModel.
void MWGui::ContainerItemModel::removeItem | ( | const ItemStack & | item, |
size_t | count | ||
) | [virtual] |
Implements MWGui::ItemModel.
void MWGui::ContainerItemModel::update | ( | ) | [virtual] |
Implements MWGui::ItemModel.
std::vector<ItemStack> MWGui::ContainerItemModel::mItems [private] |
std::vector<MWWorld::Ptr> MWGui::ContainerItemModel::mItemSources [private] |
std::vector<MWWorld::Ptr> MWGui::ContainerItemModel::mWorldItems [private] |