OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MWGui::InventoryWindow Class Reference

#include <inventorywindow.hpp>

Inheritance diagram for MWGui::InventoryWindow:
Collaboration diagram for MWGui::InventoryWindow:

Public Member Functions

 InventoryWindow (DragAndDrop *dragAndDrop, osg::Group *parent, Resource::ResourceSystem *resourceSystem)
 
virtual void onOpen ()
 Notify that window has been made visible. More...
 
void setTrading (bool trading)
 start trading, disables item drag&drop More...
 
void onFrame (float dt)
 Called every frame if the window is in an active GUI mode. More...
 
void pickUpObject (MWWorld::Ptr object)
 
MWWorld::Ptr getAvatarSelectedItem (int x, int y)
 
void rebuildAvatar ()
 
SortFilterItemModelgetSortFilterModel ()
 
TradeItemModelgetTradeModel ()
 
ItemModelgetModel ()
 
void updateItemView ()
 
void updatePlayer ()
 
void clear ()
 Clear any state specific to the running game. More...
 
void useItem (const MWWorld::Ptr &ptr, bool force=false)
 
void setGuiMode (GuiMode mode)
 
void cycle (bool next)
 Cycle to previous/next weapon. More...
 
- Public Member Functions inherited from MWGui::WindowPinnableBase
 WindowPinnableBase (const std::string &parLayout)
 
bool pinned ()
 
void setPinned (bool pinned)
 
void setPinButtonVisible (bool visible)
 
- Public Member Functions inherited from MWGui::WindowBase
 WindowBase (const std::string &parLayout)
 
virtual MyGUI::Widget * getDefaultKeyFocus ()
 
virtual void setPtr (const MWWorld::Ptr &ptr)
 Open this object in the GUI, for windows that support it. More...
 
virtual void onClose ()
 Notify that window has been hidden. More...
 
virtual bool exit ()
 Gracefully exits the window. More...
 
virtual void setVisible (bool visible)
 Sets the visibility of the window. More...
 
bool isVisible ()
 Returns the visibility state of the window. More...
 
void center ()
 
virtual void onResChange (int width, int height)
 Called when GUI viewport changes size. More...
 
- Public Member Functions inherited from MWGui::Layout
 Layout (const std::string &_layout, MyGUI::Widget *_parent=nullptr)
 
virtual ~Layout ()
 
MyGUI::Widget * getWidget (const std::string &_name)
 
template<typename T >
void getWidget (T *&_widget, const std::string &_name)
 
void setCoord (int x, int y, int w, int h)
 
void setText (const std::string &name, const std::string &caption)
 
void setTitle (const std::string &title)
 

Private Member Functions

void onItemSelected (int index)
 
void onItemSelectedFromSourceModel (int index)
 
void onBackgroundSelected ()
 
void sellItem (MyGUI::Widget *sender, int count)
 
void dragItem (MyGUI::Widget *sender, int count)
 
void onWindowResize (MyGUI::Window *_sender)
 
void onFilterChanged (MyGUI::Widget *_sender)
 
void onAvatarClicked (MyGUI::Widget *_sender)
 
void onPinToggled ()
 
void onTitleDoubleClicked ()
 
void updateEncumbranceBar ()
 
void notifyContentChanged ()
 
void dirtyPreview ()
 
void updatePreviewSize ()
 
void updateArmorRating ()
 
void adjustPanes ()
 
void ensureSelectedItemUnequipped (int count)
 Unequips count items from mSelectedItem, if it is equipped, and then updates mSelectedItem in case the items were re-stacked. More...
 

Private Attributes

DragAndDropmDragAndDrop
 
int mSelectedItem
 
MWWorld::Ptr mPtr
 
MWGui::ItemViewmItemView
 
SortFilterItemModelmSortModel
 
TradeItemModelmTradeModel
 
MyGUI::Widget * mAvatar
 
MyGUI::ImageBox * mAvatarImage
 
MyGUI::TextBox * mArmorRating
 
Widgets::MWDynamicStatmEncumbranceBar
 
MyGUI::Widget * mLeftPane
 
MyGUI::Widget * mRightPane
 
MyGUI::Button * mFilterAll
 
MyGUI::Button * mFilterWeapon
 
MyGUI::Button * mFilterApparel
 
MyGUI::Button * mFilterMagic
 
MyGUI::Button * mFilterMisc
 
MWWorld::Ptr mSkippedToEquip
 
GuiMode mGuiMode
 
int mLastXSize
 
int mLastYSize
 
std::unique_ptr< MyGUI::ITexture > mPreviewTexture
 
std::unique_ptr
< MWRender::InventoryPreview
mPreview
 
bool mTrading
 
float mScaleFactor
 
float mUpdateTimer
 

Additional Inherited Members

- Public Types inherited from MWGui::WindowBase
typedef
MyGUI::delegates::CMultiDelegate1
< WindowBase * > 
EventHandle_WindowBase
 
- Public Attributes inherited from MWGui::Layout
MyGUI::Widget * mMainWidget
 
- Protected Attributes inherited from MWGui::WindowPinnableBase
MyGUI::Widget * mPinButton
 
bool mPinned
 
- Protected Attributes inherited from MWGui::Layout
std::string mPrefix
 
std::string mLayoutName
 
