Sayonara Player
CustomMimeData.h
1/* CustomMimeData.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef SAYONARA_CUSTOM_MIME_DATA_H
22#define SAYONARA_CUSTOM_MIME_DATA_H
23
24#include "Utils/Pimpl.h"
25
26#include <QMimeData>
27
28#include <any>
29
30namespace Gui
31{
32 class AsyncDropHandler;
33
34 class CustomMimeData : public QMimeData
35 {
36 PIMPL(CustomMimeData)
37
38 public:
39 explicit CustomMimeData(const QObject* dragSource = nullptr);
40 virtual ~CustomMimeData() override;
41
42 void setMetadata(const MetaDataList& v_md);
43 const MetaDataList& metadata() const;
44 bool hasMetadata() const;
45
46 void setPlaylistSourceIndex(int playlistIndex);
47 int playlistSourceIndex() const;
48
49 QString coverUrl() const;
50 void setCoverUrl(const QString& url);
51
52 void setAsyncDropHandler(Gui::AsyncDropHandler* handler);
53 Gui::AsyncDropHandler* asyncDropHandler() const;
54
55 bool hasDragSource(const QObject* classInstance) const;
56 };
57}
58
59#endif // SAYONARA_CUSTOM_MIME_DATA_H
Definition: DragDropAsyncHandler.h:12
Definition: CustomMimeData.h:35
The MetaDataList class.
Definition: MetaDataList.h:39