Not crap after all...
[amarok.git] / src / equalizergraph.h
blob66238205f2cfbe79a970c881b6448cccc6f468b1
1 /***************************************************************************
2 Graphical spline display for equalizer
4 (c) 2004 Mark Kretschmann <markey@web.de>
5 Based on code from XMMS
6 (c) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #ifndef AMAROK_EQUALIZERGRAPH_H
19 #define AMAROK_EQUALIZERGRAPH_H
21 #include <QtGui/QWidget> //baseclass
23 class QPaintEvent;
24 class QPixmap;
25 class QResizeEvent;
28 class EqualizerGraph : public QWidget
30 public:
31 EqualizerGraph( QWidget* parent );
32 ~EqualizerGraph();
33 QSize sizeHint() const;
35 protected:
36 void resizeEvent( QResizeEvent* );
37 void paintEvent( QPaintEvent* );
39 private:
40 static const int NUM_BANDS = 10;
42 void drawBackground();
44 void init_spline( float* x, float* y, int n, float* y2 );
45 float eval_spline( float xa[], float ya[], float y2a[], int n, float x );
47 QPixmap* m_backgroundPixmap;
51 #endif /*AMAROK_EQUALIZERGRAPH_H*/