diff --git a/src/libtomahawk/DropJob.cpp b/src/libtomahawk/DropJob.cpp index aad50d36a..c2afd02ed 100644 --- a/src/libtomahawk/DropJob.cpp +++ b/src/libtomahawk/DropJob.cpp @@ -94,6 +94,34 @@ DropJob::mimeTypes() } +void +DropJob::setDropTypes( DropTypes types ) +{ + m_dropTypes = types; +} + + +void +DropJob::setDropAction( DropJob::DropAction action ) +{ + m_dropAction = action; +} + + +DropJob::DropTypes +DropJob::dropTypes() const +{ + return m_dropTypes; +} + + +DropJob::DropAction +DropJob::dropAction() const +{ + return m_dropAction; +} + + bool DropJob::acceptsMimeData( const QMimeData* data, DropJob::DropTypes acceptedType, DropJob::DropAction acceptedAction ) { @@ -704,6 +732,20 @@ DropJob::handleGroovesharkUrls ( const QString& urlsRaw ) } +bool +DropJob::canParseSpotifyPlaylists() +{ + return s_canParseSpotifyPlaylists; +} + + +void +DropJob::setCanParseSpotifyPlaylists( bool parseable ) +{ + s_canParseSpotifyPlaylists = parseable; +} + + void DropJob::handleAllUrls( const QString& urls ) { diff --git a/src/libtomahawk/DropJob.h b/src/libtomahawk/DropJob.h index 6a19f8b48..5b3b3350a 100644 --- a/src/libtomahawk/DropJob.h +++ b/src/libtomahawk/DropJob.h @@ -86,14 +86,21 @@ public: static QStringList mimeTypes(); - /// Set the drop types that should be extracted from this drop - void setDropTypes( DropTypes types ) { m_dropTypes = types; } + /** + * Set the drop types that should be extracted from this drop + */ + void setDropTypes( DropTypes types ); - /// Set the action that the drop should do. For example, if dropping a playlist, Create will create a new playlist but Append will generate the raw tracks - void setDropAction( DropAction action ) { m_dropAction = action; } + /** + * Set the action that the drop should do. + * + * For example, if dropping a playlist, Create will create a new playlist + * but Append will generate the raw tracks + */ + void setDropAction( DropAction action ); - DropTypes dropTypes() const { return m_dropTypes; } - DropAction dropAction() const { return m_dropAction; } + DropTypes dropTypes() const; + DropAction dropAction() const; /** * Begin the parsing of the mime data. The resulting tracks are exposed in the various signals @@ -110,8 +117,8 @@ public: void handleExfmUrls( const QString& urls ); void handleGroovesharkUrls( const QString& urls ); - static bool canParseSpotifyPlaylists() { return s_canParseSpotifyPlaylists; } - static void setCanParseSpotifyPlaylists( bool parseable ) { s_canParseSpotifyPlaylists = parseable; } + static bool canParseSpotifyPlaylists(); + static void setCanParseSpotifyPlaylists( bool parseable ); signals: /// QMimeData parsing results