summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/kjequalizer.h
blob: 6331e28540c9cfc124767048edf46baa67bad4d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef KJEQUALIZER_H
#define KJEQUALIZER_H

#include "kjwidget.h"
//#include "kjloader.h"
class KJLoader;
class VInterpolation;

#include <tqobject.h>

class KJEqualizer : public TQObject, public KJWidget
{
TQ_OBJECT
  
public:
	KJEqualizer(const TQStringList &, KJLoader *parent);
	~KJEqualizer(void);

	virtual void mouseMove(const TQPoint &pos, bool);
	virtual bool mousePress(const TQPoint&);
	virtual void paint(TQPainter *p, const TQRect &rect);
	int barNum(const TQPoint &pos) const;
	int level(const TQPoint &pos) const;

public slots:
	void slotUpdateBuffer();

private:
	int mBands;
	int mXSpace;

	int mBandWidth;
	int mBandHalfHeight;
	TQPixmap mBars; // holds all slider images
	TQPixmap *mBack; // holds background of EQ for easy repaint
	TQPixmap *mView; // holds prepared img of all sliders
	VInterpolation *mInterpEq;
};

#endif