PageRenderTime 143ms CodeModel.GetById 71ms app.highlight 4ms RepoModel.GetById 66ms app.codeStats 0ms

/src/libtomahawk/infobar/infobar.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 91 lines | 52 code | 20 blank | 19 comment | 0 complexity | a28ccf102e944b1cd3f9b4861549b41c 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 2012,      Leo Franchi            <lfranchi@kde.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 INFOBAR_H
21#define INFOBAR_H
22
23#include <QWidget>
24
25#include "DllMacro.h"
26#include "Artist.h"
27
28class QueryLabel;
29class QCheckBox;
30class QTimeLine;
31class QSearchField;
32class ContextWidget;
33
34namespace Ui
35{
36    class InfoBar;
37}
38
39namespace Tomahawk
40{
41class PlaylistUpdaterInterface;
42}
43
44class DLLEXPORT InfoBar : public QWidget
45{
46Q_OBJECT
47
48public:
49    InfoBar( QWidget* parent = 0 );
50    ~InfoBar();
51
52public slots:
53    void setCaption( const QString& s );
54
55    void setDescription( const QString& s );
56    // If you want a querylabel instead of an ElidedLabel
57    void setDescription( const Tomahawk::artist_ptr& artist );
58    void setDescription( const Tomahawk::album_ptr& album_ptr );
59
60    void setLongDescription( const QString& s );
61    void setPixmap( const QPixmap& p );
62
63    void setFilter( const QString& filter );
64    void setFilterAvailable( bool b );
65
66    void setUpdaters( const QList<Tomahawk::PlaylistUpdaterInterface*>& updaters );
67signals:
68    void filterTextChanged( const QString& filter );
69
70protected:
71    void changeEvent( QEvent* e );
72    void paintEvent( QPaintEvent* e );
73
74private slots:
75    void onFilterEdited();
76    void artistClicked();
77
78private:
79    Ui::InfoBar* ui;
80
81    QPixmap m_bgTile;
82    QPalette m_whitePal;
83
84    QList<Tomahawk::PlaylistUpdaterInterface*> m_updaters;;
85    QList<QWidget*> m_updaterConfigurations;
86
87    QSearchField* m_searchWidget;
88    QueryLabel* m_queryLabel;
89};
90
91#endif // INFOBAR_H