Change back to real tabbed window, updates keysets
[pierogi] / keysets / technisat.cpp
1 #include "technisat.h"
2 #include "protocols/paceprotocol.h"
3 #include "protocols/rc5protocol.h"
4
5
6 TechnisatSTB1::TechnisatSTB1(
7   unsigned int index)
8   : PIRKeysetMetaData(
9       "Satellite Receiver 1",
10       Technisat_Make,
11       index)
12 {
13   addControlledDevice(Technisat_Make, "ST 3004 S", Other_Device);
14 }
15
16
17 void TechnisatSTB1::populateProtocol(
18   QObject *guiObject)
19 {
20   if (threadableProtocol)
21   {
22     // Keyset already populated.
23     return;
24   }
25
26   threadableProtocol = new PaceProtocol(guiObject, index);
27
28   setPreData(0x4, 3);
29
30   addKey("POWER", Power_Key, 0x01, 6);
31   addKey("TV/R", TunerInput_Key, 0x02, 6); // "radio"
32   addKey("dek", Unmapped_Key, 0x04, 6);
33   addKey("tab", Unmapped_Key, 0x05, 6);
34   addKey("MUTE", Mute_Key, 0x06, 6);
35   addKey("CH_UP", ChannelUp_Key, 0x07, 6);
36   addKey("CH_DOWN", ChannelDown_Key, 0x08, 6);
37   addKey("sat", SatInput_Key, 0x09, 6);
38   addKey("lnb", Unmapped_Key, 0x0E, 6);
39   addKey("0", Zero_Key, 0x0F, 6);
40
41   addKey("1", One_Key, 0x10, 6);
42   addKey("2", Two_Key, 0x11, 6);
43   addKey("3", Three_Key, 0x12, 6);
44   addKey("4", Four_Key, 0x13, 6);
45   addKey("5", Five_Key, 0x14, 6);
46   addKey("6", Six_Key, 0x15, 6);
47   addKey("7", Seven_Key, 0x16, 6);
48   addKey("8", Eight_Key, 0x17, 6);
49   addKey("9", Nine_Key, 0x18, 6);
50   addKey("deem", Unmapped_Key, 0x1E, 6);
51
52   addKey("delete", Unmapped_Key, 0x21, 6);
53   addKey("A/B", Audio_Key, 0x24, 6);
54   addKey("save", Unmapped_Key, 0x26, 6);
55   addKey("BACK", Exit_Key, 0x27, 6);
56   addKey("audio_plus", Unmapped_Key, 0x28, 6);
57   addKey("audio_minus", Unmapped_Key, 0x29, 6);
58   addKey("MENU", Menu_Key, 0x2B, 6);
59   addKey("video_plus", Unmapped_Key, 0x2C, 6);
60   addKey("video_minus", Unmapped_Key, 0x2D, 6);
61   addKey("VOL_UP", VolumeUp_Key, 0x2E, 6);
62   addKey("VOL_DOWN", VolumeDown_Key, 0x2F, 6);
63
64   addKey("ARROW_UP", Up_Key, 0x32, 6);
65   addKey("ARROW_DOWN", Down_Key, 0x33, 6);
66   addKey("ARROW_LEFT", Left_Key, 0x34, 6);
67   addKey("ARROW_RIGHT", Right_Key, 0x35, 6);
68   addKey("OK", Select_Key, 0x36, 6);
69   addKey("LIST", Unmapped_Key, 0x37, 6);
70 }
71
72
73 TechnisatSTB1a::TechnisatSTB1a(
74   unsigned int index)
75   : TechnisatSTB1(index)
76 {
77   setKeysetName("Satellite Receiver 1a");
78
79   addControlledDevice(Technisat_Make, "ST 3002 S", Other_Device);
80 }
81
82
83 void TechnisatSTB1a::populateProtocol(
84   QObject *guiObject)
85 {
86   if (threadableProtocol)
87   {
88     // Keyset already populated.
89     return;
90   }
91
92   TechnisatSTB1::populateProtocol(guiObject);
93
94   setPreData(0x1, 3);
95 }
96
97
98 TechnisatSTB2::TechnisatSTB2(
99   unsigned int index)
100   : PIRKeysetMetaData(
101       "Satellite Receiver 2",
102       Technisat_Make,
103       index)
104 {
105   addControlledDevice(Technisat_Make, "TechniBox CAM1", Other_Device);
106 }
107
108
109 void TechnisatSTB2::populateProtocol(
110   QObject *guiObject)
111 {
112   if (threadableProtocol)
113   {
114     // Keyset already populated.
115     return;
116   }
117
118   threadableProtocol = new RC5Protocol(guiObject, index);
119
120   addKey("TV/SAT", SatInput_Key, 0x0200, 13);
121   addKey("INFO", Info_Key, 0x020F, 13);
122   addKey("MENU", Menu_Key, 0x0212, 13);
123   addKey("TV/RADIO", TunerInput_Key, 0x0213, 13);
124   addKey("OK", Select_Key, 0x0217, 13);
125
126   addKey("RED", Red_Key, 0x022B, 13);
127   addKey("GREEN", Green_Key, 0x022C, 13);
128   addKey("YELLOW", Yellow_Key, 0x022D, 13);
129   addKey("BLUE", Blue_Key, 0x022E, 13);
130
131   addKey("0", Zero_Key, 0x1200, 13);
132   addKey("1", One_Key, 0x1201, 13);
133   addKey("2", Two_Key, 0x1202, 13);
134   addKey("3", Three_Key, 0x1203, 13);
135   addKey("4", Four_Key, 0x1204, 13);
136   addKey("5", Five_Key, 0x1205, 13);
137   addKey("6", Six_Key, 0x1206, 13);
138   addKey("7", Seven_Key, 0x1207, 13);
139   addKey("8", Eight_Key, 0x1208, 13);
140   addKey("9", Nine_Key, 0x1209, 13);
141   addKey("-/--", DoubleDigit_Key, 0x120A, 13); // "OPTION"
142   addKey("POWER", Power_Key, 0x120C, 13);
143   addKey("MUTE", Mute_Key, 0x120D, 13);
144
145   addKey("RIGHT", Right_Key, 0x1210, 13);
146   addKey("RIGHT", VolumeUp_Key, 0x1210, 13);
147   addKey("LEFT", Left_Key, 0x1211, 13);
148   addKey("LEFT", VolumeDown_Key, 0x1211, 13);
149   addKey("UP", Up_Key, 0x1220, 13);
150   addKey("UP", ChannelUp_Key, 0x1220, 13);
151   addKey("DOWN", Down_Key, 0x1221, 13);
152   addKey("DOWN", ChannelDown_Key, 0x1221, 13);
153   addKey("BACK", Exit_Key, 0x1222, 13);
154   addKey("A/B", Audio_Key, 0x1223, 13);
155   addKey("STOP", Unmapped_Key, 0x1229, 13);
156   addKey("EPG", Guide_Key, 0x122F, 13); // "SFI"
157   addKey("EXT", Input_Key, 0x1238, 13);
158   addKey("VT", Teletext_Key, 0x123C, 13); // "TXT"
159 }
160
161
162 TechnisatSTB2a::TechnisatSTB2a(
163   unsigned int index)
164   : TechnisatSTB2(index)
165 {
166   setKeysetName("Satellite Receiver 2a");
167 }
168
169
170 void TechnisatSTB2a::populateProtocol(
171   QObject *guiObject)
172 {
173   if (threadableProtocol)
174   {
175     // Keyset already populated.
176     return;
177   }
178
179   TechnisatSTB2::populateProtocol(guiObject);
180
181   addKey("UP", Up_Key, 0x0210, 13);
182   addKey("LEFT", Left_Key, 0x0215, 13);
183   addKey("RIGHT", Right_Key, 0x0216, 13);
184   addKey("DOWN", Down_Key, 0x0211, 13);
185 }
186
187
188 TechnisatSTB3::TechnisatSTB3(
189   unsigned int index)
190   : PIRKeysetMetaData(
191       "Satellite Receiver (and PCTV) 3",
192       Technisat_Make,
193       index)
194 {
195   addControlledDevice(Technisat_Make, "SkyStar 2 TV", Other_Device);
196   addControlledDevice(Technisat_Make, "SkyStar 2.6D", Other_Device);
197 }
198
199
200 void TechnisatSTB3::populateProtocol(
201   QObject *guiObject)
202 {
203   if (threadableProtocol)
204   {
205     // Keyset already populated.
206     return;
207   }
208
209   threadableProtocol = new RC5Protocol(guiObject, index);
210
211   addKey("INFO", Info_Key, 0x028F, 13);
212   addKey("MENU", Menu_Key, 0x0292, 13);
213   addKey("TV/RADIO", TunerInput_Key, 0x0293, 13);
214   addKey("OK", Select_Key, 0x0297, 13);
215   addKey("RED", Red_Key, 0x02AB, 13);
216   addKey("REWIND", Rewind_Key, 0x02AB, 13);
217   addKey("GREEN", Green_Key, 0x02AC, 13);
218   addKey("STOP", Stop_Key, 0x02AC, 13);
219   addKey("YELLOW", Yellow_Key, 0x02AD, 13);
220   addKey("PLAY", Play_Key, 0x02AD, 13);
221   addKey("PAUSE", Pause_Key, 0x02AD, 13);
222   addKey("BLUE", Blue_Key, 0x02AE, 13);
223   addKey("FASTFORWARD", FastForward_Key, 0x02AE, 13);
224   addKey("CHECK", Unmapped_Key, 0x02B6, 13);
225   addKey("KEY_QUESTION", Unmapped_Key, 0x02BD, 13);
226   addKey("ZOOM", Zoom_Key, 0x02BE, 13);
227
228   addKey("0", Zero_Key, 0x1280, 13);
229   addKey("1", One_Key, 0x1281, 13);
230   addKey("2", Two_Key, 0x1282, 13);
231   addKey("3", Three_Key, 0x1283, 13);
232   addKey("4", Four_Key, 0x1284, 13);
233   addKey("5", Five_Key, 0x1285, 13);
234   addKey("6", Six_Key, 0x1286, 13);
235   addKey("7", Seven_Key, 0x1287, 13);
236   addKey("8", Eight_Key, 0x1288, 13);
237   addKey("9", Nine_Key, 0x1289, 13);
238   addKey("-/--", DoubleDigit_Key, 0x128A, 13); // "OPTION"
239   addKey("POWER", Power_Key, 0x128C, 13);
240   addKey("MUTE", Mute_Key, 0x128D, 13);
241   addKey("HILFE", Unmapped_Key, 0x128F, 13);
242
243   addKey("RIGHT", Right_Key, 0x1290, 13);
244   addKey("V+", VolumeUp_Key, 0x1290, 13);
245   addKey("LEFT", Left_Key, 0x1291, 13);
246   addKey("V-", VolumeDown_Key, 0x1291, 13);
247   addKey("UP", Up_Key, 0x12A0, 13);
248   addKey("P+", ChannelUp_Key, 0x12A0, 13);
249   addKey("DOWN", Down_Key, 0x12A1, 13);
250   addKey("P-", ChannelDown_Key, 0x12A1, 13);
251   addKey("BACK", Exit_Key, 0x12A2, 13);
252   addKey("A/B", Audio_Key, 0x12A3, 13);
253   addKey("Time", Unmapped_Key, 0x12A6, 13);
254   addKey("STOP", Unmapped_Key, 0x12A9, 13); // "Still"
255   addKey("EPG", Guide_Key, 0x12AF, 13); //"SFI"
256   addKey("RECORD", Record_Key, 0x12B7, 13);
257   addKey("EXT", Input_Key, 0x12B8, 13);
258   addKey("TXT", Teletext_Key, 0x12BC, 13);
259 }
260
261
262 TechnisatSTB3a::TechnisatSTB3a(
263   unsigned int index)
264   : TechnisatSTB3(index)
265 {
266   setKeysetName("Satellite Receiver (and PCTV) 3a");
267
268   addControlledDevice(Technisat_Make, "Technisat Digit HD4 CX", Other_Device);
269 }
270
271
272 void TechnisatSTB3a::populateProtocol(
273   QObject *guiObject)
274 {
275   if (threadableProtocol)
276   {
277     // Keyset already populated.
278     return;
279   }
280
281   TechnisatSTB3::populateProtocol(guiObject);
282
283   addKey("UP", Up_Key, 0x0290, 13);
284   addKey("DOWN", Down_Key, 0x0291, 13);
285   addKey("LEFT", Left_Key, 0x0295, 13);
286   addKey("RIGHT", Right_Key, 0x0296, 13);
287 }