Sayonara Player
MimeDataUtils.h
1 /* MimeDataUtils.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 MimeDataUtils_H
22 #define MimeDataUtils_H
23 
24 class QMimeData;
25 class MetaDataList;
26 
27 class QStringList;
28 class QString;
29 
30 namespace Gui
31 {
32  class CustomMimeData;
33  class AsyncDropHandler;
34 
35  namespace MimeData
36  {
43  MetaDataList metadata(const QMimeData* data);
44  bool hasMetadata(const QMimeData* data);
45 
52  QStringList playlists(const QMimeData* data);
53 
60  void setCoverUrl(QMimeData* data, const QString& url);
61 
68  QString coverUrl(const QMimeData* data);
69 
76  CustomMimeData* customMimedata(QMimeData* data);
77 
84  const CustomMimeData* customMimedata(const QMimeData* data);
85 
92  bool isPlayerDrag(const QMimeData* data);
93 
101  bool isInnerDragDrop(const QMimeData* data, int targetPlaylistIndex);
102 
103  Gui::AsyncDropHandler* asyncDropHandler(const QMimeData* data);
104  }
105 }
106 
107 #endif // MimeDataUtils_H
Gui::MimeData::playlists
QStringList playlists(const QMimeData *data)
playlists
Gui::AsyncDropHandler
Definition: DragDropAsyncHandler.h:12
Gui::MimeData::setCoverUrl
void setCoverUrl(QMimeData *data, const QString &url)
set_cover_url
Gui::CustomMimeData
Mimedata class for drag and dropping metadata.
Definition: CustomMimeData.h:37
MetaDataList
The MetaDataList class.
Definition: MetaDataList.h:37
Gui::MimeData::isInnerDragDrop
bool isInnerDragDrop(const QMimeData *data, int targetPlaylistIndex)
is_inner_drag_drop
Gui::MimeData::customMimedata
const CustomMimeData * customMimedata(const QMimeData *data)
custom_mimedata
Gui::MimeData::coverUrl
QString coverUrl(const QMimeData *data)
cover_url
Gui::MimeData::isPlayerDrag
bool isPlayerDrag(const QMimeData *data)
is_player_drag
Gui::MimeData::metadata
MetaDataList metadata(const QMimeData *data)
metadata