OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
MWGui::WorldItemModel Class Reference
Inheritance diagram for MWGui::WorldItemModel:
Collaboration diagram for MWGui::WorldItemModel:

Public Member Functions

 WorldItemModel (float left, float top)
 
virtual ~WorldItemModel ()
 
virtual MWWorld::Ptr copyItem (const ItemStack &item, size_t count, bool setNewOwner=false)
 
virtual void removeItem (const ItemStack &item, size_t count)
 
virtual ModelIndex getIndex (ItemStack item)
 Returns an invalid index if the item was not found. More...
 
virtual void update ()
 Rebuild the item model, this will invalidate existing model indices. More...
 
virtual size_t getItemCount ()
 
virtual ItemStack getItem (ModelIndex index)
 Throws for invalid index or out of range index. More...
 
- Public Member Functions inherited from MWGui::ItemModel
 ItemModel ()
 
virtual ~ItemModel ()
 
virtual MWWorld::Ptr moveItem (const ItemStack &item, size_t count, ItemModel *otherModel)
 
virtual bool allowedToInsertItems () const
 Is the player allowed to insert items into this model? (default true) More...
 

Private Attributes

float mLeft
 
float mTop
 

Additional Inherited Members

- Public Types inherited from MWGui::ItemModel
typedef int ModelIndex
 

Detailed Description

Makes it possible to use ItemModel::moveItem to move an item from an inventory to the world.

Constructor & Destructor Documentation

MWGui::WorldItemModel::WorldItemModel ( float  left,
float  top 
)
inline
virtual MWGui::WorldItemModel::~WorldItemModel ( )
inlinevirtual

Member Function Documentation

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

Implements MWGui::ItemModel.

Here is the call graph for this function:

virtual ModelIndex MWGui::WorldItemModel::getIndex ( ItemStack  item)
inlinevirtual

Returns an invalid index if the item was not found.

Implements MWGui::ItemModel.

virtual ItemStack MWGui::WorldItemModel::getItem ( ModelIndex  index)
inlinevirtual

Throws for invalid index or out of range index.

Implements MWGui::ItemModel.

virtual size_t MWGui::WorldItemModel::getItemCount ( )
inlinevirtual

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 void MWGui::WorldItemModel::removeItem ( const ItemStack item,
size_t  count 
)
inlinevirtual

Implements MWGui::ItemModel.

virtual void MWGui::WorldItemModel::update ( )
inlinevirtual

Rebuild the item model, this will invalidate existing model indices.

Implements MWGui::ItemModel.

Member Data Documentation

float MWGui::WorldItemModel::mLeft
private
float MWGui::WorldItemModel::mTop
private

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