You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
951 B
C++
37 lines
951 B
C++
#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;
|
|
|
|
bool onTakeItem(const MWWorld::Ptr &item, int count) override;
|
|
|
|
MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool allowAutoEquip = true) override;
|
|
void removeItem (const ItemStack& item, size_t count) override;
|
|
|
|
/// Move items from this model to \a otherModel.
|
|
MWWorld::Ptr moveItem (const ItemStack& item, size_t count, ItemModel* otherModel) override;
|
|
|
|
void update() override;
|
|
|
|
protected:
|
|
MWWorld::Ptr mActor;
|
|
private:
|
|
std::vector<ItemStack> mItems;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|