MyGUI::VectorWidgetPtr mListWindowRoot
 

Constructor & Destructor Documentation

MWGui::InventoryWindow::InventoryWindow ( DragAndDrop dragAndDrop,
osg::Group *  parent,
Resource::ResourceSystem resourceSystem 
)

Here is the call graph for this function:

Member Function Documentation

void MWGui::InventoryWindow::adjustPanes ( )
private

Here is the caller graph for this function:

void MWGui::InventoryWindow::clear ( )
virtual

Clear any state specific to the running game.

Reimplemented from MWGui::WindowBase.

Here is the call graph for this function:

void MWGui::InventoryWindow::cycle ( bool  next)

Cycle to previous/next weapon.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::dirtyPreview ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::dragItem ( MyGUI::Widget *  sender,
int  count 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::ensureSelectedItemUnequipped ( int  count)
private

Unequips count items from mSelectedItem, if it is equipped, and then updates mSelectedItem in case the items were re-stacked.

Here is the call graph for this function:

Here is the caller graph for this function:

MWWorld::Ptr MWGui::InventoryWindow::getAvatarSelectedItem ( int  x,
int  y 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ItemModel * MWGui::InventoryWindow::getModel ( )

Here is the caller graph for this function:

SortFilterItemModel * MWGui::InventoryWindow::getSortFilterModel ( )

Here is the caller graph for this function:

TradeItemModel * MWGui::InventoryWindow::getTradeModel ( )

Here is the caller graph for this function:

void MWGui::InventoryWindow::notifyContentChanged ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::onAvatarClicked ( MyGUI::Widget *  _sender)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::onBackgroundSelected ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::onFilterChanged ( MyGUI::Widget *  _sender)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::onFrame ( float  duration)
virtual

Called every frame if the window is in an active GUI mode.

Reimplemented from MWGui::WindowBase.

Here is the call graph for this function:

void MWGui::InventoryWindow::onItemSelected ( int  index)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::onItemSelectedFromSourceModel ( int  index)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::onOpen ( )
virtual

Notify that window has been made visible.

Reimplemented from MWGui::WindowBase.

Here is the call graph for this function:

void MWGui::InventoryWindow::onPinToggled ( )
privatevirtual

Implements MWGui::WindowPinnableBase.

Here is the call graph for this function:

void MWGui::InventoryWindow::onTitleDoubleClicked ( )
privatevirtual

Implements MWGui::WindowPinnableBase.

Here is the call graph for this function:

void MWGui::InventoryWindow::onWindowResize ( MyGUI::Window *  _sender)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::pickUpObject ( MWWorld::Ptr  object)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::rebuildAvatar ( )

Here is the caller graph for this function:

void MWGui::InventoryWindow::sellItem ( MyGUI::Widget *  sender,
int  count 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::setGuiMode ( GuiMode  mode)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::setTrading ( bool  trading)

start trading, disables item drag&drop

Here is the caller graph for this function:

void MWGui::InventoryWindow::updateArmorRating ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::updateEncumbranceBar ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::updateItemView ( )

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::updatePlayer ( )

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::InventoryWindow::updatePreviewSize ( )
private

Here is the caller graph for this function:

void MWGui::InventoryWindow::useItem ( const MWWorld::Ptr ptr,
bool  force = false 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

MyGUI::TextBox* MWGui::InventoryWindow::mArmorRating
private
MyGUI::Widget* MWGui::InventoryWindow::mAvatar
private
MyGUI::ImageBox* MWGui::InventoryWindow::mAvatarImage
private
DragAndDrop* MWGui::InventoryWindow::mDragAndDrop
private
Widgets::MWDynamicStat* MWGui::InventoryWindow::mEncumbranceBar
private
MyGUI::Button* MWGui::InventoryWindow::mFilterAll
private
MyGUI::Button* MWGui::InventoryWindow::mFilterApparel
private
MyGUI::Button* MWGui::InventoryWindow::mFilterMagic
private
MyGUI::Button* MWGui::InventoryWindow::mFilterMisc
private
MyGUI::Button* MWGui::InventoryWindow::mFilterWeapon
private
GuiMode MWGui::InventoryWindow::mGuiMode
private
MWGui::ItemView* MWGui::InventoryWindow::mItemView
private
int MWGui::InventoryWindow::mLastXSize
private
int MWGui::InventoryWindow::mLastYSize
private
MyGUI::Widget* MWGui::InventoryWindow::mLeftPane
private
std::unique_ptr<MWRender::InventoryPreview> MWGui::InventoryWindow::mPreview
private
std::unique_ptr<MyGUI::ITexture> MWGui::InventoryWindow::mPreviewTexture
private
MWWorld::Ptr MWGui::InventoryWindow::mPtr
private
MyGUI::Widget* MWGui::InventoryWindow::mRightPane
private
float MWGui::InventoryWindow::mScaleFactor
private
int MWGui::InventoryWindow::mSelectedItem
private
MWWorld::Ptr MWGui::InventoryWindow::mSkippedToEquip
private
SortFilterItemModel* MWGui::InventoryWindow::mSortModel
private
TradeItemModel* MWGui::InventoryWindow::mTradeModel
private
bool MWGui::InventoryWindow::mTrading
private
float MWGui::InventoryWindow::mUpdateTimer
private

The documentation for this class was generated from the following files: