summaryrefslogtreecommitdiff
path: root/src/itemshortcut.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-04 21:25:33 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-04 21:25:33 +0300
commit3dd4d34239a00a71df3638d148bfe92047ac7921 (patch)
tree543c71241fc55fac01c1329480863256b0c62471 /src/itemshortcut.h
parent2e752adf979e74f9a4b919bbc88929a7bf3adf25 (diff)
downloadplus-3dd4d34239a00a71df3638d148bfe92047ac7921.tar.gz
plus-3dd4d34239a00a71df3638d148bfe92047ac7921.tar.bz2
plus-3dd4d34239a00a71df3638d148bfe92047ac7921.tar.xz
plus-3dd4d34239a00a71df3638d148bfe92047ac7921.zip
Add support for colors to shortcuts panel.
Diffstat (limited to 'src/itemshortcut.h')
-rw-r--r--src/itemshortcut.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/itemshortcut.h b/src/itemshortcut.h
index ee59a27ac..b735e899c 100644
--- a/src/itemshortcut.h
+++ b/src/itemshortcut.h
@@ -63,6 +63,9 @@ class ItemShortcut
int getItem(int index) const
{ return mItems[index]; }
+ unsigned char getItemColor(int index) const
+ { return mItemColors[index]; }
+
/**
* Returns the amount of shortcut items.
*/
@@ -80,8 +83,7 @@ class ItemShortcut
*
* @param index Index of the items.
*/
- void setItem(int index)
- { mItems[index] = mItemSelected; save(); }
+ void setItem(int index);
/**
* Adds an item to the items store specified by the index.
@@ -89,8 +91,8 @@ class ItemShortcut
* @param index Index of the item.
* @param itemId ID of the item.
*/
- void setItems(int index, int itemId)
- { mItems[index] = itemId; save(); }
+ void setItems(int index, int itemId, unsigned char color)
+ { mItems[index] = itemId; mItemColors[index] = color; save(); }
/**
* Set the item that is selected.
@@ -100,6 +102,8 @@ class ItemShortcut
void setItemSelected(int itemId)
{ mItemSelected = itemId; }
+ void setItemSelected(Item *item);
+
/**
* Returns selected shortcut item ID.
*/
@@ -137,8 +141,10 @@ class ItemShortcut
private:
- int mItems[SHORTCUT_ITEMS]; /**< The items stored. */
- int mItemSelected; /**< The item held by cursor. */
+ int mItems[SHORTCUT_ITEMS]; /**< The items. */
+ unsigned char mItemColors[SHORTCUT_ITEMS]; /**< The item colors. */
+ int mItemSelected;
+ int mItemColorSelected;
int mNumber;
};