OpenMW
apps/openmw/mwgui/itemselection.hpp
Go to the documentation of this file.
00001 #include "container.hpp"
00002 
00003 namespace MWGui
00004 {
00005     class ItemView;
00006     class SortFilterItemModel;
00007     class InventoryItemModel;
00008 
00009     class ItemSelectionDialog : public WindowModal
00010     {
00011     public:
00012         ItemSelectionDialog(const std::string& label);
00013 
00014         typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
00015         typedef MyGUI::delegates::CMultiDelegate1<MWWorld::Ptr> EventHandle_Item;
00016 
00017         EventHandle_Item eventItemSelected;
00018         EventHandle_Void eventDialogCanceled;
00019 
00020         void openContainer (const MWWorld::Ptr& container);
00021         void setCategory(int category);
00022         void setFilter(int filter);
00023 
00024     private:
00025         ItemView* mItemView;
00026         SortFilterItemModel* mSortModel;
00027         InventoryItemModel* mModel;
00028 
00029         void onSelectedItem(int index);
00030 
00031         void onCancelButtonClicked(MyGUI::Widget* sender);
00032     };
00033 
00034 }