summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/kjequalizer.h
blob: f2e85678753feb5fc44c28933a2775bf01cc0d84 (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 KJETQUALIZER_H
#define KJETQUALIZER_H

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

#include <tqobject.h>

class KJEqualizer : public TQObject, public KJWidget
{
Q_OBJECT
  TQ_OBJECT
public:
	KJEqualizer(const TQStringList &, KJLoader *tqparent);
	~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 tqrepaint
	TQPixmap *mView; // holds prepared img of all sliders
	VInterpolation *mInterpEq;
};

#endif