diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-04 22:08:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-04 22:08:04 +0300 |
commit | a865b10749df829ef46a14e244bc88ac52bc10b4 (patch) | |
tree | 244f283ab8ba6cfcc9683eafe51be7a9d7bbabbe /src/dropshortcut.h | |
parent | 9b3e13d4246930f0aa4dfb86e735466032d283dd (diff) | |
download | plus-a865b10749df829ef46a14e244bc88ac52bc10b4.tar.gz plus-a865b10749df829ef46a14e244bc88ac52bc10b4.tar.bz2 plus-a865b10749df829ef46a14e244bc88ac52bc10b4.tar.xz plus-a865b10749df829ef46a14e244bc88ac52bc10b4.zip |
Add colors support for drops panel.
Delete search item function without colors support.
Diffstat (limited to 'src/dropshortcut.h')
-rw-r--r-- | src/dropshortcut.h | 18 |
1 files changed, 12 insertions, 6 deletions
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; }; |