From cc5f0c8555fbbcc4b6d0dc29a42b8c7869df1859 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sun, 27 Dec 2020 23:23:56 +0100 Subject: Drag and drop from download view to install + Expand and scroll to mod on install. --- src/modlist.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/modlist.h') diff --git a/src/modlist.h b/src/modlist.h index fad53755..2ca2fff1 100644 --- a/src/modlist.h +++ b/src/modlist.h @@ -310,6 +310,10 @@ signals: void postDataChanged(); + // emitted when an item is dropped from the download list, the row is from the + // download list + void downloadArchiveDropped(int row, int priority); + protected: // event filter, handles event from the header and the tree view itself @@ -336,10 +340,6 @@ private: bool renameMod(int index, const QString &newName); - bool dropURLs(const QMimeData *mimeData, int row, const QModelIndex &parent); - - bool dropMod(const QMimeData *mimeData, int row, const QModelIndex &parent); - MOBase::IModList::ModStates state(unsigned int modIndex) const; bool moveSelection(QAbstractItemView *itemView, int direction); @@ -367,6 +367,16 @@ private: QFlags state; }; +private: + + bool dropURLs(const QMimeData* mimeData, int row, const QModelIndex& parent); + bool dropMod(const QMimeData* mimeData, int row, const QModelIndex& parent); + bool dropArchive(const QMimeData* mimeData, int row, const QModelIndex& parent); + + // return the priority of the mod for a drop event + // + int dropPriority(int row, const QModelIndex& parent) const; + private: friend class ModListByPriorityProxy; -- cgit v1.3.1