1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +00:00
OpenMW/apps/openmw/mwgui/itemselection.hpp

42 lines
983 B
C++
Raw Normal View History

#ifndef OPENMW_GAME_MWGUI_ITEMSELECTION_H
#define OPENMW_GAME_MWGUI_ITEMSELECTION_H
#include "container.hpp"
namespace MWGui
{
2013-05-11 16:38:27 +00:00
class ItemView;
class SortFilterItemModel;
class InventoryItemModel;
2013-05-11 16:38:27 +00:00
class ItemSelectionDialog : public WindowModal
{
public:
2013-05-11 16:38:27 +00:00
ItemSelectionDialog(const std::string& label);
virtual void exit();
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
typedef MyGUI::delegates::CMultiDelegate1<MWWorld::Ptr> EventHandle_Item;
EventHandle_Item eventItemSelected;
EventHandle_Void eventDialogCanceled;
2013-05-11 16:38:27 +00:00
void openContainer (const MWWorld::Ptr& container);
void setCategory(int category);
void setFilter(int filter);
private:
2013-05-11 16:38:27 +00:00
ItemView* mItemView;
SortFilterItemModel* mSortModel;
InventoryItemModel* mModel;
2013-05-11 16:38:27 +00:00
void onSelectedItem(int index);
void onCancelButtonClicked(MyGUI::Widget* sender);
};
}
#endif