add mp3 and ogg torrent url info to JamendoAlbum
[amarok.git] / src / AmarokMimeData.h
blobe787f3e1ee0ccd508a95cba78a943e46ef970c04
1 /*
2 * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick@googlemail.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef AMAROK_AMAROKMIMEDATA_H
20 #define AMAROK_AMAROKMIMEDATA_H
22 #include "amarok_export.h"
23 #include "meta/meta.h"
24 #include "collection/QueryMaker.h"
26 #include <QList>
27 #include <QMap>
28 #include <QMimeData>
30 class AMAROK_EXPORT AmarokMimeData : public QMimeData
32 Q_OBJECT
33 public:
34 static const QString TRACK_MIME;
36 AmarokMimeData();
37 virtual ~AmarokMimeData();
39 virtual QStringList formats() const;
40 virtual bool hasFormat( const QString &mimeType ) const;
42 Meta::TrackList tracks() const;
43 void setTracks( const Meta::TrackList &tracks );
44 void addTracks( const Meta::TrackList &tracks );
46 QList<QueryMaker*> queryMakers();
47 void addQueryMaker( QueryMaker *queryMaker );
48 void setQueryMakers( const QList<QueryMaker*> &queryMakers );
50 /**
51 There is a lot of time to run the queries while the user is dragging.
52 This method runs all queries passed to this object. It will do nothing if there
53 are no queries.
55 void startQueries();
57 protected:
58 virtual QVariant retrieveData( const QString &mimeType, QVariant::Type type ) const;
60 private slots:
61 void newResultReady( const QString &collectionId, const Meta::TrackList &tracks );
62 void queryDone();
64 private:
65 class Private;
66 Private * const d;
70 #endif