/src/libtomahawk/context/pages/WikipediaContext.h

http://github.com/tomahawk-player/tomahawk · C Header · 81 lines · 43 code · 20 blank · 18 comment · 0 complexity · e6d5ce31236434d24e62f6986da9a419 MD5 · raw file

  1. /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
  2. *
  3. * Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
  4. * Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
  5. *
  6. * Tomahawk is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Tomahawk is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef WIKIPEDIACONTEXT_H
  20. #define WIKIPEDIACONTEXT_H
  21. #include <QGraphicsProxyWidget>
  22. #include "DllMacro.h"
  23. #include "Artist.h"
  24. #include "Album.h"
  25. #include "Query.h"
  26. #include "WebContext.h"
  27. class DLLEXPORT WikipediaContext : public WebContext
  28. {
  29. Q_OBJECT
  30. public:
  31. WikipediaContext() : WebContext() {}
  32. ~WikipediaContext() {}
  33. virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return Tomahawk::playlistinterface_ptr(); }
  34. virtual QString title() const { return tr( "Wikipedia" ); }
  35. virtual QString description() const { return QString(); }
  36. virtual bool jumpToCurrentTrack() { return false; }
  37. public slots:
  38. virtual void setArtist( const Tomahawk::artist_ptr& artist );
  39. virtual void setAlbum( const Tomahawk::album_ptr& album );
  40. virtual void setQuery( const Tomahawk::query_ptr& query );
  41. private:
  42. Tomahawk::artist_ptr m_artist;
  43. };
  44. class DLLEXPORT LastfmContext : public WebContext
  45. {
  46. Q_OBJECT
  47. public:
  48. LastfmContext() : WebContext() {}
  49. ~LastfmContext() {}
  50. virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return Tomahawk::playlistinterface_ptr(); }
  51. virtual QString title() const { return tr( "Last.fm" ); }
  52. virtual QString description() const { return QString(); }
  53. virtual bool jumpToCurrentTrack() { return false; }
  54. public slots:
  55. virtual void setArtist( const Tomahawk::artist_ptr& artist );
  56. virtual void setAlbum( const Tomahawk::album_ptr& album );
  57. virtual void setQuery( const Tomahawk::query_ptr& query );
  58. private:
  59. Tomahawk::artist_ptr m_artist;
  60. };
  61. #endif // WIKIPEDIACONTEXT_H