1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 20:19:56 +00:00
openmw-tes3mp/apps/openmw/mwgui/inventoryitemmodel.hpp

37 lines
951 B
C++
Raw Normal View History

2013-05-11 16:38:27 +00: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);
ItemStack getItem (ModelIndex index) override;
ModelIndex getIndex (ItemStack item) override;
size_t getItemCount() override;
2013-05-11 16:38:27 +00:00
bool onTakeItem(const MWWorld::Ptr &item, int count) override;
2017-10-04 18:37:08 +00:00
MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool allowAutoEquip = true) override;
void removeItem (const ItemStack& item, size_t count) override;
2013-05-11 16:38:27 +00:00
/// Move items from this model to \a otherModel.
MWWorld::Ptr moveItem (const ItemStack& item, size_t count, ItemModel* otherModel) override;
void update() override;
2013-05-11 16:38:27 +00:00
protected:
MWWorld::Ptr mActor;
private:
std::vector<ItemStack> mItems;
};
}
#endif