1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 03:32:36 +00:00
OpenMW/apps/openmw/mwgui/inventoryitemmodel.hpp

37 lines
939 B
C++
Raw Normal View History

2013-05-11 18:38:27 +02:00
#ifndef MWGUI_INVENTORY_ITEM_MODEL_H
#define MWGUI_INVENTORY_ITEM_MODEL_H
#include "itemmodel.hpp"
namespace MWGui
{
class InventoryItemModel : public ItemModel
{
public:
InventoryItemModel (const MWWorld::Ptr& actor);
virtual ItemStack getItem (ModelIndex index);
virtual ModelIndex getIndex (ItemStack item);
virtual size_t getItemCount();
2017-10-04 23:26:06 +04:00
virtual bool onTakeItem(const MWWorld::Ptr &item, int count);
2017-10-04 22:37:08 +04:00
virtual MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool setNewOwner=false);
2013-05-11 18:38:27 +02:00
virtual void removeItem (const ItemStack& item, size_t count);
/// Move items from this model to \a otherModel.
virtual MWWorld::Ptr moveItem (const ItemStack& item, size_t count, ItemModel* otherModel);
2013-05-11 18:38:27 +02:00
virtual void update();
protected:
MWWorld::Ptr mActor;
private:
std::vector<ItemStack> mItems;
};
}
#endif