/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
- /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
- *
- * Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
- *
- * Tomahawk is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Tomahawk is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
- */
- #ifndef CUSTOMPLAYLISTVIEW_H
- #define CUSTOMPLAYLISTVIEW_H
- #include "playlistview.h"
- #include "dllmacro.h"
- namespace Tomahawk
- {
- class DLLEXPORT CustomPlaylistView : public PlaylistView
- {
- Q_OBJECT
- public:
- enum PlaylistType {
- SourceLovedTracks,
- AllLovedTracks
- };
- explicit CustomPlaylistView( PlaylistType type, const source_ptr& s, QWidget* parent = 0 );
- virtual ~CustomPlaylistView();
- virtual bool showFilter() const { return false; }
- virtual bool showStatsBar() const { return false; }
- virtual QString title() const;
- virtual QPixmap pixmap() const;
- virtual QString description() const;
- virtual QString longDescription() const;
- virtual bool isTemporaryPage() const { return false; }
- virtual bool isBeingPlayed() const;
- virtual bool jumpToCurrentTrack();
- private slots:
- void tracksGenerated( QList<Tomahawk::query_ptr> tracks );
- void socialAttributesChanged( const QString& );
- void sourceAdded( const Tomahawk::source_ptr& );
- private:
- void generateTracks();
- PlaylistType m_type;
- source_ptr m_source;
- PlaylistModel* m_model;
- };
- }
- #endif // CUSTOMPLAYLISTVIEW_H