OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
alchemywindow.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_ALCHEMY_H
2 #define MWGUI_ALCHEMY_H
3 
4 #include <vector>
5 
6 #include "widgets.hpp"
7 #include "windowbase.hpp"
8 
9 namespace MWMechanics
10 {
11  class Alchemy;
12 }
13 
14 namespace MWGui
15 {
16  class ItemView;
17  class ItemWidget;
18  class SortFilterItemModel;
19 
20  class AlchemyWindow : public WindowBase
21  {
22  public:
23  AlchemyWindow();
24 
25  virtual void open();
26  virtual void exit();
27 
28  private:
29  std::string mSuggestedPotionName;
30 
33 
34  MyGUI::Button* mCreateButton;
35  MyGUI::Button* mCancelButton;
36 
37  MyGUI::Widget* mEffectsBox;
38 
39  MyGUI::EditBox* mNameEdit;
40 
41  void onCancelButtonClicked(MyGUI::Widget* _sender);
42  void onCreateButtonClicked(MyGUI::Widget* _sender);
43  void onIngredientSelected(MyGUI::Widget* _sender);
44 
45  void onSelectedItem(int index);
46 
47  void removeIngredient(MyGUI::Widget* ingredient);
48 
49  void update();
50 
51  std::auto_ptr<MWMechanics::Alchemy> mAlchemy;
52 
53  std::vector<ItemWidget*> mApparatus;
54  std::vector<ItemWidget*> mIngredients;
55  };
56 }
57 
58 #endif
void onIngredientSelected(MyGUI::Widget *_sender)
Definition: alchemywindow.cpp:138
virtual void exit()
Gracefully exits the window.
Definition: alchemywindow.cpp:132
Definition: itemview.hpp:11
MyGUI::Button * mCancelButton
Definition: alchemywindow.hpp:35
void onCreateButtonClicked(MyGUI::Widget *_sender)
Definition: alchemywindow.cpp:66
std::vector< ItemWidget * > mApparatus
Definition: alchemywindow.hpp:53
MyGUI::Widget * mEffectsBox
Definition: alchemywindow.hpp:37
std::string mSuggestedPotionName
Definition: alchemywindow.hpp:29
void onCancelButtonClicked(MyGUI::Widget *_sender)
Definition: alchemywindow.cpp:61
void onSelectedItem(int index)
Definition: alchemywindow.cpp:144
MyGUI::Button * mCreateButton
Definition: alchemywindow.hpp:34
Definition: alchemywindow.hpp:20
AlchemyWindow()
Definition: alchemywindow.cpp:26
void removeIngredient(MyGUI::Widget *ingredient)
Definition: alchemywindow.cpp:235
MyGUI::EditBox * mNameEdit
Definition: alchemywindow.hpp:39
Definition: sortfilteritemmodel.hpp:9
ItemView * mItemView
Definition: alchemywindow.hpp:31
virtual void open()
Notify that window has been made visible.
Definition: alchemywindow.cpp:104
Definition: windowbase.hpp:16
std::vector< ItemWidget * > mIngredients
Definition: alchemywindow.hpp:54
SortFilterItemModel * mSortModel
Definition: alchemywindow.hpp:32
std::auto_ptr< MWMechanics::Alchemy > mAlchemy
Definition: alchemywindow.hpp:51
void update()
Definition: alchemywindow.cpp:158