New GUI, many changes
[pierogi] / forms / piradjustform.cpp
1 #include "piradjustform.h"
2 #include "ui_piradjustform.h"
3
4 #include "mainwindow.h"
5 #include "pirkeysetmanager.h"
6
7 PIRAdjustForm::PIRAdjustForm(MainWindow *mw) :
8   QWidget(0),
9   ui(new Ui::PIRAdjustForm),
10   mainWindow(mw)
11 {
12   ui->setupUi(this);
13 }
14
15 PIRAdjustForm::~PIRAdjustForm()
16 {
17   delete ui;
18 }
19
20
21 void PIRAdjustForm::enableButtons(
22   const PIRKeysetManager *keyset,
23   unsigned int id)
24 {
25   emit bassUpEnabled(keyset->hasKey(id, BassUp_Key));
26   emit trebleUpEnabled(keyset->hasKey(id, TrebleUp_Key));
27   emit enhancedBassEnabled(keyset->hasKey(id, EnhancedBass_Key));
28   emit noiseReductionEnabled(keyset->hasKey(id, NoiseReduction_Key));
29   emit bassDownEnabled(keyset->hasKey(id, BassDown_Key));
30   emit trebleDownEnabled(keyset->hasKey(id, TrebleDown_Key));
31   emit balanceLeftEnabled(keyset->hasKey(id, BalanceLeft_Key));
32   emit balanceRightEnabled(keyset->hasKey(id, BalanceRight_Key));
33   emit surroundEnabled(keyset->hasKey(id, Surround_Key));
34   emit colorUpEnabled(keyset->hasKey(id, ColorUp_Key));
35   emit brightnessUpEnabled(keyset->hasKey(id, BrightnessUp_Key));
36   emit contrastUpEnabled(keyset->hasKey(id, ContrastUp_Key));
37   emit zoomEnabled(keyset->hasKey(id, Zoom_Key));
38   emit colorDownEnabled(keyset->hasKey(id, ColorDown_Key));
39   emit brightnessDownEnabled(keyset->hasKey(id, BrightnessDown_Key));
40   emit contrastDownEnabled(keyset->hasKey(id, ContrastDown_Key));
41 }
42
43
44 void PIRAdjustForm::on_bassUpButton_pressed()
45 {
46   mainWindow->startRepeating(BassUp_Key);
47 }
48
49 void PIRAdjustForm::on_bassUpButton_released()
50 {
51   mainWindow->stopRepeating();
52 }
53
54 void PIRAdjustForm::on_trebleUpButton_pressed()
55 {
56   mainWindow->startRepeating(TrebleUp_Key);
57 }
58
59 void PIRAdjustForm::on_trebleUpButton_released()
60 {
61   mainWindow->stopRepeating();
62 }
63
64 void PIRAdjustForm::on_enhancedBassButton_pressed()
65 {
66   mainWindow->startRepeating(EnhancedBass_Key);
67 }
68
69 void PIRAdjustForm::on_enhancedBassButton_released()
70 {
71   mainWindow->stopRepeating();
72 }
73
74 void PIRAdjustForm::on_noiseReductionButton_pressed()
75 {
76   mainWindow->startRepeating(NoiseReduction_Key);
77 }
78
79 void PIRAdjustForm::on_noiseReductionButton_released()
80 {
81   mainWindow->stopRepeating();
82 }
83
84 void PIRAdjustForm::on_bassDownButton_pressed()
85 {
86   mainWindow->startRepeating(BassDown_Key);
87 }
88
89 void PIRAdjustForm::on_bassDownButton_released()
90 {
91   mainWindow->stopRepeating();
92 }
93
94 void PIRAdjustForm::on_trebleDownButton_pressed()
95 {
96   mainWindow->startRepeating(TrebleDown_Key);
97 }
98
99 void PIRAdjustForm::on_trebleDownButton_released()
100 {
101   mainWindow->stopRepeating();
102 }
103
104 void PIRAdjustForm::on_balanceLeftButton_pressed()
105 {
106   mainWindow->startRepeating(BalanceLeft_Key);
107 }
108
109 void PIRAdjustForm::on_balanceLeftButton_released()
110 {
111   mainWindow->stopRepeating();
112 }
113
114 void PIRAdjustForm::on_balanceRightButton_pressed()
115 {
116   mainWindow->startRepeating(BalanceRight_Key);
117 }
118
119 void PIRAdjustForm::on_balanceRightButton_released()
120 {
121   mainWindow->stopRepeating();
122 }
123
124 void PIRAdjustForm::on_surroundButton_pressed()
125 {
126   mainWindow->startRepeating(Surround_Key);
127 }
128
129 void PIRAdjustForm::on_surroundButton_released()
130 {
131   mainWindow->stopRepeating();
132 }
133
134 void PIRAdjustForm::on_colorUpButton_pressed()
135 {
136   mainWindow->startRepeating(ColorUp_Key);
137 }
138
139 void PIRAdjustForm::on_colorUpButton_released()
140 {
141   mainWindow->stopRepeating();
142 }
143
144 void PIRAdjustForm::on_brightnessUpButton_pressed()
145 {
146   mainWindow->startRepeating(BrightnessUp_Key);
147 }
148
149 void PIRAdjustForm::on_brightnessUpButton_released()
150 {
151   mainWindow->stopRepeating();
152 }
153
154 void PIRAdjustForm::on_contrastUpButton_pressed()
155 {
156   mainWindow->startRepeating(ContrastUp_Key);
157 }
158
159 void PIRAdjustForm::on_contrastUpButton_released()
160 {
161   mainWindow->stopRepeating();
162 }
163
164 void PIRAdjustForm::on_zoomButton_pressed()
165 {
166   mainWindow->startRepeating(Zoom_Key);
167 }
168
169 void PIRAdjustForm::on_zoomButton_released()
170 {
171   mainWindow->stopRepeating();
172 }
173
174 void PIRAdjustForm::on_colorDownButton_pressed()
175 {
176   mainWindow->startRepeating(ColorDown_Key);
177 }
178
179 void PIRAdjustForm::on_colorDownButton_released()
180 {
181   mainWindow->stopRepeating();
182 }
183
184 void PIRAdjustForm::on_brightnessDownButton_pressed()
185 {
186   mainWindow->startRepeating(BrightnessDown_Key);
187 }
188
189 void PIRAdjustForm::on_brightnessDownButton_released()
190 {
191   mainWindow->stopRepeating();
192 }
193
194 void PIRAdjustForm::on_contrastDownButton_pressed()
195 {
196   mainWindow->startRepeating(ContrastDown_Key);
197 }
198
199 void PIRAdjustForm::on_contrastDownButton_released()
200 {
201   mainWindow->stopRepeating();
202 }