OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
companionwindow.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_MWGUI_COMPANIONWINDOW_H
2 #define OPENMW_MWGUI_COMPANIONWINDOW_H
3 
4 #include "widgets.hpp"
5 #include "windowbase.hpp"
6 #include "referenceinterface.hpp"
7 
8 namespace MWGui
9 {
10  class MessageBoxManager;
11  class ItemView;
12  class DragAndDrop;
13  class SortFilterItemModel;
14  class CompanionItemModel;
15 
17  {
18  public:
19  CompanionWindow(DragAndDrop* dragAndDrop, MessageBoxManager* manager);
20 
21  virtual void exit();
22 
23  virtual void resetReference();
24 
25  void openCompanion(const MWWorld::Ptr& npc);
26  void onFrame ();
27 
28  private:
33 
35 
36  MyGUI::Button* mCloseButton;
37  MyGUI::TextBox* mProfitLabel;
40 
41  void onItemSelected(int index);
42  void onBackgroundSelected();
43  void dragItem(MyGUI::Widget* sender, int count);
44 
45  void onMessageBoxButtonClicked(int button);
46 
47  void updateEncumbranceBar();
48 
49  void onCloseButtonClicked(MyGUI::Widget* _sender);
50 
51  virtual void onReferenceUnavailable();
52  };
53 
54 }
55 
56 #endif
Definition: companionwindow.hpp:16
void onBackgroundSelected()
Definition: companionwindow.cpp:97
void openCompanion(const MWWorld::Ptr &npc)
Definition: companionwindow.cpp:106
CompanionWindow(DragAndDrop *dragAndDrop, MessageBoxManager *manager)
Definition: companionwindow.cpp:35
Definition: itemview.hpp:11
MyGUI::Button * mCloseButton
Definition: companionwindow.hpp:36
MessageBoxManager * mMessageBoxManager
Definition: companionwindow.hpp:39
Widgets::MWDynamicStat * mEncumbranceBar
Definition: companionwindow.hpp:38
int mSelectedItem
Definition: companionwindow.hpp:32
void updateEncumbranceBar()
Definition: companionwindow.cpp:124
Definition: messagebox.hpp:20
DragAndDrop * mDragAndDrop
Definition: companionwindow.hpp:34
Definition: draganddrop.hpp:17
MyGUI::TextBox * mProfitLabel
Definition: companionwindow.hpp:37
void dragItem(MyGUI::Widget *sender, int count)
Definition: companionwindow.cpp:92
void onFrame()
Definition: companionwindow.cpp:119
void onItemSelected(int index)
Definition: companionwindow.cpp:55
void onCloseButtonClicked(MyGUI::Widget *_sender)
Definition: companionwindow.cpp:140
Definition: sortfilteritemmodel.hpp:9
virtual void onReferenceUnavailable()
called when reference has become unavailable
Definition: companionwindow.cpp:169
SortFilterItemModel * mSortModel
Definition: companionwindow.hpp:30
The companion item model keeps track of the companion's profit by monitoring which items are being ad...
Definition: companionitemmodel.hpp:11
void onMessageBoxButtonClicked(int button)
Definition: companionwindow.cpp:159
Definition: windowbase.hpp:16
virtual void resetReference()
Definition: companionwindow.cpp:174
CompanionItemModel * mModel
Definition: companionwindow.hpp:31
this class is intended for GUI interfaces that access an MW-Reference for example dialogue window acc...
Definition: referenceinterface.hpp:12
Definition: widgets.hpp:277
ItemView * mItemView
Definition: companionwindow.hpp:29
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual void exit()
Gracefully exits the window.
Definition: companionwindow.cpp:145