ItemShortcut Class Reference

#include <itemshortcut.h>

List of all members.


Detailed Description

The class which keeps track of the item shortcuts.

Definition at line 32 of file itemshortcut.h.


Public Member Functions

 ItemShortcut ()
 Constructor.
 ~ItemShortcut ()
 Destructor.
void load ()
 Load the configuration information.
int getItem (int index) const
 Returns the shortcut item ID specified by the index.
int getItemCount () const
 Returns the amount of shortcut items.
int getItemSelected () const
 Returns the item ID that is currently selected.
void setItem (int index)
 Adds the selected item ID to the items specified by the index.
void setItems (int index, int itemId)
 Adds an item to the items store specified by the index.
void setItemSelected (int itemId)
 Set the item that is selected.
bool isItemSelected ()
 A flag to check if the item is selected.
void removeItem (int index)
 Remove a item from the shortcut.
void useItem (int index)
 Try to use the item specified by the index.

Private Member Functions

void save ()
 Save the configuration information.

Private Attributes

int mItems [SHORTCUT_ITEMS]
 The items stored.
int mItemSelected
 The item held by cursor.

Constructor & Destructor Documentation

ItemShortcut::ItemShortcut (  ) 

Constructor.

Definition at line 32 of file itemshortcut.cpp.

ItemShortcut::~ItemShortcut (  ) 

Destructor.

Definition at line 41 of file itemshortcut.cpp.


Member Function Documentation

void ItemShortcut::load (  ) 

Load the configuration information.

Definition at line 46 of file itemshortcut.cpp.

int ItemShortcut::getItem ( int  index  )  const [inline]

Returns the shortcut item ID specified by the index.

Parameters:
index Index of the shortcut item.

Definition at line 55 of file itemshortcut.h.

int ItemShortcut::getItemCount (  )  const [inline]

Returns the amount of shortcut items.

Definition at line 61 of file itemshortcut.h.

int ItemShortcut::getItemSelected (  )  const [inline]

Returns the item ID that is currently selected.

Definition at line 67 of file itemshortcut.h.

void ItemShortcut::setItem ( int  index  )  [inline]

Adds the selected item ID to the items specified by the index.

Parameters:
index Index of the items.

Definition at line 75 of file itemshortcut.h.

void ItemShortcut::setItems ( int  index,
int  itemId 
) [inline]

Adds an item to the items store specified by the index.

Parameters:
index Index of the item.
itemId ID of the item.

Definition at line 84 of file itemshortcut.h.

void ItemShortcut::setItemSelected ( int  itemId  )  [inline]

Set the item that is selected.

Parameters:
itemId The ID of the item that is to be assigned.

Definition at line 92 of file itemshortcut.h.

bool ItemShortcut::isItemSelected (  )  [inline]

A flag to check if the item is selected.

Definition at line 98 of file itemshortcut.h.

void ItemShortcut::removeItem ( int  index  )  [inline]

Remove a item from the shortcut.

Definition at line 104 of file itemshortcut.h.

void ItemShortcut::useItem ( int  index  ) 

Try to use the item specified by the index.

Parameters:
index Index of the item shortcut.

Definition at line 66 of file itemshortcut.cpp.

void ItemShortcut::save (  )  [private]

Save the configuration information.

Definition at line 57 of file itemshortcut.cpp.


Member Data Documentation

int ItemShortcut::mItems[SHORTCUT_ITEMS] [private]

The items stored.

Definition at line 120 of file itemshortcut.h.

The item held by cursor.

Definition at line 121 of file itemshortcut.h.


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

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5