aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/library/librarymodel.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2021-01-03 18:15:21 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2021-01-03 18:15:21 +0000
commit773c8c68cf30960a2dd6e67561dd40bd766930bc (patch)
tree9a546efa6cb418890adcc73d7925a90907fd3eea /src/plugins/General/library/librarymodel.h
parent48c7312f4ba78ccf2947a9b4b0e6fd2bcdcb3066 (diff)
downloadqmmp-773c8c68cf30960a2dd6e67561dd40bd766930bc.tar.gz
qmmp-773c8c68cf30960a2dd6e67561dd40bd766930bc.tar.bz2
qmmp-773c8c68cf30960a2dd6e67561dd40bd766930bc.zip
library: drag and drop support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9616 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/library/librarymodel.h')
-rw-r--r--src/plugins/General/library/librarymodel.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/General/library/librarymodel.h b/src/plugins/General/library/librarymodel.h
index a13081bdd..a06365330 100644
--- a/src/plugins/General/library/librarymodel.h
+++ b/src/plugins/General/library/librarymodel.h
@@ -23,6 +23,7 @@
#include <QObject>
#include <QStringList>
+#include <QUrl>
#include <QAbstractItemModel>
class QSqlDatabase;
@@ -35,6 +36,9 @@ public:
LibraryModel(QObject *parent = nullptr);
~LibraryModel();
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ QStringList mimeTypes() const override;
+ QMimeData *mimeData(const QModelIndexList &indexes) const override;
bool canFetchMore(const QModelIndex &parent) const override;
void fetchMore(const QModelIndex &parent) override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
@@ -42,12 +46,12 @@ public:
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
-
void refresh();
private:
- LibraryTreeItem *m_rootItem;
+ QList<QUrl> getUrls(const QModelIndex &index) const;
+ LibraryTreeItem *m_rootItem;
};
#endif // LIBRARYMODEL_H