1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 03:39:14 +00:00
OpenMW/apps/openmw/mwgui/itemselection.hpp

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

49 lines
1.0 KiB
C++
Raw Normal View History

#ifndef OPENMW_GAME_MWGUI_ITEMSELECTION_H
#define OPENMW_GAME_MWGUI_ITEMSELECTION_H
#include <MyGUI_Delegate.h>
#include "windowbase.hpp"
namespace MWWorld
{
class Ptr;
}
namespace MWGui
{
2013-05-11 16:38:27 +00:00
class ItemView;
class SortFilterItemModel;
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);
bool exit() override;
typedef MyGUI::delegates::MultiDelegate<> EventHandle_Void;
typedef MyGUI::delegates::MultiDelegate<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);
SortFilterItemModel* getSortModel() { return mSortModel; }
private:
2013-05-11 16:38:27 +00:00
ItemView* mItemView;
SortFilterItemModel* mSortModel;
2013-05-11 16:38:27 +00:00
void onSelectedItem(int index);
void onCancelButtonClicked(MyGUI::Widget* sender);
};
}
#endif