PageRenderTime 43ms CodeModel.GetById 29ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

/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
20#ifndef WIKIPEDIACONTEXT_H
21#define WIKIPEDIACONTEXT_H
22
23#include <QGraphicsProxyWidget>
24
25#include "DllMacro.h"
26
27#include "Artist.h"
28#include "Album.h"
29#include "Query.h"
30#include "WebContext.h"
31
32class DLLEXPORT WikipediaContext : public WebContext
33{
34Q_OBJECT
35
36public:
37    WikipediaContext() : WebContext() {}
38    ~WikipediaContext() {}
39
40    virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return Tomahawk::playlistinterface_ptr(); }
41
42    virtual QString title() const { return tr( "Wikipedia" ); }
43    virtual QString description() const { return QString(); }
44
45    virtual bool jumpToCurrentTrack() { return false; }
46
47public slots:
48    virtual void setArtist( const Tomahawk::artist_ptr& artist );
49    virtual void setAlbum( const Tomahawk::album_ptr& album );
50    virtual void setQuery( const Tomahawk::query_ptr& query );
51
52private:
53    Tomahawk::artist_ptr m_artist;
54};
55
56
57class DLLEXPORT LastfmContext : public WebContext
58{
59Q_OBJECT
60
61public:
62    LastfmContext() : WebContext() {}
63    ~LastfmContext() {}
64
65    virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return Tomahawk::playlistinterface_ptr(); }
66
67    virtual QString title() const { return tr( "Last.fm" ); }
68    virtual QString description() const { return QString(); }
69
70    virtual bool jumpToCurrentTrack() { return false; }
71
72public slots:
73    virtual void setArtist( const Tomahawk::artist_ptr& artist );
74    virtual void setAlbum( const Tomahawk::album_ptr& album );
75    virtual void setQuery( const Tomahawk::query_ptr& query );
76
77private:
78    Tomahawk::artist_ptr m_artist;
79};
80
81#endif // WIKIPEDIACONTEXT_H