diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-12-27 23:23:56 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-02 15:38:15 +0100 |
| commit | cc5f0c8555fbbcc4b6d0dc29a42b8c7869df1859 (patch) | |
| tree | f274552d9310bce72d4153bae417cdf38f841bb9 /src/downloadlist.cpp | |
| parent | c46432cc2ef4a108557c1405a0f9c01616bc176e (diff) | |
Drag and drop from download view to install + Expand and scroll to mod on install.
Diffstat (limited to 'src/downloadlist.cpp')
| -rw-r--r-- | src/downloadlist.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/downloadlist.cpp b/src/downloadlist.cpp index a5c284e6..78e5fd24 100644 --- a/src/downloadlist.cpp +++ b/src/downloadlist.cpp @@ -90,6 +90,18 @@ QVariant DownloadList::headerData(int section, Qt::Orientation orientation, int }
}
+Qt::ItemFlags DownloadList::flags(const QModelIndex& idx) const
+{
+ return QAbstractTableModel::flags(idx) | Qt::ItemIsDragEnabled;
+}
+
+QMimeData* DownloadList::mimeData(const QModelIndexList& indexes) const
+{
+ QMimeData* result = QAbstractItemModel::mimeData(indexes);
+ result->setData("text/plain", "archive");
+ return result;
+}
+
QVariant DownloadList::data(const QModelIndex &index, int role) const
{
bool pendingDownload = index.row() >= m_Manager->numTotalDownloads();
|
