1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 21:35:24 +00:00
OpenMW/apps/openmw/mwgui/inventoryitemmodel.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1022 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);
ItemStack getItem(ModelIndex index) override;
2021-08-15 19:50:28 +02:00
ModelIndex getIndex(const ItemStack& item) override;
size_t getItemCount() override;
2013-05-11 18:38:27 +02:00
bool onTakeItem(const MWWorld::Ptr& item, int count) override;
2017-10-04 22:37:08 +04: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 18:38:27 +02: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 18:38:27 +02:00
bool usesContainer(const MWWorld::Ptr& container) override;
2013-05-11 18:38:27 +02:00
protected:
MWWorld::Ptr mActor;
2022-09-22 21:26:05 +03:00
2013-05-11 18:38:27 +02:00
private:
std::vector<ItemStack> mItems;
};
}
#endif