diff options
| author | Peter Penz <[email protected]> | 2011-09-04 17:40:44 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-09-04 17:41:15 +0200 |
| commit | 7a91492cff931c0c4e0d38dd0aee77d9dcb29373 (patch) | |
| tree | 97c0e00397f95c673ff5dc3a4cf0dcb79a0134df /src/kitemviews/kitemmodelbase.h | |
| parent | 8266e456a10670fe5ef855680d61e0b6ab0d6292 (diff) | |
Improved drag and drop support
Diffstat (limited to 'src/kitemviews/kitemmodelbase.h')
| -rw-r--r-- | src/kitemviews/kitemmodelbase.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/kitemviews/kitemmodelbase.h b/src/kitemviews/kitemmodelbase.h index c4e046402..de6e1bb1d 100644 --- a/src/kitemviews/kitemmodelbase.h +++ b/src/kitemviews/kitemmodelbase.h @@ -123,6 +123,20 @@ public: * @param startFromIndex the index from which to start searching from */ virtual int indexForKeyboardSearch(const QString& text, int startFromIndex = 0) const; + + /** + * @return True, if the item with the index \a index basically supports dropping. + * Per default false is returned. + * + * The information is used only to give a visual feedback during a drag operation + * and not to decide whether a drop event gets emitted. It is it is still up to + * the receiver of KItemListController::itemDropEvent() to decide how to handle + * the drop event. + */ + // TODO: Should the MIME-data be passed too so that the model can do a more specific + // decision whether it accepts the drop? + virtual bool supportsDropping(int index) const; + signals: /** * Is emitted if one or more items have been inserted. Each item-range consists |
