OpenMW
|
The companion item model keeps track of the companion's profit by monitoring which items are being added to and removed from the model. More...
#include <companionitemmodel.hpp>
Public Member Functions | |
CompanionItemModel (const MWWorld::Ptr &actor) | |
virtual MWWorld::Ptr | copyItem (const ItemStack &item, size_t count, bool setNewOwner) |
virtual void | removeItem (const ItemStack &item, size_t count) |
bool | hasProfit (const MWWorld::Ptr &actor) |
Public Member Functions inherited from MWGui::InventoryItemModel | |
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 | 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... | |
Additional Inherited Members | |
Public Types inherited from MWGui::ItemModel | |
typedef int | ModelIndex |
Protected Attributes inherited from MWGui::InventoryItemModel | |
MWWorld::Ptr | mActor |
The companion item model keeps track of the companion's profit by monitoring which items are being added to and removed from the model.
MWGui::CompanionItemModel::CompanionItemModel | ( | 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 "" |
Reimplemented from MWGui::InventoryItemModel.
bool MWGui::CompanionItemModel::hasProfit | ( | const MWWorld::Ptr & | actor | ) |
|
virtual |