OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
spellwindow.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_SPELLWINDOW_H
2 #define MWGUI_SPELLWINDOW_H
3 
4 #include "windowpinnablebase.hpp"
5 #include "../mwworld/ptr.hpp"
6 
7 #include "spellmodel.hpp"
8 
9 namespace MWGui
10 {
11  class SpellIcons;
12  class SpellView;
13 
14  class SpellWindow : public WindowPinnableBase, public NoDrop
15  {
16  public:
17  SpellWindow(DragAndDrop* drag);
18  virtual ~SpellWindow();
19 
20  void updateSpells();
21 
22  void onFrame(float dt);
23 
25  void cycle(bool next);
26 
27  protected:
28  MyGUI::Widget* mEffectBox;
29 
30  std::string mSpellToDelete;
31 
32  void onEnchantedItemSelected(MWWorld::Ptr item, bool alreadyEquipped);
33  void onSpellSelected(const std::string& spellId);
35  void onDeleteSpellAccept();
36  void askDeleteSpell(const std::string& spellId);
37 
38  virtual void onPinToggled();
39  virtual void onTitleDoubleClicked();
40  virtual void open();
41 
44 
45  private:
46  float mUpdateTimer;
47  };
48 }
49 
50 #endif
void askDeleteSpell(const std::string &spellId)
Definition: spellwindow.cpp:120
Definition: spellicons.hpp:54
virtual ~SpellWindow()
Definition: spellwindow.cpp:44
MyGUI::Widget * mEffectBox
Definition: spellwindow.hpp:28
SpellView * mSpellView
Definition: spellwindow.hpp:42
Definition: draganddrop.hpp:17
void onEnchantedItemSelected(MWWorld::Ptr item, bool alreadyEquipped)
Definition: spellwindow.cpp:86
std::string mSpellToDelete
Definition: spellwindow.hpp:30
void cycle(bool next)
Cycle to next/previous spell.
Definition: spellwindow.cpp:192
Definition: windowbase.hpp:52
Definition: windowpinnablebase.hpp:10
virtual void open()
Notify that window has been made visible.
Definition: spellwindow.cpp:60
SpellIcons * mSpellIcons
Definition: spellwindow.hpp:43
Displays a SpellModel in a list widget.
Definition: spellview.hpp:21
float mUpdateTimer
Definition: spellwindow.hpp:46
void onSpellSelected(const std::string &spellId)
Definition: spellwindow.cpp:168
Definition: spellwindow.hpp:14
void onFrame(float dt)
Definition: spellwindow.cpp:65
void onDeleteSpellAccept()
Definition: spellwindow.cpp:178
void onModelIndexSelected(SpellModel::ModelIndex index)
Definition: spellwindow.cpp:152
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual void onPinToggled()
Definition: spellwindow.cpp:49
virtual void onTitleDoubleClicked()
Definition: spellwindow.cpp:54
void updateSpells()
Definition: spellwindow.cpp:79
SpellWindow(DragAndDrop *drag)
Definition: spellwindow.cpp:28