PageRenderTime 167ms CodeModel.GetById 70ms app.highlight 17ms RepoModel.GetById 74ms app.codeStats 0ms

/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
19
20#ifndef CUSTOMPLAYLISTVIEW_H
21#define CUSTOMPLAYLISTVIEW_H
22
23#include "playlistview.h"
24
25#include "dllmacro.h"
26
27namespace Tomahawk
28{
29
30class DLLEXPORT CustomPlaylistView : public PlaylistView
31{
32    Q_OBJECT
33public:
34    enum PlaylistType {
35        SourceLovedTracks,
36        AllLovedTracks
37    };
38
39    explicit CustomPlaylistView( PlaylistType type, const source_ptr& s, QWidget* parent = 0 );
40    virtual ~CustomPlaylistView();
41
42    virtual bool showFilter() const { return false; }
43    virtual bool showStatsBar() const { return false; }
44
45    virtual QString title() const;
46    virtual QPixmap pixmap() const;
47    virtual QString description() const;
48    virtual QString longDescription() const;
49
50    virtual bool isTemporaryPage() const { return false; }
51    virtual bool isBeingPlayed() const;
52    virtual bool jumpToCurrentTrack();
53
54private slots:
55    void tracksGenerated( QList<Tomahawk::query_ptr> tracks );
56
57    void socialAttributesChanged( const QString& );
58    void sourceAdded( const Tomahawk::source_ptr& );
59
60private:
61    void generateTracks();
62
63    PlaylistType m_type;
64    source_ptr m_source;
65    PlaylistModel* m_model;
66};
67
68}
69
70#endif // CUSTOMPLAYLISTVIEW_H