Advanced Settings Panel
[pierogi] / keysets / emtec.cpp
1 #include "emtec.h"
2 #include "protocols/necprotocol.h"
3
4 EmtecSTB1::EmtecSTB1(
5   unsigned int index)
6   : PIRKeysetMetaData(
7       "Movie Cube Keyset 1",
8       Emtec_Make,
9       index)
10 {
11   addControlledDevice(Emtec_Make, "Movie Cube N200", Other_Device);
12 }
13
14
15 void EmtecSTB1::populateProtocol(
16   QObject *guiObject)
17 {
18   if (threadableProtocol)
19   {
20     // Keyset already populated.
21     return;
22   }
23
24   threadableProtocol = new NECProtocol(guiObject, index, true, true);
25
26   setPreData(0x9F00, 16);
27
28   addKey("Power", Power_Key, 0x57, 8);
29   addKey("Mute", Mute_Key, 0x5B, 8);
30   addKey("TV_Sys", Unmapped_Key, 0x01, 8);
31   addKey("Up", Up_Key, 0x43, 8);
32   addKey("Down", Down_Key, 0x0A, 8);
33   addKey("Left", Left_Key, 0x06, 8);
34   addKey("Right", Right_Key, 0x0E, 8);
35   addKey("Enter", Select_Key, 0x02, 8);
36   addKey("Rewind", Rewind_Key, 0x07, 8);
37   addKey("previous", Previous_Key, 0x0F, 8);
38   addKey("Vol-", VolumeDown_Key, 0x53, 8);
39   addKey("FastForward", FastForward_Key, 0x03, 8);
40   addKey("Next", Next_Key, 0x0B, 8);
41   addKey("Play", Play_Key, 0x54, 8);
42   addKey("Stop", Stop_Key, 0x13, 8);
43   addKey("Home", Guide_Key, 0x47, 8);
44   addKey("Return", Exit_Key, 0x4F, 8);
45   addKey("Search", Unmapped_Key, 0x30, 8);
46   addKey("Eject", Eject_Key, 0x31, 8);
47   addKey("option", Info_Key, 0x16, 8);
48 }
49
50
51 EmtecSTB2::EmtecSTB2(
52   unsigned int index)
53   : PIRKeysetMetaData(
54       "Movie Cube Keyset 2",
55       Emtec_Make,
56       index)
57 {
58   addControlledDevice(Emtec_Make, "MovieCube R700", Other_Device);
59   addControlledDevice(Emtec_Make, "MovieCube Q800", Other_Device);
60 }
61
62
63 void EmtecSTB2::populateProtocol(
64   QObject *guiObject)
65 {
66   if (threadableProtocol)
67   {
68     // Keyset already populated.
69     return;
70   }
71
72   threadableProtocol = new NECProtocol(guiObject, index, true, true);
73
74   setPreData(0x9F00, 16);
75
76   addKey("7", Seven_Key, 0x00, 8);
77   addKey("timeshift", Unmapped_Key, 0x01, 8);
78   addKey("select", Select_Key, 0x02, 8);
79   addKey("fast fwd", FastForward_Key, 0x03, 8);
80   addKey("4", Four_Key, 0x04, 8);
81   addKey("1", One_Key, 0x05, 8);
82   addKey("left arrow", Left_Key, 0x06, 8);
83   addKey("rewind", Rewind_Key, 0x07, 8);
84   addKey("5", Five_Key, 0x08, 8);
85   addKey("2", Two_Key, 0x09, 8);
86   addKey("down arrow", Down_Key, 0x0A, 8);
87   addKey("skip", Next_Key, 0x0B, 8); // "next"
88   addKey("9", Nine_Key, 0x0C, 8);
89   addKey("goto", Unmapped_Key, 0x0D, 8);
90   addKey("right arrow", Right_Key, 0x0E, 8);
91   addKey("replay", Previous_Key, 0x0F, 8); // "prev"
92   addKey("8", Eight_Key, 0x10, 8);
93   addKey("0", Zero_Key, 0x11, 8);
94   addKey("stop", Stop_Key, 0x13, 8);
95   addKey("6", Six_Key, 0x14, 8);
96   addKey("3", Three_Key, 0x15, 8);
97   addKey("display", Info_Key, 0x16, 8);
98   addKey("vol up", VolumeUp_Key, 0x17, 8);
99   addKey("setup", Unmapped_Key, 0x1A, 8);
100   addKey("zoom", Zoom_Key, 0x1B, 8);
101   addKey("green", Green_Key, 0x1D, 8);
102   addKey("yellow", Yellow_Key, 0x1E, 8);
103   addKey("blue", Blue_Key, 0x1F, 8);
104   addKey("audio", Audio_Key, 0x40, 8);
105   addKey("input next", Unmapped_Key, 0x41, 8);
106   addKey("f1", Unmapped_Key, 0x42, 8);
107   addKey("red", Red_Key, 0x42, 8);
108   addKey("up arrow", Up_Key, 0x43, 8);
109   addKey("repeat", Repeat_Key, 0x44, 8);
110   addKey("subtitle", Captions_Key, 0x45, 8);
111   addKey("repeat ab", RepeatAB_Key, 0x46, 8);
112   addKey("program guide", Guide_Key, 0x47, 8);
113   addKey("com skip", Advance_Key, 0x48, 8);
114   addKey("replay", Replay_Key, 0x49, 8);
115   addKey("record list", Unmapped_Key, 0x4A, 8);
116   addKey("slow", Slow_Key, 0x4C, 8);
117   addKey("pause", Pause_Key, 0x4D, 8);
118   addKey("timer", Timer_Key, 0x4E, 8);
119   addKey("return", Exit_Key, 0x4F, 8);
120   addKey("play", Play_Key, 0x50, 8);
121   addKey("record", Record_Key, 0x52, 8);
122   addKey("vol down", VolumeDown_Key, 0x54, 8);
123   addKey("browser", Unmapped_Key, 0x55, 8);
124   addKey("tv system", Unmapped_Key, 0x56, 8);
125   addKey("power", Power_Key, 0x57, 8);
126   addKey("copy", Unmapped_Key, 0x58, 8);
127   addKey("music", Unmapped_Key, 0x59, 8);
128   addKey("menu", Menu_Key, 0x5A, 8);
129   addKey("mute", Mute_Key, 0x5B, 8);
130 }