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 
51  QStringList playlists(const QMimeData* data);
52 
59  void setCoverUrl(QMimeData* data, const QString& url);
60 
67  QString coverUrl(const QMimeData* data);
68 
75  CustomMimeData* customMimedata(QMimeData* data);
76 
83  const CustomMimeData* customMimedata(const QMimeData* data);
84 
91  bool isPlayerDrag(const QMimeData* data);
92 
100  bool isInnerDragDrop(const QMimeData* data, int targetPlaylistIndex);
101 
108  bool isDragFromPlaylist(const QMimeData* data);
109 
110  bool hasAsyncDropHander(const QMimeData* data);
111  Gui::AsyncDropHandler* asyncDropHandler(const QMimeData* data);
112  }
113 }
114 
115 #endif // MimeDataUtils_H
MetaDataList metadata(const QMimeData *data)
metadata
QStringList playlists(const QMimeData *data)
playlists
void setCoverUrl(QMimeData *data, const QString &url)
set_cover_url
bool isInnerDragDrop(const QMimeData *data, int targetPlaylistIndex)
is_inner_drag_drop
bool isDragFromPlaylist(const QMimeData *data)
is_drag_from_playlist
The MetaDataList class.
Definition: MetaDataList.h:35
Definition: DragDropAsyncHandler.h:11
const CustomMimeData * customMimedata(const QMimeData *data)
custom_mimedata
QString coverUrl(const QMimeData *data)
cover_url
bool isPlayerDrag(const QMimeData *data)
is_player_drag