Advanced Settings Panel
[pierogi] / keysets / telefunken.cpp
1 #include "telefunken.h"
2 #include "protocols/paceprotocol.h"
3
4
5 TelefunkenTV1::TelefunkenTV1(
6   unsigned int index)
7   : PIRKeysetMetaData(
8       "TV Keyset 1",
9       Telefunken_Make,
10       index)
11 {
12 }
13
14
15 void TelefunkenTV1::populateProtocol(
16   QObject *guiObject)
17 {
18   if (threadableProtocol)
19   {
20     // Keyset already populated.
21     return;
22   }
23
24   threadableProtocol = new PaceProtocol(guiObject, index);
25
26   setPreData(0x7, 3);
27
28   addKey("KEY_1", One_Key, 0x00, 6);
29   addKey("KEY_4", Four_Key, 0x01, 6);
30   addKey("KEY_7", Seven_Key, 0x02, 6);
31   addKey("COLOR+", ColorUp_Key, 0x03, 6);
32   addKey("COLOR-", ColorDown_Key, 0x04, 6);
33   addKey("MUTE", Mute_Key, 0x05, 6);
34   addKey("CHANNEL", Info_Key, 0x06, 6);
35   addKey("KEY_2", Two_Key, 0x08, 6);
36   addKey("KEY_5", Five_Key, 0x09, 6);
37   addKey("KEY_8", Eight_Key, 0x0A, 6);
38   addKey("BRIGHTNESS+", BrightnessUp_Key, 0x0B, 6);
39   addKey("BRIGHTNESS-", BrightnessDown_Key, 0x0C, 6);
40   addKey("KEY_0", Zero_Key, 0x0E, 6);
41
42   addKey("KEY_3", Three_Key, 0x10, 6);
43   addKey("KEY_6", Six_Key, 0x11, 6);
44   addKey("KEY_9", Nine_Key, 0x12, 6);
45   addKey("BLUE/VT", Blue_Key, 0x15, 6);
46   addKey("VTX", Unmapped_Key, 0x15, 6); // what is this?
47   addKey("AV", Input_Key, 0x18, 6);
48   addKey("KEY_POWER", Power_Key, 0x1D, 6);
49   addKey("STD_VALUES", Unmapped_Key, 0x1E, 6); // "VIOLET/NORM", "TOP"
50   addKey("KEY_CHANNELUP", ChannelUp_Key, 0x1F, 6);
51
52   addKey("KEY_CHANNELDOWN", ChannelDown_Key, 0x20, 6);
53   addKey("BASS", BassUp_Key, 0x21, 6);
54   addKey("SIZE", Unmapped_Key, 0x22, 6); // txt
55   addKey("CONTRAST", ContrastUp_Key, 0x23, 6);
56   addKey("<-o->", Unmapped_Key, 0x24, 6); // txt
57   addKey("BALANCE", BalanceLeft_Key, 0x25, 6);
58   addKey("HIDDEN", Unmapped_Key, 0x28, 6); //txt
59   addKey("VOL_UP", VolumeUp_Key, 0x29, 6);
60   addKey("VOL_DOWN", VolumeDown_Key, 0x2A, 6);
61   addKey("MIX", Unmapped_Key, 0x2B, 6); //txt
62
63   addKey("INDEX", Unmapped_Key, 0x34, 6); //txt
64   addKey("STOP", Unmapped_Key, 0x35, 6); //txt
65   addKey("CLOCK", Unmapped_Key, 0x36, 6); //txt
66   addKey("YELLOW/PR", Yellow_Key, 0x38, 6);
67   addKey("PROGRAM", Program_Key, 0x38, 6);
68   addKey("RED/TONE", Red_Key, 0x39, 6);
69   addKey("AUDIO", SoundMode_Key, 0x39, 6);
70   addKey("GREEN/PICTURE", Green_Key, 0x3B, 6);
71   addKey("VIDEO", PictureMode_Key, 0x3B, 6);
72   addKey("FORMAT+", Unmapped_Key, 0x3C, 6);
73   addKey("FORMAT-", Unmapped_Key, 0x3D, 6);
74   addKey("VIDEOTEXT", Teletext_Key, 0x3E, 6);
75 }
76
77
78 TelefunkenTV1a::TelefunkenTV1a(
79   unsigned int index)
80   : TelefunkenTV1(index)
81 {
82   setKeysetName("TV Keyset 1a");
83 }
84
85
86 void TelefunkenTV1a::populateProtocol(
87   QObject *guiObject)
88 {
89   if (threadableProtocol)
90   {
91     // Keyset already populated.
92     return;
93   }
94
95   TelefunkenTV1::populateProtocol(guiObject);
96
97   addKey("VOLUME+", VolumeUp_Key, 0x1B, 6);
98   addKey("VOLUME-", VolumeDown_Key, 0x1C, 6);
99   addKey("+", Right_Key, 0x29, 6);
100   addKey("-", Left_Key, 0x2A, 6);
101 }