From a865b10749df829ef46a14e244bc88ac52bc10b4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 4 Jun 2011 22:08:04 +0300 Subject: Add colors support for drops panel. Delete search item function without colors support. --- src/dropshortcut.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/dropshortcut.h') diff --git a/src/dropshortcut.h b/src/dropshortcut.h index 5a020879e..ffaf40ccf 100644 --- a/src/dropshortcut.h +++ b/src/dropshortcut.h @@ -61,6 +61,9 @@ class DropShortcut int getItem(int index) const { return mItems[index]; } + int getItemColor(int index) const + { return mItemColors[index]; } + /** * Returns the amount of shortcut items. */ @@ -78,8 +81,7 @@ class DropShortcut * * @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. @@ -87,8 +89,8 @@ class DropShortcut * @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. @@ -98,6 +100,8 @@ class DropShortcut void setItemSelected(int itemId) { mItemSelected = itemId; } + void setItemSelected(Item *item); + /** * A flag to check if the item is selected. */ @@ -144,8 +148,10 @@ class DropShortcut */ bool dropItem(int cnt = 1); - int mItems[DROP_SHORTCUT_ITEMS]; /**< The items stored. */ - int mItemSelected; /**< The item held by cursor. */ + int mItems[DROP_SHORTCUT_ITEMS]; + int mItemColors[DROP_SHORTCUT_ITEMS]; + int mItemSelected; + int mItemColorSelected; int mLastDropIndex; }; -- cgit v1.2.3-60-g2f50