aboutsummaryrefslogtreecommitdiff
path: root/lib/bookmarks/bookmarksmodel.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-02-04 17:27:58 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2018-02-04 17:27:58 +0100
commit334be268bf75b863f7c912ae28bab46f7bbc325a (patch)
tree997008a9d7231c99d22fa0ea4187530b20b6b2e7 /lib/bookmarks/bookmarksmodel.h
parentFixed bug where refresh button and loading bar would get stuck in loading state (diff)
downloadsmolbote-334be268bf75b863f7c912ae28bab46f7bbc325a.tar.xz
Bookmarks drag and drop
Diffstat (limited to 'lib/bookmarks/bookmarksmodel.h')
-rw-r--r--lib/bookmarks/bookmarksmodel.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/bookmarks/bookmarksmodel.h b/lib/bookmarks/bookmarksmodel.h
index ea1d203..b6cadbf 100644
--- a/lib/bookmarks/bookmarksmodel.h
+++ b/lib/bookmarks/bookmarksmodel.h
@@ -56,6 +56,18 @@ public:
void expandItems(QTreeView *view, BookmarkItem *root = nullptr);
+ // drag and drop
+ Qt::DropActions supportedDropActions() const override
+ {
+ return Qt::CopyAction | Qt::MoveAction;
+ }
+ QStringList mimeTypes() const override
+ {
+ return {"application/bookmarks.xbel"};
+ }
+ QMimeData *mimeData(const QModelIndexList &indexes) const override;
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
+
private:
QIcon folderIcon;
QIcon bookmarkIcon;