OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
MWGui::CompanionItemModel Class Reference

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>

Inheritance diagram for MWGui::CompanionItemModel:
Collaboration diagram for MWGui::CompanionItemModel:

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
 

Detailed Description

The companion item model keeps track of the companion's profit by monitoring which items are being added to and removed from the model.

Constructor & Destructor Documentation

MWGui::CompanionItemModel::CompanionItemModel ( const MWWorld::Ptr actor)

Member Function Documentation

MWWorld::Ptr MWGui::CompanionItemModel::copyItem ( const ItemStack item,
size_t  count,
bool  setNewOwner 
)
virtual
Parameters
setNewOwnerIf true, set the copied item's owner to the actor we are copying to, otherwise reset owner to ""

Reimplemented from MWGui::InventoryItemModel.

Here is the call graph for this function:

bool MWGui::CompanionItemModel::hasProfit ( const MWWorld::Ptr actor)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::CompanionItemModel::removeItem ( const ItemStack item,
size_t  count 
)
virtual

Reimplemented from MWGui::InventoryItemModel.

Here is the call graph for this function:


The documentation for this class was generated from the following files: