OpenMW
|
The pickpocket item model randomly hides item stacks based on a specified chance. Equipped items are always hidden. More...
#include <pickpocketitemmodel.hpp>
Public Member Functions | |
PickpocketItemModel (const MWWorld::Ptr &thief, ItemModel *sourceModel, bool hideItems=true) | |
virtual ItemStack | getItem (ModelIndex index) |
Throws for invalid index or out of range index. More... | |
virtual size_t | getItemCount () |
virtual void | update () |
Rebuild the item model, this will invalidate existing model indices. More... | |
virtual void | removeItem (const ItemStack &item, size_t count) |
virtual bool | allowedToInsertItems () const |
Is the player allowed to insert items into this model? (default true) More... | |
Public Member Functions inherited from MWGui::ProxyItemModel | |
ProxyItemModel () | |
virtual | ~ProxyItemModel () |
virtual MWWorld::Ptr | copyItem (const ItemStack &item, size_t count, bool setNewOwner=false) |
virtual ModelIndex | getIndex (ItemStack item) |
Returns an invalid index if the item was not found. More... | |
void | setSourceModel (ItemModel *sourceModel) |
ModelIndex | mapToSource (ModelIndex index) |
ModelIndex | mapFromSource (ModelIndex index) |
Public Member Functions inherited from MWGui::ItemModel | |
ItemModel () | |
virtual | ~ItemModel () |
virtual MWWorld::Ptr | moveItem (const ItemStack &item, size_t count, ItemModel *otherModel) |
Private Attributes | |
std::vector< ItemStack > | mHiddenItems |
std::vector< ItemStack > | mItems |
Additional Inherited Members | |
Public Types inherited from MWGui::ItemModel | |
typedef int | ModelIndex |
Protected Attributes inherited from MWGui::ProxyItemModel | |
ItemModel * | mSourceModel |
The pickpocket item model randomly hides item stacks based on a specified chance. Equipped items are always hidden.
MWGui::PickpocketItemModel::PickpocketItemModel | ( | const MWWorld::Ptr & | thief, |
ItemModel * | sourceModel, | ||
bool | hideItems = true |
||
) |
|
virtual |
Is the player allowed to insert items into this model? (default true)
Reimplemented from 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 |
Reimplemented from MWGui::ProxyItemModel.
|
virtual |
Rebuild the item model, this will invalidate existing model indices.
Implements MWGui::ItemModel.
|
private |
|
private |