/src/libtomahawk/playlist/customplaylistview.h

http://github.com/tomahawk-player/tomahawk · C Header · 70 lines · 37 code · 16 blank · 17 comment · 0 complexity · 14e2054f6da239239344a35b0eedb9d6 MD5 · raw file

  1. /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
  2. *
  3. * Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
  4. *
  5. * Tomahawk is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * Tomahawk is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef CUSTOMPLAYLISTVIEW_H
  19. #define CUSTOMPLAYLISTVIEW_H
  20. #include "playlistview.h"
  21. #include "dllmacro.h"
  22. namespace Tomahawk
  23. {
  24. class DLLEXPORT CustomPlaylistView : public PlaylistView
  25. {
  26. Q_OBJECT
  27. public:
  28. enum PlaylistType {
  29. SourceLovedTracks,
  30. AllLovedTracks
  31. };
  32. explicit CustomPlaylistView( PlaylistType type, const source_ptr& s, QWidget* parent = 0 );
  33. virtual ~CustomPlaylistView();
  34. virtual bool showFilter() const { return false; }
  35. virtual bool showStatsBar() const { return false; }
  36. virtual QString title() const;
  37. virtual QPixmap pixmap() const;
  38. virtual QString description() const;
  39. virtual QString longDescription() const;
  40. virtual bool isTemporaryPage() const { return false; }
  41. virtual bool isBeingPlayed() const;
  42. virtual bool jumpToCurrentTrack();
  43. private slots:
  44. void tracksGenerated( QList<Tomahawk::query_ptr> tracks );
  45. void socialAttributesChanged( const QString& );
  46. void sourceAdded( const Tomahawk::source_ptr& );
  47. private:
  48. void generateTracks();
  49. PlaylistType m_type;
  50. source_ptr m_source;
  51. PlaylistModel* m_model;
  52. };
  53. }
  54. #endif // CUSTOMPLAYLISTVIEW_H