diff options
Diffstat (limited to 'src/dragdrop.h')
-rw-r--r-- | src/dragdrop.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dragdrop.h b/src/dragdrop.h index 37f1b6ee5..5630f9248 100644 --- a/src/dragdrop.h +++ b/src/dragdrop.h @@ -45,6 +45,7 @@ class DragDrop public: DragDrop(Item *const item, const DragDropSource source) : mItem(item), + mSelItem(nullptr), mSource(source) { } @@ -70,8 +71,18 @@ class DragDrop bool isEmpty() const { return mSource == DRAGDROP_SOURCE_EMPTY; } + void select(Item *const item) + { mSelItem = item; } + + void deselect() + { mSelItem = nullptr; } + + Item *getSelected() + { return mSelItem; } + private: Item *mItem; + Item *mSelItem; DragDropSource mSource; }; |