Advanced Settings Panel
[pierogi] / pirkeynames.h
1 #ifndef PIRKEYNAMES_H
2 #define PIRKEYNAMES_H
3
4 // I will need to eventually have a set of "universal" buttons, something that
5 // should be able to match a decent subset of the buttons on all the remotes
6 // out there.  The following list should give me a decent start...
7 enum PIRKeyName{
8   // The "Unmapped" key is a placeholder for commands with no key mapping:
9   Unmapped_Key,
10
11   // Power control:
12   Power_Key,
13   PowerOn_Key,
14   PowerOff_Key,
15
16   // Menu control:
17   Menu_Key,
18   Up_Key,
19   Down_Key,
20   Left_Key,
21   Right_Key,
22   Select_Key,
23   Exit_Key,
24   PageUp_Key,
25   PageDown_Key,
26   Guide_Key,
27
28   // Number keys:
29   Zero_Key,
30   One_Key,
31   Two_Key,
32   Three_Key,
33   Four_Key,
34   Five_Key,
35   Six_Key,
36   Seven_Key,
37   Eight_Key,
38   Nine_Key,
39
40   // Other keypad commands:
41   Enter_Key,
42   Clear_Key,
43   PlusOneHundred_Key,
44   Dash_Key,
45   DoubleDigit_Key,
46
47   // Volume control:
48   VolumeUp_Key,
49   VolumeDown_Key,
50   Mute_Key,
51   Surround_Key,
52   RearVolumeUp_Key,
53   RearVolumeDown_Key,
54   CenterVolumeUp_Key,
55   CenterVolumeDown_Key,
56   WooferUp_Key,
57   WooferDown_Key,
58
59   // Channel control:
60   ChannelUp_Key,
61   ChannelDown_Key,
62   PrevChannel_Key,
63
64   // Recorded media control:
65   Play_Key,
66   Pause_Key,
67   Stop_Key,
68   FastForward_Key,
69   Rewind_Key,
70   PlayX2_Key,
71   Next_Key,
72   Previous_Key,
73   StepForward_Key,
74   StepBack_Key,
75   Advance_Key,
76   Replay_Key,
77   Eject_Key,
78   Random_Key,
79   Repeat_Key,
80   RepeatAB_Key,
81   Slow_Key,
82   SlowPlus_Key,
83   SlowMinus_Key,
84   Timer_Key,
85   Clock_Key,
86   Record_Key,
87   RecordPause_Key,
88   RecordStop_Key,
89   RecordMute_Key,
90   RecordTimed_Key,
91   RecordPDC_Key,
92
93   // Color buttons:
94   Red_Key,
95   Green_Key,
96   Yellow_Key,
97   Blue_Key,
98
99   // Teletext buttons:
100   Teletext_Key,
101   TeletextReveal_Key,
102   TeletextHold_Key,
103   TeletextSize_Key,
104   TeletextSelect_Key,
105   TeletextTime_Key,
106   TeletextAndTV_Key,
107   TeletextMix_Key, // same as "AndTV"?
108   TeletextDown_Key,
109   TeletextUp_Key,
110   TeletextBackgroundTV_Key,
111   TeletextStore_Key,
112   TeletextIndex_Key,
113   TeletextOff_Key,
114
115   // Picture-in-picture stuff:
116   PIP_Key,
117   PIPSwap_Key,
118   PIPMove_Key,
119   PIPSource_Key,
120   PIPChannelUp_Key,
121   PIPChannelDown_Key,
122   PIPPause_Key,
123   PIPSize_Key,
124   PIPScan_Key,
125
126   // DVD / Blue-ray / etc. keys:
127   NextDisc_Key,
128   PrevDisc_Key,
129   DiscTitle_Key,
130   DiscMenu_Key,
131   DiscOne_Key,
132   DiscTwo_Key,
133   DiscThree_Key,
134   Angle_Key,
135
136   // VHS / Beta / etc. keys:
137   VHSSpeed_Key,
138   TrackingPlus_Key,
139   TrackingMinus_Key,
140   AutoTracking_Key,
141   IndexSearch_Key, // also known as VISS
142   IndexMark_Key,
143   IndexErase_Key,
144   OneTouchPlayBack_Key,
145
146   // Audio/Video Adjustment Controls:
147   PictureMode_Key,
148   SoundMode_Key,
149   NoiseReduction_Key,
150   EnhancedBass_Key,
151   BassUp_Key,
152   BassDown_Key,
153   TrebleUp_Key,
154   TrebleDown_Key,
155   BrightnessUp_Key,
156   BrightnessDown_Key,
157   ColorUp_Key,
158   ColorDown_Key,
159   ContrastUp_Key,
160   ContrastDown_Key,
161   BalanceRight_Key,
162   BalanceLeft_Key,
163   Keystone_Key,
164   PictureMute_Key,
165   Focus_Key,
166
167   // Input Controls:
168   Input_Key,
169   CDInput_Key,
170   PhonoInput_Key,
171   TunerInput_Key,
172   LineInput_Key,
173   TapeInput_Key,
174   AntennaInput_Key,
175   Antenna2Input_Key,
176   PCInput_Key,
177   CompositeInput_Key,
178   Composite2Input_Key,
179   SVideoInput_Key,
180   SVideo2Input_Key,
181   ComponentInput_Key,
182   Component2Input_Key,
183   HDMIInput_Key,
184   HDMI2Input_Key,
185   HDMI3Input_Key,
186   ScartInput_Key,
187   AuxInput_Key,
188   MDInput_Key,
189   LDInput_Key,
190   DVDInput_Key,
191   VCRInput_Key,
192   HDDInput_Key,
193   CableInput_Key,
194   SatInput_Key,
195   DVRInput_Key,
196   OpticalInput_Key,
197   DigitalCoaxInput_Key,
198   USBInput_Key,
199
200   // "Program" Controls:
201   Program_Key,
202   Memory_Key,
203   Call_Key,
204   NextPreset_Key,
205   PrevPreset_Key,
206
207   // Audio controls:
208 //  TunerBand_Key,
209   FMMode_Key,
210   FM_Key,
211   AM_Key, // also "MW"
212   LW_Key,
213
214   // Air Conditioner controls:
215   TempUp_Key,
216   TempDown_Key,
217   Fan_Key,
218   Cool_Key,
219   Heat_Key,
220   Oscillate_Key,
221   FanFaster_Key,
222   FanSlower_Key,
223   EnergySave_Key,
224
225   // iRobot controls:
226   RobotForward_Key,
227   RobotCW_Key,
228   RobotCCW_Key,
229   RobotSpot_Key,
230   RobotMax_Key,
231   RobotClean_Key,
232
233   // Camera controls:
234   OpenShutter_Key,
235   DelayedOpenShutter_Key,
236
237   // Other keys:
238   Captions_Key,
239   Info_Key,
240   Sleep_Key,
241   Reset_Key,
242   AspectRatio_Key,
243   Audio_Key,
244   Favorites_Key,
245   Scan_Key,
246   Zoom_Key,
247   LiveTV_Key,
248   Mode_Key
249 };
250
251
252 // Need to make the key names visible to users now:
253 #include <map>
254 #include <QString>
255 typedef std::map<PIRKeyName, QString> KeynameCollection;
256 typedef std::map<QString, PIRKeyName> ReverseKeynameCollection;
257
258 class QComboBox;
259
260 class PIRKeynameMgr
261 {
262 public:
263   PIRKeynameMgr();
264
265   QString getKeynameString(
266     PIRKeyName keyname);
267
268   PIRKeyName getKeynameID(
269     QString keynameString);
270
271   void populateComboBox(
272     QComboBox *cb);
273
274 private:
275   KeynameCollection keynameStrings;
276   ReverseKeynameCollection keynameIDs;
277 };
278
279 #endif // PIRKEYNAMES_H