1 #ifndef MWGUI_INVENTORY_ITEM_MODEL_H
2 #define MWGUI_INVENTORY_ITEM_MODEL_H
The base class that all item models should derive from.
Definition: itemmodel.hpp:43
virtual MWWorld::Ptr moveItem(const ItemStack &item, size_t count, ItemModel *otherModel)
Move items from this model to otherModel.
Definition: inventoryitemmodel.cpp:60
MWWorld::Ptr mActor
Definition: inventoryitemmodel.hpp:27
virtual size_t getItemCount()
Definition: inventoryitemmodel.cpp:24
virtual ModelIndex getIndex(ItemStack item)
Returns an invalid index if the item was not found.
Definition: inventoryitemmodel.cpp:29
A single item stack managed by an item model.
Definition: itemmodel.hpp:12
virtual void update()
Rebuild the item model, this will invalidate existing model indices.
Definition: inventoryitemmodel.cpp:71
InventoryItemModel(const MWWorld::Ptr &actor)
Definition: inventoryitemmodel.cpp:10
std::vector< ItemStack > mItems
Definition: inventoryitemmodel.hpp:29
virtual MWWorld::Ptr copyItem(const ItemStack &item, size_t count, bool setNewOwner=false)
Definition: inventoryitemmodel.cpp:41
virtual void removeItem(const ItemStack &item, size_t count)
Definition: inventoryitemmodel.cpp:49
virtual ItemStack getItem(ModelIndex index)
Throws for invalid index or out of range index.
Definition: inventoryitemmodel.cpp:15
Definition: inventoryitemmodel.hpp:9
Pointer to a LiveCellRef.
Definition: ptr.hpp:19