diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-14 20:50:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-14 22:54:59 +0300 |
commit | 0204a75a049d6819719cf41ac92116012ed50d86 (patch) | |
tree | d2723719f22628a612c17b0f977054610c5720fd /src/dragdrop.h | |
parent | 3fc421539bc81f27262b91554694509f3e47f865 (diff) | |
download | mv-0204a75a049d6819719cf41ac92116012ed50d86.tar.gz mv-0204a75a049d6819719cf41ac92116012ed50d86.tar.bz2 mv-0204a75a049d6819719cf41ac92116012ed50d86.tar.xz mv-0204a75a049d6819719cf41ac92116012ed50d86.zip |
Allow drag cast type from skills window into shortcuts.
Diffstat (limited to 'src/dragdrop.h')
-rw-r--r-- | src/dragdrop.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dragdrop.h b/src/dragdrop.h index d684110ee..729a96bc4 100644 --- a/src/dragdrop.h +++ b/src/dragdrop.h @@ -42,6 +42,7 @@ class DragDrop final const DragDropSourceT source) : mItemImage(item ? item->getImage() : nullptr), mText(), + mItemData(), mSource(source), mItem(item ? item->getId() : 0), mSelItem(0), @@ -73,6 +74,12 @@ class DragDrop final Image *getItemImage() { return mItemImage; } + void setItemData(const std::string &data) + { mItemData = data; } + + std::string getItemData() + { return mItemData; } + DragDropSourceT getSource() const { return mSource; } @@ -83,6 +90,7 @@ class DragDrop final if (mItemImage) mItemImage->decRef(); + mItemData.clear(); mText.clear(); if (item) { @@ -113,6 +121,7 @@ class DragDrop final mItemImage->decRef(); mItem = 0; mItemColor = ItemColor_one; + mItemData.clear(); if (command) { @@ -151,6 +160,7 @@ class DragDrop final mItemImage = nullptr; mSource = DragDropSource::Empty; mTag = -1; + mItemData.clear(); if (info) { const SkillData *const data = info->data; @@ -178,6 +188,7 @@ class DragDrop final mItemImage = nullptr; mSource = DragDropSource::Empty; mText.clear(); + mItemData.clear(); mTag = -1; } @@ -241,6 +252,7 @@ class DragDrop final private: Image *mItemImage; std::string mText; + std::string mItemData; DragDropSourceT mSource; int mItem; int mSelItem; |