A couple of UI additions
[pierogi] / keysets / grundig.cpp
1 #include "grundig.h"
2 #include "protocols/rc5protocol.h"
3 #include "protocols/necxprotocol.h"
4 #include "protocols/necprotocol.h"
5
6 // This one is iffy, might be another brand:
7 GrundigSat1::GrundigSat1(
8   unsigned int index)
9   : PIRKeysetMetaData(
10       "Satellite Keyset 1",
11       Grundig_Make,
12       index)
13 {
14 }
15
16
17 void GrundigSat1::populateProtocol(
18   QObject *guiObject)
19 {
20   if (threadableProtocol)
21   {
22     // If the pointer is not null, the keyset must already be populated.
23     return;
24   }
25
26   threadableProtocol = new RC5Protocol(guiObject, index);
27
28   addKey("Mute", Mute_Key, 0x0286, 13);
29   addKey("Guide", Guide_Key, 0x028F, 13);
30   addKey("Up", Up_Key, 0x0290, 13);
31   addKey("Down", Down_Key, 0x0291, 13);
32   addKey("Serv", Unmapped_Key, 0x0292, 13);
33   addKey("Exit", Exit_Key, 0x0293, 13);
34   addKey("Left", Left_Key, 0x0295, 13);
35   addKey("Right", Right_Key, 0x0296, 13);
36   addKey("OK", Select_Key, 0x0297, 13);
37   addKey("Prefer", Unmapped_Key, 0x02A1, 13);
38   addKey("Perso", Unmapped_Key, 0x02AA, 13);
39   addKey("A", Unmapped_Key, 0x02AB, 13);
40   addKey("B", Unmapped_Key, 0x02AC, 13);
41   addKey("C", Unmapped_Key, 0x02AD, 13);
42   addKey("D", Unmapped_Key, 0x02AE, 13);
43   addKey("E", Unmapped_Key, 0x02AF, 13);
44
45   addKey("1", One_Key, 0x1281, 13);
46   addKey("2", Two_Key, 0x1282, 13);
47   addKey("3", Three_Key, 0x1283, 13);
48   addKey("4", Four_Key, 0x1284, 13);
49   addKey("5", Five_Key, 0x1285, 13);
50   addKey("6", Six_Key, 0x1286, 13);
51   addKey("7", Seven_Key, 0x1287, 13);
52   addKey("8", Eight_Key, 0x1288, 13);
53   addKey("9", Nine_Key, 0x1289, 13);
54   addKey("0", Zero_Key, 0x1280, 13);
55   addKey("Standby", Power_Key, 0x128C, 13);
56   addKey("Info", Info_Key, 0x128F, 13);
57   addKey("TV/Sat", Input_Key, 0x12A8, 13);
58   addKey("Plus", Unmapped_Key, 0x12AF, 13);
59 }
60
61
62 GrundigSat2::GrundigSat2(
63   unsigned int index)
64   : PIRKeysetMetaData(
65       "Satellite Keyset 2",
66       Grundig_Make,
67       index)
68 {
69   addControlledDevice(Grundig_Make, "STR 7100", Sat_Device);
70 }
71
72
73 void GrundigSat2::populateProtocol(
74   QObject *guiObject)
75 {
76   if (threadableProtocol)
77   {
78     // If the pointer is not null, the keyset must already be populated.
79     return;
80   }
81
82   threadableProtocol = new RC5Protocol(guiObject, index);
83
84   addKey("POWER", Power_Key, 0x017B, 13);
85   addKey("Audio", Audio_Key, 0x00D3, 13);
86   addKey(">|", StepForward_Key, 0x008B, 13);
87   addKey("|<", StepBack_Key, 0x00BB, 13);
88   addKey("1", One_Key, 0x00EB, 13);
89   addKey("2", Two_Key, 0x016B, 13);
90   addKey("3", Three_Key, 0x006B, 13);
91   addKey("4", Four_Key, 0x01AB, 13);
92   addKey("5", Five_Key, 0x00AB, 13);
93   addKey("6", Six_Key, 0x012B, 13);
94   addKey("7", Seven_Key, 0x002B, 13);
95   addKey("8", Eight_Key, 0x01CB, 13);
96   addKey("9", Nine_Key, 0x00CB, 13);
97   addKey("0", Zero_Key, 0x01EB, 13);
98   addKey("i", Info_Key, 0x0093, 13);  // "OSD"
99   addKey("MUTE", Mute_Key, 0x00FB, 13);
100   addKey("P+", ChannelUp_Key, 0x0153, 13);
101   addKey("P-", ChannelDown_Key, 0x0053, 13);
102   addKey("-", VolumeDown_Key, 0x00DB, 13);
103   addKey("+", VolumeUp_Key, 0x01DB, 13);
104   addKey("OK", Select_Key, 0x01FB, 13);
105   addKey("AUX", AuxInput_Key, 0x003B, 13); // "DiscMenu"
106   addKey("TXT", Teletext_Key, 0x01E3, 13);
107   addKey("RED", Red_Key, 0x0143, 13);
108   addKey("GREEN", Green_Key, 0x0103, 13);
109   addKey("YELLOW", Yellow_Key, 0x0043, 13);
110   addKey("BLUE", Blue_Key, 0x0113, 13);
111   addKey("COL-", ColorDown_Key, 0x009B, 13);
112   addKey("COL+", ColorUp_Key, 0x019B, 13);
113   addKey("BRIGHT-", BrightnessDown_Key, 0x005B, 13);
114   addKey("BRIGHT+", BrightnessUp_Key, 0x015B, 13);
115   addKey("TV-G", Unmapped_Key, 0x01BB, 13);
116 }
117
118
119 GrundigSat3::GrundigSat3(
120   unsigned int index)
121   : PIRKeysetMetaData(
122       "Satellite Keyset 3",
123       Grundig_Make,
124       index)
125 {
126 }
127
128
129 void GrundigSat3::populateProtocol(
130   QObject *guiObject)
131 {
132   if (threadableProtocol)
133   {
134     // Keyset already populated.
135     return;
136   }
137
138   threadableProtocol = new NECProtocol(guiObject, index, false, true);
139
140   setPreData(0x80, 8);
141
142   addKey("menu", Menu_Key, 0x12, 8);
143   addKey("Ch-", ChannelDown_Key, 0x16, 8);
144   addKey("3", Three_Key, 0x40, 8);
145   addKey("2", Two_Key, 0x41, 8);
146   addKey("1", One_Key, 0x42, 8);
147   addKey("6", Six_Key, 0x44, 8);
148   addKey("5", Five_Key, 0x45, 8);
149   addKey("4", Four_Key, 0x46, 8);
150   addKey("0", Zero_Key, 0x47, 8);
151   addKey("9", Nine_Key, 0x48, 8);
152   addKey("8", Eight_Key, 0x49, 8);
153   addKey("7", Seven_Key, 0x4A, 8);
154   addKey("mute", Mute_Key, 0x4C, 8);
155   addKey("up", Up_Key, 0x4E, 8);
156   addKey("sub", Captions_Key, 0x73, 8);
157   addKey("OK", Select_Key, 0x75, 8);
158   addKey("Yellow", Yellow_Key, 0x78, 8);
159   addKey("text", Teletext_Key, 0x7B, 8);
160   addKey("Vol-", VolumeDown_Key, 0x7D, 8);
161   addKey("exit", Exit_Key, 0x7E, 8);
162   addKey("AD", Unmapped_Key, 0x7F, 8);
163   addKey("power", Power_Key, 0xB2, 8);
164   addKey("TV/DTV", TunerInput_Key, 0xB7, 8);
165   addKey("Guide", Guide_Key, 0xB8, 8);
166   addKey("Info", Info_Key, 0xB9, 8);
167   addKey("Green", Green_Key, 0xBA, 8);
168   addKey("Red", Red_Key, 0xBB, 8);
169   addKey("down", Down_Key, 0xBE, 8);
170   addKey("right", Right_Key, 0xC4, 8);
171   addKey("left", Left_Key, 0xC8, 8);
172   addKey("Blue", Blue_Key, 0xCC, 8);
173   addKey("wide", AspectRatio_Key, 0xCF, 8);
174   addKey("back", PrevChannel_Key, 0xD2, 8);
175   addKey("Vol+", VolumeUp_Key, 0xD4, 8);
176   addKey("Ch List", Unmapped_Key, 0xD5, 8);
177   addKey("Ch+", ChannelUp_Key, 0xD6, 8);
178   addKey("Swap", Unmapped_Key, 0xD8, 8);
179 }
180
181
182 GrundigAmp1::GrundigAmp1(
183   unsigned int index)
184   : PIRKeysetMetaData(
185       "Amp Keyset 1",
186       Grundig_Make,
187       index)
188 {
189   addControlledDevice(Grundig_Make, "FineArts Amplifier V1", Audio_Device);
190 }
191
192
193 void GrundigAmp1::populateProtocol(
194   QObject *guiObject)
195 {
196   if (threadableProtocol)
197   {
198     // If the pointer is not null, the keyset must already be populated.
199     return;
200   }
201
202   threadableProtocol = new RC5Protocol(guiObject, index);
203
204   addKey("number_10", Zero_Key, 0x1C00, 13);
205   addKey("number_1", One_Key, 0x1C01, 13);
206   addKey("number_2", Two_Key, 0x1C02, 13);
207   addKey("number_3", Three_Key, 0x1C03, 13);
208   addKey("number_4", Four_Key, 0x1C04, 13);
209   addKey("number_5", Five_Key, 0x1C05, 13);
210   addKey("number_6", Six_Key, 0x1C06, 13);
211   addKey("number_7", Seven_Key, 0x1C07, 13);
212   addKey("number_8", Eight_Key, 0x1C08, 13);
213   addKey("number_9", Nine_Key, 0x1C09, 13);
214   addKey("mute", Mute_Key, 0x1C0D, 13);
215   addKey("volume_+", VolumeUp_Key, 0x1C10, 13);
216   addKey("volume_-", VolumeDown_Key, 0x1C11, 13);
217   addKey("standby", Power_Key, 0x1C3D, 13);
218
219   addKey("tuner_up", ChannelUp_Key, 0x1C60, 13);
220   addKey("tuner_down", ChannelDown_Key, 0x1C61, 13);
221   addKey("tuner", TunerInput_Key, 0x1C7F, 13);
222
223   addKey("tape_play_back", Unmapped_Key, 0x1CAF, 13);
224   addKey("tape_pause", Unmapped_Key, 0x1CB0, 13);
225   addKey("tape_fastrewind", Unmapped_Key, 0x1CB2, 13);
226   addKey("tape_fastforward", Unmapped_Key, 0x1CB4, 13);
227   addKey("tape_play_forward", Unmapped_Key, 0x1CB5, 13);
228   addKey("tape_stop", Unmapped_Key, 0x1CB6, 13);
229   addKey("tape_record", Unmapped_Key, 0x1CB7, 13);
230   addKey("tape", TapeInput_Key, 0x1CBF, 13);
231
232   addKey("cd_fastforward", FastForward_Key, 0x1D20, 13);
233   addKey("cd_fastrewind", Rewind_Key, 0x1D21, 13);
234   addKey("cd_pause", Pause_Key, 0x1D30, 13);
235   addKey("cd_play", Play_Key, 0x1D35, 13);
236   addKey("cd_stop", Stop_Key, 0x1D36, 13);
237   addKey("cd", CDInput_Key, 0x1D3F, 13);
238
239   addKey("phono", PhonoInput_Key, 0x1D7F, 13);
240   addKey("dsr_up", Unmapped_Key, 0x1DA0, 13);
241   addKey("dsr_down", Unmapped_Key, 0x1DA1, 13);
242   addKey("dsr_aux", AuxInput_Key, 0x1DBF, 13);
243
244   addKey("dcc_play_back", Unmapped_Key, 0x1DEF, 13);
245   addKey("dcc_pause", Unmapped_Key, 0x1DF0, 13);
246   addKey("dcc_fastrewind", Unmapped_Key, 0x1DF2, 13);
247   addKey("dcc_fastforward", Unmapped_Key, 0x1DF4, 13);
248   addKey("dcc_play_forward", Unmapped_Key, 0x1DF5, 13);
249   addKey("dcc_stop", Unmapped_Key, 0x1DF6, 13);
250   addKey("dcc_record", Unmapped_Key, 0x1DF7, 13);
251   addKey("dcc", Unmapped_Key, 0x1DFF, 13);
252 }
253
254
255 GrundigAudio1::GrundigAudio1(
256   unsigned int index)
257   : PIRKeysetMetaData(
258       "Audio(CD) Keyset 1",
259       Grundig_Make,
260       index)
261 {
262   addControlledDevice(Grundig_Make, "CD 8400", Audio_Device);
263 }
264
265
266 void GrundigAudio1::populateProtocol(
267   QObject *guiObject)
268 {
269   if (threadableProtocol)
270   {
271     // If the pointer is not null, the keyset must already be populated.
272     return;
273   }
274
275   threadableProtocol = new RC5Protocol(guiObject, index);
276
277   addKey("0", Zero_Key, 0x1D00, 13);
278   addKey("1", One_Key, 0x1D01, 13);
279   addKey("2", Two_Key, 0x1D02, 13);
280   addKey("3", Three_Key, 0x1D03, 13);
281   addKey("4", Four_Key, 0x1D04, 13);
282   addKey("5", Five_Key, 0x1D05, 13);
283   addKey("6", Six_Key, 0x1D06, 13);
284   addKey("7", Seven_Key, 0x1D07, 13);
285   addKey("8", Eight_Key, 0x1D08, 13);
286   addKey("9", Nine_Key, 0x1D09, 13);
287   addKey("10+", DoubleDigit_Key, 0x1D0A, 13); // hack
288   addKey("20+", PlusOneHundred_Key, 0x1D0B, 13); // also hack
289
290   addKey("repeat", Repeat_Key, 0x1D1D, 13);
291
292   addKey("track+", Next_Key, 0x1D20, 13);
293   addKey("track-", Previous_Key, 0x1D21, 13);
294   addKey("index+", Unmapped_Key, 0x1D22, 13);
295   addKey("index-", Unmapped_Key, 0x1D23, 13);
296   addKey("store", Memory_Key, 0x1D29, 13);
297   addKey("scan", Scan_Key, 0x1D2B, 13);
298
299   addKey("pause", Pause_Key, 0x1D30, 13);
300   addKey("skip-", Replay_Key, 0x1D32, 13);
301   addKey("skip+", Advance_Key, 0x1D34, 13);
302   addKey("play", Play_Key, 0x1D35, 13);
303   addKey("stop", Stop_Key, 0x1D36, 13);
304 }
305
306
307 GrundigAudio2::GrundigAudio2(
308   unsigned int index)
309   : PIRKeysetMetaData(
310       "Audio Keyset 2",
311       Grundig_Make,
312       index)
313 {
314   addControlledDevice(Grundig_Make, "CDM 700", Audio_Device);
315   addControlledDevice(Grundig_Make, "UMS-9V", Audio_Device);
316 }
317
318
319 void GrundigAudio2::populateProtocol(
320   QObject *guiObject)
321 {
322   if (threadableProtocol)
323   {
324     // If the pointer is not null, the keyset must already be populated.
325     return;
326   }
327
328   threadableProtocol = new NECXProtocol(guiObject, index, true);
329
330   setPreData(0xA2A2, 16);
331
332   addKey("1", One_Key, 0x01, 8);
333   addKey("5", Five_Key, 0x02, 8);
334   addKey("9", Nine_Key, 0x03, 8);
335   addKey("tuning_down", ChannelDown_Key, 0x04, 8);
336   addKey("display", Info_Key, 0x05, 8); // "MODE_remain
337   addKey("on/off", Power_Key, 0x06, 8);
338   addKey("tuner", TunerInput_Key, 0x07, 8);
339   addKey("2", Two_Key, 0x09, 8);
340   addKey("6", Six_Key, 0x0A, 8);
341   addKey("0", Zero_Key, 0x0B, 8);
342   addKey("tuning_up", ChannelUp_Key, 0x0C, 8);
343   addKey("random", Random_Key, 0x0D, 8);
344   addKey("band", TunerBand_Key, 0x0E, 8);
345   addKey("cd", CDInput_Key, 0x0F, 8);
346
347   addKey("3", Three_Key, 0x11, 8);
348   addKey("7", Seven_Key, 0x12, 8);
349   addKey("play/pause", Play_Key, 0x13, 8);
350   addKey("play/pause", Pause_Key, 0x13, 8);
351   addKey("time_program", Program_Key, 0x14, 8); // "MEMORY_clock"
352   addKey("intro", Unmapped_Key, 0x15, 8);
353   addKey("SLEEP", Sleep_Key, 0x17, 8);
354   addKey("4", Four_Key, 0x19, 8);
355   addKey("8", Eight_Key, 0x1A, 8);
356   addKey("stop", Stop_Key, 0x1B, 8);
357   addKey("repeat/scan", Repeat_Key, 0x1C, 8);
358   addKey("repeat/scan", Scan_Key, 0x1C, 8);
359   addKey("BASS", EnhancedBass_Key, 0x1D, 8);
360   addKey("tape", TapeInput_Key, 0x1E, 8);
361   addKey("TIMER", Timer_Key, 0x1F, 8);
362
363   addKey("volume_up", VolumeUp_Key, 0x20, 8);
364   addKey("volume_down", VolumeDown_Key, 0x60, 8);
365   addKey("mute", Mute_Key, 0xA0, 8);
366   addKey("+10", DoubleDigit_Key, 0xE0, 8);
367 }
368
369
370 GrundigVCR1::GrundigVCR1(
371   unsigned int index)
372   : PIRKeysetMetaData(
373       "VCR Keyset 1",
374       Grundig_Make,
375       index)
376 {
377   addControlledDevice(Grundig_Make, "GV 437", VCR_Device);
378 }
379
380
381 void GrundigVCR1::populateProtocol(
382   QObject *guiObject)
383 {
384   if (threadableProtocol)
385   {
386     // If the pointer is not null, the keyset must already be populated.
387     return;
388   }
389
390   threadableProtocol = new RC5Protocol(guiObject, index);
391
392   addKey("SYSTEM", Menu_Key, 0x014A, 13);
393   addKey("OK", Select_Key, 0x0157, 13);
394   addKey("next", Next_Key, 0x0170, 13);
395   addKey("previous", Previous_Key, 0x0171, 13);
396   addKey("MONITOR", Unmapped_Key, 0x017A, 13);
397   addKey("tuner", TunerInput_Key, 0x017D, 13);
398   addKey("cass", Eject_Key, 0x017E, 13); // might be wrong
399
400   addKey("0", Zero_Key, 0x1140, 13);
401   addKey("1", One_Key, 0x1141, 13);
402   addKey("2", Two_Key, 0x1142, 13);
403   addKey("3", Three_Key, 0x1143, 13);
404   addKey("4", Four_Key, 0x1144, 13);
405   addKey("5", Five_Key, 0x1145, 13);
406   addKey("6", Six_Key, 0x1146, 13);
407   addKey("7", Seven_Key, 0x1147, 13);
408   addKey("8", Eight_Key, 0x1148, 13);
409   addKey("9", Nine_Key, 0x1149, 13);
410   addKey("SELECT", Enter_Key, 0x114B, 13); // "selvps"
411   addKey("standby", Power_Key, 0x114C, 13); // "OFF"
412   addKey("tracking", AutoTracking_Key, 0x114E, 13);
413
414   addKey("TIMER", Timer_Key, 0x115D, 13);
415
416   // Just guessing at what + and - mean here:
417   addKey("+", ChannelUp_Key, 0x1160, 13);
418   addKey("-", ChannelDown_Key, 0x1161, 13);
419   addKey("REW", Rewind_Key, 0x1165, 13);
420   addKey("FF", FastForward_Key, 0x1166, 13);
421
422   addKey("CLEAR", Clear_Key, 0x1171, 13);
423   addKey("PLAY", Play_Key, 0x1175, 13);
424   addKey("pausestop", Pause_Key, 0x1176, 13); // "STOP"
425   addKey("pausestop", Stop_Key, 0x1176, 13); // "STOP"
426   addKey("RECORD", Record_Key, 0x1177, 13);
427   addKey("SP/LP", VHSSpeed_Key, 0x117A, 13);
428 }
429
430
431 GrundigVCR1a::GrundigVCR1a(
432   unsigned int index)
433   : GrundigVCR1(index)
434 {
435   setKeysetName("VCR Keyset 1a");
436 }
437
438
439 void GrundigVCR1a::populateProtocol(
440   QObject *guiObject)
441 {
442   if (threadableProtocol)
443   {
444     // If the pointer is not null, the keyset must already be populated.
445     return;
446   }
447
448   GrundigVCR1::populateProtocol(guiObject);
449
450   addKey("INDEX", Unmapped_Key, 0x0170, 13);
451   addKey("PAUSE", Pause_Key, 0x1169, 13);
452 }
453
454
455 GrundigTV1::GrundigTV1(
456   unsigned int index)
457   : PIRKeysetMetaData(
458       "TV Keyset 1",
459       Grundig_Make,
460       index)
461 {
462   addControlledDevice(Grundig_Make, "ST 55-908", TV_Device);
463 }
464
465
466 void GrundigTV1::populateProtocol(
467   QObject *guiObject)
468 {
469   if (threadableProtocol)
470   {
471     // If the pointer is not null, the keyset must already be populated.
472     return;
473   }
474
475   threadableProtocol = new RC5Protocol(guiObject, index);
476
477   addKey("leer", Unmapped_Key, 0x0000, 13);
478   addKey("POWER", Power_Key, 0x017F, 13);
479   addKey("1", One_Key, 0x00EF, 13);
480   addKey("2", Two_Key, 0x016F, 13);
481   addKey("3", Three_Key, 0x006F, 13);
482   addKey("4", Four_Key, 0x01AF, 13);
483   addKey("5", Five_Key, 0x00AF, 13);
484   addKey("6", Six_Key, 0x012F, 13);
485   addKey("7", Seven_Key, 0x002F, 13);
486   addKey("8", Eight_Key, 0x1CF, 13);
487   addKey("9", Nine_Key, 0x00CF, 13);
488   addKey("0", Zero_Key, 0x01EF, 13);
489   addKey("AUX2", Unmapped_Key, 0x014F, 13);
490   addKey("BR+", BrightnessUp_Key, 0x015F, 13);
491   addKey("BR-", BrightnessDown_Key, 0x005F, 13);
492   addKey("COLOR+", ColorUp_Key, 0x019F, 13);
493   addKey("COLOR-", ColorDown_Key, 0x009F, 13);
494   addKey("AUX", AuxInput_Key, 0x003F, 13);
495   addKey("I", Info_Key, 0x0097, 13); // "Info"
496   addKey("TXT", Teletext_Key, 0x01E7, 13);
497   addKey("P+", ChannelUp_Key, 0x0157, 13);
498   addKey("P+", Up_Key, 0x0157, 13);
499   addKey("VOL-", VolumeDown_Key, 0x00DF, 13);
500   addKey("VOL-", Left_Key, 0x00DF, 13);
501   addKey("OK", Select_Key, 0x01FF, 13);
502   addKey("VOL+", VolumeUp_Key, 0x01DF, 13);
503   addKey("VOL+", Right_Key, 0x01DF, 13);
504   addKey("P-", ChannelDown_Key, 0x0057, 13);
505   addKey("P-", Down_Key, 0x0057, 13);
506   addKey("MUTE", Mute_Key, 0x00FF, 13);
507   addKey("BLUE", Blue_Key, 0x0117, 13);
508   addKey("YELLOW", Yellow_Key, 0x0047, 13);
509   addKey("GREEN", Green_Key, 0x0107, 13);
510   addKey("RED", Red_Key, 0x0147, 13);
511 }
512
513
514 GrundigTV2::GrundigTV2(
515   unsigned int index)
516   : PIRKeysetMetaData(
517       "TV Keyset 2",
518       Grundig_Make,
519       index)
520 {
521 }
522
523
524 void GrundigTV2::populateProtocol(
525   QObject *guiObject)
526 {
527   if (threadableProtocol)
528   {
529     // If the pointer is not null, the keyset must already be populated.
530     return;
531   }
532
533   threadableProtocol = new RC5Protocol(guiObject, index);
534
535   addKey("P+", ChannelUp_Key, 0x0010, 13);
536   addKey("P+", Up_Key, 0x0010, 13);
537   addKey("P-", ChannelDown_Key, 0x0011, 13);
538   addKey("P-", Down_Key, 0x0011, 13);
539   addKey("info", Info_Key, 0x0012, 13);
540   addKey("<-", VolumeDown_Key, 0x0015, 13);
541   addKey("<-", Left_Key, 0x0015, 13);
542   addKey("+>", VolumeUp_Key, 0x0016, 13);
543   addKey("+>", Right_Key, 0x0016, 13);
544   addKey("OK", Select_Key, 0x0017, 13);
545
546   addKey("NEXT", Next_Key, 0x0170, 13);
547   addKey("PREV", Previous_Key, 0x0171, 13);
548
549   addKey("0AV", Zero_Key, 0x1000, 13); // also AV?
550   addKey("1", One_Key, 0x1001, 13);
551   addKey("2", Two_Key, 0x1002, 13);
552   addKey("3", Three_Key, 0x1003, 13);
553   addKey("4", Four_Key, 0x1004, 13);
554   addKey("5", Five_Key, 0x1005, 13);
555   addKey("6", Six_Key, 0x1006, 13);
556   addKey("7", Seven_Key, 0x1007, 13);
557   addKey("8", Eight_Key, 0x1008, 13);
558   addKey("9", Nine_Key, 0x1009, 13);
559   addKey("power", Power_Key, 0x100C, 13);
560   addKey("mute", Mute_Key, 0x100D, 13);
561
562   addKey("br+", BrightnessUp_Key, 0x1012, 13);
563   addKey("br-", BrightnessDown_Key, 0x1013, 13);
564   addKey("col+", ColorUp_Key, 0x1014, 13);
565   addKey("col-", ColorDown_Key, 0x1015, 13);
566
567   addKey("PC/CL", Unmapped_Key, 0x1031, 13);
568
569   addKey("TXT", Teletext_Key, 0x115D, 13);
570   addKey("<<", Rewind_Key, 0x1165, 13);
571   addKey(">>", FastForward_Key, 0x1166, 13);
572   addKey("||", Pause_Key, 0x1169, 13);
573   addKey(">", Play_Key, 0x1175, 13);
574   addKey("stop", Stop_Key, 0x1176, 13);
575   addKey("REC", Record_Key, 0x1177, 13);
576 }
577
578
579 GrundigTV3::GrundigTV3(
580   unsigned int index)
581   : PIRKeysetMetaData(
582       "TV/VDR Keyset 3",
583       Grundig_Make,
584       index)
585 {
586 }
587
588
589 void GrundigTV3::populateProtocol(
590   QObject *guiObject)
591 {
592   if (threadableProtocol)
593   {
594     // If the pointer is not null, the keyset must already be populated.
595     return;
596   }
597
598   threadableProtocol = new RC5Protocol(guiObject, index);
599
600   addKey("USR4", Unmapped_Key, 0x0205, 13);
601   addKey("INFO", Info_Key, 0x0206, 13);
602   addKey("BACK", Exit_Key, 0x020F, 13);
603   addKey("UP", Up_Key, 0x0210, 13);
604   addKey("DOWN", Down_Key, 0x0211, 13);
605   addKey("LEFT", Left_Key, 0x0215, 13);
606   addKey("RIGHT", Right_Key, 0x0216, 13);
607   addKey("OK", Select_Key, 0x0217, 13);
608
609   addKey("RED", Red_Key, 0x022B, 13);
610   addKey("GREEN", Green_Key, 0x022C, 13);
611   addKey("YEL", Yellow_Key, 0x022D, 13);
612   addKey("BLU", Blue_Key, 0x022E, 13);
613   addKey("USR2", Unmapped_Key, 0x0235, 13);
614   addKey("USR1", Unmapped_Key, 0x023E, 13);
615
616   addKey("0", Zero_Key, 0x1200, 13);
617   addKey("1", One_Key, 0x1201, 13);
618   addKey("2", Two_Key, 0x1202, 13);
619   addKey("3", Three_Key, 0x1203, 13);
620   addKey("4", Four_Key, 0x1204, 13);
621   addKey("5", Five_Key, 0x1205, 13);
622   addKey("6", Six_Key, 0x1206, 13);
623   addKey("7", Seven_Key, 0x1207, 13);
624   addKey("8", Eight_Key, 0x1208, 13);
625   addKey("9", Nine_Key, 0x1209, 13);
626
627   addKey("MUTE", Mute_Key, 0x120D, 13);
628   addKey("REC", Record_Key, 0x120E, 13);
629   addKey("VOL+", VolumeUp_Key, 0x1210, 13);
630   addKey("VOL-", VolumeDown_Key, 0x1211, 13);
631   addKey("NEXT", Next_Key, 0x121E, 13);
632   addKey("PREV", Previous_Key, 0x121F, 13);
633   addKey("CHANNEL+", ChannelUp_Key, 0x1220, 13);
634   addKey("CHANNEL-", ChannelDown_Key, 0x1221, 13);
635   addKey("CEC", Unmapped_Key, 0x1222, 13);
636   addKey("USR3", Unmapped_Key, 0x1223, 13);
637   addKey("REW", Rewind_Key, 0x122C, 13);
638   addKey("FF", FastForward_Key, 0x122E, 13);
639
640   addKey("PAUSE", Pause_Key, 0x1230, 13);
641   addKey("PLAY", Play_Key, 0x1235, 13);
642   addKey("STOP", Stop_Key, 0x1236, 13);
643   addKey("MENU", Menu_Key, 0x123C, 13);
644 }
645
646
647 GrundigDVD1::GrundigDVD1(
648   unsigned int index)
649   : PIRKeysetMetaData(
650       "DVD Keyset 1",
651       Grundig_Make,
652       index)
653 {
654   addControlledDevice(Grundig_Make, "GDV 130", DVD_Device);
655 }
656
657
658 void GrundigDVD1::populateProtocol(
659   QObject *guiObject)
660 {
661   if (threadableProtocol)
662   {
663     // If the pointer is not null, the keyset must already be populated.
664     return;
665   }
666
667   threadableProtocol = new NECProtocol(guiObject, index, false, true);
668
669   setPreData(0x10, 8);
670
671   addKey("POWER", Power_Key, 0x00, 8);
672   addKey("FF_SF", FastForward_Key, 0x01, 8);
673   addKey("OPEN_CLOSE", Eject_Key, 0x02, 8);
674   addKey("ARROW_LEFT", Left_Key, 0x03, 8);
675   addKey("STEP", StepForward_Key, 0x04, 8);
676   addKey("PREV", Previous_Key, 0x05, 8);
677   addKey("DISPLAY", Info_Key, 0x06, 8);
678   addKey("NEXT", Next_Key, 0x07, 8);
679   addKey("1", One_Key, 0x08, 8);
680   addKey("2", Two_Key, 0x09, 8);
681   addKey("3", Three_Key, 0x0A, 8);
682   addKey("ARROW_UP", Up_Key, 0x0B, 8);
683   addKey("FR_SR", Rewind_Key, 0x0C, 8);
684   addKey("SETUP", Menu_Key, 0x0D, 8);
685   addKey("TITLE", DiscTitle_Key, 0x0E, 8);
686   addKey("MENU", DiscMenu_Key, 0x0F, 8);
687
688   addKey("4", Four_Key, 0x10, 8);
689   addKey("5", Five_Key, 0x11, 8);
690   addKey("6", Six_Key, 0x12, 8);
691   addKey("SELECT", Select_Key, 0x13, 8);
692   addKey("DIGEST", Unmapped_Key, 0x14, 8);
693   addKey("ANGLE", Angle_Key, 0x15, 8);
694   addKey("SUBTITLE", Captions_Key, 0x16, 8);
695   addKey("AUDIO", Audio_Key, 0x17, 8);
696   addKey("7", Seven_Key, 0x18, 8);
697   addKey("8", Eight_Key, 0x19, 8);
698   addKey("9", Nine_Key, 0x1A, 8);
699   addKey("ARROW_RIGHT", Right_Key, 0x1B, 8);
700   addKey("PROGRAM", Program_Key, 0x1C, 8);
701   addKey("VOLUME_UP", VolumeUp_Key, 0x1D, 8);
702   addKey("ZOOM", Zoom_Key, 0x1E, 8);
703   addKey("3D_SOUND", Surround_Key, 0x1F, 8);
704
705   addKey("CLEAR", Clear_Key, 0x40, 8);
706   addKey("0", Zero_Key, 0x41, 8);
707   addKey("PCB", Unmapped_Key, 0x42, 8);
708   addKey("ARROW_DOWN", Down_Key, 0x43, 8);
709   addKey("SHUFFLE", Random_Key, 0x44, 8);
710   addKey("VOLUME_DOWN", VolumeDown_Key, 0x45, 8);
711   addKey("REPEAT", Repeat_Key, 0x46, 8);
712   addKey("A-B", RepeatAB_Key, 0x47, 8);
713   addKey("STOP/RETURN", Stop_Key, 0x48, 8);
714   addKey("STOP/RETURN", Exit_Key, 0x48, 8);
715   addKey("PLAY/PAUSE", Play_Key, 0x49, 8);
716   addKey("PLAY/PAUSE", Pause_Key, 0x49, 8);
717   addKey("MARKER", Unmapped_Key, 0x4A, 8);
718 }