OpenMW
|
#include <inventoryitemmodel.hpp>
Public Member Functions | |
InventoryItemModel (const MWWorld::Ptr &actor) | |
virtual ItemStack | getItem (ModelIndex index) |
Throws for invalid index or out of range index. More... | |
virtual ModelIndex | getIndex (ItemStack item) |
Returns an invalid index if the item was not found. More... | |
virtual size_t | getItemCount () |
virtual MWWorld::Ptr | copyItem (const ItemStack &item, size_t count, bool setNewOwner=false) |
virtual void | removeItem (const ItemStack &item, size_t count) |
virtual MWWorld::Ptr | moveItem (const ItemStack &item, size_t count, ItemModel *otherModel) |
Move items from this model to otherModel. More... | |
virtual void | update () |
Rebuild the item model, this will invalidate existing model indices. More... | |
Public Member Functions inherited from MWGui::ItemModel | |
ItemModel () | |
virtual | ~ItemModel () |
virtual bool | allowedToInsertItems () const |
Is the player allowed to insert items into this model? (default true) More... | |
Protected Attributes | |
MWWorld::Ptr | mActor |
Private Attributes | |
std::vector< ItemStack > | mItems |
Additional Inherited Members | |
Public Types inherited from MWGui::ItemModel | |
typedef int | ModelIndex |
MWGui::InventoryItemModel::InventoryItemModel | ( | const MWWorld::Ptr & | actor | ) |
|
virtual |
setNewOwner | If true, set the copied item's owner to the actor we are copying to, otherwise reset owner to "" |
Implements MWGui::ItemModel.
Reimplemented in MWGui::CompanionItemModel.
|
virtual |
Returns an invalid index if the item was not found.
Implements MWGui::ItemModel.
|
virtual |
Throws for invalid index or out of range index.
Implements MWGui::ItemModel.
|
virtual |
The number of items in the model, this specifies the range of indices you can pass to the getItem function (but this range is only valid until the next call to update())
Implements MWGui::ItemModel.
|
virtual |
Move items from this model to otherModel.
Reimplemented from MWGui::ItemModel.
|
virtual |
Implements MWGui::ItemModel.
Reimplemented in MWGui::CompanionItemModel.
|
virtual |
Rebuild the item model, this will invalidate existing model indices.
Implements MWGui::ItemModel.
|
protected |
|
private |