summaryrefslogtreecommitdiffstats
path: root/noatun/library/equalizerview.h
blob: 98778fccefdc53b8b4fb5eaee0100df9c60158c9 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef EQUALIZERVIEW_H
#define EQUALIZERVIEW_H

#include <qwidget.h>
#include <kdialogbase.h>
#include <klistview.h>

class VBand;
class QSlider;
class QLabel;
class QListViewItem;
class VPreset;
class QHBoxLayout;
class EqualizerWidget;


class EqualizerLevel : public QWidget
{
Q_OBJECT
public:
	EqualizerLevel(QWidget *parent, VBand band);

public slots:
	void changed();
	void changed(int);

	void setBand(VBand band);

private:
	VBand mBand;
	QSlider *mSlider;
	QLabel *mLabel;
};


class PresetList : public KListView
{
Q_OBJECT
public:
	PresetList(QWidget *parent, const char *name=0);

public:
	void rename(QListViewItem *item, int c);
};


class EqualizerView : public KDialogBase
{
Q_OBJECT
	QPtrList<EqualizerLevel> mBands;

public:
	EqualizerView();
	virtual void show();

	QListViewItem *itemFor(const QString &filename);
	QListViewItem *itemFor(const VPreset &preset);

public slots:
	void setPreamp(int);
	void changedPreamp(int);

private slots:
	void changedBands();
	void changedEq();

	void removed(VPreset p);
	void created(VPreset p);
	void renamed(VPreset p);

	void remove();
	void create();
	void reset();
	void rename(QListViewItem *);
	void select(QListViewItem*);

private:
	bool first;
	EqualizerWidget *mWidget;
	QHBoxLayout *bandsLayout;
// 	QCheckBox *mOn;
// 	QSlider *mPreamp;
	PresetList *mPresets;
	bool mGoingPreset;
// 	QPushButton *mRemovePreset, *mAddPreset;
// 	QFrame *mSliders;
// 	KIntNumInput *mBandCount;
};

#endif