1
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
3
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
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.
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.
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/>.
19
#ifndef CONTEXTWIDGET_H
20
#define CONTEXTWIDGET_H
22
#include <QGraphicsView>
29
class QGraphicsWebView;
30
class QGraphicsWidget;
36
class ContextProxyPage;
44
class DLLEXPORT ContextWidget : public QWidget
49
ContextWidget( QWidget* parent = 0 );
53
void setArtist( const Tomahawk::artist_ptr& artist );
54
void setAlbum( const Tomahawk::album_ptr& album );
55
void setQuery( const Tomahawk::query_ptr& query, bool force = false );
62
void onAnimationStep( int frame );
63
void onAnimationFinished();
66
void paintEvent( QPaintEvent* e );
67
void resizeEvent( QResizeEvent* e );
68
void changeEvent( QEvent* e );
71
void fadeOut( bool animate );
73
void layoutViews( bool animate = true );
75
Ui::ContextWidget* ui;
79
QTimeLine* m_timeLine;
81
QGraphicsScene* m_scene;
82
QList<Tomahawk::ContextPage*> m_views;
83
QList<Tomahawk::ContextProxyPage*> m_pages;
87
Tomahawk::artist_ptr m_artist;
88
Tomahawk::album_ptr m_album;
89
Tomahawk::query_ptr m_query;
93
#endif // CONTEXTWIDGET_H