Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Pierogi
Summary Forums Tracker Lists Tasks Docs News SCM Files
authorJohn Pietrzak <john@pietrzak.org>
Fri, 3 Feb 2012 15:10:05 +0000 (10:10 -0500)
committerJohn Pietrzak <john@pietrzak.org>
Fri, 3 Feb 2012 15:10:05 +0000 (10:10 -0500)
I've updated the GUI with an additional window to hold yet more tabs.
This frees up some space on the main window, which was getting crowded with
too many tabs.  I still want to tweak the UI some more, though...

In the process of adding some Pioneer keysets, I ended up totally revamping
the underlying key structure; Pioneer does some rather nasty things to the
standard NEC protocol. :(  I think I now have a better basis for future
keyset additions, but there is much more clean up work left to do...

Yet another attempt to force the package manager to actually manage my files;
I've made a trivial change to the pierogi.sudoers file, hoping that will
convince the package manager to install the dang file if it isn't there.
I'm really getting tired of the Debian system at this point.  (Then again,
I'm working off the Qt SDK here, and their interaction with Debian could be
at fault.)

In any case, yet another massive update.

86 files changed:
doc/documentation.html
jvcprotocol.cpp [deleted file]
jvcprotocol.h [deleted file]
keysets/apple.cpp
keysets/denon.cpp
keysets/denon.h
keysets/ei.cpp
keysets/elgato.cpp
keysets/goldstar.cpp
keysets/hauppauge.cpp
keysets/hitachi.cpp
keysets/jvc.cpp
keysets/lg.cpp
keysets/lg.h
keysets/magnavox.cpp
keysets/mitsubishi.cpp
keysets/nokia.cpp
keysets/panasonic.cpp
keysets/philips.cpp
keysets/pinnacle.cpp
keysets/pioneer.cpp [new file with mode: 0644]
keysets/pioneer.h [new file with mode: 0644]
keysets/raite.cpp
keysets/rca.cpp
keysets/sagem.cpp
keysets/samsung.cpp
keysets/sanyo.cpp
keysets/sharp.cpp
keysets/sony.cpp
keysets/tivo.cpp
keysets/toshiba.cpp
keysets/westinghouse.cpp
keysets/yamaha.cpp
keysets/yamaha.h
keysets/zenith.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
necprotocol.cpp [deleted file]
necprotocol.h [deleted file]
pierogi.pro
pierogi.pro.user
pierogi.sudoers
pirkeynames.h
pirkeysetmanager.cpp
pirkeysetmanager.h
pirkeysetmetadata.cpp
pirkeysetmetadata.h
pirmakenames.cpp
pirmakenames.h
pirprotocol.cpp [deleted file]
pirprotocol.h [deleted file]
pirsecondaryform.cpp [new file with mode: 0644]
pirsecondaryform.h [new file with mode: 0644]
pirsecondaryform.ui [new file with mode: 0644]
protocols/jvcprotocol.cpp [new file with mode: 0644]
protocols/jvcprotocol.h [new file with mode: 0644]
protocols/lircprotocol.cpp [new file with mode: 0644]
protocols/lircprotocol.h [new file with mode: 0644]
protocols/necprotocol.cpp [new file with mode: 0644]
protocols/necprotocol.h [new file with mode: 0644]
protocols/pioneerprotocol.cpp [new file with mode: 0644]
protocols/pioneerprotocol.h [new file with mode: 0644]
protocols/pirprotocol.cpp [new file with mode: 0644]
protocols/pirprotocol.h [new file with mode: 0644]
protocols/rc5protocol.cpp [new file with mode: 0644]
protocols/rc5protocol.h [new file with mode: 0644]
protocols/rc6protocol.cpp [new file with mode: 0644]
protocols/rc6protocol.h [new file with mode: 0644]
protocols/samsungprotocol.cpp [new file with mode: 0644]
protocols/samsungprotocol.h [new file with mode: 0644]
protocols/sharpprotocol.cpp [new file with mode: 0644]
protocols/sharpprotocol.h [new file with mode: 0644]
protocols/sircprotocol.cpp [new file with mode: 0644]
protocols/sircprotocol.h [new file with mode: 0644]
protocols/spaceprotocol.cpp [new file with mode: 0644]
protocols/spaceprotocol.h [new file with mode: 0644]
qtc_packaging/debian_fremantle/postrm.needsfixing [deleted file]
rc5protocol.cpp [deleted file]
rc5protocol.h [deleted file]
rc6protocol.cpp [deleted file]
rc6protocol.h [deleted file]
sharpprotocol.cpp [deleted file]
sharpprotocol.h [deleted file]
sircprotocol.cpp [deleted file]
sircprotocol.h [deleted file]

index 81b387b..df4fd34 100644 (file)
@@ -325,6 +325,8 @@ to the theory and practice behind consumer IR devices
 
 <li>An excellent collection of <a href="http://www.hifi-remote.com/sony/">Sony command codes</a>
 
+<li>An in-depth investigation of the <a href="http://www.adrian-kingston.com/IRFormatPioneer.htm">Pioneer IR Protocol</a>
+
 <li>Link to (what appears to be) source code for the N900's
 <a href="http://svn.jacekowski.org/host_mode/trunk/drivers/input/lirc/lirc_rx51.c">/dev/lirc0 device driver</a>.
 
diff --git a/jvcprotocol.cpp b/jvcprotocol.cpp
deleted file mode 100644 (file)
index 37909fc..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-#include "jvcprotocol.h"
-
-#include "pirexception.h"
-#include <string>
-//#include <iostream>
-
-// Some global communications stuff:
-#include <QMutex>
-extern bool commandInFlight;
-extern QMutex commandIFMutex;
-
-// The JVC protocol should have the following attributes:
-// A "zero" is encoded with a 526 usec pulse, 52626 usec space.
-// A "one" is encoded with a 526 usec pulse, and 3*526 (1578) usec space.
-// The header is a 8400 usec pulse, 4200 usec space.
-// Commands end with a trailing 526 usec pulse.
-// Commands are repeated by re-sending entire command without the header.
-// Repeats are broadcast every 60000 usec.
-// The carrier frequency is 38 kHz, duty cycle is 1/3.
-
-JVCProtocol::JVCProtocol(
-  QObject *guiObject,
-  unsigned int index)
-  : PIRProtocol(guiObject, index, 60000, true),
-    zeroPulse(526),
-    zeroSpace(526),
-    onePulse(526),
-    oneSpace(1578),
-    headerPulse(8400),
-    headerSpace(4200),
-    trailerPulse(526)
-{
-  setCarrierFrequency(38000);
-  setDutyCycle(33);
-}
-
-
-void JVCProtocol::startSendingCommand(
-  unsigned int threadableID,
-  PIRKeyName command)
-{
-  // Exceptions here are problematic; I'll try to weed them out by putting the
-  // whole thing in a try/catch block:
-  try
-  {
-    // First, check if we are meant to be the recipient of this command:
-    if (threadableID != id) return;
-
-    clearRepeatFlag();
-
-    KeycodeCollection::const_iterator i = keycodes.find(command);
-
-    // Do we even have this key defined?
-    if (i == keycodes.end())
-    {
-      std::string s = "Tried to send a non-existent command.\n";
-      throw PIRException(s);
-    }
-
-    // construct the device:
-    PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
-
-    int repeatCount = 0;
-    int commandDuration = 0;
-    while (repeatCount < MAX_REPEAT_COUNT)
-    {
-      // If we are currently repeating, and have a special "repeat signal",
-      // use that signal.  Otherwise, generate a normal command string.
-      if (repeatCount)
-      {
-        commandDuration = generateHeadlessCommand((*i).second, rx51device);
-      }
-      else
-      {
-        commandDuration = generateStandardCommand((*i).second, rx51device);
-      }
-
-      // Now, tell the device to send the whole command:
-      rx51device.sendCommandToDevice();
-
-      // sleep until the next repetition of command:
-      sleepUntilRepeat(commandDuration);
-
-      // Check whether we've reached the minimum required number of repetitons:
-      if (repeatCount >= minimumRepetitions)
-      {
-        // Check whether we've been asked to stop:
-        if (checkRepeatFlag())
-        {
-          QMutexLocker cifLocker(&commandIFMutex);
-          commandInFlight = false;
-          return;
-        }
-      }
-
-      ++repeatCount;
-    }
-  }
-  catch (PIRException e)
-  {
-    // inform the gui:
-    emit commandFailed(e.getError().c_str());
-  }
-
-  QMutexLocker cifLocker(&commandIFMutex);
-  commandInFlight = false;
-}
-
-
-// JVC data is sent in reverse order, i.e., the least signficant bit is
-// sent first.
-int JVCProtocol::generateStandardCommand(
-  const CommandSequence &bits,
-  PIRRX51Hardware &rx51device)
-{
-  int duration = 0;
-
-  // First, the "header" pulse:
-  rx51device.addPair(headerPulse, headerSpace);
-  duration += (headerPulse + headerSpace);
-
-  // Now, push the actual data:
-  duration += pushReverseBits(preData, rx51device);
-  duration += pushReverseBits(bits, rx51device);
-
-  // Finally add the "trail":
-  rx51device.addSingle(trailerPulse);
-  duration += trailerPulse;
-
-  return duration;
-}
-
-
-int JVCProtocol::generateHeadlessCommand(
-  const CommandSequence &bits,
-  PIRRX51Hardware &rx51device)
-{
-  int duration = 0;
-
-  // Push the actual data:
-  duration += pushReverseBits(preData, rx51device);
-  duration += pushReverseBits(bits, rx51device);
-
-  // Finally add the "trail":
-  rx51device.addSingle(trailerPulse);
-  duration += trailerPulse;
-
-  return duration;
-}
-
-
-int JVCProtocol::pushReverseBits(
-  const CommandSequence &bits,
-  PIRRX51Hardware &rx51device)
-{
-  int duration = 0;
-  CommandSequence::const_reverse_iterator i = bits.rbegin();
-  while (i != bits.rend())
-  {
-    if (*i)
-    {
-      // Send the pulse for "One":
-      rx51device.addPair(onePulse, oneSpace);
-      duration += (onePulse + oneSpace);
-    }
-    else
-    {
-      // Send the pulse for "Zero":
-      rx51device.addPair(zeroPulse, zeroSpace);
-      duration += (zeroPulse + zeroSpace);
-    }
-    ++i;
-  }
-
-  return duration;
-}
-
diff --git a/jvcprotocol.h b/jvcprotocol.h
deleted file mode 100644 (file)
index 75d52ef..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef JVCPROTOCOL_H
-#define JVCPROTOCOL_H
-
-#include "pirprotocol.h"
-#include "pirrx51hardware.h"
-
-//
-// JVC has its own protocol, similar in some ways to the popular NEC protocol.
-// The main differences are that the address and command segments are not
-// sent with an inverted copy, and that repeats are implemented by sending
-// the body without a header, rather than a header without a body.
-//
-
-class JVCProtocol: public PIRProtocol
-{
-public:
-  JVCProtocol(
-    QObject *guiObject,
-    unsigned int index);
-
-public slots:
-  void startSendingCommand(
-    unsigned int threadableID,
-    PIRKeyName command);
-
-private:
-  unsigned int zeroPulse;
-  unsigned int zeroSpace;
-  unsigned int onePulse;
-  unsigned int oneSpace;
-
-  unsigned int headerPulse;
-  unsigned int headerSpace;
-
-  unsigned int trailerPulse;
-
-  int generateStandardCommand(
-    const CommandSequence &bits,
-    PIRRX51Hardware &device);
-
-  int generateHeadlessCommand(
-    const CommandSequence &bits,
-    PIRRX51Hardware &device);
-
-  int pushReverseBits(
-    const CommandSequence &bits,
-    PIRRX51Hardware &device);
-};
-
-#endif // JVCPROTOCOL_H
index 7b79f79..ecba06c 100644 (file)
@@ -1,6 +1,6 @@
 #include "apple.h"
-#include "necprotocol.h"
-#include "pirmakenames.h"
+#include "protocols/lircprotocol.h"
+//#include "pirmakenames.h"
 
 // Based on LIRC Apple_A1156 config file
 AppleWhiteRemote::AppleWhiteRemote(
@@ -14,7 +14,17 @@ AppleWhiteRemote::AppleWhiteRemote(
   addControlledDevice(Apple_Make, "Mac Mini", Computer_Device);
 
   // Set up the threadable object:
-  threadableProtocol = new NECProtocol(guiObject, index, LIRC_NEC);
+  LIRCProtocol *lp = new LIRCProtocol(
+    guiObject, index,
+    560, 560,
+    560, 1680,
+    110000, true);
+
+  threadableProtocol = lp;
+
+  lp->setHeaderPair(9000, 4500);
+  lp->setTrailerPulse(560);
+  lp->setRepeatPair(9000, 2250);
 
   setPreData(0x77e1, 16);
   setPostData(0xc5, 8);
index 5ca685d..4aaa0b5 100644 (file)
@@ -1,6 +1,7 @@
 #include "denon.h"
-#include "sharpprotocol.h"
-#include "necprotocol.h"
+#include "protocols/sharpprotocol.h"
+#include "protocols/lircprotocol.h"
+#include "protocols/necprotocol.h"
 
 // This whole set of Denon keysets is a mess.  Need to clean it up!!!
 
@@ -47,7 +48,7 @@ DenonDVD1::DenonDVD1(
   addSharpKey("SKIP_DOWN", Next_Key, 0x08, 0x99);
   addSharpKey("FAST_FORWARD", FastForward_Key, 0x08, 0x9A);
   addSharpKey("FAST_REVERSE", Rewind_Key, 0x08, 0x9B);
-  addSharpKey("MODE", Unmapped_Key, 0x08, 0x9C);
+  addSharpKey("MODE", Mode_Key, 0x08, 0x9C);
   addSharpKey("PAUSE", Pause_Key, 0x08, 0x9D);
   addSharpKey("PLAY", Play_Key, 0x08, 0xA0);
   addSharpKey("STOP", Stop_Key, 0x08, 0xA1);
@@ -76,18 +77,17 @@ DenonDVD2::DenonDVD2(
 {
   addControlledDevice(Denon_Make, "DVD-2500", DVD_Device);
 
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     400, 500,
     400, 1400,
-    43000, false,
-    LIRC_NEC);
+    43000, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(3500, 1800);
-  np->setTrailerPulse(400);
+  lp->setHeaderPair(3500, 1800);
+  lp->setTrailerPulse(400);
 
   setPreData(0x40040D00, 32);
 
@@ -184,11 +184,10 @@ DenonDVD3::DenonDVD3(
   addSharpKey("select", Select_Key, 0x01, 0xBB);
   addSharpKey("setup", Menu_Key, 0x01, 0xBC);
   addSharpKey("title", DiscTitle_Key, 0x01, 0xBD);
-  addSharpKey("call", Unmapped_Key, 0x01, 0xBE);
+  addSharpKey("call", Call_Key, 0x01, 0xBE);
 }
 
 
-// This one is messed up:
 DenonReceiver1::DenonReceiver1(
   QObject *guiObject,
   unsigned int index)
@@ -199,44 +198,65 @@ DenonReceiver1::DenonReceiver1(
 {
   addControlledDevice(Denon_Make, "avr-1708", Audio_Device);
 
-  NECProtocol *np = new NECProtocol(
-    guiObject,
-    index,
-    400, 700,
-    400, 1700,
-    67000, true,
-    LIRC_NEC);
-
-  threadableProtocol = np;
-
-  np->setElevenBitToggle(true);
-
-  np->setTrailerPulse(400);
-
-  addKey("On", PowerOn_Key, 0x221C, 15);
-  addKey("Off", PowerOff_Key, 0x211C, 15);
-  addKey("DVD_HDP", Unmapped_Key, 0x231C, 15); // "SRC_DVD"
-  addKey("TV_CBL", Unmapped_Key, 0x224C, 15);
-  addKey("VCR", Unmapped_Key, 0x22CC, 15);
-  addKey("Play", Play_Key, 0x10E8, 15);
-  addKey("Stop", Stop_Key, 0x11E8, 15);
-  addKey("Skip_Favorite", Favorites_Key, 0x13A8, 15);
-  addKey("Pause", Pause_Key, 0x1328, 15);
-  addKey("Volume_up", VolumeUp_Key, 0x223C, 15);
-  addKey("Volume_down", VolumeDown_Key, 0x213C, 15);
-  addKey("Rewind", Rewind_Key, 0x1368, 15);
-  addKey("Forward", FastForward_Key, 0x1168, 15);
-  addKey("Setup", Menu_Key, 0x206C, 15);
-  addKey("Mute", Mute_Key, 0x203C, 15);
-  addKey("Night_Audio", Unmapped_Key, 0x1064, 15);
-  addKey("Display", Info_Key, 0x23EC, 15); // "onscreen"
-  addKey("Enter", Select_Key, 0x201C, 15);
-  addKey("Left", Left_Key, 0x1BF8, 15);
-  addKey("Up", Up_Key, 0x1B14, 15);
-  addKey("Right", Right_Key, 0x22EC, 15);
-  addKey("Down", Down_Key, 0x1894, 15);
-  addKey("Return", Exit_Key, 0x21EC, 15);
-  addKey("Dimmer", Unmapped_Key, 0x1BEC, 15);
+  threadableProtocol = new SharpProtocol(guiObject, index, false);
+
+  addSharpKey("Phono", PhonoInput_Key, 0x02, 0xC3);
+  addSharpKey("CD", CDInput_Key, 0x02, 0xC4);
+  addSharpKey("Tuner", TunerInput_Key, 0x02, 0xC5); // "SRC_TUNNER"
+  addSharpKey("SRC_SATCBL", SatInput_Key, 0x02, 0xC8);
+  addSharpKey("TV_CBL", CableInput_Key, 0x02, 0xC9);
+  addSharpKey("SRC_HDP", DVDInput_Key, 0x02, 0xCA); // "DVD_TV"
+  addSharpKey("SRC_VAUX", AuxInput_Key, 0x02, 0xCC);
+  addSharpKey("VCR", VCRInput_Key, 0x02, 0xCD);
+  addSharpKey("SRC_DVR", DVRInput_Key, 0x02, 0xCE);
+  addSharpKey("DAT_Tape", TapeInput_Key, 0x02, 0xD2);
+  addSharpKey("Setup", Menu_Key, 0x02, 0xD8); // "VIDEO_SELECT"
+  addSharpKey("multi", Unmapped_Key, 0x02, 0xDB);
+  addSharpKey("analog", Unmapped_Key, 0x02, 0xDC);
+  addSharpKey("Right", Right_Key, 0x02, 0xDD);
+  addSharpKey("Return", Exit_Key, 0x02, 0xDE);
+  addSharpKey("Display", Info_Key, 0x02, 0xDF); // "onscreen"
+  addSharpKey("Enter", Select_Key, 0x02, 0xE0);
+  addSharpKey("On", PowerOn_Key, 0x02, 0xE1);
+  addSharpKey("Off", PowerOff_Key, 0x02, 0xE2);
+  addSharpKey("DVD_HDP", Unmapped_Key, 0x02, 0xE3); // "SRC_DVD"
+  addSharpKey("BTN_STD", Unmapped_Key, 0x02, 0xE4);
+  addSharpKey("Mode", Mode_Key, 0x02, 0xE6); // "BTN_SIMU"
+  addSharpKey("Stereo", Audio_Key, 0x02, 0xE7);
+  addSharpKey("Delay", Unmapped_Key, 0x02, 0xE9);
+  addSharpKey("Test_Tone", Unmapped_Key, 0x02, 0xEA);
+  addSharpKey("Mute", Mute_Key, 0x02, 0xF0);
+  addSharpKey("Volume_up", VolumeUp_Key, 0x02, 0xF1);
+  addSharpKey("Volume_down", VolumeDown_Key, 0x02, 0xF2);
+  addSharpKey("RearVolumeUp", RearVolumeUp_Key, 0x02, 0xF3);
+  addSharpKey("RearVolumeDown", RearVolumeDown_Key, 0x02, 0xF4);
+  addSharpKey("CenterVolumeUp", CenterVolumeUp_Key, 0x02, 0xF5);
+  addSharpKey("CenterVolumeDown", CenterVolumeDown_Key, 0x02, 0xF6);
+
+  addSharpKey("Pause", Pause_Key, 0x04, 0x53);
+  addSharpKey("Skip_Favorite", Favorites_Key, 0x04, 0x57);
+  addSharpKey("Forward", FastForward_Key, 0x04, 0x5A);
+  addSharpKey("Rewind", Rewind_Key, 0x04, 0x5B);
+  addSharpKey("Play", Play_Key, 0x04, 0x5C);
+  addSharpKey("Stop", Stop_Key, 0x04, 0x5E);
+  addSharpKey("TAPE_REC", Unmapped_Key, 0x04, 0x5F);
+  addSharpKey("BTN_STD_CINEMA", Unmapped_Key, 0x04, 0x95);
+  addSharpKey("BTN_STD_MUSIC", Unmapped_Key, 0x04, 0x96);
+  addSharpKey("Night_Audio", Unmapped_Key, 0x04, 0x98);
+  addSharpKey("BTN_MULTEQ", Unmapped_Key, 0x04, 0x9D);
+
+  addSharpKey("Left", Left_Key, 0x0C, 0x7F); // This looks wrong
+  addSharpKey("RCVR_SURROUND", Surround_Key, 0x0C, 0xA1);
+  addSharpKey("Up", Up_Key, 0x0C, 0xA3);
+  addSharpKey("Down", Down_Key, 0x0C, 0xA4);
+  addSharpKey("output", Unmapped_Key, 0x0C, 0xA5);
+  addSharpKey("BTN_HDMI_CONTROL", Unmapped_Key, 0x0C, 0xAF);
+  addSharpKey("ext.in", Unmapped_Key, 0x0C, 0xB5);
+  addSharpKey("input-mode", Unmapped_Key, 0x0C, 0xB6);
+  addSharpKey("Shift", TunerBand_Key, 0x0C, 0xCD);
+  addSharpKey("channel-", ChannelDown_Key, 0x0C, 0xD5);
+  addSharpKey("channel+", ChannelUp_Key, 0x0C, 0xD6);
+  addSharpKey("Dimmer", Unmapped_Key, 0x0C, 0xDF);
 }
 
 
@@ -249,34 +269,16 @@ DenonReceiver1a::DenonReceiver1a(
 
   addControlledDevice(Denon_Make, "AVR-1610", Audio_Device);
 
-  // This keyset may need work, see denon/RC-1120
-  addKey("SRC_TV", Unmapped_Key, 0x21B3, 15);
-  addKey("SRC_TUNNER", Unmapped_Key, 0x228C, 15);
-  addKey("SRC_VAUX", Unmapped_Key, 0x20CC, 15);
-  addKey("SRC_HDP", Unmapped_Key, 0x214C, 15);
-  addKey("SRC_DVR", Unmapped_Key, 0x2233, 15);
-  addKey("SRC_VCR", Unmapped_Key, 0x2133, 15);
-  addKey("SRC_SATCBL", Unmapped_Key, 0x204C, 15);
-  addKey("BTN_VSEL", Unmapped_Key, 0x2393, 15);
-  addKey("BTN_INPUT_MODE", Unmapped_Key, 0x19B4, 15);
-  addKey("BTN_MULTEQ", Unmapped_Key, 0x111B, 15);
-  addKey("BTN_HDMI_CONTROL", Unmapped_Key, 0x182B, 15);
-  addKey("BTN_UP", Up_Key, 0x18EB, 15);
-  addKey("BTN_DOWN", Down_Key, 0x1894, 15);
-  addKey("BTN_SKIP", Unmapped_Key, 0x18CC, 15);
-  addKey("BTN_STOP", Stop_Key, 0x1BAC, 15);
-  addKey("BTN_PAUSE", Pause_Key, 0x1ACC, 15);
-  addKey("BTN_PLAY", Play_Key, 0x186C, 15);
-  addKey("FAST_REVERSE", Rewind_Key, 0x1A93, 15);
-  addKey("FAST_FORWARD", FastForward_Key, 0x1A6C, 15);
-  addKey("BTN_PREV", Previous_Key, 0x1AAC, 15);
-  addKey("BTN_NEXT", Next_Key, 0x19AC, 15);
-  addKey("BTN_STD", Unmapped_Key, 0x2363, 15);
-  addKey("PAGE_DN", PageDown_Key, 0x1813, 15);
-  addKey("PAGE_UP", PageUp_Key, 0x21EC, 15);
-  addKey("BTN_STD_CINEMA", Unmapped_Key, 0x115B, 15);
-  addKey("BTN_STD_MUSIC", Unmapped_Key, 0x125B, 15);
-  addKey("BTN_SIMU", Unmapped_Key, 0x219C, 15);
+  addSharpKey("BTN_SKIP", Unmapped_Key, 0x0C, 0xCC);
+  addSharpKey("BTN_PAUSE", Pause_Key, 0x0C, 0xCD);
+  addSharpKey("BTN_STOP", Stop_Key, 0x0C, 0xD7);
+  addSharpKey("BTN_PLAY", Play_Key, 0x0C, 0xD8);
+  addSharpKey("FAST_FORWARD", FastForward_Key, 0x0C, 0xD9);
+  addSharpKey("FAST_REVERSE", Rewind_Key, 0x0C, 0xDA);
+  addSharpKey("BTN_PREV", Previous_Key, 0x0C, 0xD5);
+  addSharpKey("BTN_NEXT", Next_Key, 0x0C, 0xD6);
+  addSharpKey("PAGE_UP", PageUp_Key, 0x0C, 0xDE);
+  addSharpKey("PAGE_DN", PageDown_Key, 0x0C, 0xDF);
 }
 
 
@@ -289,16 +291,8 @@ DenonReceiver1b::DenonReceiver1b(
 
   addControlledDevice(Denon_Make, "avr-3300", Audio_Device);
 
-  addKey("vol+", VolumeUp_Key, 0x21C3, 15);
-  addKey("channel+", ChannelUp_Key, 0x19AC, 15);
-  addKey("channel-", ChannelDown_Key, 0x1AAC, 15);
-  addKey("setup", Menu_Key, 0x1814, 15);
-  addKey("params", Unmapped_Key, 0x1A14, 15);
-  addKey("input-mode", Unmapped_Key, 0x19B4, 15);
-  addKey("analog", Unmapped_Key, 0x20EC, 15);
-  addKey("ext.in", Unmapped_Key, 0x1AB4, 15);
-  addKey("output", Unmapped_Key, 0x1A94, 15);
-  addKey("multi", Unmapped_Key, 0x236C, 15);
+  addSharpKey("setup", Menu_Key, 0x0C, 0x50);
+  addSharpKey("params", Unmapped_Key, 0x0C, 0x51);
 }
 
 
@@ -313,33 +307,111 @@ DenonReceiver1c::DenonReceiver1c(
   addControlledDevice(Denon_Make, "AVR-1802", Audio_Device);
   addControlledDevice(Denon_Make, "AVR-1803", Audio_Device);
 
-  addKey("ONE", One_Key, 0x230C, 15);
-  addKey("TWO", Two_Key, 0x208C, 15);
-  addKey("THREE", Three_Key, 0x231C, 15);
-  addKey("FOUR", Four_Key, 0x20CC, 15);
-  addKey("FIVE", Five_Key, 0x22CC, 15);
-  addKey("SIX", Six_Key, 0x21CC, 15);
-  addKey("SEVEN", Seven_Key, 0x224C, 15);
-  addKey("EIGHT", Eight_Key, 0x19B4, 15);
-  addKey("NINE", Nine_Key, 0x212C, 15);
-  addKey("ZERO", Zero_Key, 0x228C, 15);
-  addKey("RCVR_SURROUND_MODE", Unmapped_Key, 0x219C, 15);
-  addKey("RCVR_CHANNEL+", ChannelUp_Key, 0x19AC, 15);
-  addKey("RCVR_CHANNEL-", ChannelDown_Key, 0x1AAC, 15);
-  addKey("VIDEO_SELECT", Unmapped_Key, 0x206C, 15);
-  addKey("CD_DISC_SKIP", Unmapped_Key, 0x0B58, 15);
-  addKey("CD_PLAY", Unmapped_Key, 0x08E8, 15);
-  addKey("CD_PAUSE", Unmapped_Key, 0x0AE8, 15);
-  addKey("CD_NEXT", Unmapped_Key, 0x0868, 15);
-  addKey("CD_PREV", Unmapped_Key, 0x0A68, 15);
-  addKey("CD_STOP", Unmapped_Key, 0x09E8, 15);
-  addKey("CD_REW", Unmapped_Key, 0x0B68, 15);
-  addKey("CD_FFW", Unmapped_Key, 0x0968, 15);
-  addKey("SYSTEM", Menu_Key, 0x1814, 15);
-  addKey("RCVR_SURROUND", Surround_Key, 0x1A14, 15);
-//  addKey("RCVR_CH_SELECT", Select_Key, 0x201C, 15);
-  addKey("RCVR_T_TONE", Unmapped_Key, 0x215C, 15);
-  addKey("RCVR_STATUS", Info_Key, 0x21EC, 15);
+  addSharpKey("ONE", One_Key, 0x02, 0xC3);
+  addSharpKey("TWO", Two_Key, 0x02, 0xC4);
+  addSharpKey("THREE", Three_Key, 0x02, 0xE3);
+  addSharpKey("FOUR", Four_Key, 0x02, 0xCC);
+  addSharpKey("FIVE", Five_Key, 0x02, 0xCD);
+  addSharpKey("SIX", Six_Key, 0x02, 0xCE);
+  addSharpKey("SEVEN", Seven_Key, 0x02, 0xC9);
+  addSharpKey("EIGHT", Eight_Key, 0x0C, 0xB6); // must be wrong
+  addSharpKey("NINE", Nine_Key, 0x02, 0xD2);
+  addSharpKey("ZERO", Zero_Key, 0x02, 0xCA);
+  addSharpKey("RCVR_SURROUND_MODE", Surround_Key, 0x02, 0xE6);
+  addSharpKey("RCVR_STATUS", Info_Key, 0x02, 0xDE); // "Panel"
+  addSharpKey("RCVR_T_TONE", Unmapped_Key, 0x02, 0xEA);
+
+  addSharpKey("REPEAT", Repeat_Key, 0x08, 0x54);
+  addSharpKey("CD_NEXT", Next_Key, 0x08, 0x58);
+  addSharpKey("CD_PREV", Previous_Key, 0x08, 0x59);
+  addSharpKey("CD_FFW", FastForward_Key, 0x08, 0x5A);
+  addSharpKey("CD_REW", Rewind_Key, 0x08, 0x5B);
+  addSharpKey("CD_PLAY", Play_Key, 0x08, 0x5C);
+  addSharpKey("CD_PAUSE", Pause_Key, 0x08, 0x5D);
+  addSharpKey("CD_STOP", Stop_Key, 0x08, 0x5E);
+  addSharpKey("DISC1", Unmapped_Key, 0x08, 0x64);
+  addSharpKey("DISC2", Unmapped_Key, 0x08, 0x65);
+  addSharpKey("DISC3", Unmapped_Key, 0x08, 0x66);
+  addSharpKey("DISC4", Unmapped_Key, 0x08, 0x67);
+  addSharpKey("DISC5", Unmapped_Key, 0x08, 0x68);
+  addSharpKey("DISC6", Unmapped_Key, 0x08, 0x69);
+  addSharpKey("random", Random_Key, 0x08, 0x6A);
+  addSharpKey("CD_DISC_SKIP", NextDisc_Key, 0x08, 0x6B);
+  addSharpKey("CD", CDInput_Key, 0x08, 0x73);
+
+  addSharpKey("SYSTEM", Menu_Key, 0x0C, 0xA0);
+}
+
+
+DenonReceiver1d::DenonReceiver1d(
+  QObject *guiObject,
+  unsigned int index)
+  : DenonReceiver1c(guiObject, index)
+{
+  setKeysetName("Receiver Keyset 1d");
+
+  addControlledDevice(Denon_Make, "PMA-480R", Audio_Device);
+
+  addSharpKey("AMP_PHONO", PhonoInput_Key, 0x02, 0x81);
+  addSharpKey("AMP_TUNER", TunerInput_Key, 0x02, 0x83);
+  addSharpKey("AMP_AUX", AuxInput_Key, 0x02, 0x84);
+  addSharpKey("AMP_MUTING", Mute_Key, 0x02, 0x8B);
+  addSharpKey("AMP_VOL_DOWN", VolumeDown_Key, 0x02, 0x8C);
+  addSharpKey("AMP_VOL_UP", VolumeUp_Key, 0x02, 0x8D);
+  addSharpKey("AMP_POWER", Power_Key, 0x02, 0x90);
+  addSharpKey("AMP_CD", CDInput_Key, 0x02, 0x92);
+  addSharpKey("AMP_TAPE-1", TapeInput_Key, 0x02, 0x99);
+  addSharpKey("AMP_TAPE-2", Unmapped_Key, 0x02, 0x9A);
+
+  addSharpKey("TAPE_A/B", Unmapped_Key, 0x04, 0x53);
+  addSharpKey("TAPE_PLAY_REV", Unmapped_Key, 0x04, 0x57);
+  addSharpKey("TAPE_PAUSE", Unmapped_Key, 0x04, 0x5D);
+  addSharpKey("DECK", Unmapped_Key, 0x04, 0x75);
+
+  addSharpKey("panel", Info_Key, 0x0C, 0x7E);
+  addSharpKey("TUNER", TunerInput_Key, 0x0C, 0xDD);
+}
+
+
+DenonReceiver1e::DenonReceiver1e(
+  QObject *guiObject,
+  unsigned int index)
+  : DenonReceiver1d(guiObject, index)
+{
+  setKeysetName("Receiver Keyset 1e");
+
+  addControlledDevice(Denon_Make, "DRA-385RD", Audio_Device);
+
+  addSharpKey("voldwn", VolumeDown_Key, 0x0C, 0x4C);
+  addSharpKey("volup", VolumeUp_Key, 0x0C, 0x4D);
+  addSharpKey("preset+", NextPreset_Key, 0x0C, 0x4E);
+  addSharpKey("preset-", PrevPreset_Key, 0x0C, 0x4F);
+  addSharpKey("video", CableInput_Key, 0x0C, 0x53);
+  addSharpKey("phono", PhonoInput_Key, 0x0C, 0x58);
+  addSharpKey("tuner", TunerInput_Key, 0x0C, 0x59);
+  addSharpKey("cd", CDInput_Key, 0x0C, 0x5A);
+  addSharpKey("tape_mon", Unmapped_Key, 0x0C, 0x5C);
+  addSharpKey("tape1", Unmapped_Key, 0x0C, 0x5D);
+  addSharpKey("tape2", Unmapped_Key, 0x0C, 0x5E);
+}
+
+DenonReceiver1f::DenonReceiver1f(
+  QObject *guiObject,
+  unsigned int index)
+  : DenonReceiver1c(guiObject, index)
+{
+  setKeysetName("Receiver Keyset 1f");
+
+  addControlledDevice(Denon_Make, "AVR-700RD", Audio_Device);
+  addControlledDevice(Denon_Make, "RC-841", Audio_Device);
+
+  addSharpKey("Power", Power_Key, 0x02, 0xC1);
+
+  addSharpKey("Deck_A_B", Unmapped_Key, 0x04, 0x53);
+  addSharpKey("Deck_PlayLeft", Unmapped_Key, 0x04, 0x57);
+
+  addSharpKey("Preset_Down", NextPreset_Key, 0x0C, 0xB5);
+  addSharpKey("Preset_Up", PrevPreset_Key, 0x0C, 0xB6);
 }
 
 
@@ -365,11 +437,11 @@ DenonReceiver2::DenonReceiver2(
   addSharpKey("amp_vol-down", VolumeDown_Key, 0x13, 0x4C);
   addSharpKey("amp_vol-up", VolumeUp_Key, 0x13, 0x4D);
   addSharpKey("amp_power", Power_Key, 0x13, 0x50);
-  addSharpKey("amp_phono", Unmapped_Key, 0x13, 0x58);
-  addSharpKey("amp_tuner", Unmapped_Key, 0x13, 0x59);
-  addSharpKey("amp_aux/video", Unmapped_Key, 0x13, 0x5B);
-  addSharpKey("amp_cd", Unmapped_Key, 0x13, 0x5A);
-  addSharpKey("amp_tape", Unmapped_Key, 0x13, 0x5D);
+  addSharpKey("amp_phono", PhonoInput_Key, 0x13, 0x58);
+  addSharpKey("amp_tuner", TunerInput_Key, 0x13, 0x59);
+  addSharpKey("amp_aux/video", AuxInput_Key, 0x13, 0x5B);
+  addSharpKey("amp_cd", CDInput_Key, 0x13, 0x5A);
+  addSharpKey("amp_tape", TapeInput_Key, 0x13, 0x5D);
   addSharpKey("TUN_CH_DOWN", ChannelDown_Key, 0x13, 0xD5);
   addSharpKey("TUN_CH_UP", ChannelUp_Key, 0x13, 0xD6);
 
@@ -382,7 +454,7 @@ DenonReceiver2::DenonReceiver2(
   addSharpKey("cd_pause", Pause_Key, 0x17, 0x5D);
   addSharpKey("cd_stop", Stop_Key, 0x17, 0x5E);
   addSharpKey("CD_RANDOM", Random_Key, 0x17, 0x6A);
-  addSharpKey("CD_SKIP", Unmapped_Key, 0x17, 0x6B);
+  addSharpKey("CD_SKIP", NextDisc_Key, 0x17, 0x6B);
 
   addSharpKey("tape_a/b", Unmapped_Key, 0x1B, 0x53);
   addSharpKey("tape_playrev", Unmapped_Key, 0x1B, 0x57);
@@ -405,11 +477,11 @@ DenonReceiver2a::DenonReceiver2a(
   addControlledDevice(Denon_Make, "PMA-425R", Audio_Device);
 
   addSharpKey("AMP_TAPE2", Unmapped_Key, 0x1D, 0x9A);
-  addSharpKey("AMP_TAPE1", Unmapped_Key, 0x1D, 0x99);
-  addSharpKey("AMP_AUX", Unmapped_Key, 0x1D, 0x84);
-  addSharpKey("AMP_TUNER", Unmapped_Key, 0x1D, 0x73);
-  addSharpKey("AMP_CD", Unmapped_Key, 0x1D, 0x82);
-  addSharpKey("AMP_PHONO", Unmapped_Key, 0x1D, 0x81);
+  addSharpKey("AMP_TAPE1", TapeInput_Key, 0x1D, 0x99);
+  addSharpKey("AMP_AUX", AuxInput_Key, 0x1D, 0x84);
+  addSharpKey("AMP_TUNER", TunerInput_Key, 0x1D, 0x73);
+  addSharpKey("AMP_CD", CDInput_Key, 0x1D, 0x82);
+  addSharpKey("AMP_PHONO", PhonoInput_Key, 0x1D, 0x81);
   addSharpKey("AMP_VOL_UP", VolumeUp_Key, 0x1D, 0x8D);
   addSharpKey("AMP_VOL_DOWN", VolumeDown_Key, 0x1D, 0x8C);
   addSharpKey("AMP_POWER", Power_Key, 0x1D, 0x90);
@@ -425,180 +497,43 @@ DenonReceiver3::DenonReceiver3(
       Denon_Make,
       index)
 {
-  addControlledDevice(Denon_Make, "PMA-480R", Audio_Device);
-
-  threadableProtocol = new SharpProtocol(guiObject, index, false);
-
-  addSharpKey("AMP_PHONO", Unmapped_Key, 0x02, 0x81);
-  addSharpKey("AMP_TUNER", Unmapped_Key, 0x02, 0x83);
-  addSharpKey("AMP_AUX", Unmapped_Key, 0x02, 0x84);
-  addSharpKey("AMP_MUTING", Mute_Key, 0x02, 0x8B);
-  addSharpKey("AMP_VOL_DOWN", VolumeDown_Key, 0x02, 0x8C);
-  addSharpKey("AMP_VOL_UP", VolumeUp_Key, 0x02, 0x8D);
-  addSharpKey("AMP_POWER", Power_Key, 0x02, 0x90);
-  addSharpKey("AMP_CD", Unmapped_Key, 0x02, 0x92);
-  addSharpKey("AMP_TAPE-1", Unmapped_Key, 0x02, 0x99);
-  addSharpKey("AMP_TAPE-2", Unmapped_Key, 0x02, 0x9A);
-
-  addSharpKey("TAPE_A/B", Unmapped_Key, 0x04, 0x53);
-  addSharpKey("TAPE_PLAY_REV", Unmapped_Key, 0x04, 0x57);
-  addSharpKey("TAPE_FF", Unmapped_Key, 0x04, 0x5A);
-  addSharpKey("TAPE_REW", Unmapped_Key, 0x04, 0x5B);
-  addSharpKey("TAPE_PLAY", Unmapped_Key, 0x04, 0x5C);
-  addSharpKey("TAPE_PAUSE", Unmapped_Key, 0x04, 0x5D);
-  addSharpKey("TAPE_STOP", Unmapped_Key, 0x04, 0x5E);
-  addSharpKey("TAPE_REC", Unmapped_Key, 0x04, 0x5F);
-  addSharpKey("DECK", Unmapped_Key, 0x04, 0x75);
-
-  addSharpKey("REPEAT", Repeat_Key, 0x08, 0x54);
-  addSharpKey("CD_NEXT", Next_Key, 0x08, 0x58);
-  addSharpKey("CD_BACK", Previous_Key, 0x08, 0x59);
-  addSharpKey("CD_FF", FastForward_Key, 0x08, 0x5A);
-  addSharpKey("CD_REW", Rewind_Key, 0x08, 0x5B);
-  addSharpKey("CD_PLAY", Play_Key, 0x08, 0x5C);
-  addSharpKey("CD_PAUSE", Pause_Key, 0x08, 0x5D);
-  addSharpKey("CD_STOP", Stop_Key, 0x08, 0x5E);
-  addSharpKey("DISC1", One_Key, 0x08, 0x64);
-  addSharpKey("DISC2", Two_Key, 0x08, 0x65);
-  addSharpKey("DISC3", Three_Key, 0x08, 0x66);
-  addSharpKey("DISC4", Four_Key, 0x08, 0x67);
-  addSharpKey("DISC5", Five_Key, 0x08, 0x68);
-  addSharpKey("DISC6", Six_Key, 0x08, 0x69);
-  addSharpKey("random", Random_Key, 0x08, 0x6A);
-  addSharpKey("CD", Unmapped_Key, 0x08, 0x73);
-  addSharpKey("disksk", DiscSelect_Key, 0x08, 0x6B);
-
-  addSharpKey("panel", Info_Key, 0x0C, 0x7E);
-  addSharpKey("TUNER_UP", ChannelUp_Key, 0x0C, 0xD5);
-  addSharpKey("TUNER_DOWN", ChannelDown_Key, 0x0C, 0xD6);
-  addSharpKey("TUNER", Unmapped_Key, 0x0C, 0xDD);
-}
-
-
-DenonReceiver3a::DenonReceiver3a(
-  QObject *guiObject,
-  unsigned int index)
-  : DenonReceiver3(guiObject, index)
-{
-  setKeysetName("Receiver Keyset 3a");
-
-  addControlledDevice(Denon_Make, "DRA-385RD", Audio_Device);
-
-  addSharpKey("voldwn", VolumeDown_Key, 0x0C, 0x4C);
-  addSharpKey("volup", VolumeUp_Key, 0x0C, 0x4D);
-  addSharpKey("preset+", Unmapped_Key, 0x0C, 0x4E);
-  addSharpKey("preset-", Unmapped_Key, 0x0C, 0x4F);
-  addSharpKey("tape2", Unmapped_Key, 0x0C, 0x5E);
-  addSharpKey("video", Unmapped_Key, 0x0C, 0x53);
-  addSharpKey("phono", Unmapped_Key, 0x0C, 0x58);
-  addSharpKey("tuner", Unmapped_Key, 0x0C, 0x59);
-  addSharpKey("cd", Unmapped_Key, 0x0C, 0x5A);
-  addSharpKey("tape_mon", Unmapped_Key, 0x0C, 0x5C);
-  addSharpKey("tape1", Unmapped_Key, 0x0C, 0x5D);
-}
-
-
-DenonReceiver4::DenonReceiver4(
-  QObject *guiObject,
-  unsigned int index)
-  : PIRKeysetMetaData(
-      "Receiver Keyset 4",
-      Denon_Make,
-      index)
-{
   addControlledDevice(Denon_Make, "AVR-600 RD", Audio_Device);
 
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     561, 489,
     561, 1543,
-    67329, true,
-    LIRC_NEC);
+    67329, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setTrailerPulse(561);
+  lp->setTrailerPulse(561);
 
   addKey("POWER", Power_Key, 0xA20C, 16);
   addKey("UP", Up_Key, 0x99AC, 16);
   addKey("DOWN", Down_Key, 0x9AAC, 16);
-  addKey("TUNER", Unmapped_Key, 0xA28C, 16);
-  addKey("CD", Unmapped_Key, 0xA08C, 16);
-  addKey("PHONO", Unmapped_Key, 0xA30C, 16);
-  addKey("VCR", Unmapped_Key, 0xA2CC, 16);
-  addKey("TV", Unmapped_Key, 0xA14C, 16);
-  addKey("TAPE", Unmapped_Key, 0xA12C, 16);
+  addKey("TUNER", TunerInput_Key, 0xA28C, 16);
+  addKey("CD", CDInput_Key, 0xA08C, 16);
+  addKey("PHONO", PhonoInput_Key, 0xA30C, 16);
+  addKey("VCR", VCRInput_Key, 0xA2CC, 16);
+  addKey("TV", CableInput_Key, 0xA14C, 16);
+  addKey("TAPE", TapeInput_Key, 0xA12C, 16);
   addKey("STEREO", Unmapped_Key, 0xA39C, 16);
-  addKey("MODE", Unmapped_Key, 0xA19C, 16);
+  addKey("MODE", Mode_Key, 0xA19C, 16);
   addKey("TESTTONE", Unmapped_Key, 0xA15C, 16);
   addKey("DELAY", Unmapped_Key, 0xA25C, 16);
   addKey("MUTE", Mute_Key, 0xA03C, 16);
   addKey("PANEL", Info_Key, 0xA1EC, 16);
-  addKey("CENTER_UP", Unmapped_Key, 0xA2BC, 16);
-  addKey("CENTER_DOWN", Unmapped_Key, 0xA1BC, 16);
-  addKey("REAR_UP", Unmapped_Key, 0xA33C, 16);
-  addKey("REAR_DOWN", Unmapped_Key, 0xA0BC, 16);
+  addKey("CENTER_UP", CenterVolumeUp_Key, 0xA2BC, 16);
+  addKey("CENTER_DOWN", CenterVolumeDown_Key, 0xA1BC, 16);
+  addKey("REAR_UP", RearVolumeUp_Key, 0xA33C, 16);
+  addKey("REAR_DOWN", RearVolumeDown_Key, 0xA0BC, 16);
   addKey("VOL_UP", VolumeUp_Key, 0xA23C, 16);
   addKey("VOL_DOWN", VolumeDown_Key, 0xA13C, 16);
 }
 
 
-DenonReceiver5::DenonReceiver5(
-  QObject *guiObject,
-  unsigned int index)
-  : PIRKeysetMetaData(
-      "Receiver Keyset 5",
-      Denon_Make,
-      index)
-{
-  addControlledDevice(Denon_Make, "AVR-700RD", Audio_Device);
-  addControlledDevice(Denon_Make, "RC-841", Audio_Device);
-
-  threadableProtocol = new SharpProtocol(guiObject, index, false);
-
-  addSharpKey("Power", Power_Key, 0x02, 0xC1);
-  addSharpKey("Phono", Unmapped_Key, 0x02, 0xC3);
-  addSharpKey("CD", Unmapped_Key, 0x02, 0xC4);
-  addSharpKey("Tuner", Unmapped_Key, 0x02, 0xC5);
-  addSharpKey("DVD_TV", Unmapped_Key, 0x02, 0xCA);
-  addSharpKey("NoName1", Unmapped_Key, 0x02, 0xCC);
-  addSharpKey("VCR", Unmapped_Key, 0x02, 0xCD);
-  addSharpKey("DAT_Tape", Unmapped_Key, 0x02, 0xD2);
-  addSharpKey("Panel", Info_Key, 0x02, 0xDE);
-  addSharpKey("NoName2", Unmapped_Key, 0x02, 0xDF);
-  addSharpKey("Mode", Unmapped_Key, 0x02, 0xE6);
-  addSharpKey("Stereo", Unmapped_Key, 0x02, 0xE7);
-  addSharpKey("Delay", Unmapped_Key, 0x02, 0xE9);
-  addSharpKey("Test_Tone", Unmapped_Key, 0x02, 0xEA);
-  addSharpKey("Muting", Mute_Key, 0x02, 0xF0);
-  addSharpKey("MasterVolumeUp", VolumeUp_Key, 0x02, 0xF1);
-  addSharpKey("MasterVolumeDown", VolumeDown_Key, 0x02, 0xF2);
-  addSharpKey("RearVolumeUp", Unmapped_Key, 0x02, 0xF3);
-  addSharpKey("RearVolumeDown", Unmapped_Key, 0x02, 0xF4);
-  addSharpKey("CenterVolumeUp", Unmapped_Key, 0x02, 0xF5);
-  addSharpKey("CenterVolumeDown", Unmapped_Key, 0x02, 0xF6);
-
-  addSharpKey("Deck_A_B", Unmapped_Key, 0x04, 0x53);
-  addSharpKey("Deck_PlayLeft", Unmapped_Key, 0x04, 0x57);
-  addSharpKey("Deck_FastForward", Unmapped_Key, 0x04, 0x5A);
-  addSharpKey("Deck_Rewind", Unmapped_Key, 0x04, 0x5B);
-  addSharpKey("Deck_PlayRight", Unmapped_Key, 0x04, 0x5C);
-  addSharpKey("Deck_Stop", Unmapped_Key, 0x04, 0x5E);
-
-  addSharpKey("CD_Next", Next_Key, 0x08, 0x58);
-  addSharpKey("CD_Prev", Previous_Key, 0x08, 0x59);
-  addSharpKey("CD_Pause", Pause_Key, 0x08, 0x5B);
-  addSharpKey("CD_Play", Play_Key, 0x08, 0x5C);
-  addSharpKey("CD_Stop", Stop_Key, 0x08, 0x5E);
-  addSharpKey("CD_Disc_Skip_Plus", DiscSelect_Key, 0x08, 0x6B);
-
-  addSharpKey("Preset_Down", ChannelDown_Key, 0x0C, 0xB5);
-  addSharpKey("Preset_Up", ChannelUp_Key, 0x0C, 0xB6);
-  addSharpKey("Shift", TunerBand_Key, 0x0C, 0xCD);
-}
-
-
 DenonAudio1::DenonAudio1(
   QObject *guiObject,
   unsigned int index)
@@ -647,11 +582,13 @@ DenonAudio1::DenonAudio1(
   addSharpKey("KEY_PROGRAM", Program_Key, 0x08, 0x4D);
   addSharpKey("open_close", Eject_Key, 0x08, 0x50);
   addSharpKey("KEY_CANCEL", Clear_Key, 0x08, 0x51); // "cancel", "CD_CANCEL"
+  addSharpKey("call", Call_Key, 0x08, 0x52);
   addSharpKey("time", Unmapped_Key, 0x08, 0x53); // "CD_TIME"
   addSharpKey("repeat", Repeat_Key, 0x08, 0x54); // "CD_REPEAT"
+  addSharpKey("a-b", RepeatAB_Key, 0x08, 0x55);
   addSharpKey("DIRECT", Unmapped_Key, 0x08, 0x57); // "direct"
-  addSharpKey("KEY_NEXT", Next_Key, 0x08, 0x58); // "cdfwd", "cdnexttrack"
-  addSharpKey("KEY_PREVIOUS", Previous_Key, 0x08, 0x59); // "cdrew", "cdprevtrack"
+  addSharpKey("KEY_NEXT", Next_Key, 0x08, 0x58); // "cdnexttrack"
+  addSharpKey("KEY_PREVIOUS", Previous_Key, 0x08, 0x59); // "cdprevtrack"
   addSharpKey("KEY_FORWARD", FastForward_Key, 0x08, 0x5A); // "cdffwd"
   addSharpKey("KEY_REWIND", Rewind_Key, 0x08, 0x5B); // "cdfrew"
   addSharpKey("KEY_PLAY", Play_Key, 0x08, 0x5C); // "cdplay"
@@ -660,9 +597,8 @@ DenonAudio1::DenonAudio1(
   addSharpKey("auto_space", Unmapped_Key, 0x08, 0x61);
   addSharpKey("auto_edit", Unmapped_Key, 0x08, 0x63);
   addSharpKey("random", Random_Key, 0x08, 0x6A); // "CD_RANDOM"
-  addSharpKey("cdskip", Unmapped_Key, 0x08, 0x6B);
-  addSharpKey("DISC_SKIP+", DiscSelect_Key, 0x08, 0x6B); // "cdskip"
-  addSharpKey("DISC_SKIP-", Unmapped_Key, 0x08, 0x6E);
+  addSharpKey("DISC_SKIP+", NextDisc_Key, 0x08, 0x6B); // "cdskip"
+  addSharpKey("DISC_SKIP-", PrevDisc_Key, 0x08, 0x6E);
   addSharpKey("peak", Unmapped_Key, 0x08, 0x6F);
   addSharpKey("edit", Unmapped_Key, 0x08, 0x70); // "CD_EDIT"
   addSharpKey("fader", Unmapped_Key, 0x08, 0x76);
@@ -675,21 +611,21 @@ DenonAudio1::DenonAudio1(
   addSharpKey("PRESET UP", Up_Key, 0x0C, 0x4E); // "up"
   addSharpKey("PRESET DOWN", Down_Key, 0x0C, 0x4F); // "dwn"
   addSharpKey("KEY_POWER", Power_Key, 0x0C, 0x50); // "aus"
-  addSharpKey("RCVR_VIDEO", Unmapped_Key, 0x0C, 0x53);
-  addSharpKey("RCVR_PHONO", Unmapped_Key, 0x0C, 0x58);
-  addSharpKey("tuner", Unmapped_Key, 0x0C, 0x59); // "RCVR_TUNER"
+  addSharpKey("RCVR_VIDEO", CableInput_Key, 0x0C, 0x53);
+  addSharpKey("RCVR_PHONO", PhonoInput_Key, 0x0C, 0x58);
+  addSharpKey("tuner", TunerInput_Key, 0x0C, 0x59); // "RCVR_TUNER"
   addSharpKey("RCVR_TAPE_MON", Unmapped_Key, 0x0C, 0x5C);
   addSharpKey("RCVR_TAPE1", Unmapped_Key, 0x0C, 0x5D);
   addSharpKey("RCVR_TAPE2", Unmapped_Key, 0x0C, 0x5E);
   addSharpKey("KEY_FN", Unmapped_Key, 0x0C, 0x5F); // "func"
-  addSharpKey("RCVR_CD", Unmapped_Key, 0x0C, 0x6A);
+  addSharpKey("RCVR_CD", CDInput_Key, 0x0C, 0x6A);
   addSharpKey("KEY_SLEEP", Sleep_Key, 0x0C, 0x72);
 //  addSharpKey("RCVR_PANEL", Info_Key, 0x0C, 0x7E);  // Either 0x7E or 0xDE here
   addSharpKey("memo", Unmapped_Key, 0x0C, 0xD1);
   addSharpKey("RDS", Unmapped_Key, 0x0C, 0xD2); // "TUNER_RDS"
   addSharpKey("CT", Unmapped_Key, 0x0C, 0xD3); // "TUNER_CT"
   addSharpKey("pty", Unmapped_Key, 0x0C, 0xD4); // "TUNER_PTY"
-  addSharpKey("TUNER BAND", Unmapped_Key, 0x0C, 0xD7);
+  addSharpKey("TUNER BAND", TunerBand_Key, 0x0C, 0xD7);
   addSharpKey("TUNER KEY_UP", ChannelUp_Key, 0x0C, 0xD9);
   addSharpKey("TUNER KEY_DOWN", ChannelDown_Key, 0x0C, 0xDA);
   addSharpKey("panel", Info_Key, 0x0C, 0xDE);
@@ -738,7 +674,7 @@ DenonAudio1c::DenonAudio1c(
 
   addControlledDevice(Denon_Make, "DCM-260", Audio_Device);
 
-  addSharpKey("DISC_SELECT", DiscSelect_Key, 0x08, 0x62);
+  addSharpKey("DISC_SELECT", NextDisc_Key, 0x08, 0x62);
 }
 
 
@@ -776,7 +712,7 @@ DenonAudio2::DenonAudio2(
 {
   addControlledDevice(Denon_Make, "D-C30", Audio_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0xDA25, 16);
   setPreData(0x5B, 8);
@@ -828,130 +764,66 @@ DenonAudio3::DenonAudio3(
       Denon_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
-    guiObject,
-    index,
-    336, 717,
-    336, 1773,
-    67458, true,
-    LIRC_NEC);
-
-  threadableProtocol = np;
-
-  np->setElevenBitToggle(true);
-
-  np->setTrailerPulse(336);
-
-  addKey("open_close", Eject_Key, 0x8828, 15);
-  addKey("call", Unmapped_Key, 0x8928, 15);
-  addKey("prog", Program_Key, 0x8B08, 15);
-  addKey("direct", Unmapped_Key, 0x8BA8, 15);
-  addKey("1", One_Key, 0x8908, 15);
-  addKey("2", Two_Key, 0x8B08, 15);
-  addKey("3", Three_Key, 0x8888, 15);
-  addKey("4", Four_Key, 0x8A88, 15);
-  addKey("5", Five_Key, 0x8988, 15);
-  addKey("6", Six_Key, 0x8B88, 15);
-  addKey("7", Seven_Key, 0x8848, 15);
-  addKey("8", Eight_Key, 0x8A48, 15);
-  addKey("9", Nine_Key, 0x8948, 15);
-  addKey("10", Zero_Key, 0x8B48, 15);
-  addKey("+10", DoubleDigit_Key, 0x88C8, 15);
-  addKey("play", Play_Key, 0x88E8, 15);
-  addKey("vol_up", VolumeUp_Key, 0x89C8, 15);
-  addKey("vol_down", VolumeDown_Key, 0x8BC8, 15);
-  addKey("pause", Pause_Key, 0x8AE8, 15);
-  addKey("stop", Stop_Key, 0x89E8, 15);
-  addKey("a_space", Unmapped_Key, 0x8A18, 15);
-  addKey("all", Unmapped_Key, 0x88A8, 15);
-  addKey("a-b", Unmapped_Key, 0x8AA8, 15);
-  addKey("rewind", Rewind_Key, 0x8B68, 15);
-  addKey("wind", FastForward_Key, 0x8968, 15);
-  addKey("prev", Previous_Key, 0x8A68, 15);
-  addKey("next", Next_Key, 0x8868, 15);
-}
-
-
-DenonAudio4::DenonAudio4(
-  QObject *guiObject,
-  unsigned int index)
-  : PIRKeysetMetaData(
-      "Audio Keyset 4",
-      Denon_Make,
-      index)
-{
   addControlledDevice(Denon_Make, "DMD-800", Audio_Device);
 
-  NECProtocol *np = new NECProtocol(
-    guiObject,
-    index,
-    275, 775,
-    275, 1900,
-    43000, false,
-    LIRC_NEC);
-
-  threadableProtocol = np;
-
-  np->setElevenBitToggle(true);
-
-  np->setTrailerPulse(275);
-
-  addKey("EJECT", Eject_Key, 0x319C, 15);
-  addKey("POWER", Power_Key, 0x301C, 15);
-  addKey("PLAY", Play_Key, 0x311C, 15);
-  addKey("PAUSE", Pause_Key, 0x331C, 15);
-  addKey("STOP", Stop_Key, 0x321C, 15);
-  addKey("REC", Record_Key, 0x329C, 15);
-  addKey("1", One_Key, 0x320C, 15);
-  addKey("2", Two_Key, 0x310C, 15);
-  addKey("3", Three_Key, 0x330C, 15);
-  addKey("4", Four_Key, 0x308C, 15);
-  addKey("5", Five_Key, 0x328C, 15);
-  addKey("6", Six_Key, 0x318C, 15);
-  addKey("7", Seven_Key, 0x338C, 15);
-  addKey("8", Eight_Key, 0x304C, 15);
-  addKey("9", Nine_Key, 0x324C, 15);
-  addKey("10", Zero_Key, 0x314C, 15);
-  addKey("+10", DoubleDigit_Key, 0x305C, 15);
-  addKey("CALL", Unmapped_Key, 0x31BC, 15);
-  addKey("PREV_TRACK", Previous_Key, 0x315C, 15);
-  addKey("NEXT_TRACK", Next_Key, 0x325C, 15);
-  addKey("BACK", Replay_Key, 0x30DC, 15);
-  addKey("FORWARD", Advance_Key, 0x335C, 15);
-  addKey("CLEAR", Clear_Key, 0x33EC, 15);
-  addKey("PROG", Program_Key, 0x303C, 15);
-  addKey("REPEAT", Repeat_Key, 0x323C, 15);
-  addKey("RANDOM", Random_Key, 0x333C, 15);
-  addKey("EDIT", Unmapped_Key, 0x33DC, 15);
-  addKey("ENTER", Select_Key, 0x31EC, 15);
-  addKey("TIME", Unmapped_Key, 0x30BC, 15);
-  addKey("CHAR", Unmapped_Key, 0x32EC, 15);
-  addKey("TITLE", Unmapped_Key, 0x32BC, 15);
+  threadableProtocol = new SharpProtocol(guiObject, index, false);
+
+  addKey("1", One_Key, 0x06, 0xC1);
+  addKey("2", Two_Key, 0x06, 0xC2);
+  addKey("3", Three_Key, 0x06, 0xC3);
+  addKey("4", Four_Key, 0x06, 0xC4);
+  addKey("5", Five_Key, 0x06, 0xC5);
+  addKey("6", Six_Key, 0x06, 0xC6);
+  addKey("7", Seven_Key, 0x06, 0xC7);
+  addKey("8", Eight_Key, 0x06, 0xC8);
+  addKey("9", Nine_Key, 0x06, 0xC9);
+  addKey("10", Zero_Key, 0x06, 0xCA);
+  addKey("CHAR", Unmapped_Key, 0x06, 0xDD);
+  addKey("ENTER", Select_Key, 0x06, 0xDE);
+  addKey("CLEAR", Clear_Key, 0x06, 0xDF);
+  addKey("POWER", Power_Key, 0x06, 0xE0);
+  addKey("STOP", Stop_Key, 0x06, 0xE1);
+  addKey("PLAY", Play_Key, 0x06, 0xE2);
+  addKey("PAUSE", Pause_Key, 0x06, 0xE3);
+  addKey("REC", Record_Key, 0x06, 0xE5);
+  addKey("EJECT", Eject_Key, 0x06, 0xE6);
+  addKey("+10", DoubleDigit_Key, 0x06, 0xE8);
+  addKey("NEXT_TRACK", Next_Key, 0x06, 0xE9);
+  addKey("PREV_TRACK", Previous_Key, 0x06, 0xEA);
+  addKey("FORWARD", Advance_Key, 0x06, 0xEB);
+  addKey("BACK", Replay_Key, 0x06, 0xEC);
+  addKey("EDIT", Unmapped_Key, 0x06, 0xEF);
+  addKey("PROG", Program_Key, 0x06, 0xF0);
+  addKey("REPEAT", Repeat_Key, 0x06, 0xF1);
+  addKey("RANDOM", Random_Key, 0x06, 0xF3);
+  addKey("TIME", Unmapped_Key, 0x06, 0xF4);
+  addKey("TITLE", Unmapped_Key, 0x06, 0xF5);
+  addKey("CALL", Call_Key, 0x06, 0xF6);
 }
 
 
-DenonAudio5::DenonAudio5(
+DenonAudio4::DenonAudio4(
   QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
-      "Audio Keyset 5",
+      "Audio Keyset 4",
       Denon_Make,
       index)
 {
   addControlledDevice(Denon_Make, "D-G1MD", Audio_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
 
 //  setPreData(0x4040, 16);
   setPreData(0x0202, 16);
 
-  addKey("fm/am", Unmapped_Key, 0x00, 8);
+  addKey("fm/am", TunerBand_Key, 0x00, 8);
   addKey("rds", Unmapped_Key, 0x01, 8);
   addKey("1", One_Key, 0x02, 8);
   addKey("6", Six_Key, 0x03, 8);
   addKey("+10", DoubleDigit_Key, 0x04, 8);
-  addKey("mdrec", Unmapped_Key, 0x05, 8);
-  addKey("recmute", Unmapped_Key, 0x06, 8);
+  addKey("mdrec", Record_Key, 0x05, 8);
+  addKey("recmute", RecordMute_Key, 0x06, 8);
   addKey("edit", Unmapped_Key, 0x07, 8);
   addKey("tape", Unmapped_Key, 0x08, 8);
   addKey("pty", Unmapped_Key, 0x09, 8);
@@ -961,15 +833,15 @@ DenonAudio5::DenonAudio5(
   addKey("pickrec", Unmapped_Key, 0x0D, 8);
   addKey("revmode", Unmapped_Key, 0x0E, 8);
   addKey("editcancel", Unmapped_Key, 0x0F, 8);
-  addKey("cd", Unmapped_Key, 0x10, 8);
+  addKey("cd", CDInput_Key, 0x10, 8);
   addKey("ct", Unmapped_Key, 0x11, 8);
   addKey("3", Three_Key, 0x12, 8);
   addKey("8", Eight_Key, 0x13, 8);
   addKey("clock", Unmapped_Key, 0x14, 8);
   addKey("checkspace", Unmapped_Key, 0x15, 8);
-  addKey("dolby", Unmapped_Key, 0x16, 8);
+  addKey("dolby", NoiseReduction_Key, 0x16, 8);
   addKey("prog", Program_Key, 0x17, 8);
-  addKey("aux", Unmapped_Key, 0x18, 8);
+  addKey("aux", AuxInput_Key, 0x18, 8);
   addKey("rt", Unmapped_Key, 0x19, 8);
   addKey("4", Four_Key, 0x1A, 8);
   addKey("9", Nine_Key, 0x1B, 8);
@@ -977,7 +849,7 @@ DenonAudio5::DenonAudio5(
   addKey("clear", Clear_Key, 0x1D, 8);
   addKey("titleinput", Unmapped_Key, 0x1E, 8);
   addKey("vol-", VolumeDown_Key, 0x1F, 8);
-  addKey("md", Unmapped_Key, 0x40, 8);
+  addKey("md", MDInput_Key, 0x40, 8);
   addKey("fmmode", Unmapped_Key, 0x41, 8);
   addKey("5", Five_Key, 0x42, 8);
   addKey("0", Zero_Key, 0x43, 8);
@@ -993,7 +865,7 @@ DenonAudio5::DenonAudio5(
   addKey("timedisp", Info_Key, 0x4D, 8);
   addKey("eqmode", Unmapped_Key, 0x4E, 8);
   addKey("mute", Mute_Key, 0x4F, 8);
-  addKey("bass", Unmapped_Key, 0x50, 8);
+  addKey("bass", EnhancedBass_Key, 0x50, 8);
   addKey("forward", FastForward_Key, 0x51, 8);
   addKey("prev", Previous_Key, 0x52, 8);
   addKey("next", Next_Key, 0x53, 8);
index 6b76d9a..58e3ad4 100644 (file)
@@ -60,50 +60,50 @@ public:
     unsigned int index);
 };
 
-class DenonReceiver2: public PIRKeysetMetaData
+class DenonReceiver1d: public DenonReceiver1c
 {
 public:
-  DenonReceiver2(
+  DenonReceiver1d(
     QObject *guiObject,
     unsigned int index);
 };
 
-class DenonReceiver2a: public DenonReceiver2
+class DenonReceiver1e: public DenonReceiver1d
 {
 public:
-  DenonReceiver2a(
+  DenonReceiver1e(
     QObject *guiObject,
     unsigned int index);
 };
 
-class DenonReceiver3: public PIRKeysetMetaData
+class DenonReceiver1f: public DenonReceiver1c
 {
 public:
-  DenonReceiver3(
+  DenonReceiver1f(
     QObject *guiObject,
     unsigned int index);
 };
 
-class DenonReceiver3a: public DenonReceiver3
+class DenonReceiver2: public PIRKeysetMetaData
 {
 public:
-  DenonReceiver3a(
+  DenonReceiver2(
     QObject *guiObject,
     unsigned int index);
 };
 
-class DenonReceiver4: public PIRKeysetMetaData
+class DenonReceiver2a: public DenonReceiver2
 {
 public:
-  DenonReceiver4(
+  DenonReceiver2a(
     QObject *guiObject,
     unsigned int index);
 };
 
-class DenonReceiver5: public PIRKeysetMetaData
+class DenonReceiver3: public PIRKeysetMetaData
 {
 public:
-  DenonReceiver5(
+  DenonReceiver3(
     QObject *guiObject,
     unsigned int index);
 };
@@ -172,12 +172,4 @@ public:
     unsigned int index);
 };
 
-class DenonAudio5: public PIRKeysetMetaData
-{
-public:
-  DenonAudio5(
-    QObject *guiObject,
-    unsigned int index);
-};
-
 #endif // DENON_H
index 71f3ee8..1fe7955 100644 (file)
@@ -1,5 +1,5 @@
 #include "ei.h"
-#include "rc5protocol.h"
+#include "protocols/rc5protocol.h"
 
 // Based on LIRC Ei-TV90 config file
 EiTV1::EiTV1(
@@ -37,12 +37,12 @@ EiTV1::EiTV1(
   addKey("TV_STATUS", Info_Key, 0x0F, 6);
   addKey("VOLUME+", VolumeUp_Key, 0x10, 6);
   addKey("VOLUME-", VolumeDown_Key, 0x11, 6);
-  addKey("LIGHT+", Unmapped_Key, 0x12, 6);
-  addKey("LIGHT-", Unmapped_Key, 0x13, 6);
-  addKey("COLOR+", Unmapped_Key, 0x14, 6);
-  addKey("COLOR-", Unmapped_Key, 0x15, 6);
-  addKey("CONTRAST+", Unmapped_Key, 0x1C, 6);
-  addKey("CONTRAST-", Unmapped_Key, 0x1D, 6);
+  addKey("LIGHT+", BrightnessUp_Key, 0x12, 6);
+  addKey("LIGHT-", BrightnessDown_Key, 0x13, 6);
+  addKey("COLOR+", ColorUp_Key, 0x14, 6);
+  addKey("COLOR-", ColorDown_Key, 0x15, 6);
+  addKey("CONTRAST+", ContrastUp_Key, 0x1C, 6);
+  addKey("CONTRAST-", ContrastDown_Key, 0x1D, 6);
   addKey("->*", Unmapped_Key, 0x1E, 6);
   addKey("P+", ChannelUp_Key, 0x20, 6);
   addKey("P-", ChannelDown_Key, 0x21, 6);
index 6e0c298..484cb58 100644 (file)
@@ -1,5 +1,5 @@
 #include "elgato.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
 
 ElgatoEyeTV1::ElgatoEyeTV1(
   QObject *guiObject,
@@ -9,7 +9,7 @@ ElgatoEyeTV1::ElgatoEyeTV1(
       Elgato_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
   setPreData(0x45, 8);
 
index a72b57a..724cb72 100644 (file)
@@ -1,6 +1,7 @@
 #include "goldstar.h"
-#include "necprotocol.h"
-#include "rc5protocol.h"
+#include "protocols/necprotocol.h"
+#include "protocols/rc5protocol.h"
+#include "protocols/lircprotocol.h"
 
 GoldStarTV1::GoldStarTV1(
   QObject *guiObject,
@@ -12,7 +13,7 @@ GoldStarTV1::GoldStarTV1(
 {
   addControlledDevice(GoldStar_Make, "105-210A", TV_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x20DF, 16);
   setPreData(0x04, 8);
@@ -110,7 +111,7 @@ GoldStarVCR1::GoldStarVCR1(
   addControlledDevice(GoldStar_Make, "GSE-Q204P", VCR_Device);
   addControlledDevice(GoldStar_Make, "QUISY 500", VCR_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x7689, 16);
   setPreData(0x6E, 8);
@@ -211,34 +212,35 @@ GoldStarCD1::GoldStarCD1(
 {
   addControlledDevice(GoldStar_Make, "FFH-272A/L", Audio_Device);
 
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     600, 500,
     600, 1600,
-    108000, true,
-    LIRC_NEC);
+    108000, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4500, 4500);
-  np->setTrailerPulse(600);
-  np->setRepeatPair(600, 1600);
-  np->setRepeatNeedsHeader(true);
+  lp->setHeaderPair(4500, 4500);
+  lp->setTrailerPulse(600);
+  lp->setRepeatPair(600, 1600);
+  lp->setRepeatNeedsHeader(true);
 
   setPreData(0x0808, 16);
   setPostData(0x1, 1);
 
   addKey("power", Power_Key, 0x3C43, 15);
   addKey("mute", Mute_Key, 0x7C03, 15);
-  addKey("cd", Unmapped_Key, 0x601F, 15);
-  addKey("tape", Unmapped_Key, 0x0877, 15);
-  addKey("aux", Unmapped_Key, 0x4837, 15);
+  addKey("cd", CDInput_Key, 0x601F, 15);
+  addKey("tape", TapeInput_Key, 0x0877, 15);
+  addKey("aux", AuxInput_Key, 0x4837, 15);
   addKey("fm", Unmapped_Key, 0x007F, 15);
   addKey("mw", Unmapped_Key, 0x403F, 15);
   addKey("lw", Unmapped_Key, 0x205F, 15);
   addKey("pre-", ChannelDown_Key, 0x245B, 15);
+  addKey("pre-", PrevPreset_Key, 0x245B, 15);
   addKey("pre+", ChannelUp_Key, 0x641B, 15);
+  addKey("pre+", NextPreset_Key, 0x641B, 15);
   addKey("ply/pau", Play_Key, 0x106F, 15);
   addKey("stop", Stop_Key, 0x502F, 15);
   addKey("prev", Previous_Key, 0x304F, 15);
@@ -246,7 +248,7 @@ GoldStarCD1::GoldStarCD1(
   addKey("prog", Program_Key, 0x5926, 15);
   addKey("repeat", Repeat_Key, 0x3946, 15);
   addKey("random", Random_Key, 0x057A, 15);
-  addKey("dskip", Unmapped_Key, 0x2956, 15);
+  addKey("dskip", NextDisc_Key, 0x2956, 15);
   addKey("remain", Unmapped_Key, 0x453A, 15);
   addKey("eqpatt", Unmapped_Key, 0x017E, 15);
   addKey("vol-", VolumeDown_Key, 0x344B, 15);
index 7efc7c6..25921a4 100644 (file)
@@ -1,5 +1,5 @@
 #include "hauppauge.h"
-#include "rc5protocol.h"
+#include "protocols/rc5protocol.h"
 
 HauppaugePCTV1::HauppaugePCTV1(
   QObject *guiObject,
@@ -39,7 +39,7 @@ HauppaugePCTV1::HauppaugePCTV1(
   addKey("Videos", Unmapped_Key, 0x18, 6);
   addKey("Music", Unmapped_Key, 0x19, 6);
   addKey("Pictures", Unmapped_Key, 0x1A, 6);
-  addKey("Guide", Unmapped_Key, 0x1B, 6);
+  addKey("Guide", Guide_Key, 0x1B, 6);
   addKey("TV", Unmapped_Key, 0x1C, 6);
   addKey("SkipForward", Next_Key, 0x1E, 6);
   addKey("Back/Exit", Exit_Key, 0x1F, 6);
index 72e6438..64df878 100644 (file)
@@ -1,5 +1,5 @@
 #include "hitachi.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
 
 HitachiTV1::HitachiTV1(
   QObject *guiObject,
@@ -9,7 +9,7 @@ HitachiTV1::HitachiTV1(
       Hitachi_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x0AF5, 16);
   setPreData(0x50, 8);
@@ -133,8 +133,8 @@ HitachiTV1c::HitachiTV1c(
   addKey("ArrowLeft", Left_Key, 0x73, 8);
   addKey("DayMode", Unmapped_Key, 0x74, 8);
   addKey("NightMode", Unmapped_Key, 0x75, 8);
-  addKey("AntennaA", Unmapped_Key, 0x76, 8);
-  addKey("AntennaB", Unmapped_Key, 0x77, 8);
+  addKey("AntennaA", AntennaInput_Key, 0x76, 8);
+  addKey("AntennaB", Antenna2Input_Key, 0x77, 8);
   addKey("CC", Unmapped_Key, 0x78, 8); // Another CC key?
   // Many more codes available in LIRC's hitachi/CLU4341UG2 config file
 }
@@ -148,7 +148,7 @@ HitachiProjector::HitachiProjector(
       Hitachi_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
 
 //  setPreData(0xE1A2, 16);
   setPreData(0x4587, 16);
@@ -190,7 +190,7 @@ HitachiDVD1::HitachiDVD1(
       Hitachi_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
 
 //  setPreData(0x01C4, 16);
   setPreData(0x2380, 16);
@@ -231,7 +231,7 @@ HitachiDVD1::HitachiDVD1(
   addKey("Angle", Angle_Key, 0x2A, 8);
   addKey("Subtitle", Captions_Key, 0x2B, 8);
   addKey("Audio", Audio_Key, 0x2C, 8);
-  addKey("Mode", Unmapped_Key, 0x2D, 8);
+  addKey("Mode", Mode_Key, 0x2D, 8);
   addKey("DiscNav", Guide_Key, 0x32, 8);
   addKey("Zoom", Zoom_Key, 0x3B, 8);
   addKey("SearchMode", Unmapped_Key, 0x3E, 8);
@@ -250,7 +250,7 @@ HitachiAudio1::HitachiAudio1(
   addControlledDevice(Hitachi_Make, "FX-7", Audio_Device);
   addControlledDevice(Hitachi_Make, "FX-77", Audio_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0xDA25, 16);
   setPreData(0x5B, 8);
@@ -295,7 +295,7 @@ HitachiVCR1::HitachiVCR1(
       Hitachi_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x06F9, 16);
   setPreData(0x60, 8);
index 1879e54..0e6a6e5 100644 (file)
@@ -1,6 +1,6 @@
 #include "jvc.h"
-#include "jvcprotocol.h"
-#include "necprotocol.h"
+#include "protocols/jvcprotocol.h"
+#include "protocols/lircprotocol.h"
 
 JVCSat1::JVCSat1(
   QObject *guiObject,
@@ -10,20 +10,19 @@ JVCSat1::JVCSat1(
       JVC_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
    guiObject,
    index,
    624, 1500,
    624, 2600,
-   6000, false,
-   LIRC_NEC);
+   6000, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(750, 6000);
-  np->setTrailerPulse(624);
+  lp->setHeaderPair(750, 6000);
+  lp->setTrailerPulse(624);
 
-  np->setFullHeadlessRepeat(true);
+  lp->setFullHeadlessRepeat(true);
 
 //  np->setCarrierFrequency(56000);
 //  np->setDutyCycle(32);
@@ -78,24 +77,23 @@ JVCSat2::JVCSat2(
       JVC_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     440, 2780,
     440, 1645,
-    6115, false,
-    LIRC_NEC);
+    6115, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(525, 6045);
-  np->setTrailerPulse(450);
+  lp->setHeaderPair(525, 6045);
+  lp->setTrailerPulse(450);
 
-//  np->setMinimumRepetitions(6);
-  np->setFullHeadlessRepeat(true);
+//  lp->setMinimumRepetitions(6);
+  lp->setFullHeadlessRepeat(true);
 
-  np->setCarrierFrequency(56000);
-  np->setDutyCycle(32);
+  lp->setCarrierFrequency(56000);
+  lp->setDutyCycle(32);
 
   setPostData(0x000, 10);
 
@@ -193,7 +191,7 @@ JVCVCR1::JVCVCR1(
 
   addKey("ch_set", Unmapped_Key, 0x66, 8);
   addKey("line", Unmapped_Key, 0x6E, 8);
-  addKey("mode", Unmapped_Key, 0x81, 8);
+  addKey("mode", Mode_Key, 0x81, 8);
   addKey("Red", Red_Key, 0x91, 8);
   addKey("INDEX1", Unmapped_Key, 0x93, 8);
   addKey("INDEX2", Unmapped_Key, 0x94, 8);
@@ -313,16 +311,16 @@ JVCTV1::JVCTV1(
   addKey("8", Eight_Key, 0x28, 8);
   addKey("9", Nine_Key, 0x29, 8);
 
-  addKey("br_up", Unmapped_Key, 0x30, 8);
-  addKey("br_down", Unmapped_Key, 0x31, 8);
-  addKey("col_up", Unmapped_Key, 0x32, 8);
-  addKey("col_down", Unmapped_Key, 0x33, 8);
-  addKey("con_up", Unmapped_Key, 0x36, 8);
-  addKey("con_down", Unmapped_Key, 0x37, 8);
+  addKey("br_up", BrightnessUp_Key, 0x30, 8);
+  addKey("br_down", BrightnessDown_Key, 0x31, 8);
+  addKey("col_up", ColorUp_Key, 0x32, 8);
+  addKey("col_down", ColorDown_Key, 0x33, 8);
+  addKey("con_up", ContrastUp_Key, 0x36, 8);
+  addKey("con_down", ContrastDown_Key, 0x37, 8);
   addKey("FUNCTION", Unmapped_Key, 0x3B, 8);
   addKey("RECALL", PrevChannel_Key, 0x3C, 8);
   addKey("sound", Unmapped_Key, 0x42, 8); // "<>"
-  addKey("VNR", Unmapped_Key, 0x45, 8);
+  addKey("VNR", NoiseReduction_Key, 0x45, 8);
   addKey("right", Right_Key, 0x55, 8);
   addKey("left", Left_Key, 0x5B, 8);
   addKey("X", Clear_Key, 0x70, 8);
@@ -428,7 +426,7 @@ JVCDAT1::JVCDAT1(
   addKey("INTRO", Unmapped_Key, 0x11, 8);
   addKey("MEMORY", Program_Key, 0x12, 8);
   addKey("DISPLAY", Info_Key, 0x14, 8);
-  addKey("CALL", Unmapped_Key, 0x15, 8);
+  addKey("CALL", Call_Key, 0x15, 8);
   addKey("SEARCH->>", Unmapped_Key, 0x16, 8);
   addKey("<<-SEARCH", Unmapped_Key, 0x17, 8);
   addKey("|<-SKIP", Previous_Key, 0x18, 8);
@@ -499,9 +497,9 @@ JVCAudio1::JVCAudio1(
   addKey("POWER", Power_Key, 0x17A3, 16);
   addKey("VOL+", VolumeUp_Key, 0x1EA3, 16);
   addKey("VOL-", VolumeDown_Key, 0x1FA3, 16);
-  addKey("MD-AUX", Unmapped_Key, 0x3EA3, 16); // "TAPE-AUX"
-  addKey("TAPE", Unmapped_Key, 0x3FA3, 16);
-  addKey("FM-MODE", Unmapped_Key, 0x5AA3, 16);
+  addKey("MD-AUX", AuxInput_Key, 0x3EA3, 16); // "TAPE-AUX"
+  addKey("TAPE", TapeInput_Key, 0x3FA3, 16);
+  addKey("FM-MODE", FMMode_Key, 0x5AA3, 16);
   addKey("TUNER-BAND", TunerBand_Key, 0x5BA3, 16);
   addKey("AHB-PRO", Unmapped_Key, 0x75A3, 16);
   addKey("AUTO-PRESET", Unmapped_Key, 0x77A3, 16);
@@ -565,7 +563,7 @@ JVCAudio1b::JVCAudio1b(
 {
   setKeysetName("Audio Keyset 1b");
 
-  addKey("VCR", Unmapped_Key, 0x2443, 16);
+  addKey("VCR", VCRInput_Key, 0x2443, 16);
 
   addKey("tape-stop", Unmapped_Key, 0x0383, 16); // "Deck.Stop"
   addKey("FORWARDS", Unmapped_Key, 0x0683, 16); // "Deck.Right"
@@ -582,7 +580,7 @@ JVCAudio1b::JVCAudio1b(
   addKey("RecPause", RecordPause_Key, 0xED83, 16);
 
   addKey("MONITOR/TAPE2", Unmapped_Key, 0x07A3, 16);
-  addKey("TUNER", Unmapped_Key, 0x0BA3, 16);
+  addKey("TUNER", TunerInput_Key, 0x0BA3, 16);
   addKey("tuner-", ChannelDown_Key, 0x18A3, 16);
   addKey("tuner+", ChannelUp_Key, 0x19A3, 16);
   addKey("FADE_MUTING", Unmapped_Key, 0x1CA3, 16);
@@ -599,7 +597,7 @@ JVCAudio1b::JVCAudio1b(
   addKey("Tuner 10", Unmapped_Key, 0x2AA3, 16);
   addKey("Tuner +10", Unmapped_Key, 0x2FA3, 16);
   addKey("SoundMode", SoundMode_Key, 0x38A3, 16);
-  addKey("PHONO", Unmapped_Key, 0x3CA3, 16);
+  addKey("PHONO", PhonoInput_Key, 0x3CA3, 16);
   addKey("cd-play", Play_Key, 0x3DA3, 16); // "CD"
 
   addKey("cd-stop", Stop_Key, 0x43B3, 16);
@@ -636,9 +634,9 @@ JVCAudio2::JVCAudio2(
   addKey("power", Power_Key, 0x00, 8);
   addKey("vol+", VolumeUp_Key, 0x01, 8);
   addKey("vol-", VolumeDown_Key, 0x02, 8);
-  addKey("ACTIVE_HYPER_BASS", Unmapped_Key, 0x04, 8); // "bass"
+  addKey("ACTIVE_HYPER_BASS", EnhancedBass_Key, 0x04, 8); // "bass"
   addKey("band", TunerBand_Key, 0x0B, 8);  // "TUNER_BAND"
-  addKey("aux", Unmapped_Key, 0x0D, 8);
+  addKey("aux", AuxInput_Key, 0x0D, 8);
 
   addKey("enter", Enter_Key, 0x11, 8);
   addKey("PRESET_SCAN", Scan_Key, 0x12, 8);
@@ -649,7 +647,7 @@ JVCAudio2::JVCAudio2(
   addKey("right-select", Unmapped_Key, 0x18, 8);
   addKey("left-select", Unmapped_Key, 0x19, 8);
   addKey("display", Info_Key, 0x1C, 8); // "CLOCK"
-  addKey("auto_mono", Unmapped_Key, 0x1F, 8);  // "fmstereo", "mode"
+  addKey("auto_mono", FMMode_Key, 0x1F, 8);  // "fmstereo", "mode"
 
   addKey("1", One_Key, 0x21, 8);
   addKey("2", Two_Key, 0x22, 8);
@@ -693,13 +691,13 @@ JVCAudio2::JVCAudio2(
   addKey("repeat", Repeat_Key, 0x78, 8);
   addKey("open_close", Eject_Key, 0x7B, 8); // "allcdeject"
   addKey("continue", Unmapped_Key, 0x7D, 8);
-  addKey("call", Unmapped_Key, 0x7F, 8);
+  addKey("call", Call_Key, 0x7F, 8);
   addKey("FREQUENCY", Unmapped_Key, 0x80, 8);
   addKey("tone", Unmapped_Key, 0x86, 8);
-  addKey("bass+", Unmapped_Key, 0x87, 8);
-  addKey("bass-", Unmapped_Key, 0x88, 8);
-  addKey("treble+", Unmapped_Key, 0x89, 8);
-  addKey("treble-", Unmapped_Key, 0x8A, 8);
+  addKey("bass+", BassUp_Key, 0x87, 8);
+  addKey("bass-", BassDown_Key, 0x88, 8);
+  addKey("treble+", TrebleUp_Key, 0x89, 8);
+  addKey("treble-", TrebleDown_Key, 0x8A, 8);
   addKey("sound", Unmapped_Key, 0x8F, 8);
   addKey("beat-cut", Unmapped_Key, 0xEE, 8);
   addKey("playcd1", Unmapped_Key, 0xF1, 8);
index adb48cb..fcf0c56 100644 (file)
@@ -1,7 +1,6 @@
 #include "lg.h"
-#include "necprotocol.h"
-#include "rc5protocol.h"
-#include "pirmakenames.h"
+#include "protocols/necprotocol.h"
+#include "protocols/rc5protocol.h"
 
 LGTV1::LGTV1(
   QObject *guiObject,
@@ -11,7 +10,7 @@ LGTV1::LGTV1(
       LG_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, false);
 
 //  setPreData(0x20DF, 16);
   setPreData(0x04, 8);
@@ -40,13 +39,13 @@ LGTV1::LGTV1(
   addKey("8", Eight_Key, 0x18, 8);
   addKey("9", Nine_Key, 0x19, 8);
   addKey("qview", Unmapped_Key, 0x1A, 8); // "review"
-  addKey("fav", Unmapped_Key, 0x1E, 8);
+  addKey("fav", Favorites_Key, 0x1E, 8);
   addKey("text", Teletext_Key, 0x20, 8);
   addKey("topt", Unmapped_Key, 0x21, 8);
   addKey("topt/rev", Rewind_Key, 0x21, 8);
   addKey("MIX", TeletextAndTV_Key, 0x24, 8);
   addKey("TIME", TeletextTime_Key, 0x26, 8);
-  addKey("INDEX", Unmapped_Key, 0x27, 8);
+  addKey("INDEX", TeletextIndex_Key, 0x27, 8);
   addKey("return/exit", Exit_Key, 0x28, 8);
   addKey("avmode", Unmapped_Key, 0x30, 8); // "UPDATE"
   addKey("subtitle", Captions_Key, 0x39, 8); // "cc"
@@ -57,11 +56,11 @@ LGTV1::LGTV1(
   addKey("ok", Select_Key, 0x44, 8);
   addKey("qmenu", Unmapped_Key, 0x45, 8);
   addKey("video", Unmapped_Key, 0x4D, 8); // "apc", "PSM"
-  addKey("TV/PC", Unmapped_Key, 0x50, 8);
+  addKey("TV/PC", PCInput_Key, 0x50, 8);
   addKey("sound", Unmapped_Key, 0x52, 8); // "SSM"
   addKey("list", Unmapped_Key, 0x53, 8);
   addKey("auto", Unmapped_Key, 0x54, 8);
-  addKey("memory/erase", Unmapped_Key, 0x55, 8);
+  addKey("memory/erase", Memory_Key, 0x55, 8);
   addKey("pip", PIP_Key, 0x60, 8);
   addKey("blue", Blue_Key, 0x61, 8);
   addKey("blue/pause", Pause_Key, 0x61, 8);
@@ -223,6 +222,7 @@ LGTV2b::LGTV2b(
 }
 
 
+/*
 LGDisc1::LGDisc1(
   QObject *guiObject,
   unsigned int index)
@@ -254,7 +254,7 @@ LGDisc1::LGDisc1(
   addKey("stop", Stop_Key, 0x05, 8);
   addKey("<<<", Unmapped_Key, 0x06, 8);
   addKey(">>>", Unmapped_Key, 0x07, 8);
-  addKey("aux", Unmapped_Key, 0x09, 8);
+  addKey("aux", AuxInput_Key, 0x09, 8);
   addKey("minus", Unmapped_Key, 0x12, 8);  // "pr_preset_down"
   addKey("plus", Unmapped_Key, 0x13, 8); // "pr_preset_up"
   addKey("volume-", VolumeDown_Key, 0x16, 8);
@@ -275,7 +275,7 @@ LGDisc1::LGDisc1(
   addKey("program", Program_Key, 0x4D, 8);
   addKey("repeat", Repeat_Key, 0x4E, 8);
   addKey("pause", Pause_Key, 0x4F, 8);
-  addKey("band", Unmapped_Key, 0x59, 8);
+  addKey("band", TunerBand_Key, 0x59, 8);
   addKey("dimmer", Unmapped_Key, 0x5E, 8);
   addKey("rds", Unmapped_Key, 0x60, 8);
   addKey("exit_cancel", Unmapped_Key, 0x69, 8);
@@ -310,8 +310,10 @@ LGDisc1::LGDisc1(
   addKey("marker", Unmapped_Key, 0xB4, 8);
   addKey("sleep", Sleep_Key, 0xC2, 8);
 }
+*/
 
 
+/*
 LGDisc2::LGDisc2(
   QObject *guiObject,
   unsigned int index)
@@ -401,6 +403,7 @@ LGDisc2a::LGDisc2a(
   addKey("KEY_YELLOW", Yellow_Key, 0x7E, 8);
   addKey("KEY_BLUE", Blue_Key, 0x7F, 8);
 }
+*/
 
 
 LGVCR1::LGVCR1(
@@ -411,7 +414,7 @@ LGVCR1::LGVCR1(
       LG_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x7689, 16);
   setPreData(0x6E, 8);
index e00226a..65def64 100644 (file)
@@ -61,6 +61,7 @@ public:
     unsigned int index);
 };
 
+/*
 class LGDisc1: public PIRKeysetMetaData
 {
 public:
@@ -84,6 +85,7 @@ public:
     QObject *guiObject,
     unsigned int index);
 };
+*/
 
 class LGVCR1: public PIRKeysetMetaData
 {
index 42f589b..2d3d63c 100644 (file)
@@ -1,7 +1,7 @@
 #include "magnavox.h"
-#include "rc6protocol.h"
-#include "rc5protocol.h"
-#include "necprotocol.h"
+#include "protocols/rc6protocol.h"
+#include "protocols/rc5protocol.h"
+#include "protocols/lircprotocol.h"
 
 MagnavoxDVD1::MagnavoxDVD1(
   QObject *guiObject,
@@ -130,18 +130,17 @@ MagnavoxConverterBox1::MagnavoxConverterBox1(
 {
   addControlledDevice(Magnavox_Make, "TB100MG9", TV_Device);
 
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     894, 795,
     894, 2537,
-    33751, false,
-    LIRC_NEC);
+    33751, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(3514, 3396);
-  np->setTrailerPulse(894);
+  lp->setHeaderPair(3514, 3396);
+  lp->setTrailerPulse(894);
 
   addKey("KEY_POWER", Power_Key, 0x541ABE, 24);
   addKey("KEY_1", One_Key, 0x57EA81, 24);
index 44b1be5..896d3f6 100644 (file)
@@ -1,5 +1,5 @@
 #include "mitsubishi.h"
-#include "necprotocol.h"
+#include "protocols/lircprotocol.h"
 
 MitsubishiTV1::MitsubishiTV1(
   QObject *guiObject,
@@ -9,19 +9,18 @@ MitsubishiTV1::MitsubishiTV1(
       Mitsubishi_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     300, 900,
     300, 2100,
-    53715, true,
-    LIRC_NEC);
+    53715, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setTrailerPulse(300);
+  lp->setTrailerPulse(300);
 
-//  np->setMinimumRepetitions(1);
+//  lp->setMinimumRepetitions(1);
 
   setPreData(0xE2, 8);
 
@@ -57,10 +56,10 @@ MitsubishiTV1::MitsubishiTV1(
   addKey("down", Down_Key, 0x36, 8);
   addKey("right", Right_Key, 0x82, 8);
   addKey("left", Left_Key, 0x92, 8);
-  addKey("TEXT", Unmapped_Key, 0x30, 8);
-  addKey("HOLD", Unmapped_Key, 0xA8, 8);
-  addKey("INDEX", Unmapped_Key, 0x64, 8);
-  addKey("CANCEL/TIME", Unmapped_Key, 0xB8, 8);
+  addKey("TEXT", Teletext_Key, 0x30, 8);
+  addKey("HOLD", TeletextHold_Key, 0xA8, 8);
+  addKey("INDEX", TeletextIndex_Key, 0x64, 8);
+  addKey("CANCEL/TIME", TeletextTime_Key, 0xB8, 8);
   addKey("RED", Red_Key, 0xF4, 8);
   addKey("GREEN", Green_Key, 0xEC, 8);
   addKey("YELLOW", Yellow_Key, 0xFC, 8);
@@ -76,16 +75,16 @@ MitsubishiTV1::MitsubishiTV1(
   addKey("SOURCE", PIPSource_Key, 0xFA, 8);
   addKey("POSITION", PIPMove_Key, 0x76, 8);
   addKey("EXCHANGE", PIPSwap_Key, 0xFE, 8);
-  addKey("STILL", Unmapped_Key, 0xE6, 8);
+  addKey("STILL", PIPPause_Key, 0xE6, 8);
   addKey("PREVMENU", Exit_Key, 0xD2, 8);
   addKey("ENTER", Select_Key, 0xDE, 8);
-  addKey("VIDEO", Unmapped_Key, 0xCC, 8);
-  addKey("AUDIO", Unmapped_Key, 0xDC, 8);
+  addKey("VIDEO", PictureMode_Key, 0xCC, 8);
+  addKey("AUDIO", SoundMode_Key, 0xDC, 8);
   addKey("ST/MONO", Unmapped_Key, 0xC0, 8);
   addKey("DEGAUSS", Unmapped_Key, 0xCE, 8);
   addKey("DEMO", Unmapped_Key, 0x62, 8);
   addKey("PRESET", Unmapped_Key, 0xA2, 8);
-  addKey("BAND", Unmapped_Key, 0xAE, 8);
+  addKey("BAND", TunerBand_Key, 0xAE, 8);
   addKey("AFT", Unmapped_Key, 0xA6, 8);
   addKey("SKIP", Unmapped_Key, 0xB6, 8);
   addKey("REALNAME", Unmapped_Key, 0xDA, 8);
@@ -114,19 +113,18 @@ MitsubishiVCR1::MitsubishiVCR1(
       Mitsubishi_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     300, 900,
     300, 2100,
-    53815, true,
-    LIRC_NEC);
+    53815, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setTrailerPulse(300);
+  lp->setTrailerPulse(300);
 
-//  np->setMinimumRepetitions(1);
+//  lp->setMinimumRepetitions(1);
 
   setPreData(0xEA, 8);
 
index 675022c..4a3d776 100644 (file)
@@ -1,5 +1,5 @@
 #include "nokia.h"
-#include "necprotocol.h"
+#include "protocols/lircprotocol.h"
 
 NokiaGenericVCR::NokiaGenericVCR(
   QObject *guiObject,
@@ -9,19 +9,18 @@ NokiaGenericVCR::NokiaGenericVCR(
       Nokia_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     272, 737,
     272, 1711,
-    42100, false,
-    LIRC_NEC);
+    42100, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setTrailerPulse(272);
+  lp->setTrailerPulse(272);
 
-//  np->setMinimumRepetitions(3);
+//  lp->setMinimumRepetitions(3);
 
   setPreData(0x6, 3);
 
index e128f4a..a80661a 100644 (file)
@@ -1,5 +1,6 @@
 #include "panasonic.h"
-#include "necprotocol.h"
+#include "protocols/lircprotocol.h"
+#include "protocols/necprotocol.h"
 
 PanasonicAmp::PanasonicAmp(
   QObject *guiObject,
@@ -9,22 +10,21 @@ PanasonicAmp::PanasonicAmp(
       Panasonic_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     400, 400,
     400, 1200,
-    76000, false,
-    LIRC_NEC);
+    76000, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4000, 1600);
-  np->setTrailerPulse(400);
+  lp->setHeaderPair(4000, 1600);
+  lp->setTrailerPulse(400);
 
-//  np->setMinimumRepetitions(4);
+//  lp->setMinimumRepetitions(4);
 
-  np->setCarrierFrequency(36000);
+  lp->setCarrierFrequency(36000);
 
   setPreData(0x80080A86, 32);
 
@@ -44,18 +44,7 @@ PanasonicCarAudio::PanasonicCarAudio(
       Panasonic_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
-    guiObject,
-    index,
-    665, 465,
-    665, 1595,
-    108609, true,
-    Extended_NEC);
-
-  threadableProtocol = np;
-
-  np->setHeaderPair(9148, 4424);
-  np->setTrailerPulse(667);
+  threadableProtocol = new NECProtocol(guiObject, index, true, false);
 
 //  setPreData(0x8156, 16);
   setPreData(0x6A81, 16);
@@ -79,18 +68,17 @@ PanasonicSat1::PanasonicSat1(
       Panasonic_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 400,
     500, 1212,
-    74500, false,
-    LIRC_NEC);
+    74500, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(3565, 1700);
-  np->setTrailerPulse(500);
+  lp->setHeaderPair(3565, 1700);
+  lp->setTrailerPulse(500);
 
   setPreData(0x40040140, 32);
 
@@ -99,7 +87,7 @@ PanasonicSat1::PanasonicSat1(
 //  addKey("CH+", ChannelUp_Key, 0x2D6C, 16);
   addKey("CH-", ChannelDown_Key, 0x6D2C, 16);
 //  addKey("CH-", ChannelDown_Key, 0xADEC, 16);
-  addKey("R_TUNE", Unmapped_Key, 0x8BCA, 16);
+  addKey("R_TUNE", PrevChannel_Key, 0x8BCA, 16);
   addKey("GUIDE", Guide_Key, 0xA3E2, 16);
   addKey("MENU", Menu_Key, 0x2362, 16);
   addKey("EXIT", Exit_Key, 0x6322, 16);
@@ -120,12 +108,12 @@ PanasonicSat1::PanasonicSat1(
   addKey("9", Nine_Key, 0x1554, 16);
   addKey("0", Zero_Key, 0x95D4, 16);
   addKey("LOGO_TUNE", Unmapped_Key, 0xABEA, 16);
-  addKey("ALT_AUD", Unmapped_Key, 0x1D5C, 16);
+  addKey("ALT_AUD", Audio_Key, 0x1D5C, 16);
   addKey("TV/DSS", Input_Key, 0x3D7C, 16);
   addKey("REC", Record_Key, 0x4302, 16);
   addKey("ACTION", Select_Key, 0xC382, 16);
   addKey("PROG", Program_Key, 0x5110, 16);
-  addKey("TXT", Unmapped_Key, 0x7B3A, 16);
+  addKey("TXT", Teletext_Key, 0x7B3A, 16);
   addKey("STTL", Unmapped_Key, 0xFBBA, 16);
   addKey("GUIDE", Guide_Key, 0xCB8A, 16);
 //  addKey("EXIT", Unmapped_Key, 0xF3B2, 16);
@@ -156,27 +144,26 @@ PanasonicTV1::PanasonicTV1(
       Panasonic_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 400,
     500, 1250,
-    75000, false,
-    LIRC_NEC);
+    75000, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(3500, 1700);
-  np->setTrailerPulse(500);
+  lp->setHeaderPair(3500, 1700);
+  lp->setTrailerPulse(500);
 
-//  np->setMinRepeat(1);
+//  lp->setMinRepeat(1);
 
   setPreData(0x400401, 24);
 
   addKey("POWER", Power_Key, 0x00BCBD, 24);
   addKey("MUTE", Mute_Key, 0x004C4D, 24);
-  addKey("PICTURE", Unmapped_Key, 0x006061, 24);
-  addKey("SOUND", Unmapped_Key, 0x00E0E1, 24);
+  addKey("PICTURE", PictureMode_Key, 0x006061, 24);
+  addKey("SOUND", SoundMode_Key, 0x00E0E1, 24);
   addKey("ACTION", Enter_Key, 0x004A4B, 24);
   addKey("ACTION", Select_Key, 0x004A4B, 24);
   addKey("UP", Up_Key, 0x005253, 24);
@@ -211,7 +198,7 @@ PanasonicTV1::PanasonicTV1(
   addKey("STR", Unmapped_Key, 0x00ABAA, 24);
   addKey("TIMER", Timer_Key, 0x00F0F1, 24);
   addKey("HELP", Unmapped_Key, 0x003534, 24);
-  addKey("R-TUNE", Unmapped_Key, 0x00ECED, 24);
+  addKey("R-TUNE", PrevChannel_Key, 0x00ECED, 24);
   addKey("GAME", Unmapped_Key, 0x00DDDC, 24);
   addKey("S", Unmapped_Key, 0x007071, 24);
   addKey("S_MENU", Unmapped_Key, 0x008A8B, 24);
@@ -288,18 +275,17 @@ PanasonicVCR1::PanasonicVCR1(
       Panasonic_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     550, 330,
     550, 1200,
-    75000, false,
-    LIRC_NEC);
+    75000, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(3600, 1650);
-  np->setTrailerPulse(550);
+  lp->setHeaderPair(3600, 1650);
+  lp->setTrailerPulse(550);
 
   setPreData(0x400409, 24);
 
@@ -442,18 +428,17 @@ PanasonicDVD1::PanasonicDVD1(
       Panasonic_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 400,
     500, 1200,
-    75000, false,
-    LIRC_NEC);
+    75000, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(3500, 1650);
-  np->setTrailerPulse(500);
+  lp->setHeaderPair(3500, 1650);
+  lp->setTrailerPulse(500);
 
   setPreData(0x40040D00, 32);
 
@@ -486,7 +471,7 @@ PanasonicDVD1::PanasonicDVD1(
   addKey("CANCEL", Clear_Key, 0xC1CC, 16);
   addKey("+10", DoubleDigit_Key, 0x919C, 16);
   addKey("inputselect", Input_Key, 0x919C, 16);
-//  addKey("R-TUNE", Unmapped_Key, 0xD9D4, 16);
+//  addKey("R-TUNE", PrevChannel_Key, 0xD9D4, 16);
   addKey("TOP_MENU", DiscTitle_Key, 0xD9D4, 16);
   addKey("OPEN/CLOSE", Eject_Key, 0x808D, 16);
 //  addKey("TV-SAT", Input_Key, 0x808D, 16);
@@ -502,7 +487,7 @@ PanasonicDVD1::PanasonicDVD1(
   addKey("REPEAT", Repeat_Key, 0x313C, 16);
   addKey("A-B_REPEAT", RepeatAB_Key, 0x121F, 16);
   addKey("A.SRD", Unmapped_Key, 0x7974, 16);
-  addKey("BASS", Unmapped_Key, 0x2B26, 16);
+  addKey("BASS", EnhancedBass_Key, 0x2B26, 16);
   addKey("CINEMA", Unmapped_Key, 0x030E, 16);
   addKey("D.ENH", Unmapped_Key, 0xABA6, 16);
   addKey("ZOOM", Zoom_Key, 0x838E, 16);
@@ -562,25 +547,24 @@ PanasonicAudio1::PanasonicAudio1(
   addControlledDevice(Panasonic_Make, "RX-DS25", Audio_Device);
   addControlledDevice(Panasonic_Make, "RX-e300", Audio_Device);
 
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     400, 400,
     400, 1200,
-    76000, false,
-    LIRC_NEC);
+    76000, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4000, 1600);
-  np->setTrailerPulse(400);
+  lp->setHeaderPair(4000, 1600);
+  lp->setTrailerPulse(400);
 
-//  np->setMinimumRepetitions(1);
+//  lp->setMinimumRepetitions(1);
 
   setPreData(0x40040543, 32);
 
   addKey("power", Power_Key, 0xFDBB, 16);
-  addKey("tape", Unmapped_Key, 0x3573, 16);
+  addKey("tape", TapeInput_Key, 0x3573, 16);
   addKey("1", One_Key, 0x094F, 16);
   addKey("2", Two_Key, 0x89CF, 16);
   addKey("3", Three_Key, 0x490F, 16);
@@ -599,8 +583,8 @@ PanasonicAudio1::PanasonicAudio1(
   addKey("tuning+", ChannelUp_Key, 0x97D1, 16);
   addKey("TUNER_PRESET_TUNE_DOWN", Unmapped_Key, 0x1751, 16);
   addKey("TUNER_PRESET_TUNE_UP", Unmapped_Key, 0xE7A1, 16);
-  addKey("fm-mode", Unmapped_Key, 0x2761, 16); // "st-mono"
-  addKey("cd", Unmapped_Key, 0x6D2B, 16);
+  addKey("fm-mode", FMMode_Key, 0x2761, 16); // "st-mono"
+  addKey("cd", CDInput_Key, 0x6D2B, 16);
   addKey("prev", Previous_Key, 0x2167, 16);
   addKey("next", Next_Key, 0xA1E7, 16);
   addKey("stop-clear", Stop_Key, 0x0147, 16);
index 4e1c711..cd3e29c 100644 (file)
@@ -1,7 +1,7 @@
 #include "philips.h"
-#include "rc5protocol.h"
-#include "rc6protocol.h"
-#include "necprotocol.h"
+#include "protocols/rc5protocol.h"
+#include "protocols/rc6protocol.h"
+#include "protocols/necprotocol.h"
 
 PhilipsTV1::PhilipsTV1(
   QObject *guiObject,
@@ -50,7 +50,7 @@ PhilipsTV1::PhilipsTV1(
   addKey("MY_AUDIO", Unmapped_Key, 0x10D2, 13);
   addKey("EXPAND", Surround_Key, 0x1024, 13); // "STEREO", "spatial"
   addKey("INFO", Info_Key, 0x100F, 13); // "+", "OSD"
-  addKey("TEXT_TV", Unmapped_Key, 0x103C, 13); // "TELETEXT"
+  addKey("TEXT_TV", TeletextAndTV_Key, 0x103C, 13); // "TELETEXT"
   addKey("SURF", Unmapped_Key, 0x1022, 13);
   addKey("TEXT_CLOCK", TeletextTime_Key, 0x102A, 13); // "time"
   addKey("TEXT_ENLARGE", TeletextSize_Key, 0x102B, 13); // "Reduce_Teletext"
@@ -62,26 +62,26 @@ PhilipsTV1::PhilipsTV1(
   addKey("TV-Dash", Dash_Key, 0x100A, 13);
   addKey("CP", Unmapped_Key, 0x100B, 13); // "C/P"
   addKey("pp", PrevChannel_Key, 0x100E, 13); // "GREEN"
-  addKey("BRIGHTNESS_UP", Unmapped_Key, 0x1012, 13);
-  addKey("BRIGHTNESS_DOWN", Unmapped_Key, 0x1013, 13);
-  addKey("CONTRAST_UP", Unmapped_Key, 0x1014, 13);
-  addKey("CONTRAST_DOWN", Unmapped_Key, 0x1015, 13);
-  addKey("BASS_UP", Unmapped_Key, 0x1016, 13);
-  addKey("BASS_DOWN", Unmapped_Key, 0x1017, 13);
-  addKey("TREBLE_UP", Unmapped_Key, 0x1018, 13);
-  addKey("TREBLE_DOWN", Unmapped_Key, 0x1019, 13);
-  addKey("BALANCE_RIGHT", Unmapped_Key, 0x101A, 13);
-  addKey("BALANCE_LEFT", Unmapped_Key, 0x101B, 13);
+  addKey("BRIGHTNESS_UP", BrightnessUp_Key, 0x1012, 13);
+  addKey("BRIGHTNESS_DOWN", BrightnessDown_Key, 0x1013, 13);
+  addKey("CONTRAST_UP", ContrastUp_Key, 0x1014, 13);
+  addKey("CONTRAST_DOWN", ContrastDown_Key, 0x1015, 13);
+  addKey("BASS_UP", BassUp_Key, 0x1016, 13);
+  addKey("BASS_DOWN", BassDown_Key, 0x1017, 13);
+  addKey("TREBLE_UP", TrebleUp_Key, 0x1018, 13);
+  addKey("TREBLE_DOWN", TrebleDown_Key, 0x1019, 13);
+  addKey("BALANCE_RIGHT", BalanceRight_Key, 0x101A, 13);
+  addKey("BALANCE_LEFT", BalanceLeft_Key, 0x101B, 13);
   addKey("TT_OUT", Unmapped_Key, 0x101D, 13);
-  addKey("TT_UPDOWN", Unmapped_Key, 0x102B, 13); // "TELETEXT_RESIZE"
-  addKey("TT_X", Unmapped_Key, 0x102D, 13); // "TELETEXT_OFF"
-  addKey("TT_TV", Unmapped_Key, 0x103F, 13);
-  addKey("TT_PLAY", Unmapped_Key, 0x101E, 13);
+  addKey("TT_UPDOWN", TeletextSize_Key, 0x102B, 13); // "TELETEXT_RESIZE"
+  addKey("TT_X", TeletextOff_Key, 0x102D, 13); // "TELETEXT_OFF"
+  addKey("TT_TV", TeletextAndTV_Key, 0x103F, 13);
+  addKey("TT_PLAY", TeletextReveal_Key, 0x101E, 13);
   addKey("TT_INFO", Unmapped_Key, 0x102C, 13); // "TELETEXT_ADDINFO"
-  addKey("TT_STOP", Unmapped_Key, 0x1029, 13);
-  addKey("TT_TIME", Unmapped_Key, 0x102A, 13);
+  addKey("TT_STOP", TeletextHold_Key, 0x1029, 13);
+  addKey("TT_TIME", TeletextTime_Key, 0x102A, 13);
   addKey("TT_MIX", Unmapped_Key, 0x102E, 13);
-  addKey("TELETEXT", Unmapped_Key, 0x103C, 13);
+  addKey("TELETEXT", Teletext_Key, 0x103C, 13);
   // The media keys are not well described!  -- config file 5373
   addKey("RECORD", Record_Key, 0x1037, 13);
   addKey("BACK", Unmapped_Key, 0x102F, 13);
@@ -180,7 +180,7 @@ PhilipsTV1d::PhilipsTV1d(
   addKey("pip_switch", PIPSwap_Key, 0x001A, 13);
   addKey("pip_prog+", PIPChannelUp_Key, 0x0026, 13);
   addKey("pip_prog-", PIPChannelDown_Key, 0x0027, 13);
-  addKey("tvtxt_index", Unmapped_Key, 0x002F, 13);
+  addKey("tvtxt_index", TeletextIndex_Key, 0x002F, 13);
 }
 
 
@@ -344,7 +344,7 @@ PhilipsTV3::PhilipsTV3(
   threadableProtocol = new RC6Protocol(guiObject, index, 0x28);
 
   addKey("power", Power_Key, 0x0C, 8);
-  addKey("text", Unmapped_Key, 0x3C, 8);
+  addKey("text", Teletext_Key, 0x3C, 8);
   addKey("red", Red_Key, 0x6D, 8);
   addKey("green", Green_Key, 0x6E, 8);
   addKey("yellow", Yellow_Key, 0x6F, 8);
@@ -520,7 +520,7 @@ PhilipsDVD2::PhilipsDVD2(
   addKey("topmenu", DiscTitle_Key, 0x9C, 8);
   addKey("bonus", Unmapped_Key, 0x5D, 8);
   addKey("repeat", Repeat_Key, 0x1D, 8);
-  addKey("hdmi", Unmapped_Key, 0xC6, 8);
+  addKey("hdmi", HDMIInput_Key, 0xC6, 8);
   addKey("red", Red_Key, 0x6D, 8);
   addKey("green", Green_Key, 0x6E, 8);
   addKey("yellow", Yellow_Key, 0x6F, 8);
@@ -593,7 +593,7 @@ PhilipsDVD3::PhilipsDVD3(
   addKey("Up", Up_Key, 0x58, 8);
   addKey("Audio", Audio_Key, 0x4E, 8);
   addKey("Subtitle", Captions_Key, 0x4B, 8);
-  addKey("Scart", Unmapped_Key, 0x43, 8);
+  addKey("Scart", ScartInput_Key, 0x43, 8);
   addKey("Rec", Record_Key, 0x37, 8);
   addKey("Stop", Stop_Key, 0x31, 8);
   addKey("Play", Play_Key, 0x2C, 8);
@@ -663,7 +663,7 @@ PhilipsDVD4::PhilipsDVD4(
   addKey("9", Nine_Key, 0x09, 8);
   addKey("0", Zero_Key, 0x00, 8);
   addKey("TC", Unmapped_Key, 0xC8, 8);
-  addKey("TUNER", Unmapped_Key, 0xEE, 8);
+  addKey("TUNER", TunerInput_Key, 0xEE, 8);
   addKey("ZOOM", Zoom_Key, 0xF7, 8);
   addKey("ANGLE", Angle_Key, 0x85, 8);
   addKey("SUBTITLE", Captions_Key, 0x4B, 8);
@@ -771,7 +771,7 @@ PhilipsVCR1b::PhilipsVCR1b(
   addKey("Previous", Previous_Key, 0x0171, 13);
   addKey("Next", Next_Key, 0x0170, 13);
   addKey("Monitor", Unmapped_Key, 0x017A, 13);
-  addKey("Tuner", Unmapped_Key, 0x017D, 13);
+  addKey("Tuner", TunerInput_Key, 0x017D, 13);
   addKey("Tracking", AutoTracking_Key, 0x114E, 13);
 }
 
@@ -800,14 +800,14 @@ PhilipsVCR1c::PhilipsVCR1c(
   addKey("VPS", Unmapped_Key, 0x114B, 13);
   addKey("Cassette", Eject_Key, 0x017E, 13);
   addKey("DECODER", Unmapped_Key, 0x0169, 13);
-  addKey("Tuner", Unmapped_Key, 0x017D, 13);
+  addKey("Tuner", TunerInput_Key, 0x017D, 13);
   addKey("Monitor", Unmapped_Key, 0x017A, 13);
   addKey("SYSTEM", Unmapped_Key, 0x014A, 13);
   addKey("REC_MODE", Unmapped_Key, 0x115E, 13);
   addKey("SHOWVIEW", Unmapped_Key, 0x0145, 13);
   addKey("DW", Unmapped_Key, 0x0144, 13); // "D/W"
-  addKey("SPEED-", Unmapped_Key, 0x1165, 13);
-  addKey("SPEED+", Unmapped_Key, 0x1166, 13);
+  addKey("SPEED-", SlowMinus_Key, 0x1165, 13);
+  addKey("SPEED+", SlowPlus_Key, 0x1166, 13);
 }
 
 
@@ -1001,7 +1001,7 @@ PhilipsAudio1::PhilipsAudio1(
 
   threadableProtocol = new RC5Protocol(guiObject, index);
 
-  addKey("Dynamic Bass Boost", Unmapped_Key, 0x0406, 13); // "dbb"
+  addKey("Dynamic Bass Boost", EnhancedBass_Key, 0x0406, 13); // "dbb"
   addKey("Digital Sound Control", Unmapped_Key, 0x040F, 13); // "dsc"
   addKey("mute", Mute_Key, 0x140D, 13);
   addKey("Vol+", VolumeUp_Key, 0x1410, 13);
@@ -1036,16 +1036,16 @@ PhilipsAudio1::PhilipsAudio1(
   addKey("cd_1", One_Key, 0x1537, 13);
   addKey("cd_2", Two_Key, 0x1538, 13);
   addKey("cd_3", Three_Key, 0x1539, 13);
-  addKey("cd", Unmapped_Key, 0x153F, 13);
+  addKey("cd", CDInput_Key, 0x153F, 13);
   addKey("aux_power", Unmapped_Key, 0x154C, 13); // "power", "standby"
-  addKey("aux", Unmapped_Key, 0x157F, 13);
+  addKey("aux", AuxInput_Key, 0x157F, 13);
   addKey("DPL", Unmapped_Key, 0x1425, 13);
   addKey("SleepTimer", Sleep_Key, 0x1426, 13);
-  addKey("Rear+", Unmapped_Key, 0x0401, 13);
-  addKey("Rear-", Unmapped_Key, 0x0402, 13);
+  addKey("Rear+", RearVolumeUp_Key, 0x0401, 13);
+  addKey("Rear-", RearVolumeDown_Key, 0x0402, 13);
   addKey("TestTone", Unmapped_Key, 0x0418, 13);
-  addKey("Center+", Unmapped_Key, 0x0426, 13);
-  addKey("Center-", Unmapped_Key, 0x0427, 13);
+  addKey("Center+", CenterVolumeUp_Key, 0x0426, 13);
+  addKey("Center-", CenterVolumeDown_Key, 0x0427, 13);
   addKey("incredible_surround", Surround_Key, 0x0400, 13); // "inc_s"
   addKey("osm", Unmapped_Key, 0x042C, 13);
   addKey("vec", Unmapped_Key, 0x042B, 13);
@@ -1056,12 +1056,12 @@ PhilipsAudio1::PhilipsAudio1(
   addKey("TIMER", Timer_Key, 0x142A, 13);
   addKey("FLAT", Unmapped_Key, 0x1434, 13);
   addKey("LOUDNESS", Unmapped_Key, 0x1432, 13);
-  addKey("BASS_UP", Unmapped_Key, 0x1416, 13);
-  addKey("BASS_DOWN", Unmapped_Key, 0x1417, 13);
-  addKey("TREBLE_UP", Unmapped_Key, 0x1418, 13);
-  addKey("TREBLE_DOWN", Unmapped_Key, 0x1419, 13);
-  addKey("BALANCE_RIGHT", Right_Key, 0x141A, 13); // "BalR"
-  addKey("BALANCE_LEFT", Left_Key, 0x141B, 13); // "BalL"
+  addKey("BASS_UP", BassUp_Key, 0x1416, 13);
+  addKey("BASS_DOWN", BassDown_Key, 0x1417, 13);
+  addKey("TREBLE_UP", TrebleUp_Key, 0x1418, 13);
+  addKey("TREBLE_DOWN", TrebleDown_Key, 0x1419, 13);
+  addKey("BALANCE_RIGHT", BalanceRight_Key, 0x141A, 13); // "BalR"
+  addKey("BALANCE_LEFT", BalanceLeft_Key, 0x141B, 13); // "BalL"
   addKey("TUNER_DISPLAY", Unmapped_Key, 0x144F, 13);
   addKey("CDR", Unmapped_Key, 0x16BF, 13);
   addKey("CDR_POWER", Unmapped_Key, 0x100C, 13);
@@ -1103,8 +1103,8 @@ PhilipsAudio1b::PhilipsAudio1b(
   addControlledDevice(Philips_Make, "FW 362", Audio_Device);
 
   addKey("tv_power", Unmapped_Key, 0x100C, 13);
-  addKey("tv_vcr", Unmapped_Key, 0x103F, 13);
-  addKey("tape1", Unmapped_Key, 0x14AC, 13);
+  addKey("tv_vcr", VCRInput_Key, 0x103F, 13);
+  addKey("tape1", TapeInput_Key, 0x14AC, 13);
   addKey("tape2", Unmapped_Key, 0x14AE, 13);
   addKey("play", Play_Key, 0x1175, 13);
   addKey("pause", Pause_Key, 0x1170, 13);
@@ -1113,7 +1113,7 @@ PhilipsAudio1b::PhilipsAudio1b(
   addKey("skip_back", Previous_Key, 0x1021, 13);
   addKey("forw", FastForward_Key, 0x1010, 13);
   addKey("back", Rewind_Key, 0x1011, 13);
-  addKey("disc_up", Unmapped_Key, 0x151E, 13);
+  addKey("disc_up", NextDisc_Key, 0x151E, 13);
 }
 
 
@@ -1127,15 +1127,15 @@ PhilipsAudio2::PhilipsAudio2(
 {
   addControlledDevice(Philips_Make, "FW2104", Audio_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, true, false);
 
 //  setPreData(0x61CA, 16);
   setPreData(0x5386, 16);
 
   addKey("POWER", Power_Key, 0x01, 8);
-  addKey("TAPE", Unmapped_Key, 0x02, 8);
-  addKey("CD", Unmapped_Key, 0x03, 8);
-  addKey("TUNER", TunerBand_Key, 0x04, 8);
+  addKey("TAPE", TapeInput_Key, 0x02, 8);
+  addKey("CD", CDInput_Key, 0x03, 8);
+  addKey("TUNER", TunerInput_Key, 0x04, 8);
   addKey("MUTE", Mute_Key, 0x06, 8);
   addKey("VOL_UP", VolumeUp_Key, 0x07, 8);
   addKey("VOL_DOWN", VolumeDown_Key, 0x08, 8);
@@ -1144,7 +1144,7 @@ PhilipsAudio2::PhilipsAudio2(
   addKey("SNOOZE", Unmapped_Key, 0x0B, 8);
   addKey("SLEEP", Sleep_Key, 0x0C, 8);
   addKey("TIMER", Timer_Key, 0x0D, 8);
-  addKey("AUX", Unmapped_Key, 0x05, 8);
+  addKey("AUX", AuxInput_Key, 0x05, 8);
   addKey("REP_A_B", RepeatAB_Key, 0x13, 8);
   addKey("MEMORY", Program_Key, 0x14, 8);
   addKey("CANCEL", Clear_Key, 0x15, 8);
index 599bd95..caaedea 100644 (file)
@@ -1,5 +1,5 @@
 #include "pinnacle.h"
-#include "rc5protocol.h"
+#include "protocols/rc5protocol.h"
 
 PinnaclePCTV1::PinnaclePCTV1(
   QObject *guiObject,
diff --git a/keysets/pioneer.cpp b/keysets/pioneer.cpp
new file mode 100644 (file)
index 0000000..30adfe1
--- /dev/null
@@ -0,0 +1,810 @@
+#include "pioneer.h"
+#include "protocols/pioneerprotocol.h"
+#include "protocols/lircprotocol.h"
+
+PioneerTV1::PioneerTV1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 1",
+      Pioneer_Make,
+      index)
+{
+  threadableProtocol = new PioneerProtocol(guiObject, index);
+
+  addNECKey("0", Zero_Key, 0xAA, 0x00);
+  addNECKey("1", One_Key, 0xAA, 0x01);
+  addNECKey("2", Two_Key, 0xAA, 0x02);
+  addNECKey("3", Three_Key, 0xAA, 0x03);
+  addNECKey("4", Four_Key, 0xAA, 0x04);
+  addNECKey("5", Five_Key, 0xAA, 0x05);
+  addNECKey("6", Six_Key, 0xAA, 0x06);
+  addNECKey("7", Seven_Key, 0xAA, 0x07);
+  addNECKey("8", Eight_Key, 0xAA, 0x08);
+  addNECKey("9", Nine_Key, 0xAA, 0x09);
+  addNECKey("VOL_PLUS", VolumeUp_Key, 0xAA, 0x0A);
+  addNECKey("VOL_MINUS", VolumeDown_Key, 0xAA, 0x0B);
+
+  addNECKey("CH_PLUS", ChannelUp_Key, 0xAA, 0x10);
+  addNECKey("CH_MINUS", ChannelDown_Key, 0xAA, 0x11);
+  addNECKey("POWER_ON_OFF", Power_Key, 0xAA, 0x1C);
+  addNECKey("RIGHT", Right_Key, 0xAA, 0x24);
+  addNECKey("LEFT", Left_Key, 0xAA, 0x25);
+  addNECKey("UP", Up_Key, 0xAA, 0x26);
+  addNECKey("DOWN", Down_Key, 0xAA, 0x27);
+  addNECKey("ENTER", Enter_Key, 0xAA, 0x28);
+  addNECKey("REC", Record_Key, 0xAA, 0x38);
+  addNECKey("INPUT_ANT", AntennaInput_Key, 0xAA, 0x45);
+  addNECKey("MUTING", Mute_Key, 0xAA, 0x49);
+  addNECKey("DISPLAY", Unmapped_Key, 0xAA, 0x4A);
+
+  addPioneerKey("CH_ENTER", Enter_Key, 0xAA, 0x5A, 0xAF, 0x61);
+  addPioneerKey("CH_RETURN", PrevChannel_Key, 0xAA, 0x5A, 0xAF, 0x62);
+  addPioneerKey("DOT", Unmapped_Key, 0xAA, 0x5A, 0xAF, 0x64);
+  addPioneerKey("INPUT_PC", PCInput_Key, 0xAA, 0x5A, 0xAF, 0x74);
+  addPioneerKey("INPUT1", Unmapped_Key, 0xAA, 0x5A, 0xAF, 0x7A);
+  addPioneerKey("INPUT2", Unmapped_Key, 0xAA, 0x5A, 0xAF, 0x7B);
+  addPioneerKey("INPUT3", Unmapped_Key, 0xAA, 0x5A, 0xAF, 0x7C);
+  addPioneerKey("INPUT4", Unmapped_Key, 0xAA, 0x5A, 0xAF, 0x7D);
+  addPioneerKey("HDMI5", HDMIInput_Key, 0xAA, 0x5A, 0xAF, 0x7E);
+  addPioneerKey("HDMI6", HDMI2Input_Key, 0xAA, 0x5A, 0xAF, 0x7F);
+
+  addPioneerKey("HOME_MENU", Unmapped_Key, 0xAA, 0x5B, 0xAF, 0x20);
+  addPioneerKey("RETURN", Exit_Key, 0xAA, 0x5B, 0xAF, 0x22);
+  addPioneerKey("TV_GUIDE", Guide_Key, 0xAA, 0x5B, 0xAF, 0x24);
+  addPioneerKey("INFO", Info_Key, 0xAA, 0x5B, 0xAF, 0x25);
+  addPioneerKey("MENU", Menu_Key, 0xAA, 0x5B, 0xAF, 0x27);
+  addPioneerKey("DAY_PLUS", Unmapped_Key, 0xAA, 0x5B, 0xAF, 0x2A);
+  addPioneerKey("DAY_MINUS", Unmapped_Key, 0xAA, 0x5B, 0xAF, 0x2B);
+  addPioneerKey("RED_B", Red_Key, 0xAA, 0x5B, 0xAF, 0x2C);
+  addPioneerKey("GREEN_C", Green_Key, 0xAA, 0x5B, 0xAF, 0x2D);
+  addPioneerKey("YELLOW_D", Yellow_Key, 0xAA, 0x5B, 0xAF, 0x2E);
+  addPioneerKey("BLUE_A", Blue_Key, 0xAA, 0x5B, 0xAF, 0x2F);
+  addPioneerKey("PAGE_PLUS", PageUp_Key, 0xAA, 0x5B, 0xAF, 0x33);
+  addPioneerKey("PAGE_MINUS", PageDown_Key, 0xAA, 0x5B, 0xAF, 0x34);
+
+  addNECKey("AV_SELECTION", Input_Key, 0xAA, 0x5E); // is this right?
+  addPioneerKey("SCREEN_SIZE", AspectRatio_Key, 0xAA, 0x5E, 0xAF, 0x3A);
+  addPioneerKey("SLEEP", Sleep_Key, 0xAA, 0x5E, 0xAF, 0x70);
+}
+
+
+PioneerTV2::PioneerTV2(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV (STB) Keyset 2",
+      Pioneer_Make,
+      index)
+{
+  threadableProtocol = new PioneerProtocol(guiObject, index);
+
+  // I'm not sure this keyset even needs the "0xAA" keys at all...
+  addNECKey("tv-dengen", Unmapped_Key, 0xAA, 0x1C);
+  addNECKey("tv-nyuuryoku-kirikae", Unmapped_Key, 0xAA, 0x13);
+  addNECKey("tv-channel-up", Unmapped_Key, 0xAA, 0x10);
+  addNECKey("tv-channel-down", Unmapped_Key, 0xAA, 0x11);
+  addNECKey("dengen", Power_Key, 0xAC, 0x1C);
+  addNECKey("sleep", Sleep_Key, 0xAC, 0x48);
+  addNECKey("1", One_Key, 0xAC, 0x01);
+  addNECKey("2", Two_Key, 0xAC, 0x02);
+  addNECKey("3", Three_Key, 0xAC, 0x03);
+  addNECKey("4", Four_Key, 0xAC, 0x04);
+  addNECKey("5", Five_Key, 0xAC, 0x05);
+  addNECKey("6", Six_Key, 0xAC, 0x06);
+  addNECKey("7", Seven_Key, 0xAC, 0x07);
+  addNECKey("8", Eight_Key, 0xAC, 0x08);
+  addNECKey("9", Nine_Key, 0xAC, 0x09);
+  addNECKey("10-0", Zero_Key, 0xAC, 0x00);
+  addNECKey("channel-up", ChannelUp_Key, 0xAC, 0x10);
+  addNECKey("channel-down", ChannelDown_Key, 0xAC, 0x11);
+  addNECKey("mute", Mute_Key, 0xAA, 0x49);
+  addNECKey("volume-up", VolumeUp_Key, 0xAA, 0x0A);
+  addNECKey("volume-down", VolumeDown_Key, 0xAA, 0x0B);
+  addNECKey("ff-left", Unmapped_Key, 0xAC, 0x4B);
+  addNECKey("ff-right", Unmapped_Key, 0xAC, 0x13);
+  addNECKey("ff-down", Unmapped_Key, 0xAC, 0x4F);
+  addNECKey("ff-up", Unmapped_Key, 0xAC, 0x4E);
+  addNECKey("up", Up_Key, 0xAC, 0x58);
+  addNECKey("down", Down_Key, 0xAC, 0x59);
+  addNECKey("left", Left_Key, 0xAC, 0x57);
+  addNECKey("right", Right_Key, 0xAC, 0x56);
+  addNECKey("kettei", Unmapped_Key, 0xAC, 0x4C);
+  addNECKey("guide", Guide_Key, 0xAC, 0x50);
+  addNECKey("shousai", Unmapped_Key, 0xAC, 0x54);
+  addNECKey("modoru", Unmapped_Key, 0xAC, 0x53);
+  addNECKey("navi", Unmapped_Key, 0xAC, 0x18);
+  addNECKey("okonomi", Unmapped_Key, 0xAC, 0x44);
+  addNECKey("channel-hyouji", Unmapped_Key, 0xAC, 0x4A);
+  addNECKey("channel-ichiran", Unmapped_Key, 0xAC, 0x5B);
+  addNECKey("channel-return", Unmapped_Key, 0xAC, 0x5C);
+  addNECKey("onsei", Unmapped_Key, 0xAC, 0x1E);
+//  addNECKey(, Unmapped_Key, 0xAC, 0x33); //"catv", "data", "aoi", "akai", "midori", "kiiroi", "vod", "browser", "genre-kensaku", "gazou"
+  addPioneerKey("chijo", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x3B);
+  addPioneerKey("bscs", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x3D);
+  addPioneerKey("ch", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x3C);
+  addPioneerKey("11", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x39);
+  addPioneerKey("12", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x38);
+  addPioneerKey("jimaku", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x31);
+}
+
+
+PioneerTV3::PioneerTV3(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV (STB) Keyset 3",
+      Pioneer_Make,
+      index)
+{
+  threadableProtocol = new PioneerProtocol(guiObject, index);
+
+  addNECKey("KEY_VOLUMEUP", VolumeUp_Key, 0xAA, 0x0A);
+  addNECKey("KEY_VOLUMEDOWN", VolumeDown_Key, 0xAA, 0x0B);
+  addNECKey("KEY_CHANNELUP", ChannelUp_Key, 0xAA, 0x10);
+  addNECKey("KEY_CHANNELDOWN", ChannelDown_Key, 0xAA, 0x11);
+  addNECKey("KEY_VCR", Unmapped_Key, 0xAA, 0x13);
+  addNECKey("KEY_POWER3", Unmapped_Key, 0xAA, 0x1C);
+  addNECKey("KEY_MUTE", Mute_Key, 0xAA, 0x49);
+  addNECKey("KEY_UP", Up_Key, 0xAA, 0xE9);
+  addNECKey("KEY_DOWN", Down_Key, 0xAA, 0xEA);
+  addNECKey("KEY_RIGHT", Right_Key, 0xAA, 0xEB);
+  addNECKey("KEY_LEFT", Left_Key, 0xAA, 0xEC);
+  addNECKey("KEY_OK", Select_Key, 0xAA, 0xED);
+
+  addPioneerKey("KEY_0", Zero_Key, 0xAA, 0xEE, 0xAF, 0x20);
+  addPioneerKey("KEY_1", One_Key, 0xAA, 0xEE, 0xAF, 0x21);
+  addPioneerKey("KEY_2", Two_Key, 0xAA, 0xEE, 0xAF, 0x22);
+  addPioneerKey("KEY_3", Three_Key, 0xAA, 0xEE, 0xAF, 0x23);
+  addPioneerKey("KEY_4", Four_Key, 0xAA, 0xEE, 0xAF, 0x24);
+  addPioneerKey("KEY_5", Five_Key, 0xAA, 0xEE, 0xAF, 0x25);
+  addPioneerKey("KEY_6", Six_Key, 0xAA, 0xEE, 0xAF, 0x26);
+  addPioneerKey("KEY_7", Seven_Key, 0xAA, 0xEE, 0xAF, 0x27);
+  addPioneerKey("KEY_8", Eight_Key, 0xAA, 0xEE, 0xAF, 0x28);
+  addPioneerKey("KEY_9", Nine_Key, 0xAA, 0xEE, 0xAF, 0x29);
+  addPioneerKey("KEY_POWER", Power_Key, 0xAA, 0xEE, 0xAF, 0x2A);
+  addPioneerKey("KEY_PROGRAM", Program_Key, 0xAA, 0xEE, 0xAF, 0x2D);
+  addPioneerKey("KEY_PERSO", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x30);
+  addPioneerKey("KEY_A", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x31);
+  addPioneerKey("KEY_B", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x32);
+  addPioneerKey("KEY_C", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x33);
+  addPioneerKey("KEY_D", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x34);
+  addPioneerKey("KEY_E", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x35);
+  addPioneerKey("KEY_SAT", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x37);
+  addPioneerKey("KEY_EPG", Guide_Key, 0xAA, 0xEE, 0xAF, 0x38);
+  addPioneerKey("KEY_FAVORITES", Favorites_Key, 0xAA, 0xEE, 0xAF, 0x39);
+  addPioneerKey("KEY_ESC", Exit_Key, 0xAA, 0xEE, 0xAF, 0x3A);
+  addPioneerKey("KEY_SERVICE", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x3B);
+  addPioneerKey("KEY_PLUS", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x3C);
+  addPioneerKey("KEY_AUDIO", Audio_Key, 0xAA, 0xEE, 0xAF, 0x60);
+  addPioneerKey("KEY_FREEZE", Pause_Key, 0xAA, 0xEE, 0xAF, 0x61);
+
+  addNECKey("KEY_FORWARD", FastForward_Key, 0xAB, 0x10);
+  addNECKey("KEY_REWIND", Rewind_Key, 0xAB, 0x11);
+  addNECKey("KEY_RECORD", Record_Key, 0xAB, 0x14);
+  addNECKey("KEY_STOP", Stop_Key, 0xAB, 0x16);
+  addNECKey("KEY_PLAY", Play_Key, 0xAB, 0x17);
+  addNECKey("KEY_PAUSE", Pause_Key, 0xAB, 0x18);
+  addNECKey("KEY_POWER2", Unmapped_Key, 0xAB, 0x1C);
+}
+
+
+PioneerAudio1::PioneerAudio1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 1",
+      Pioneer_Make,
+      index)
+{
+  addControlledDevice(Pioneer_Make, "XC-L11 (Radio/CD)", Audio_Device);
+  addControlledDevice(Pioneer_Make, "Hi-Fi DU-L7", Audio_Device);
+  addControlledDevice(Pioneer_Make, "CU-XR015", Audio_Device);
+  addControlledDevice(Pioneer_Make, "A880", Audio_Device);
+
+  threadableProtocol = new PioneerProtocol(guiObject, index);
+
+  addNECKey("TAPE2_FWD", Unmapped_Key, 0xA1, 0x10);
+  addNECKey("TAPE2_RWD", Unmapped_Key, 0xA1, 0x11);
+  addNECKey("TAPE2_STOP", Unmapped_Key, 0xA1, 0x16);
+  addNECKey("tape_fforw", Unmapped_Key, 0xA1, 0x56);
+  addNECKey("tape_fback", Unmapped_Key, 0xA1, 0x57);
+  addNECKey("tape_back", Unmapped_Key, 0xA1, 0x5B);
+  addNECKey("tape_stop", Unmapped_Key, 0xA1, 0x5C);
+  addNECKey("tape_forw", Unmapped_Key, 0xA1, 0x5D);
+
+  // Might want subclass for CD?
+  addNECKey("REPEAT", Repeat_Key, 0xA2, 0x0C);
+  addNECKey("PGM", Program_Key, 0xA2, 0x0D);
+  addNECKey("cd_forw", Unmapped_Key, 0xA2, 0x10);
+  addNECKey("cd_back", Unmapped_Key, 0xA2, 0x11);
+  addNECKey("cd_stop", Unmapped_Key, 0xA2, 0x16);
+  addNECKey("cd_play", Unmapped_Key, 0xA2, 0x17);
+  addNECKey("cd_pause", Unmapped_Key, 0xA2, 0x18);
+  addNECKey("DISC_CHANGE", NextDisc_Key, 0xA2, 0x1D);
+  addNECKey("disc1", Unmapped_Key, 0xA2, 0x1E);
+  addNECKey("disc2", Unmapped_Key, 0xA2, 0x1F);
+  addNECKey("clear", Unmapped_Key, 0xA2, 0x45);
+  addNECKey("cd_rnd", Random_Key, 0xA2, 0x4A); // "random"
+  addNECKey("disc3", Unmapped_Key, 0xA2, 0x50);
+  addNECKey("OPEN", Eject_Key, 0xA2, 0x51);
+
+  addNECKey("station+", ChannelUp_Key, 0xA4, 0x10);
+  addNECKey("station-", ChannelDown_Key, 0xA4, 0x11);
+  addNECKey("mono", FMMode_Key, 0xA4, 0x1E);
+
+  addNECKey("1", One_Key, 0xA6, 0x00);
+  addNECKey("2", Two_Key, 0xA6, 0x01);
+  addNECKey("3", Three_Key, 0xA6, 0x02);
+  addNECKey("4", Four_Key, 0xA6, 0x03);
+  addNECKey("5", Five_Key, 0xA6, 0x04);
+  addNECKey("6", Six_Key, 0xA6, 0x05);
+  addNECKey("7", Seven_Key, 0xA6, 0x06);
+  addNECKey("8", Eight_Key, 0xA6, 0x07);
+  addNECKey("9", Nine_Key, 0xA6, 0x08);
+  addNECKey("10/0", Zero_Key, 0xA6, 0x09);
+  addNECKey("volume-up", VolumeUp_Key, 0xA6, 0x0A);
+  addNECKey("volume-down", VolumeDown_Key, 0xA6, 0x0B);
+  addNECKey("tape", TapeInput_Key, 0xA6, 0x17); // "TAPE2_PLAY"
+  addNECKey("sleep", Sleep_Key, 0xA6, 0x19);
+  addNECKey("standby", Power_Key, 0xA6, 0x1C); // "POWER"
+  addNECKey("11/>10", DoubleDigit_Key, 0xA6, 0x40);
+  addNECKey("12/CLR", Clear_Key, 0xA6, 0x41);
+  addNECKey("cd", CDInput_Key, 0xA6, 0x44); // "CD_PLAY"
+  addNECKey("scan", Scan_Key, 0xA6, 0x48);
+  addNECKey("FM/AM", TunerBand_Key, 0xA6, 0x49); // "BAND"
+  addNECKey("aux", AuxInput_Key, 0xA6, 0x4C);
+  addNECKey("TAPE1_PLAY", Unmapped_Key, 0xA6, 0x5A);
+  addNECKey("KARAOKE", Unmapped_Key, 0xA6, 0x69);
+  addNECKey("menu", Menu_Key, 0xA6, 0x72); // "LEVEL"
+  addNECKey("cancel", Exit_Key, 0xA6, 0x73); // probably not "exit"
+  addNECKey("set", Select_Key, 0xA6, 0x74);
+  addNECKey("play/pause", Play_Key, 0xA6, 0x75);
+  addNECKey("play/pause", Pause_Key, 0xA6, 0x75);
+  addNECKey("stop", Stop_Key, 0xA6, 0x90);
+  addNECKey("next", Next_Key, 0xA6, 0x91);
+  addNECKey("previous", Previous_Key, 0xA6, 0x92);
+  addNECKey("forward", FastForward_Key, 0xA6, 0x93);
+  addNECKey("rewind", Rewind_Key, 0xA6, 0x94);
+  addNECKey("func", Unmapped_Key, 0xA6, 0x99);
+  addNECKey("disp", Info_Key, 0xA6, 0x9D); // "DISPLAY"
+//  addNECKey("am", TunerBand_Key, 0xA6, 0xA0); // "fm", messed up
+//  addNECKey("minus", Left_Key, 0xA6, 0xA0); // "plus", messed up
+  addNECKey("md", MDInput_Key, 0xA6, 0xA2);
+  addNECKey("smart_ope", Unmapped_Key, 0xA6, 0xCA);
+  addNECKey("snooze", Unmapped_Key, 0xA6, 0xCD);
+  addNECKey("timer", Timer_Key, 0xA6, 0xCE);
+  addNECKey("PRO_LOGIC", Unmapped_Key, 0xA6, 0xD4);
+  addNECKey("TONE_TEST", Unmapped_Key, 0xA6, 0xD5);
+  addNECKey("soundmorph+", Unmapped_Key, 0xA6, 0xD7); // "TURN_CW"
+  addNECKey("soundmorph-", Unmapped_Key, 0xA6, 0xD8); // "TURN_ACW"
+  addNECKey("sound", Audio_Key, 0xA6, 0xDA); // "SFC", "MORPHING"
+  addNECKey("sfc_preset", Unmapped_Key, 0xA6, 0xDC);
+  addNECKey("pbass", EnhancedBass_Key, 0xA6, 0xDD);
+}
+
+
+PioneerAudio1a::PioneerAudio1a(
+  QObject *guiObject,
+  unsigned int index)
+  : PioneerAudio1(guiObject, index)
+{
+  setKeysetName("Audio Keyset 1a");
+
+  addNECKey("cd", CDInput_Key, 0xA6, 0x0E);
+  addNECKey("tape", TapeInput_Key, 0xA6, 0x0F);
+}
+
+
+PioneerAudio2::PioneerAudio2(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 2",
+      Pioneer_Make,
+      index)
+{
+  threadableProtocol = new PioneerProtocol(guiObject, index);
+
+  addNECKey("VOL+", VolumeUp_Key, 0xA5, 0x0A);
+  addNECKey("VOL-", VolumeDown_Key, 0xA5, 0x0B);
+  addNECKey("Mute", Mute_Key, 0xA5, 0x12);
+
+  addNECKey("Stop", Stop_Key, 0xAB, 0x20);
+  addNECKey("RecordStop", RecordStop_Key, 0xAB, 0x21);
+  addNECKey("Play", Play_Key, 0xAB, 0x22);
+  addNECKey("Pause", Pause_Key, 0xAB, 0x23);
+  addNECKey("SkipForw", Advance_Key, 0xAB, 0x24);
+  addNECKey("SkipBack", Replay_Key, 0xAB, 0x25);
+  addNECKey("TrackNext", Next_Key, 0xAB, 0x26);
+  addNECKey("TrackPrev", Previous_Key, 0xAB, 0x27);
+  addNECKey("Record", Record_Key, 0xAB, 0x28);
+
+  addPioneerKey("CH+", ChannelUp_Key, 0xAB, 0x2A, 0xAF, 0x6E);
+  addPioneerKey("CH-", ChannelDown_Key, 0xAB, 0x2A, 0xAF, 0x6F);
+
+  addPioneerKey("Subtitle", Captions_Key, 0xAB, 0x2C, 0xAF, 0x36);
+  addPioneerKey("Left", Left_Key, 0xAB, 0x2C, 0xAF, 0x63);
+  addPioneerKey("Right", Right_Key, 0xAB, 0x2C, 0xAF, 0x64);
+  addPioneerKey("Dot", Unmapped_Key, 0xAB, 0x2C, 0xAF, 0x66);
+  addPioneerKey("0", Zero_Key, 0xAB, 0x2C, 0xAF, 0xA0);
+  addPioneerKey("1", One_Key, 0xAB, 0x2C, 0xAF, 0xA1);
+  addPioneerKey("2", Two_Key, 0xAB, 0x2C, 0xAF, 0xA2);
+  addPioneerKey("3", Three_Key, 0xAB, 0x2C, 0xAF, 0xA3);
+  addPioneerKey("4", Four_Key, 0xAB, 0x2C, 0xAF, 0xA4);
+  addPioneerKey("5", Five_Key, 0xAB, 0x2C, 0xAF, 0xA5);
+  addPioneerKey("6", Six_Key, 0xAB, 0x2C, 0xAF, 0xA6);
+  addPioneerKey("7", Seven_Key, 0xAB, 0x2C, 0xAF, 0xA7);
+  addPioneerKey("8", Eight_Key, 0xAB, 0x2C, 0xAF, 0xA8);
+  addPioneerKey("9", Nine_Key, 0xAB, 0x2C, 0xAF, 0xA9);
+  addPioneerKey("Guide", Guide_Key, 0xAB, 0x2C, 0xAF, 0xB0);
+  addPioneerKey("TopMenu", DiscTitle_Key, 0xAB, 0x2C, 0xAF, 0xB4);
+  addPioneerKey("Menu", DiscMenu_Key, 0xAB, 0x2C, 0xAF, 0xB9);
+  addPioneerKey("Audio", Audio_Key, 0xAB, 0x2C, 0xAF, 0xBE);
+  addPioneerKey("Enter", Enter_Key, 0xAB, 0x2C, 0xAF, 0xE5);
+  addPioneerKey("OK", Select_Key, 0xAB, 0x2C, 0xAF, 0xEF);
+  addPioneerKey("Up", Up_Key, 0xAB, 0x2C, 0xAF, 0xF2);
+  addPioneerKey("Down", Down_Key, 0xAB, 0x2C, 0xAF, 0xF3);
+  addPioneerKey("Return", Exit_Key, 0xAB, 0x2C, 0xAF, 0xF4);
+
+  addNECKey("Green", Green_Key, 0xAF, 0x63);
+  addNECKey("HDD", HDDInput_Key, 0xAF, 0x64);
+  addNECKey("DVD", DVDInput_Key, 0xAF, 0x65);
+}
+
+
+PioneerAudio3::PioneerAudio3(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 3",
+      Pioneer_Make,
+      index)
+{
+  addControlledDevice(Pioneer_Make, "A-207R", Audio_Device);
+  addControlledDevice(Pioneer_Make, "SX-302", Audio_Device);
+  addControlledDevice(Pioneer_Make, "VSX-9300", Audio_Device);
+
+  threadableProtocol = new PioneerProtocol(guiObject, index);
+
+  addNECKey("tape_deck1", Unmapped_Key, 0xA1, 0x0C);
+  addNECKey("tape_deck2", Unmapped_Key, 0xA1, 0x0D);
+  addNECKey("tape_ff", Unmapped_Key, 0xA1, 0x10);
+  addNECKey("tape_rew", Unmapped_Key, 0xA1, 0x11);
+  addNECKey("TAPE_REC_LEFT", Unmapped_Key, 0xA1, 0x12);
+  addNECKey("tape_rec", Unmapped_Key, 0xA1, 0x14); // "TAPE_REC_RIGHT"
+  addNECKey("tape_reverse", Unmapped_Key, 0xA1, 0x15); //"TAPE_PLAY_LEFT"
+  addNECKey("tape_stop", Unmapped_Key, 0xA1, 0x16);
+  addNECKey("tape_play", Unmapped_Key, 0xA1, 0x17); //"TAPE_PLAY_RIGHT"
+  addNECKey("tape_pause", Unmapped_Key, 0xA1, 0x18);
+  addNECKey("POWER_TAPE", Unmapped_Key, 0xA1, 0x1C);
+  addNECKey("tape_tapeselect", Unmapped_Key, 0xA1, 0x4C);
+  addNECKey("DISK1_TAPE_NEXT", Unmapped_Key, 0xA1, 0x56);
+  addNECKey("DISK1_TAPE_PREV", Unmapped_Key, 0xA1, 0x57);
+  addNECKey("DISK1_TAPE_PLAY_LEFT", Unmapped_Key, 0xA1, 0x5B);
+  addNECKey("DISK1_TAPE_STOP", Unmapped_Key, 0xA1, 0x5C);
+  addNECKey("DISK1_TAPE_PLAY_RIGHT", Unmapped_Key, 0xA1, 0x5D);
+
+  addNECKey("CD_PGM", Program_Key, 0xA2, 0x0D);
+  addNECKey("cd_next", Next_Key, 0xA2, 0x10);
+  addNECKey("cd_previous", Previous_Key, 0xA2, 0x11);
+  addNECKey("cd_stop", Stop_Key, 0xA2, 0x16);
+  addNECKey("cd_play", Play_Key, 0xA2, 0x17);
+  addNECKey("cd_pause", Pause_Key, 0xA2, 0x18);
+  addNECKey("cd_power", Unmapped_Key, 0xA2, 0x1C);
+  addNECKey("cd_discsel", NextDisc_Key, 0xA2, 0x1D); // "disc+"
+  addNECKey("CD_TIME", Unmapped_Key, 0xA2, 0x43);
+  addNECKey("CD_RND", Random_Key, 0xA2, 0x4A);
+  addNECKey("CD_EDIT", Unmapped_Key, 0xA2, 0x4B);
+  addNECKey("disc-", PrevDisc_Key, 0xA2, 0xC1);
+  addNECKey("cdbest", Unmapped_Key, 0xA2, 0xC2);
+
+  addNECKey("0", Zero_Key, 0xA4, 0x00);
+  addNECKey("1", One_Key, 0xA4, 0x01);
+  addNECKey("2", Two_Key, 0xA4, 0x02);
+  addNECKey("3", Three_Key, 0xA4, 0x03);
+  addNECKey("4", Four_Key, 0xA4, 0x04);
+  addNECKey("5", Five_Key, 0xA4, 0x05);
+  addNECKey("6", Six_Key, 0xA4, 0x06);
+  addNECKey("7", Seven_Key, 0xA4, 0x07);
+  addNECKey("8", Eight_Key, 0xA4, 0x08);
+  addNECKey("9", Nine_Key, 0xA4, 0x09);
+  addNECKey("fm", Unmapped_Key, 0xA4, 0x0D);
+  addNECKey("am", Unmapped_Key, 0xA4, 0x0E);
+  addNECKey("tuner_station+", NextPreset_Key, 0xA4, 0x10);
+  addNECKey("tuner_station-", PrevPreset_Key, 0xA4, 0x11);
+  addNECKey("tuner_band", TunerBand_Key, 0xA4, 0x13);
+  addNECKey("tuner_power", Unmapped_Key, 0xA4, 0x1C);
+  addNECKey("mpx", Unmapped_Key, 0xA4, 0x1E); // Toggle mono FM
+  addNECKey("tunerclass", Unmapped_Key, 0xA4, 0x40); // class A, B, C
+  addNECKey("tunersearch", Unmapped_Key, 0xA4, 0x42);
+  addNECKey("directaccess", Enter_Key, 0xA4, 0x43); // use to type in frequency values
+  addNECKey("tunerdisplaymode", Info_Key, 0xA4, 0x4A);
+  addNECKey("memory-scan", Scan_Key, 0xA4, 0x4D);
+  addNECKey("hits", Unmapped_Key, 0xA4, 0x4E);
+  addNECKey("freq-plus", ChannelUp_Key, 0xA4, 0x56);
+  addNECKey("freq-minus", ChannelDown_Key, 0xA4, 0x57);
+
+  addPioneerKey("effect/chsel-", Unmapped_Key, 0xA5, 0x07, 0xA5, 0x41);
+  addPioneerKey("effect/chsel+", Unmapped_Key, 0xA5, 0x07, 0xA5, 0x42);
+  addPioneerKey("digitalnr", Unmapped_Key, 0xA5, 0x07, 0xA5, 0x59);// noise reduction
+  addPioneerKey("inputatt", Unmapped_Key, 0xA5, 0x07, 0xA5, 0x5E); // analog input attenuation
+
+  addPioneerKey("direct", Unmapped_Key, 0xA5, 0x08, 0xA5, 0x5D); // DSP processing
+  addPioneerKey("standard", Unmapped_Key, 0xA5, 0x08, 0xA5, 0x5E); // DD/DTS standard
+
+  addNECKey("volume+", VolumeUp_Key, 0xA5, 0x0A);
+  addNECKey("volume-", VolumeDown_Key, 0xA5, 0x0B);
+  addNECKey("tv/sat", SatInput_Key, 0xA5, 0x0C);
+  addNECKey("ld", LDInput_Key, 0xA5, 0x0D); // "VDP"
+  addNECKey("vcr2", Unmapped_Key, 0xA5, 0x0E);
+  addNECKey("vcr-line", VCRInput_Key, 0xA5, 0x0F);
+  addNECKey("md/tape1", TapeInput_Key, 0xA5, 0x11);
+  addNECKey("muting", Mute_Key, 0xA5, 0x12);
+  addNECKey("video", Unmapped_Key, 0xA5, 0x16);
+  addNECKey("poweron", PowerOn_Key, 0xA5, 0x1A);
+  addNECKey("poweroff", PowerOff_Key, 0xA5, 0x1B);
+  addNECKey("amp_power", Power_Key, 0xA5, 0x1C);
+  addNECKey("tape2", Unmapped_Key, 0xA5, 0x1D);
+  addNECKey("dsp", Unmapped_Key, 0xA5, 0x40); // cycle hall, jazz, dance, theater
+  addNECKey("loudness", Unmapped_Key, 0xA5, 0x44);
+  addNECKey("tuner", TunerInput_Key, 0xA5, 0x47);
+  addNECKey("sleep", Sleep_Key, 0xA5, 0x48);
+  addNECKey("cd", CDInput_Key, 0xA5, 0x4C);
+  addNECKey("phono", PhonoInput_Key, 0xA5, 0x4D);
+  addNECKey("dat/tape1", TapeInput_Key, 0xA5, 0x4E);
+  addNECKey("line", LineInput_Key, 0xA5, 0x4F);
+  addNECKey("muteon", Unmapped_Key, 0xA5, 0x51);
+  addNECKey("muteoff", Unmapped_Key, 0xA5, 0x52);
+  addNECKey("VSEL", Unmapped_Key, 0xAf, 0x54);
+  addNECKey("input", Input_Key, 0xA5, 0x55); // cycle through all inputs!
+
+  addPioneerKey("speakers", Unmapped_Key, 0xA5, 0x56, 0xA5, 0x00);
+  addPioneerKey("signalselect", Unmapped_Key, 0xA5, 0x56, 0xA5, 0x03);
+  addPioneerKey("effect/chsel", Unmapped_Key, 0xA5, 0x56, 0xA5, 0x04);
+  addPioneerKey("dimmer", Unmapped_Key, 0xA5, 0x56, 0xA5, 0x06);
+
+  addPioneerKey("bass+", BassUp_Key, 0xA5, 0x57, 0xA5, 0x00);
+  addPioneerKey("bass-", BassDown_Key, 0xA5, 0x57, 0xA5, 0x01);
+  addPioneerKey("treble+", TrebleUp_Key, 0xA5, 0x57, 0xA5, 0x02);
+  addPioneerKey("treble-", TrebleDown_Key, 0xA5, 0x57, 0xA5, 0x03);
+
+  addNECKey("up", Up_Key, 0xA5, 0x80);
+  addNECKey("down", Down_Key, 0xA5, 0x81);
+  addNECKey("right", Right_Key, 0xA5, 0x82);
+  addNECKey("left", Left_Key, 0xA5, 0x83);
+  addNECKey("enter", Select_Key, 0xA5, 0x84);
+  addNECKey("dvd/ld", Unmapped_Key, 0xA5, 0x85);
+
+  addPioneerKey("setup", Menu_Key, 0xA5, 0x9B, 0xA5, 0xD6);
+
+  addPioneerKey("stereo", Unmapped_Key, 0xA5, 0x9F, 0xA5, 0xC0);
+  addPioneerKey("midnight", Unmapped_Key, 0xA5, 0x9F, 0xA5, 0xCB);
+  addPioneerKey("thx", Unmapped_Key, 0xA5, 0x9F, 0xA5, 0xD1);
+  addPioneerKey("advanced", Unmapped_Key, 0xA5, 0x9F, 0xA5, 0xD3); // DD/DTS advanced
+
+  addNECKey("ld_stop", Unmapped_Key, 0xA8, 0x16);
+  addNECKey("ld_play", Unmapped_Key, 0xA8, 0x17);
+  addNECKey("ld_pause", Unmapped_Key, 0xA8, 0x18);
+  addNECKey("ld_power", Unmapped_Key, 0xA8, 0x1C);
+  addNECKey("ld_display", Unmapped_Key, 0xA8, 0x43);
+  addNECKey("ld_next", Unmapped_Key, 0xA8, 0x52);
+  addNECKey("ld_previous", Unmapped_Key, 0xA8, 0x53);
+
+  addNECKey("tv_channel+", Unmapped_Key, 0xAA, 0x10);
+  addNECKey("tv_channel-", Unmapped_Key, 0xAA, 0x11);
+  addNECKey("tv_func", Unmapped_Key, 0xAA, 0x13);
+  addNECKey("tv_power", Unmapped_Key, 0xAA, 0x1C);
+
+  addNECKey("vcr_tv-vcr", Unmapped_Key, 0xAB, 0x0F);
+  addNECKey("vcr_ff", Unmapped_Key, 0xAB, 0x10);
+  addNECKey("vcr_rew", Unmapped_Key, 0xAB, 0x11);
+  addNECKey("vcr_stop", Unmapped_Key, 0xAB, 0x16);
+  addNECKey("vcr_play", Unmapped_Key, 0xAB, 0x17);
+  addNECKey("vcr_pause", Unmapped_Key, 0xAB, 0x18);
+  addNECKey("vcr_channel+", Unmapped_Key, 0xAB, 0x52);
+  addNECKey("vcr_channel-", Unmapped_Key, 0xAB, 0x53);
+}
+
+
+PioneerAudio4::PioneerAudio4(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 4",
+      Pioneer_Make,
+      index)
+{
+  threadableProtocol = new PioneerProtocol(guiObject, index);
+
+  addNECKey("tapesel", Unmapped_Key, 0xA1, 0x4C);
+  addNECKey(">>", FastForward_Key, 0xA1, 0x56);
+  addNECKey("<<", Rewind_Key, 0xA1, 0x57);
+  addNECKey("<", Unmapped_Key, 0xA1, 0x5B);
+  addNECKey("square", Unmapped_Key, 0xA1, 0x5C);
+  addNECKey(">", Unmapped_Key, 0xA1, 0x5D);
+
+  addNECKey(">>|", Next_Key, 0xA2, 0x10);
+  addNECKey("|<<", Previous_Key, 0xA2, 0x11);
+  addNECKey("squarecd", Stop_Key, 0xA2, 0x16);
+  addNECKey(">cd", Play_Key, 0xA2, 0x17);
+  addNECKey("cdpower", Unmapped_Key, 0xA2, 0x1C);
+  addNECKey("discsel", NextDisc_Key, 0xA2, 0x65);
+
+  addNECKey("tuner+", ChannelUp_Key, 0xA4, 0x10);
+  addNECKey("tuner-", ChannelDown_Key, 0xA4, 0x11);
+  addNECKey("tunerpower", Unmapped_Key, 0xA4, 0x1C);
+
+  addNECKey("vol+", VolumeUp_Key, 0xA5, 0x0A);
+  addNECKey("vol-", VolumeDown_Key, 0xA5, 0x0B);
+  addNECKey("amppower", Power_Key, 0xA5, 0x1C);
+  addNECKey("tape2", Unmapped_Key, 0xA5, 0x1D);
+  addNECKey("function", Unmapped_Key, 0xA5, 0x55);
+}
+
+
+PioneerAudio5::PioneerAudio5(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 5",
+      Pioneer_Make,
+      index)
+{
+  addControlledDevice(Pioneer_Make, "XR-P240C", Audio_Device);
+
+  LIRCProtocol *lp = new LIRCProtocol(
+    guiObject,
+    index,
+    560, 560,
+    560, 1680,
+    110000, true);
+
+  threadableProtocol = lp;
+
+  lp->setHeaderPair(9000, 4500);
+  lp->setTrailerPulse(560);
+  lp->setRepeatPair(9000, 4500);
+
+  setPreData(0x10217EF, 26);
+
+  addKey("POWER", Power_Key, 0x9867, 16);
+  addKey("MONO", FMMode_Key, 0x48B7, 16);
+  addKey("MEM_SCAN", Unmapped_Key, 0x8877, 16);
+  addKey("TUNER_BAND", TunerBand_Key, 0x18E7, 16);
+  addKey("1", One_Key, 0x00FF, 16);
+  addKey("2", Two_Key, 0x807F, 16);
+  addKey("3", Three_Key, 0x40BF, 16);
+  addKey("4", Four_Key, 0xC03F, 16);
+  addKey("5", Five_Key, 0x20DF, 16);
+  addKey("6", Six_Key, 0xA05F, 16);
+  addKey("7", Seven_Key, 0x609F, 16);
+  addKey("8", Eight_Key, 0xE01F, 16);
+  addKey("SCAN", Scan_Key, 0xB44B, 16);
+  addKey("REPEAT", Repeat_Key, 0x847B, 16);
+  addKey("DISC", NextDisc_Key, 0xE41B, 16);
+  addKey("CLEAR", Clear_Key, 0x34CB, 16);
+  addKey("PROGRAM", Program_Key, 0x44BB, 16);
+  addKey("CD_PREV", Previous_Key, 0x2CD3, 16);
+  addKey("CD_NEXT", Next_Key, 0x6C93, 16);
+  addKey("TIME", Unmapped_Key, 0x04FB, 16);
+  addKey("RANDOM", Random_Key, 0xC43B, 16);
+  addKey("CD_STOP", Stop_Key, 0xF40B, 16);
+  addKey("CD_PLAY_PAUSE", Play_Key, 0xD42B, 16);
+  addKey("CD_PLAY_PAUSE", Pause_Key, 0xD42B, 16);
+  addKey("VOLUME_PLUS", VolumeUp_Key, 0x708F, 16);
+  addKey("VOLUME_MINUS", VolumeDown_Key, 0xF00F, 16);
+  addKey("POWER_BASS", EnhancedBass_Key, 0xD02F, 16);
+  addKey("MUTE", Mute_Key, 0xE817, 16);
+  addKey("TAPE", TapeInput_Key, 0x7887, 16);
+  addKey("AUX_VIDEO", AuxInput_Key, 0xF807, 16);
+  addKey("TUNER", TunerInput_Key, 0xD827, 16);
+  addKey("CD", CDInput_Key, 0x38C7, 16);
+}
+
+
+PioneerCD1::PioneerCD1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "CD Keyset 1",
+      Pioneer_Make,
+      index)
+{
+  addControlledDevice(Pioneer_Make, "PD-106", Audio_Device);
+  addControlledDevice(Pioneer_Make, "PD-202", Audio_Device);
+  addControlledDevice(Pioneer_Make, "PD-4550", Audio_Device);
+  addControlledDevice(Pioneer_Make, "PD-F957", Audio_Device);
+  addControlledDevice(Pioneer_Make, "PD-M107", Audio_Device);
+  addControlledDevice(Pioneer_Make, "PD-S503", Audio_Device);
+  addControlledDevice(Pioneer_Make, "PD-F1007", Audio_Device);
+
+  threadableProtocol = new PioneerProtocol(guiObject, index);
+
+  addNECKey("0", Zero_Key, 0xA2, 0x00);
+  addNECKey("1", One_Key, 0xA2, 0x01);
+  addNECKey("2", Two_Key, 0xA2, 0x02);
+  addNECKey("3", Three_Key, 0xA2, 0x03);
+  addNECKey("4", Four_Key, 0xA2, 0x04);
+  addNECKey("5", Five_Key, 0xA2, 0x05);
+  addNECKey("6", Six_Key, 0xA2, 0x06);
+  addNECKey("7", Seven_Key, 0xA2, 0x07);
+  addNECKey("8", Eight_Key, 0xA2, 0x08);
+  addNECKey("9", Nine_Key, 0xA2, 0x09);
+  addNECKey("VOL+", VolumeUp_Key, 0xA2, 0x0A);
+  addNECKey("VOL-", VolumeDown_Key, 0xA2, 0x0B);
+  addNECKey("REPEAT", Repeat_Key, 0xA2, 0x0C);
+  addNECKey("PROGRAMMEMORY", Program_Key, 0xA2, 0x0D); // "PROG"
+  addNECKey("forw", FastForward_Key, 0xA2, 0x0E); // "FF"
+  addNECKey("back", Rewind_Key, 0xA2, 0x0F); // "REW"
+
+  addNECKey("skip_forw", Next_Key, 0xA2, 0x10);
+  addNECKey("skip_back", Previous_Key, 0xA2, 0x11);
+  addNECKey("stop", Stop_Key, 0xA2, 0x16);
+  addNECKey("play", Play_Key, 0xA2, 0x17);
+  addNECKey("pause", Pause_Key, 0xA2, 0x18);
+  addNECKey("power", Power_Key, 0xA2, 0x1C);
+  addNECKey("disc+", NextDisc_Key, 0xA2, 0x1D);
+  addNECKey("disc_1", Unmapped_Key, 0xA2, 0x1E);
+  addNECKey("disc_2", Unmapped_Key, 0xA2, 0x1F);
+
+  addNECKey("set_track", Unmapped_Key, 0xA2, 0x40);
+  addNECKey("menu", Menu_Key, 0xA2, 0x41);  // "set_disc"
+  addNECKey("TIME", Unmapped_Key, 0xA2, 0x43);
+  addNECKey("CLEAR", Clear_Key, 0xA2, 0x45);
+  addNECKey("check", Unmapped_Key, 0xA2, 0x49);
+  addNECKey("RANDOM", Random_Key, 0xA2, 0x4A);
+  addNECKey("AUTOPGM", Unmapped_Key, 0xA2, 0x4B); // "EDIT"
+  addNECKey("MUSICWINDOW", Unmapped_Key, 0xA2, 0x4D);
+  addNECKey("FADEIN", Unmapped_Key, 0xA2, 0x4E);
+  addNECKey("FADEOUT", Unmapped_Key, 0xA2, 0x4F);
+  addNECKey("disc_3", Unmapped_Key, 0xA2, 0x50);
+  addNECKey("OPEN/CLOSE", Eject_Key, 0xA2, 0x51);
+  addNECKey("+10", Unmapped_Key, 0xA2, 0x52);
+  addNECKey("disc_4", Unmapped_Key, 0xA2, 0x53);
+  addNECKey("NEXTINDEX", Unmapped_Key, 0xA2, 0x54);
+  addNECKey("PREVINDEX", Unmapped_Key, 0xA2, 0x55);
+  addNECKey(">=20", DoubleDigit_Key, 0xA2, 0x56);
+  addNECKey("disc_5", Unmapped_Key, 0xA2, 0x57);
+  addNECKey("TIMEFADE", Unmapped_Key, 0xA2, 0x5A);
+  addNECKey("disc_6", Unmapped_Key, 0xA2, 0x5B);
+  addNECKey("delete", Unmapped_Key, 0xA2, 0x5D);
+  addNECKey("HI-LITE", Unmapped_Key, 0xA2, 0x5E); // "hi-lite_scan"
+
+  addPioneerKey("20", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x80);
+  addPioneerKey("11", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x81);
+  addPioneerKey("12", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x82);
+  addPioneerKey("13", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x83);
+  addPioneerKey("14", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x84);
+  addPioneerKey("15", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x85);
+  addPioneerKey("16", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x86);
+  addPioneerKey("17", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x87);
+  addPioneerKey("18", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x88);
+  addPioneerKey("19", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x89);
+
+  addPioneerKey("disc-", PrevDisc_Key, 0xA2, 0xC1, 0xA2, 0x93);
+  addPioneerKey("TITLE_INPUT", Unmapped_Key, 0xA2, 0xC1, 0xA2, 0x95);
+  addPioneerKey("mode", Unmapped_Key, 0xA2, 0xC1, 0xA2, 0x9C);
+
+  addPioneerKey("TITLE_DISPLAY", Info_Key, 0xA2, 0xC2, 0xA2, 0x94);
+  addPioneerKey("search", Unmapped_Key, 0xA2, 0xC2, 0xA2, 0x95);
+  addPioneerKey("BEST", Unmapped_Key, 0xA2, 0xC2, 0xA2, 0x9B);
+
+  addPioneerKey("previous", Unmapped_Key, 0xA2, 0xC6, 0xA2, 0x93);
+  addPioneerKey("CURSOR_right", Right_Key, 0xA2, 0xC6, 0xA2, 0x9B);
+  addPioneerKey("CURSOR_left", Left_Key, 0xA2, 0xC6, 0xA2, 0x9C);
+}
+
+
+PioneerLaserDisc1::PioneerLaserDisc1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "LD Keyset 1",
+      Pioneer_Make,
+      index)
+{
+  addControlledDevice(Pioneer_Make, "CLD-D925", Other_Device);
+
+  threadableProtocol = new PioneerProtocol(guiObject, index);
+
+  addNECKey("0", Zero_Key, 0xA8, 0x00);
+  addNECKey("1", One_Key, 0xA8, 0x01);
+  addNECKey("2", Two_Key, 0xA8, 0x02);
+  addNECKey("3", Three_Key, 0xA8, 0x03);
+  addNECKey("4", Four_Key, 0xA8, 0x04);
+  addNECKey("5", Five_Key, 0xA8, 0x05);
+  addNECKey("6", Six_Key, 0xA8, 0x06);
+  addNECKey("7", Seven_Key, 0xA8, 0x07);
+  addNECKey("8", Eight_Key, 0xA8, 0x08);
+  addNECKey("9", Nine_Key, 0xA8, 0x09);
+
+  addNECKey("dacx", Unmapped_Key, 0xA8, 0x0C);
+  addNECKey("ff", FastForward_Key, 0xA8, 0x10);
+  addNECKey("rew", Rewind_Key, 0xA8, 0x11); // "scan-"
+  addNECKey("chp/tm", Unmapped_Key, 0xA8, 0x13);
+//  addNECKey("eject", Eject_Key, 0xA8, 0x16); // ?
+  addNECKey("stop", Stop_Key, 0xA8, 0x16);
+  addNECKey("play", Play_Key, 0xA8, 0x17);
+  addNECKey("pause", Pause_Key, 0xA8, 0x18);
+  addNECKey("memory", Memory_Key, 0xA8, 0x19);
+  addNECKey("power", Power_Key, 0xA8, 0x1C);
+  addNECKey("audio", Audio_Key, 0xA8, 0x1E); // "Audio_D/A"
+  addNECKey("+10", DoubleDigit_Key, 0xA8, 0x1F);
+  addNECKey("Jog_slow->", Unmapped_Key, 0xA8, 0x20);
+  addNECKey("Jog_slow<-", Unmapped_Key, 0xA8, 0x22);
+  addNECKey("Jog_Forward", Unmapped_Key, 0xA8, 0x2B);
+  addNECKey("Jog_Reverse", Unmapped_Key, 0xA8, 0x2F);
+  addNECKey("ctrl", Unmapped_Key, 0xA8, 0x37);
+  addNECKey("display", Info_Key, 0xA8, 0x43);
+  addNECKey("repeat", Repeat_Key, 0xA8, 0x44);
+  addNECKey("clear", Clear_Key, 0xA8, 0x45);
+  addNECKey("-", Unmapped_Key, 0xA8, 0x46);
+  addNECKey("+", Unmapped_Key, 0xA8, 0x47);
+  addNECKey("repeatab", RepeatAB_Key, 0xA8, 0x48);
+  addNECKey("pgm", Program_Key, 0xA8, 0x4C);
+  addNECKey("Disc_Side_A", Unmapped_Key, 0xA8, 0x4D);
+  addNECKey("Disc_Side_B", Unmapped_Key, 0xA8, 0x4E);
+  addNECKey("step-", StepBack_Key, 0xA8, 0x50);
+  addNECKey("skip+", Next_Key, 0xA8, 0x52);  // "seek+"
+  addNECKey("skip-", Previous_Key, 0xA8, 0x53); // "seek-"
+  addNECKey("step+", StepForward_Key, 0xA8, 0x54);
+  addNECKey("speed-", SlowMinus_Key, 0xA8, 0x55);
+  addNECKey("speed+", SlowPlus_Key, 0xA8, 0x58);
+  addNECKey("intro", Unmapped_Key, 0xA8, 0x5A);
+  addNECKey("random", Random_Key, 0xA8, 0x5E);
+}
+
+
+PioneerDVD1::PioneerDVD1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "DVD Keyset 1",
+      Pioneer_Make,
+      index)
+{
+  addControlledDevice(Pioneer_Make, "VXX2702", DVD_Device);
+  addControlledDevice(Pioneer_Make, "VXX2801", DVD_Device);
+
+  threadableProtocol = new PioneerProtocol(guiObject, index);
+
+  addNECKey("STOP", Stop_Key, 0xA3, 0x98);
+  addNECKey("NEXT", Next_Key, 0xA3, 0x9C);
+  addNECKey("PREV", Previous_Key, 0xA3, 0x9D);
+  addNECKey("PLAY", Play_Key, 0xA3, 0x9E);
+  addNECKey("PAUSE", Pause_Key, 0xA3, 0x9F);
+
+  addPioneerKey("SUBTITLE", Captions_Key, 0xA3, 0x99, 0xAF, 0x36);
+  addPioneerKey("ZOOM", Zoom_Key, 0xA3, 0x99, 0xAF, 0x37);
+  addPioneerKey("SURROUND", Surround_Key, 0xA3, 0x99, 0xAF, 0x61);
+  addPioneerKey("LEFT", Left_Key, 0xA3, 0x99, 0xAF, 0x63);
+  addPioneerKey("RIGHT", Right_Key, 0xA3, 0x99, 0xAF, 0x64);
+  addPioneerKey("PLAY_MODE", Unmapped_Key, 0xA3, 0x99, 0xAF, 0x7F);
+  addPioneerKey("0", Zero_Key, 0xA3, 0x99, 0xAF, 0xA0);
+  addPioneerKey("1", One_Key, 0xA3, 0x99, 0xAF, 0xA1);
+  addPioneerKey("2", Two_Key, 0xA3, 0x99, 0xAF, 0xA2);
+  addPioneerKey("3", Three_Key, 0xA3, 0x99, 0xAF, 0xA3);
+  addPioneerKey("4", Four_Key, 0xA3, 0x99, 0xAF, 0xA4);
+  addPioneerKey("5", Five_Key, 0xA3, 0x99, 0xAF, 0xA5);
+  addPioneerKey("6", Six_Key, 0xA3, 0x99, 0xAF, 0xA6);
+  addPioneerKey("7", Seven_Key, 0xA3, 0x99, 0xAF, 0xA7);
+  addPioneerKey("8", Eight_Key, 0xA3, 0x99, 0xAF, 0xA8);
+  addPioneerKey("9", Nine_Key, 0xA3, 0x99, 0xAF, 0xA9);
+  addPioneerKey("SETUP", Menu_Key, 0xA3, 0x99, 0xAF, 0xB0);
+  addPioneerKey("TOP_MENU", DiscTitle_Key, 0xA3, 0x99, 0xAF, 0xB4);
+  addPioneerKey("ANGLE", Angle_Key, 0xA3, 0x99, 0xAF, 0xB5);
+  addPioneerKey("OPEN/CLOSE", Eject_Key, 0xA3, 0x99, 0xAF, 0xB6);
+  addPioneerKey("MENU", DiscMenu_Key, 0xA3, 0x99, 0xAF, 0xB9);
+  addPioneerKey("AUDIO", Audio_Key, 0xA3, 0x99, 0xAF, 0xBE);
+  addPioneerKey("STANDBY/ON", Power_Key, 0xA3, 0x99, 0xAF, 0xBC);
+  addPioneerKey("DISPLAY", Info_Key, 0xA3, 0x99, 0xAF, 0xE3);
+  addPioneerKey("CLEAR", Clear_Key, 0xA3, 0x99, 0xAF, 0xE5);
+  addPioneerKey("FWD", FastForward_Key, 0xA3, 0x99, 0xAF, 0xE9);
+  addPioneerKey("BWD", Rewind_Key, 0xA3, 0x99, 0xAF, 0xEA);
+  addPioneerKey("ENTER", Enter_Key, 0xA3, 0x99, 0xAF, 0xEF);
+  addPioneerKey("ENTER", Select_Key, 0xA3, 0x99, 0xAF, 0xEF);
+  addPioneerKey("UP", Up_Key, 0xA3, 0x99, 0xAF, 0xF2);
+  addPioneerKey("DOWN", Down_Key, 0xA3, 0x99, 0xAF, 0xF3);
+  addPioneerKey("RETURN", Exit_Key, 0xA3, 0x99, 0xAF, 0xF4);
+}
diff --git a/keysets/pioneer.h b/keysets/pioneer.h
new file mode 100644 (file)
index 0000000..1072664
--- /dev/null
@@ -0,0 +1,103 @@
+#ifndef PIONEER_H
+#define PIONEER_H
+
+#include "pirkeysetmetadata.h"
+#include <QObject>
+
+class PioneerTV1: public PIRKeysetMetaData
+{
+public:
+  PioneerTV1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerTV2: public PIRKeysetMetaData
+{
+public:
+  PioneerTV2(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerTV3: public PIRKeysetMetaData
+{
+public:
+  PioneerTV3(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerAudio1: public PIRKeysetMetaData
+{
+public:
+  PioneerAudio1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerAudio1a: public PioneerAudio1
+{
+public:
+  PioneerAudio1a(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerAudio2: public PIRKeysetMetaData
+{
+public:
+  PioneerAudio2(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerAudio3: public PIRKeysetMetaData
+{
+public:
+  PioneerAudio3(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerAudio4: public PIRKeysetMetaData
+{
+public:
+  PioneerAudio4(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerAudio5: public PIRKeysetMetaData
+{
+public:
+  PioneerAudio5(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerCD1: public PIRKeysetMetaData
+{
+public:
+  PioneerCD1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerLaserDisc1: public PIRKeysetMetaData
+{
+public:
+  PioneerLaserDisc1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class PioneerDVD1: public PIRKeysetMetaData
+{
+public:
+  PioneerDVD1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+#endif // PIONEER_H
index 4219293..9a882cb 100644 (file)
@@ -1,5 +1,5 @@
 #include "raite.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
 
 RaiteDVD1::RaiteDVD1(
   QObject *guiObject,
@@ -9,7 +9,9 @@ RaiteDVD1::RaiteDVD1(
       Raite_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  addControlledDevice(Raite_Make, "DVD-703", DVD_Device);
+
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x04FB, 16);
   setPreData(0x20, 8);
index 9be27dd..08a2d0e 100644 (file)
@@ -1,5 +1,5 @@
 #include "rca.h"
-#include "necprotocol.h"
+#include "protocols/lircprotocol.h"
 
 RCATV1::RCATV1(
   QObject *guiObject,
@@ -9,20 +9,19 @@ RCATV1::RCATV1(
       RCA_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 1000,
     500, 2000,
-    64500, true,
-    LIRC_NEC);
+    64500, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4000, 4000);
-  np->setTrailerPulse(500);
+  lp->setHeaderPair(4000, 4000);
+  lp->setTrailerPulse(500);
 
-//  np->setMinimumRepetitions(1);
+//  lp->setMinimumRepetitions(1);
 
   setPreData(0xF, 4);
 
@@ -56,7 +55,7 @@ RCATV1::RCATV1(
   addKey("tv-9", Nine_Key, 0x390C6, 20);
   addKey("tv-0", Zero_Key, 0x300CF, 20);
   addKey("tv-input", Input_Key, 0xA305C, 20);
-  addKey("tv-antenna", Unmapped_Key, 0x050FA, 20);
+  addKey("tv-antenna", AntennaInput_Key, 0x050FA, 20);
   addKey("tv-reverse", Rewind_Key, 0x1D0E2, 20);
   addKey("tv-play", Play_Key, 0x150EA, 20);
   addKey("tv-forward", FastForward_Key, 0x1C0E3, 20);
@@ -98,17 +97,16 @@ RCATV2::RCATV2(
       RCA_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 1000,
     500, 2000,
-    12390, false,
-    LIRC_NEC);
+    12390, false);
 
-  threadableProtocol = np;
-  np->setHeaderPair(17355, 3978);
-  np->setTrailerPulse(897);
+  threadableProtocol = lp;
+  lp->setHeaderPair(17355, 3978);
+  lp->setTrailerPulse(897);
 
   setPreData(0xF, 4);
 
@@ -147,18 +145,17 @@ RCAAux1::RCAAux1(
       RCA_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 1000,
     500, 2000,
-    64500, true,
-    LIRC_NEC);
+    64500, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4000, 4000);
-  np->setTrailerPulse(500);
+  lp->setHeaderPair(4000, 4000);
+  lp->setTrailerPulse(500);
 
   setPreData(0x4, 4);
 
@@ -189,7 +186,7 @@ RCAAux1::RCAAux1(
   addKey("aux-9", Nine_Key, 0x39BC6, 20);
   addKey("aux-0", Zero_Key, 0x30BCF, 20);
   addKey("aux-who", Unmapped_Key, 0x61B9E, 20);
-  addKey("aux-antenna", Unmapped_Key, 0x05BFA, 20);
+  addKey("aux-antenna", AntennaInput_Key, 0x05BFA, 20);
   addKey("aux-reverse", Rewind_Key, 0x1DBE2, 20);
   addKey("aux-play", Play_Key, 0x15BEA, 20);
   addKey("aux-forward", FastForward_Key, 0x1CBE3, 20);
@@ -210,18 +207,17 @@ RCAAux2::RCAAux2(
       RCA_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 1000,
     500, 2000,
-    64500, true,
-    LIRC_NEC);
+    64500, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4000, 4000);
-  np->setTrailerPulse(500);
+  lp->setHeaderPair(4000, 4000);
+  lp->setTrailerPulse(500);
 
   setPreData(0xC, 4);
 
@@ -254,7 +250,7 @@ RCAAux2::RCAAux2(
   addKey("aux-8", Eight_Key, 0x383C7, 20);
   addKey("aux-9", Nine_Key, 0x393C6, 20);
   addKey("aux-0", Zero_Key, 0x303CF, 20);
-  addKey("aux-antenna", Unmapped_Key, 0x053FA, 20);
+  addKey("aux-antenna", AntennaInput_Key, 0x053FA, 20);
   addKey("aux-reverse", Rewind_Key, 0x1D3E2, 20);
   addKey("aux-play", Play_Key, 0x153EA, 20);
   addKey("aux-forward", FastForward_Key, 0x1C3E3, 20);
@@ -276,7 +272,7 @@ RCAAux2a::RCAAux2a(
   addKey("aux2_left", Left_Key, 0x6439B, 20);
   addKey("aux2_right", Right_Key, 0x6539A, 20);
   addKey("aux2_down", Down_Key, 0x6239D, 20);
-  addKey("aux2_antenna", Unmapped_Key, 0x413BE, 20);
+  addKey("aux2_antenna", AntennaInput_Key, 0x413BE, 20);
   addKey("aux2_whoinput", Input_Key, 0x283D7, 20);
 }
 
@@ -289,20 +285,19 @@ RCAVCR1::RCAVCR1(
       RCA_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 1000,
     500, 2000,
-    64500, true,
-    LIRC_NEC);
+    64500, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4000, 4000);
-  np->setTrailerPulse(500);
+  lp->setHeaderPair(4000, 4000);
+  lp->setTrailerPulse(500);
 
-//  np->setMinimumRepetitions(1);
+//  lp->setMinimumRepetitions(1);
 
   setPreData(0xE, 4);
 
@@ -333,7 +328,7 @@ RCAVCR1::RCAVCR1(
   addKey("vcr1-9", Nine_Key, 0x391C6, 20);
   addKey("vcr1-0", Zero_Key, 0x301CF, 20);
   addKey("vcr1-input", Input_Key, 0x471B8, 20);
-  addKey("vcr1-antenna", Unmapped_Key, 0x051FA, 20);
+  addKey("vcr1-antenna", AntennaInput_Key, 0x051FA, 20);
   addKey("vcr1-reverse", Rewind_Key, 0x1D1E2, 20);
   addKey("vcr1-play", Play_Key, 0x151EA, 20);
   addKey("vcr1-forward", FastForward_Key, 0x1C1E3, 20);
@@ -356,18 +351,17 @@ RCAVCR2::RCAVCR2(
       RCA_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 1000,
     500, 2000,
-    64500, true,
-    LIRC_NEC);
+    64500, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4000, 4000);
-  np->setTrailerPulse(500);
+  lp->setHeaderPair(4000, 4000);
+  lp->setTrailerPulse(500);
 
   setPreData(0xD, 4);
 
@@ -398,7 +392,7 @@ RCAVCR2::RCAVCR2(
   addKey("vcr2-9", Nine_Key, 0x392C6, 20);
   addKey("vcr2-0", Zero_Key, 0x302CF, 20);
   addKey("vcr2-input", Input_Key, 0x472B8, 20);
-  addKey("vcr2-antenna", Unmapped_Key, 0x052FA, 20);
+  addKey("vcr2-antenna", AntennaInput_Key, 0x052FA, 20);
   addKey("vcr2-reverse", Rewind_Key, 0x1D2E2, 20);
   addKey("vcr2-play", Play_Key, 0x152EA, 20);
   addKey("vcr2-forward", FastForward_Key, 0x1C2E3, 20);
@@ -417,18 +411,17 @@ RCADVD1::RCADVD1(
       RCA_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 1000,
     500, 2000,
-    64500, true,
-    LIRC_NEC);
+    64500, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4000, 4000);
-  np->setTrailerPulse(500);
+  lp->setHeaderPair(4000, 4000);
+  lp->setTrailerPulse(500);
 
   setPreData(0x5, 4);
 
@@ -459,7 +452,7 @@ RCADVD1::RCADVD1(
   addKey("dvd-9", Nine_Key, 0x39AC6, 20);
   addKey("dvd-0", Zero_Key, 0x30ACF, 20);
   addKey("dvd-input", Input_Key, 0x47AB8, 20);
-  addKey("dvd-antenna", Unmapped_Key, 0x05AFA, 20); // tv_vcr
+  addKey("dvd-antenna", AntennaInput_Key, 0x05AFA, 20); // tv_vcr
   addKey("dvd-reverse", Rewind_Key, 0x1DAE2, 20);
   addKey("dvd-play", Play_Key, 0x15AEA, 20);
   addKey("dvd-forward", FastForward_Key, 0x1CAE3, 20);
@@ -495,18 +488,17 @@ RCASat1::RCASat1(
       RCA_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     500, 1000,
     500, 2000,
-    64500, true,
-    LIRC_NEC);
+    64500, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4000, 4000);
-  np->setTrailerPulse(500);
+  lp->setHeaderPair(4000, 4000);
+  lp->setTrailerPulse(500);
 
   setPreData(0x7, 4);
 
@@ -538,7 +530,7 @@ RCASat1::RCASat1(
   addKey("9", Nine_Key, 0x398C6, 20);
   addKey("0", Zero_Key, 0x308CF, 20);
   addKey("hd-input", Input_Key, 0x478B8, 20);
-  addKey("antenna", Unmapped_Key, 0x058FA, 20); // "TV/VCR"
+  addKey("antenna", AntennaInput_Key, 0x058FA, 20); // "TV/VCR"
   addKey("hd-reverse", Rewind_Key, 0x1D8E2, 20);
   addKey("hd-play", Play_Key, 0x158EA, 20);
   addKey("hd-forward", FastForward_Key, 0x1C8E3, 20);
@@ -546,7 +538,7 @@ RCASat1::RCASat1(
   addKey("hd-stop", Stop_Key, 0x1F8E0, 20);
   addKey("hd-pause", Pause_Key, 0x198E6, 20);
   addKey("skip", Advance_Key, 0x538AC, 20);
-  addKey("SAT", Unmapped_Key, 0x3A8C5, 20);
+  addKey("SAT", CableInput_Key, 0x3A8C5, 20);
   addKey("PIP", PIP_Key, 0x1B8E4, 20);
   addKey("SWAP", PIPSwap_Key, 0xC383C, 20);
   addKey("INPUT", Unmapped_Key, 0x6189E, 20);
@@ -561,24 +553,23 @@ RCASat2::RCASat2(
       RCA_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     440, 2780,
     440, 1645,
-    6115, false,
-    LIRC_NEC);
+    6115, false);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(525, 6045);
-  np->setTrailerPulse(450);
+  lp->setHeaderPair(525, 6045);
+  lp->setTrailerPulse(450);
 
-//  np->setMinimumRepetitions(6);
-  np->setFullHeadlessRepeat(true);
+//  lp->setMinimumRepetitions(6);
+  lp->setFullHeadlessRepeat(true);
 
-  np->setCarrierFrequency(56000);
-  np->setDutyCycle(32);
+  lp->setCarrierFrequency(56000);
+  lp->setDutyCycle(32);
 
   setPostData(0x000, 10);
 
@@ -613,7 +604,7 @@ RCASat2::RCASat2(
   addKey("asterisk", Unmapped_Key, 0x37, 6);
   addKey("pound", Unmapped_Key, 0x38, 6);
   addKey("power_off", PowerOff_Key, 0x39, 6);
-  addKey("sat", Unmapped_Key, 0x41, 6);
+  addKey("sat", CableInput_Key, 0x41, 6);
   addKey("dish_home", Unmapped_Key, 0x52, 6);
   addKey("sys_info2", Unmapped_Key, 0x54, 6);
   addKey("dish_home2", Unmapped_Key, 0x56, 6);
index 99e37a9..270b3cc 100644 (file)
@@ -1,5 +1,5 @@
 #include "sagem.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
 
 SagemTVBox1::SagemTVBox1(
   QObject *guiObject,
@@ -9,7 +9,7 @@ SagemTVBox1::SagemTVBox1(
       Sagem_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
 
 //  setPreData(0xE17A, 16);
   setPreData(0x5E87, 16);
index d4a262f..7363954 100644 (file)
@@ -1,6 +1,7 @@
 #include "samsung.h"
-#include "necprotocol.h"
-#include "rc5protocol.h"
+#include "protocols/samsungprotocol.h"
+#include "protocols/lircprotocol.h"
+#include "protocols/rc5protocol.h"
 
 SamsungTV1::SamsungTV1(
   QObject *guiObject,
@@ -14,18 +15,7 @@ SamsungTV1::SamsungTV1(
   addControlledDevice(Samsung_Make, "LN32C530F1FXZA", TV_Device);
   addControlledDevice(Samsung_Make, "UE46B6000VPXZG", TV_Device); // ?
 
-  NECProtocol *np = new NECProtocol(
-    guiObject,
-    index,
-    600, 500,
-    600, 1600,
-    107500, true,
-    Extended_NEC);
-
-  threadableProtocol = np;
-
-  np->setHeaderPair(4500, 4500);
-  np->setTrailerPulse(600);
+  threadableProtocol = new SamsungProtocol(guiObject, index);
 
 //  setPreData(0xE0E0, 16);
   setPreData(0x0707, 16);
@@ -73,7 +63,7 @@ SamsungTV1::SamsungTV1(
   addKey("ch.scan", PIPScan_Key, 0x31, 8);  // "h.scan"
   addKey("PIP.chan+", PIPChannelUp_Key, 0x32, 8); // "AUDCH_UP"
   addKey("PIP.chan-", PIPChannelDown_Key, 0x33, 8); // "AUDCH_DOWN"
-  addKey("ANTENNA", Unmapped_Key, 0x36, 8);
+  addKey("ANTENNA", AntennaInput_Key, 0x36, 8);
   addKey("surf", Unmapped_Key, 0x3D, 8); // "r.surf"
   addKey("PSize", PIPSize_Key, 0x3E, 8);
   addKey("STILL", PIPPause_Key, 0x42, 8);
@@ -93,13 +83,13 @@ SamsungTV1::SamsungTV1(
   addKey("Right", Right_Key, 0x62, 8);
   addKey("Left", Left_Key, 0x65, 8);
   addKey("Enter", Select_Key, 0x68, 8);
-  addKey("pc", Unmapped_Key, 0x69, 8);
+  addKey("pc", PCInput_Key, 0x69, 8);
   addKey("ch-mgr", Unmapped_Key, 0x6B, 8); // "CH_LIST"
   addKey("Red", Red_Key, 0x6C, 8);
   addKey("srs", Surround_Key, 0x6E, 8);
   addKey("E.SAVING", Unmapped_Key, 0x77, 8);
   addKey("Content", Unmapped_Key, 0x79, 8);
-  addKey("HDMI", Unmapped_Key, 0x8B, 8);
+  addKey("HDMI", HDMIInput_Key, 0x8B, 8);
   addKey("WISELINK", Unmapped_Key, 0x8C, 8); // "W.Link", "Media.P"
   addKey("D.MENU", DiscMenu_Key, 0x8E, 8);
   addKey("Internet", Unmapped_Key, 0x93, 8);
@@ -230,12 +220,12 @@ SamsungTV2::SamsungTV2(
   addKey("Yellow", Yellow_Key, 0x002D, 13);
   addKey("Blue", Blue_Key, 0x002E, 13);
   addKey(">>", FastForward_Key, 0x101E, 13);
-  addKey("colour+", Unmapped_Key, 0x1014, 13);
-  addKey("colour-", Unmapped_Key, 0x1015, 13);
-  addKey("brightness+", Unmapped_Key, 0x1012, 13);
-  addKey("brightness-", Unmapped_Key, 0x1013, 13);
-  addKey("contrast+", Unmapped_Key, 0x101C, 13);
-  addKey("contrast-", Unmapped_Key, 0x101D, 13);
+  addKey("colour+", ColorUp_Key, 0x1014, 13);
+  addKey("colour-", ColorDown_Key, 0x1015, 13);
+  addKey("brightness+", BrightnessUp_Key, 0x1012, 13);
+  addKey("brightness-", BrightnessDown_Key, 0x1013, 13);
+  addKey("contrast+", ContrastUp_Key, 0x101C, 13);
+  addKey("contrast-", ContrastDown_Key, 0x101D, 13);
 }
 
 
@@ -261,74 +251,70 @@ SamsungVCR1::SamsungVCR1(
       Samsung_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
-    guiObject,
-    index,
-    600, 500,
-    600, 1650,
-    113837, true,
-    LIRC_NEC);
-
-  threadableProtocol = np;
-
-  np->setHeaderPair(4500, 4500);
-  np->setTrailerPulse(600);
-
-  setPreData(0xA0A0, 16);
-
-  addKey("Power", Power_Key, 0x40BF, 16);
-  addKey("Eject", Eject_Key, 0x04FB, 16);
-  addKey("TV/Video", Input_Key, 0x807F, 16); // TV/Video
-  addKey("One", One_Key, 0x20DF, 16);
-  addKey("Two", Two_Key, 0xA05F, 16);
-  addKey("Three", Three_Key, 0x609F, 16);
-  addKey("Four", Four_Key, 0x10EF, 16);
-  addKey("Five", Five_Key, 0x906F, 16);
-  addKey("Six", Six_Key, 0x50AF, 16);
-  addKey("Seven", Seven_Key, 0x30CF, 16);
-  addKey("Eight", Eight_Key, 0xB04F, 16);
-  addKey("Nine", Nine_Key, 0x708F, 16);
-  addKey("Zero", Zero_Key, 0x8877, 16);
-  addKey("Clear", Reset_Key, 0xB847, 16); // "CNT.RESET"
-  addKey("Rewind", Rewind_Key, 0x18E7, 16);
-  addKey("Stop", Stop_Key, 0xA857, 16);
-  addKey("Play", Play_Key, 0x9867, 16);
-  addKey("play/pause", Pause_Key, 0x9867, 16);
-  addKey("FastForward", FastForward_Key, 0x58A7, 16);
-  addKey("Menu", Menu_Key, 0xF807, 16);
-  addKey("Captions", Captions_Key, 0x44BB, 16);
-  addKey("Info", Info_Key, 0x7887, 16); // "display"
-//  addKey("Exit", Exit_Key, 0xB847, 16);
-  addKey("Up", Up_Key, 0xF40B, 16);
-  addKey("Down", Down_Key, 0x946B, 16);
-  addKey("Left", Left_Key, 0xBE41, 16);
-  addKey("Right", Right_Key, 0x7E81, 16);
-//  addKey("Enter", Enter_Key, 0x3AC5, 16);
-  addKey("Enter", Select_Key, 0x3AC5, 16); // "ok"
-  addKey("Record", Record_Key, 0x28D7, 16);
-  addKey("ChannelUp", ChannelUp_Key, 0x48B7, 16);
-  addKey("ChannelDown", ChannelDown_Key, 0x08F7, 16);
-  addKey("mark/search", Unmapped_Key, 0xD42B, 16); // "index"
-  addKey("auto_track", AutoTracking_Key, 0x847B, 16);
-  addKey("ipc", Unmapped_Key, 0xAE51, 16);
-  addKey("input", Unmapped_Key, 0x24DB, 16);
-  addKey("trk_up", TrackingPlus_Key, 0x34CB, 16); // "FINE_UP"
-  addKey("trk_down", TrackingMinus_Key, 0xB44B, 16); // "FINE_DOWN"
-  addKey("progressive/speed", VHSSpeed_Key, 0x5CA3, 16); // "SP-LP"
-  addKey("dub", Unmapped_Key, 0x748B, 16);
-  addKey("timer", Sleep_Key, 0x0CF3, 16); // "MONITOR"
-  addKey("100+", PlusOneHundred_Key, 0x649B, 16);
-  addKey("shift", Unmapped_Key, 0xA45B, 16);
-  addKey("Dma", Unmapped_Key, 0xC639, 16);
-  addKey("A.REP", Unmapped_Key, 0xC03F, 16);
-  addKey("SYSTEM", Unmapped_Key, 0x4CB3, 16);
-  addKey("VPS", Unmapped_Key, 0x0E71, 16);
-  addKey("BAND", Unmapped_Key, 0x621D, 16);
-  addKey("Q_PRO", Unmapped_Key, 0x5E21, 16);
-  addKey("SHOWVIEW", Unmapped_Key, 0x0679, 16);
-  addKey("SLOW_DOWN", SlowMinus_Key, 0x740B, 16);
-  addKey("SLOW_UP", SlowPlus_Key, 0x641B, 16);
-  addKey("PRESET", Unmapped_Key, 0x5629, 16);
+  threadableProtocol = new SamsungProtocol(guiObject, index);
+
+//  setPreData(0xA0A0, 16);
+  setPreData(0x0505, 16);
+
+  addKey("TV/Video", Input_Key, 0x01, 8);
+  addKey("Power", Power_Key, 0x02, 8);
+  addKey("A.REP", Unmapped_Key, 0x03, 8);
+  addKey("One", One_Key, 0x04, 8);
+  addKey("Two", Two_Key, 0x05, 8);
+  addKey("Three", Three_Key, 0x06, 8);
+  addKey("Four", Four_Key, 0x08, 8);
+  addKey("Five", Five_Key, 0x09, 8);
+  addKey("Six", Six_Key, 0x0A, 8);
+  addKey("Seven", Seven_Key, 0x0C, 8);
+  addKey("Eight", Eight_Key, 0x0D, 8);
+  addKey("Nine", Nine_Key, 0x0E, 8);
+
+  addKey("ChannelDown", ChannelDown_Key, 0x10, 8);
+  addKey("Zero", Zero_Key, 0x11, 8);
+  addKey("ChannelUp", ChannelUp_Key, 0x12, 8);
+  addKey("SLOW_UP", SlowPlus_Key, 0x13, 8);
+  addKey("Record", Record_Key, 0x14, 8);
+  addKey("Stop", Stop_Key, 0x15, 8);
+  addKey("Rewind", Rewind_Key, 0x18, 8);
+  addKey("SLOW_DOWN", SlowMinus_Key, 0x17, 8);
+  addKey("Play/Pause", Play_Key, 0x19, 8);
+  addKey("Play/Pause", Pause_Key, 0x19, 8);
+  addKey("FastForward", FastForward_Key, 0x1A, 8);
+  addKey("Memory", Memory_Key, 0x1C, 8);
+  addKey("Clear", Reset_Key, 0x1D, 8); // "CNT.RESET", "CLR_RST", "reset"
+//  addKey("Exit", Exit_Key, 0x1D, 8);
+  addKey("Info", Info_Key, 0x1E, 8); // "display"
+  addKey("Menu", Menu_Key, 0x1F, 8);
+
+  addKey("Eject", Eject_Key, 0x20, 8);
+  addKey("auto_track", AutoTracking_Key, 0x21, 8); // "A.TRK"
+  addKey("Captions", Captions_Key, 0x22, 8);
+  addKey("BAND", TunerBand_Key, 0x23, 8);
+  addKey("input", Unmapped_Key, 0x24, 8);
+  addKey("shift", Unmapped_Key, 0x25, 8);
+  addKey("100+", PlusOneHundred_Key, 0x26, 8);
+  addKey("Down", Down_Key, 0x29, 8); // "erase"
+  addKey("mark/search", Unmapped_Key, 0x2B, 8); // "index"
+  addKey("trk_up", TrackingPlus_Key, 0x2C, 8); // "FINE_UP"
+  addKey("trk_down", TrackingMinus_Key, 0x2D, 8); // "FINE_DOWN"
+  addKey("dub", Unmapped_Key, 0x2E, 8);
+  addKey("Up", Up_Key, 0x2F, 8); // "mark"
+
+  addKey("timer", Unmapped_Key, 0x30, 8); // "MONITOR", "showview", "SHOWVIEW"
+  addKey("SEARCH", Unmapped_Key, 0x31, 8);
+  addKey("SYSTEM", Unmapped_Key, 0x32, 8);
+  addKey("CLK_COUNT", Unmapped_Key, 0x33, 8); // "clk/cnt"
+  addKey("PRESET", Unmapped_Key, 0x35, 8);
+  addKey("VPS", Unmapped_Key, 0x38, 8);
+  addKey("progressive/speed", VHSSpeed_Key, 0x3A, 8); // "SP-LP"
+  addKey("Q_PRO", Unmapped_Key, 0x3D, 8);
+
+  addKey("Enter", Select_Key, 0x5C, 8); // "ok"
+  addKey("Dma", Unmapped_Key, 0x63, 8);
+
+  addKey("ipc", PictureMode_Key, 0x75, 8); // "PICTURE"
+  addKey("Left", Left_Key, 0x7D, 8); // "shuttle<"
+  addKey("Right", Right_Key, 0x7E, 8); // "shuttle>"
 }
 
 
@@ -339,21 +325,21 @@ SamsungVCR1a::SamsungVCR1a(
 {
   setKeysetName("VCR(DVD) Keyset 1a");
 
-  addKey("power", Power_Key, 0x12ED, 16);
-  addKey("clear", Clear_Key, 0x8C73, 16);
-  addKey("audio", Audio_Key, 0xBC43, 16);
-  addKey("dvd", Unmapped_Key, 0xAA55, 16);
-  addKey("vcr", Unmapped_Key, 0x14EB, 16);
-  addKey("input_sel", Input_Key, 0x9A65, 16);
-  addKey("menu", Menu_Key, 0x16E9, 16);
-  addKey("up", Up_Key, 0x34CB, 16);
-  addKey("down", Down_Key, 0xB44B, 16);
-  addKey("left", Left_Key, 0xE817, 16);
-  addKey("right", Right_Key, 0xC837, 16);
-  addKey("enter", Select_Key, 0xC23D, 16); // "ok"
-  addKey("disc_menu", DiscMenu_Key, 0x06F9, 16);
-  addKey("mode/repeat", Unmapped_Key, 0x6699, 16);
-  addKey("angle/timer", Unmapped_Key, 0xA25D, 16);
+  addKey("right", Right_Key, 0x13, 8);
+  addKey("left", Left_Key, 0x17, 8);
+  addKey("vcr", Unmapped_Key, 0x28, 8);
+  addKey("up", Up_Key, 0x2C, 8);
+  addKey("down", Down_Key, 0x2D, 8);
+  addKey("clear", Clear_Key, 0x31, 8);
+  addKey("audio", Audio_Key, 0x3D, 8);
+  addKey("enter", Select_Key, 0x43, 8); // "ok"
+  addKey("angle/timer", Unmapped_Key, 0x45, 8);
+  addKey("power", Power_Key, 0x48, 8);
+  addKey("dvd", Unmapped_Key, 0x55, 8);
+  addKey("input_sel", Input_Key, 0x59, 8);
+  addKey("disc_menu", DiscMenu_Key, 0x60, 8);
+  addKey("mode/repeat", Unmapped_Key, 0x66, 8);
+  addKey("menu", Menu_Key, 0x68, 8);
 }
 
 
@@ -364,35 +350,17 @@ SamsungVCR1b::SamsungVCR1b(
 {
   setKeysetName("VCR(DVD) Keyset 1b");
 
-  addKey("audio", Audio_Key, 0x44BB, 16); // "output"
-  addKey("Input", Input_Key, 0x24DB, 16);
-  addKey("+", Unmapped_Key, 0x649B, 16);
-  addKey("-", Unmapped_Key, 0x14EB, 16);
-  addKey("slowup", SlowPlus_Key, 0xC837, 16);
-  addKey("slowdown", SlowMinus_Key, 0xE817, 16);
-  addKey("reset", Clear_Key, 0xB847, 16); // "CLR/RST"
-  addKey("pause", Pause_Key, 0x6897, 16); // "P/S"
-  addKey("shuttle<", Unmapped_Key, 0xBE41, 16);
-  addKey("shuttle>", Unmapped_Key, 0x7E81, 16);
-  addKey("showview", Unmapped_Key, 0x0CF3, 16);
-  addKey("index", Unmapped_Key, 0xD42B, 16);
-  addKey("mark", Unmapped_Key, 0xF40B, 16);
-  addKey("erase", Unmapped_Key, 0x946B, 16);
-  addKey("prog", Program_Key, 0xF807, 16);
-  addKey("clk/cnt", Unmapped_Key, 0xCC33, 16);
-  addKey("aft", Unmapped_Key, 0x2ED1, 16);
-  addKey("SYSTEM", Menu_Key, 0x9669, 16);
-  addKey("A.TRK", AutoTracking_Key, 0x847B, 16);
-  addKey("Q-PRO", Unmapped_Key, 0xBC43, 16);
-  addKey("PICTURE", PictureMode_Key, 0xAE51, 16);
-  addKey("OK_UP", Up_Key, 0x4AB5, 16);
-  addKey("OK_DOWN", Down_Key, 0x0AF5, 16);
-  addKey("OK_LEFT", Left_Key, 0xCE31, 16);
-  addKey("OK_RIGHT", Right_Key, 0xEE11, 16);
-  addKey("Band", Unmapped_Key, 0xC43B, 16);
-  addKey("Preset", Unmapped_Key, 0xAC53, 16);
-  addKey("Search", Unmapped_Key, 0x8C73, 16);
-  addKey("Memory", Unmapped_Key, 0x38C7, 16);
+  addKey("audio", Audio_Key, 0x22, 8); // "output"
+  addKey("+", Unmapped_Key, 0x26, 8);
+  addKey("-", Unmapped_Key, 0x28, 8);
+  addKey("pause", Pause_Key, 0x16, 8); // "P/S"
+  addKey("prog", Program_Key, 0x1F, 8);
+  addKey("aft", Unmapped_Key, 0x74, 8);
+  addKey("SYSTEM", Menu_Key, 0x69, 8);
+  addKey("OK_UP", Up_Key, 0x52, 8);
+  addKey("OK_DOWN", Down_Key, 0x50, 8);
+  addKey("OK_LEFT", Left_Key, 0x73, 8);
+  addKey("OK_RIGHT", Right_Key, 0x77, 8);
 }
 
 
@@ -401,40 +369,43 @@ SamsungVCR1c::SamsungVCR1c(
   unsigned int index)
   : SamsungVCR1a(guiObject, index)
 {
+  addControlledDevice(Samsung_Make, "DVD-V1000", DVD_Device);
+
   setKeysetName("VCR(DVD) Keyset 1c");
 
-  addKey("eject", Eject_Key, 0x4CB3, 16);
-  addKey("vol_up", VolumeUp_Key, 0xC639, 16);
-  addKey("vol_down", VolumeDown_Key, 0x02FD, 16);
-  addKey("prev_ch", PrevChannel_Key, 0x2AD5, 16);
-  addKey("up", Up_Key, 0x7887, 16);
-  addKey("down", Down_Key, 0x8C73, 16);
-  addKey("left", Left_Key, 0x6699, 16);
-  addKey("right", Right_Key, 0x00FF, 16);
-  addKey("speed", VHSSpeed_Key, 0x06F9, 16);
-  addKey("timer", Sleep_Key, 0x44BB, 16);
-  addKey("return", Exit_Key, 0xBC43, 16);
+  addKey("right", Right_Key, 0x00, 8);
+  addKey("up", Up_Key, 0x1E, 8);
+  addKey("timer", Sleep_Key, 0x22, 8);
+  addKey("speed", VHSSpeed_Key, 0x30, 8);
+  addKey("down", Down_Key, 0x31, 8);
+  addKey("eject", Eject_Key, 0x32, 8);
+  addKey("return", Exit_Key, 0x3D, 8);
+  addKey("vol_down", VolumeDown_Key, 0x40, 8);
+  addKey("prev_ch", PrevChannel_Key, 0x54, 8);
+  addKey("vol_up", VolumeUp_Key, 0x63, 8);
+  addKey("left", Left_Key, 0x66, 8);
 }
 
 
-// Combo VCR/TV:
 SamsungVCR1d::SamsungVCR1d(
   QObject *guiObject,
   unsigned int index)
   : SamsungVCR1(guiObject, index)
 {
+  // Combo VCR/TV:
+  addControlledDevice(Samsung_Make, "CXD1342", TV_Device);
+  addControlledDevice(Samsung_Make, "CXD1342", VCR_Device);
+
   setKeysetName("VCR/TV Combo Keyset 1d");
 
-  addKey("eject", Eject_Key, 0x4CB3, 16);
-  addKey("P-STD", PictureMode_Key, 0xF609, 16);
-  addKey("MUTE", Mute_Key, 0xF00F, 16);
-  addKey("VOL+", VolumeUp_Key, 0xE01F, 16);
-  addKey("VOL-", VolumeDown_Key, 0xD02F, 16);
-  addKey("PRE-CH", PrevChannel_Key, 0x54AB, 16);
-  addKey("P./STILL", Pause_Key, 0x6897, 16);
-  addKey("REPEAT", Repeat_Key, 0xEC13, 16);
-  addKey("TRK+", TrackingPlus_Key, 0xB44B, 16);
-  addKey("TRK-", TrackingMinus_Key, 0x34CB, 16);
+  addKey("VOL+", VolumeUp_Key, 0x07, 8);
+  addKey("VOL-", VolumeDown_Key, 0x0B, 8);
+  addKey("MUTE", Mute_Key, 0x0F, 8);
+  addKey("P./STILL", Pause_Key, 0x16, 8);
+  addKey("PRE-CH", PrevChannel_Key, 0x2A, 8);
+  addKey("eject", Eject_Key, 0x32, 8);
+  addKey("REPEAT", Repeat_Key, 0x37, 8);
+  addKey("P-STD", Unmapped_Key, 0x6F, 8); // Picture mode?
 }
 
 
@@ -445,28 +416,28 @@ SamsungVCR1e::SamsungVCR1e(
 {
   setKeysetName("VCR(DVD) Keyset 1e");
 
-  addKey("OPEN/CLOSE", Eject_Key, 0x4CB3, 16);
-  addKey("AUDIO", Audio_Key, 0x16E9, 16);
-  addKey("MODE/REPEAT", Repeat_Key, 0x6699, 16);
-  addKey("ZOOM", Zoom_Key, 0x5CA3, 16);
-  addKey("CLOCK/COUNTER", Clock_Key, 0x8C73, 16);
-  addKey("ANGLE", Angle_Key, 0x2AD5, 16);
-  addKey("3D_SOUND", Surround_Key, 0x649B, 16);
-  addKey("DVD", Unmapped_Key, 0xAA55, 16);
-  addKey("VCR", Unmapped_Key, 0x14EB, 16);
-  addKey("INPUT_SEL", Input_Key, 0x9A65, 16);
-  addKey("DIGEST", Unmapped_Key, 0x00FF, 16);
-  addKey("TRK_UP", TrackingPlus_Key, 0xC639, 16);
-  addKey("TRK_DOWN", TrackingMinus_Key, 0x02FD, 16);
-  addKey("DISC_MENU", DiscMenu_Key, 0xF807, 16);
-  addKey("UP", Up_Key, 0x34CB, 16);
-  addKey("DOWN", Down_Key, 0xB44B, 16);
-  addKey("RIGHT", Right_Key, 0xC837, 16);
-  addKey("LEFT", Left_Key, 0xE817, 16);
-  addKey("SETUP/ENTER", Menu_Key, 0xC23D, 16);
-  addKey("SETUP/ENTER", Select_Key, 0xC23D, 16);
-  addKey("RETURN", Exit_Key, 0xBC43, 16);
-  addKey("TITLE", DiscTitle_Key, 0x06F9, 16);
+  addKey("DIGEST", Unmapped_Key, 0x00, 8);
+  addKey("RIGHT", Right_Key, 0x13, 8);
+  addKey("LEFT", Left_Key, 0x17, 8);
+  addKey("DISC_MENU", DiscMenu_Key, 0x1F, 8);
+  addKey("3D_SOUND", Surround_Key, 0x26, 8);
+  addKey("VCR", Unmapped_Key, 0x28, 8);
+  addKey("UP", Up_Key, 0x2C, 8);
+  addKey("DOWN", Down_Key, 0x2D, 8);
+  addKey("CLOCK/COUNTER", Clock_Key, 0x31, 8);
+  addKey("OPEN/CLOSE", Eject_Key, 0x32, 8);
+  addKey("ZOOM", Zoom_Key, 0x3A, 8);
+  addKey("RETURN", Exit_Key, 0x3D, 8);
+  addKey("TRK_DOWN", TrackingMinus_Key, 0x40, 8);
+  addKey("SETUP/ENTER", Menu_Key, 0x43, 8);
+  addKey("SETUP/ENTER", Select_Key, 0x43, 8);
+  addKey("ANGLE", Angle_Key, 0x54, 8);
+  addKey("DVD", Unmapped_Key, 0x55, 8);
+  addKey("INPUT_SEL", Input_Key, 0x59, 8);
+  addKey("TITLE", DiscTitle_Key, 0x60, 8);
+  addKey("TRK_UP", TrackingPlus_Key, 0x63, 8);
+  addKey("MODE/REPEAT", Repeat_Key, 0x66, 8);
+  addKey("AUDIO", Audio_Key, 0x68, 8);
 }
 
 
@@ -478,19 +449,18 @@ SamsungDVD1::SamsungDVD1(
       Samsung_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     600, 500,
     600, 1600,
-    108000, true,
-    LIRC_NEC);
+    108000, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(9000, 4500);
-  np->setTrailerPulse(600);
-  np->setRepeatPair(9000, 4500);
+  lp->setHeaderPair(9000, 4500);
+  lp->setTrailerPulse(600);
+  lp->setRepeatPair(9000, 4500);
 
   setPreData(0x198133F, 26);
 
@@ -583,75 +553,67 @@ SamsungDVD2::SamsungDVD2(
       Samsung_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
-    guiObject,
-    index,
-    600, 500,
-    600, 1600,
-    108000, true,
-    LIRC_NEC);
-
-  threadableProtocol = np;
-
-  np->setHeaderPair(4500, 4500);
-  np->setTrailerPulse(600);
-
-  setPreData(0xC2CA, 16);
-
-  addKey("1", One_Key, 0x827D, 16);
-  addKey("2", Two_Key, 0x42BD, 16);
-  addKey("3", Three_Key, 0xC23D, 16);
-  addKey("4", Four_Key, 0x22DD, 16);
-  addKey("5", Five_Key, 0xA25D, 16);
-  addKey("6", Six_Key, 0x629D, 16);
-  addKey("7", Seven_Key, 0xE21D, 16);
-  addKey("8", Eight_Key, 0xFC03, 16);
-  addKey("9", Nine_Key, 0xEC13, 16);
-  addKey("0", Zero_Key, 0xF40B, 16);
-  addKey("remain", Unmapped_Key, 0x00FF, 16);
-  addKey("cancel", Unmapped_Key, 0xE817, 16);
-  addKey("prev", Previous_Key, 0xD827, 16);
-  addKey("stop", Stop_Key, 0xD02F, 16);
-  addKey("play", Play_Key, 0xC03F, 16);
-  addKey("next", Next_Key, 0xC837, 16);
-  addKey("VOL+", VolumeUp_Key, 0xCC33, 16);
-  addKey("VOL-", VolumeDown_Key, 0xDC23, 16);
-  addKey("ch+", ChannelUp_Key, 0xC43B, 16);
-  addKey("ch-", ChannelDown_Key, 0xD42B, 16);
-  addKey("super5.1", Surround_Key, 0xE619, 16);
-  addKey("UP", Up_Key, 0xB04F, 16);
-  addKey("DOWN", Down_Key, 0xA857, 16);
-  addKey("LEFT", Left_Key, 0xA45B, 16);
-  addKey("RIGHT", Right_Key, 0xB847, 16);
-  addKey("ENTER", Select_Key, 0xA05F, 16);
-  addKey("SLEEP", Sleep_Key, 0x847B, 16);
-//  addKey("MODE", Program_Key, 0x18E7, 16); // Might be wrong
-  addKey("TV-VIDEO", Input_Key, 0x18E7, 16);
-  addKey("DVD", Unmapped_Key, 0x9867, 16);
-  addKey("TUNER", Unmapped_Key, 0x906F, 16);
-  addKey("AUX", Unmapped_Key, 0x8877, 16);
-  addKey("MUTE", Mute_Key, 0x9C63, 16);
-  addKey("SUBTITLE", Captions_Key, 0x708F, 16);
-  addKey("MENU", Menu_Key, 0x6C93, 16);
-  addKey("INFO", Info_Key, 0x649B, 16);
-  addKey("AUDIO", Audio_Key, 0x609F, 16);
-  addKey("RETURN", Exit_Key, 0x38C7, 16);
-  addKey("ZOOM", Zoom_Key, 0xF00F, 16);
-  addKey("MUSIC", Unmapped_Key, 0x24DB, 16);
-  addKey("MOVIE", Unmapped_Key, 0x16E9, 16);
-  addKey("ASC", Unmapped_Key, 0x9669, 16);
-  addKey("TEST-TONE", Unmapped_Key, 0x2CD3, 16);
-  addKey("EZ-VIEW", Unmapped_Key, 0xE01F, 16);
-  addKey("PLII-MODE", Unmapped_Key, 0x20DF, 16);
-  addKey("PLII-EFFECT", Unmapped_Key, 0x30CF, 16);
-  addKey("SOUND-EDIT", SoundMode_Key, 0x28D7, 16);
-  addKey("STEP", StepForward_Key, 0xBC43, 16);
-  addKey("REPEAT", Repeat_Key, 0x6699, 16);
-  addKey("SLOW", Slow_Key, 0xAC53, 16);
-  addKey("LOGO", Unmapped_Key, 0x1CE3, 16);
-  addKey("HDMI-AUDIO", Unmapped_Key, 0x0EF1, 16);
-  addKey("SD-HD", AspectRatio_Key, 0x9A65, 16);
-  addKey("TUNER-MEMORY", Unmapped_Key, 0xB44B, 16);
+  addControlledDevice(Samsung_Make, "HT-P1200", DVD_Device);
+
+  threadableProtocol= new SamsungProtocol(guiObject, index);
+
+//  setPreData(0xC2CA, 16);
+  setPreData(0x5343, 16);
+
+  addKey("remain", Unmapped_Key, 0x00, 8);
+  addKey("play", Play_Key, 0x03, 8);
+  addKey("PLII-MODE", Unmapped_Key, 0x04, 8);
+  addKey("ENTER", Select_Key, 0x05, 8);
+  addKey("AUDIO", Audio_Key, 0x06, 8);
+  addKey("EZ-VIEW", Unmapped_Key, 0x07, 8);
+  addKey("TUNER", TunerInput_Key, 0x09, 8);
+  addKey("stop", Stop_Key, 0x0B, 8);
+  addKey("PLII-EFFECT", Unmapped_Key, 0x0C, 8);
+  addKey("UP", Up_Key, 0x0D, 8);
+  addKey("SUBTITLE", Captions_Key, 0x0E, 8);
+  addKey("ZOOM", Zoom_Key, 0x0F, 8);
+  addKey("AUX", AuxInput_Key, 0x11, 8);
+  addKey("next", Next_Key, 0x13, 8);
+  addKey("SOUND-EDIT", SoundMode_Key, 0x14, 8);
+  addKey("DOWN", Down_Key, 0x15, 8);
+  addKey("cancel", Unmapped_Key, 0x17, 8);
+//  addKey("MODE", Program_Key, 0x18, 8); // Might be wrong
+  addKey("TV-VIDEO", Input_Key, 0x18, 8);
+  addKey("DVD", DVDInput_Key, 0x19, 8);
+  addKey("prev", Previous_Key, 0x1B, 8);
+  addKey("RETURN", Exit_Key, 0x1C, 8);
+  addKey("RIGHT", Right_Key, 0x1D, 8);
+  addKey("SLEEP", Sleep_Key, 0x21, 8);
+  addKey("ch+", ChannelUp_Key, 0x23, 8);
+  addKey("MUSIC", Unmapped_Key, 0x24, 8);
+  addKey("LEFT", Left_Key, 0x25, 8);
+  addKey("INFO", Info_Key, 0x26, 8);
+  addKey("ch-", ChannelDown_Key, 0x2B, 8);
+  addKey("TUNER-MEMORY", Memory_Key, 0x2D, 8);
+  addKey("0", Zero_Key, 0x2F, 8);
+  addKey("VOL+", VolumeUp_Key, 0x33, 8);
+  addKey("TEST-TONE", Unmapped_Key, 0x34, 8);
+  addKey("SLOW", Slow_Key, 0x35, 8);
+  addKey("MENU", Menu_Key, 0x36, 8);
+  addKey("9", Nine_Key, 0x37, 8);
+  addKey("LOGO", Unmapped_Key, 0x38, 8);
+  addKey("MUTE", Mute_Key, 0x39, 8);
+  addKey("VOL-", VolumeDown_Key, 0x3B, 8);
+  addKey("STEP", StepForward_Key, 0x3D, 8);
+  addKey("8", Eight_Key, 0x3F, 8);
+  addKey("1", One_Key, 0x41, 8);
+  addKey("2", Two_Key, 0x42, 8);
+  addKey("3", Three_Key, 0x43, 8);
+  addKey("4", Four_Key, 0x44, 8);
+  addKey("5", Five_Key, 0x45, 8);
+  addKey("6", Six_Key, 0x46, 8);
+  addKey("7", Seven_Key, 0x47, 8);
+  addKey("SD-HD", AspectRatio_Key, 0x59, 8);
+  addKey("REPEAT", Repeat_Key, 0x66, 8);
+  addKey("super5.1", Surround_Key, 0x67, 8);
+  addKey("MOVIE", Unmapped_Key, 0x68, 8);
+  addKey("ASC", Unmapped_Key, 0x69, 8);
+  addKey("HDMI-AUDIO", Unmapped_Key, 0x70, 8);
 }
 
 
@@ -663,18 +625,17 @@ SamsungAC1::SamsungAC1(
       Samsung_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
+  LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,
     600, 500,
     600, 1600,
-    60000, true,
-    LIRC_NEC);
+    60000, true);
 
-  threadableProtocol = np;
+  threadableProtocol = lp;
 
-  np->setHeaderPair(4500, 4500);
-  np->setTrailerPulse(600);
+  lp->setHeaderPair(4500, 4500);
+  lp->setTrailerPulse(600);
 
   setPreData(0x804, 12);
 
index aca49c2..b9f348f 100644 (file)
@@ -1,6 +1,6 @@
 #include "sanyo.h"
 
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
 
 SanyoVCR1::SanyoVCR1(
   QObject *guiObject,
@@ -13,7 +13,7 @@ SanyoVCR1::SanyoVCR1(
   addControlledDevice(Sanyo_Make, "DVW-5000", VCR_Device);
   addControlledDevice(Sanyo_Make, "DVW-5000", DVD_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x8C73, 16);
   setPreData(0x31, 8);
@@ -44,7 +44,7 @@ SanyoVCR1::SanyoVCR1(
   addKey("0", Zero_Key, 0x1D, 8);
   addKey("Input", Unmapped_Key, 0x1E, 8);  // need a subclass for this?
   addKey("ATR", Unmapped_Key, 0x1F, 8);
-  addKey("Memory", Unmapped_Key, 0x43, 8); // "->0<-"
+  addKey("Memory", Memory_Key, 0x43, 8); // "->0<-"
   addKey("Reset", Reset_Key, 0x44, 8);
   addKey("PROG", Program_Key, 0x46, 8);
   addKey("Cancel", Clear_Key, 0x4A, 8);
@@ -76,7 +76,7 @@ SanyoDVD1::SanyoDVD1(
 {
   addControlledDevice(Sanyo_Make, "DVD-SL25", DVD_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
 
 //  setPreData(0x3C23, 16);
   setPreData(0xC43C, 16);
@@ -136,7 +136,7 @@ SanyoTV1::SanyoTV1(
       Sanyo_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x1CE3, 16);
   setPreData(0x38, 8);
@@ -157,9 +157,9 @@ SanyoTV1::SanyoTV1(
   addKey("Sleep", Sleep_Key, 0x0D, 8);
   addKey("Volume Up", VolumeUp_Key, 0x0E, 8);
   addKey("Volume Down", VolumeDown_Key, 0x0F, 8);
-  addKey("image", Unmapped_Key, 0x11, 8);
+  addKey("image", PictureMode_Key, 0x11, 8);
   addKey("Power", Power_Key, 0x12, 8);
-  addKey("video_mode", PictureMode_Key, 0x13, 8);
+  addKey("video_mode", Unmapped_Key, 0x13, 8);
   addKey("TV", Input_Key, 0x14, 8); // tv/video
   addKey("Menu", Menu_Key, 0x17, 8); // "setup"
   addKey("Recall", PrevChannel_Key, 0x19, 8);
@@ -247,16 +247,16 @@ SanyoTV1d::SanyoTV1d(
 {
   setKeysetName("TV Keyset 1d");
 
-  addKey("contrast_>", Unmapped_Key, 0x0E, 8);
-  addKey("contrast_<", Unmapped_Key, 0x0F, 8);
+  addKey("contrast_>", ContrastUp_Key, 0x0E, 8);
+  addKey("contrast_<", ContrastDown_Key, 0x0F, 8);
   addKey("prg_scan", Scan_Key, 0x10, 8);
   addKey("tuning_>", ChannelUp_Key, 0x12, 8);
   addKey("tuning_<", ChannelDown_Key, 0x13, 8);
   addKey("clear_screen", Unmapped_Key, 0x18, 8);
-  addKey("colour_>", Unmapped_Key, 0x1A, 8);
-  addKey("colour_<", Unmapped_Key, 0x1B, 8);
-  addKey("bright_>", Unmapped_Key, 0x1E, 8);
-  addKey("bright_<", Unmapped_Key, 0x1F, 8);
+  addKey("colour_>", ColorUp_Key, 0x1A, 8);
+  addKey("colour_<", ColorDown_Key, 0x1B, 8);
+  addKey("bright_>", BrightnessUp_Key, 0x1E, 8);
+  addKey("bright_<", BrightnessDown_Key, 0x1F, 8);
 }
 
 
@@ -287,7 +287,7 @@ SanyoProjector::SanyoProjector(
 {
   addControlledDevice(Sanyo_Make, "PLV-Z1", Other_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x0CF3, 16);
   setPreData(0x30, 16);
index ba2855f..004a1bc 100644 (file)
@@ -1,5 +1,5 @@
 #include "sharp.h"
-#include "sharpprotocol.h"
+#include "protocols/sharpprotocol.h"
 
 SharpTV1::SharpTV1(
   QObject *guiObject,
@@ -25,7 +25,7 @@ SharpTV1::SharpTV1(
   addSharpKey("stereo", Unmapped_Key, 0x01, 0x0C); // "VpsPds"
   addSharpKey("40+", Unmapped_Key, 0x01, 0x0F); // odd!
 
-  addSharpKey("NR", Unmapped_Key, 0x01, 0x10);
+  addSharpKey("NR", NoiseReduction_Key, 0x01, 0x10);
   addSharpKey("CH_UP", ChannelUp_Key, 0x01, 0x11);
   addSharpKey("CH_DOWN", ChannelDown_Key, 0x01, 0x12);
   addSharpKey("TV/VIDEO", Input_Key, 0x01, 0x13);
@@ -41,13 +41,13 @@ SharpTV1::SharpTV1(
   addSharpKey("PROG", Program_Key, 0x01, 0x1D);
 
   addSharpKey("PICTURE_NORMALIZE", Unmapped_Key, 0x01, 0x21);
-  addSharpKey("CONTRAST_UP", Unmapped_Key, 0x01, 0x22);
-  addSharpKey("CONTRAST_DOWN", Unmapped_Key, 0x01, 0x23);
-  addSharpKey("COLOR_UP", Unmapped_Key, 0x01, 0x24);
-  addSharpKey("COLOR_DOWN", Unmapped_Key, 0x01, 0x25);
+  addSharpKey("CONTRAST_UP", ContrastUp_Key, 0x01, 0x22);
+  addSharpKey("CONTRAST_DOWN", ContrastDown_Key, 0x01, 0x23);
+  addSharpKey("COLOR_UP", ColorUp_Key, 0x01, 0x24);
+  addSharpKey("COLOR_DOWN", ColorDown_Key, 0x01, 0x25);
   addSharpKey("SOUND_NORMALIZE", Unmapped_Key, 0x01, 0x26);
-  addSharpKey("BRIGHTNESS_UP", Unmapped_Key, 0x01, 0x28);
-  addSharpKey("BRIGHTNESS_DOWN", Unmapped_Key, 0x01, 0x29);
+  addSharpKey("BRIGHTNESS_UP", BrightnessUp_Key, 0x01, 0x28);
+  addSharpKey("BRIGHTNESS_DOWN", BrightnessDown_Key, 0x01, 0x29);
   addSharpKey("CH_SWAP", PrevChannel_Key, 0x01, 0x27); // "FLASHBACK", "ret"
   addSharpKey("MONO", Unmapped_Key, 0x01, 0x2C);
   addSharpKey("BROWSE", Unmapped_Key, 0x01, 0x2F);
@@ -71,7 +71,7 @@ SharpTV1::SharpTV1(
   addSharpKey("COLOR_GREEN", Green_Key, 0x01, 0x49);
   addSharpKey("COLOR_YELLOW", Yellow_Key, 0x01, 0x4A);
   addSharpKey("COLOR_BLUE", Blue_Key, 0x01, 0x4B);
-  addSharpKey("INDEX", Unmapped_Key, 0x01, 0x4C);
+  addSharpKey("INDEX", TeletextIndex_Key, 0x01, 0x4C);
   addSharpKey("MENU", Menu_Key, 0x01, 0x4D);
   addSharpKey("LOCK", Unmapped_Key, 0x01, 0x51);
   addSharpKey("RESET", Reset_Key, 0x01, 0x52);
@@ -79,14 +79,14 @@ SharpTV1::SharpTV1(
 
   addSharpKey("PICTURE", PictureMode_Key, 0x01, 0x60);
   addSharpKey("SOUND", SoundMode_Key, 0x01, 0x61);
-  addSharpKey("TREBLE_UP", Unmapped_Key, 0x01, 0x62);
-  addSharpKey("TREBLE_DOWN", Unmapped_Key, 0x01, 0x63);
-  addSharpKey("BASS_UP", Unmapped_Key, 0x01, 0x64);
-  addSharpKey("BASS_DOWN", Unmapped_Key, 0x01, 0x65);
+  addSharpKey("TREBLE_UP", TrebleUp_Key, 0x01, 0x62);
+  addSharpKey("TREBLE_DOWN", TrebleDown_Key, 0x01, 0x63);
+  addSharpKey("BASS_UP", BassUp_Key, 0x01, 0x64);
+  addSharpKey("BASS_DOWN", BassDown_Key, 0x01, 0x65);
   addSharpKey("WOOFER_UP", Unmapped_Key, 0x01, 0x66);
   addSharpKey("WOOFER_DOWN", Unmapped_Key, 0x01, 0x67);
-  addSharpKey("BALANCE_LEFT", Unmapped_Key, 0x01, 0x6B);
-  addSharpKey("BALANCE_RIGHT", Unmapped_Key, 0x01, 0x6C);
+  addSharpKey("BALANCE_LEFT", BalanceLeft_Key, 0x01, 0x6B);
+  addSharpKey("BALANCE_RIGHT", BalanceRight_Key, 0x01, 0x6C);
   addSharpKey("SURROUND", Surround_Key, 0x01, 0x6E);
 
   addSharpKey("calendar", Unmapped_Key, 0x01, 0x76);
@@ -295,11 +295,11 @@ SharpReceiver1::SharpReceiver1(
   addSharpKey("VOL+", VolumeUp_Key, 0x12, 0x14);
   addSharpKey("VOL-", VolumeDown_Key, 0x12, 0x15);
   addSharpKey("POWER", Power_Key, 0x12, 0x16);
-  addSharpKey("TUNER", Unmapped_Key, 0x12, 0x19);
-  addSharpKey("TAPE", Unmapped_Key, 0x12, 0x1A);
-  addSharpKey("CD", Unmapped_Key, 0x12, 0x1B);
-  addSharpKey("PHONO", Unmapped_Key, 0x12, 0x1D);
-  addSharpKey("X-BASS", Unmapped_Key, 0x12, 0x2E);
+  addSharpKey("TUNER", TunerInput_Key, 0x12, 0x19);
+  addSharpKey("TAPE", TapeInput_Key, 0x12, 0x1A);
+  addSharpKey("CD", CDInput_Key, 0x12, 0x1B);
+  addSharpKey("PHONO", PhonoInput_Key, 0x12, 0x1D);
+  addSharpKey("X-BASS", EnhancedBass_Key, 0x12, 0x2E);
   addSharpKey("FM", Unmapped_Key, 0x12, 0x32);
   addSharpKey("LW", Unmapped_Key, 0x12, 0x33);
   addSharpKey("MW", Unmapped_Key, 0x12, 0x34);
@@ -315,7 +315,7 @@ SharpReceiver1::SharpReceiver1(
   addSharpKey("8", Eight_Key, 0x14, 0x08);
   addSharpKey("9", Nine_Key, 0x14, 0x09);
   addSharpKey("0", Zero_Key, 0x14, 0x0A);
-  addSharpKey("CALL", Unmapped_Key, 0x14, 0x11);
+  addSharpKey("CALL", Call_Key, 0x14, 0x11);
   addSharpKey("CLEAR", Clear_Key, 0x14, 0x12);
   addSharpKey("MEMORY", Program_Key, 0x14, 0x13);
   addSharpKey("CUE", FastForward_Key, 0x14, 0x19);
index bab2747..996dcde 100644 (file)
@@ -1,5 +1,5 @@
 #include "sony.h"
-#include "sircprotocol.h"
+#include "protocols/sircprotocol.h"
 
 
 SonyTV1::SonyTV1(
@@ -45,13 +45,13 @@ SonyTV1::SonyTV1(
   addSIRC12Key("POWER", Power_Key, 0x01, 0x15);
   addSIRC12Key("normalise", Reset_Key, 0x01, 0x16); // "reset"
   addSIRC12Key("a/b", Audio_Key, 0x01, 0x17); // "mts", "sap", "language"
-  addSIRC12Key("picture_up", Unmapped_Key, 0x01, 0x18); // "Contrast Up"
-  addSIRC12Key("picture_down", Unmapped_Key, 0x1, 0x19); // "Contrast Down"
+  addSIRC12Key("picture_up", ContrastUp_Key, 0x01, 0x18); // "Contrast Up"
+  addSIRC12Key("picture_down", ContrastDown_Key, 0x1, 0x19); // "Contrast Down"
   addSIRC12Key("-/--", DoubleDigit_Key, 0x01, 0x1D);
   addSIRC12Key("tv/video", Input_Key, 0x01, 0x25);
   addSIRC12Key("bucket", Unmapped_Key, 0x01, 0x28);
   addSIRC12Key("stereo", Surround_Key, 0x01, 0x29);
-  addSIRC12Key("ANT", Unmapped_Key, 0x01, 0x2A);
+  addSIRC12Key("ANT", AntennaInput_Key, 0x01, 0x2A);
   addSIRC12Key("time", Clock_Key, 0x01, 0x2B);
   addSIRC12Key("timer/block", Timer_Key, 0x01, 0x30);
   addSIRC12Key("right", Right_Key, 0x01, 0x33);
@@ -63,7 +63,8 @@ SonyTV1::SonyTV1(
   addSIRC12Key("off/repeat", Repeat_Key, 0x01, 0x3C);
   addSIRC12Key("TELETXT", Teletext_Key, 0x01, 0x3F);
   addSIRC12Key("favourite", Unmapped_Key, 0x01, 0x4A); // separate keyset?
-  addSIRC12Key("cable", Unmapped_Key, 0x01, 0x4E);
+  addSIRC12Key("cable", CableInput_Key, 0x01, 0x4E);
+  addSIRC12Key("Sat", SatInput_Key, 0x01, 0x51);
   addSIRC12Key("pip_ch+", PIPChannelUp_Key, 0x01, 0x58);
   addSIRC12Key("pip_ch-", PIPChannelDown_Key, 0x01, 0x59);
   addSIRC12Key("piptv_video", PIPSource_Key, 0x01, 0x5A);
@@ -71,8 +72,6 @@ SonyTV1::SonyTV1(
   addSIRC12Key("pipfreeze", PIPPause_Key, 0x01, 0x5C);
   addSIRC12Key("PIP_POSITION", PIPMove_Key, 0x01, 0x5E);
   addSIRC12Key("PIP_SWAP", PIPSwap_Key, 0x01, 0x5F);
-  addSIRC12Key("PIP_SOURCE", Unmapped_Key, 0x01, 0x67); // separate keyset?
-  addSIRC12Key("Sat", Unmapped_Key, 0x01, 0x51);
   addSIRC12Key("MENU", Menu_Key, 0x01, 0x60);
   addSIRC12Key("Settup_V", Unmapped_Key, 0x01, 0x61); // alternate pic mode
   addSIRC12Key("Settup_A", Unmapped_Key, 0x01, 0x62); // alternate sound mode
@@ -80,6 +79,7 @@ SonyTV1::SonyTV1(
   addSIRC12Key("picturemode", PictureMode_Key, 0x01, 0x64);
   addSIRC12Key("OK", Select_Key, 0x01, 0x65); // "return", "select", "enter"
   addSIRC12Key("output", Unmapped_Key, 0x01, 0x66);
+  addSIRC12Key("PIP_SOURCE", Unmapped_Key, 0x01, 0x67); // separate keyset?
   addSIRC12Key("asterisk", Unmapped_Key, 0x01, 0x68); // "TV System"
   addSIRC12Key("auto_program", Unmapped_Key, 0x01, 0x6B);
   addSIRC12Key("setup", Program_Key, 0x01, 0x6C);
@@ -214,20 +214,20 @@ SonyAmp1::SonyAmp1(
   addSIRC12Key("VOL-", VolumeDown_Key, 0x0C, 0x13);
   addSIRC12Key("MUTE", Mute_Key, 0x0C, 0x14);
   addSIRC12Key("POWER", Power_Key, 0x0C, 0x15);
-  addSIRC12Key("LD", Unmapped_Key, 0x0C, 0x19);
-  addSIRC12Key("TV", Unmapped_Key, 0x0C, 0x18);
+  addSIRC12Key("LD", LDInput_Key, 0x0C, 0x19);
+  addSIRC12Key("TV", CableInput_Key, 0x0C, 0x18);
   addSIRC12Key("VIDEO2", Unmapped_Key, 0x0C, 0x1E);
-  addSIRC12Key("PHONO", Unmapped_Key, 0x0C, 0x20);
-  addSIRC12Key("TUNER", Unmapped_Key, 0x0C, 0x21);
+  addSIRC12Key("PHONO", PhonoInput_Key, 0x0C, 0x20);
+  addSIRC12Key("TUNER", TunerInput_Key, 0x0C, 0x21);
   addSIRC12Key("VIDEO1", Unmapped_Key, 0x0C, 0x22);
-  addSIRC12Key("TAPE", Unmapped_Key, 0x0C, 0x23);
-  addSIRC12Key("CD", Unmapped_Key, 0x0C, 0x25);
+  addSIRC12Key("TAPE", TapeInput_Key, 0x0C, 0x23);
+  addSIRC12Key("CD", CDInput_Key, 0x0C, 0x25);
   addSIRC12Key("DAT", Unmapped_Key, 0x0C, 0x46);
   addSIRC12Key("SLEEP", Sleep_Key, 0x0C, 0x60);
-  addSIRC12Key("MD", Unmapped_Key, 0x0C, 0x69);
+  addSIRC12Key("MD", MDInput_Key, 0x0C, 0x69);
   addSIRC12Key("TV2", Unmapped_Key, 0x0C, 0x6A);
   addSIRC12Key("5.1CH", Unmapped_Key, 0x0C, 0x72);
-  addSIRC12Key("DVD", Unmapped_Key, 0x0C, 0x7D);
+  addSIRC12Key("DVD", DVDInput_Key, 0x0C, 0x7D);
 }
 
 
@@ -266,19 +266,19 @@ SonyAmp2::SonyAmp2(
   addSIRC12Key("vol_-", VolumeDown_Key, 0x10, 0x13);
   addSIRC12Key("mute", Mute_Key, 0x10, 0x14);
   addSIRC12Key("power", Power_Key, 0x10, 0x15);
-  addSIRC12Key("aux/vdp", Unmapped_Key, 0x10, 0x1D);
+  addSIRC12Key("aux/vdp", AuxInput_Key, 0x10, 0x1D);
   addSIRC12Key("video2", Unmapped_Key, 0x10, 0x1E);
-  addSIRC12Key("phono", Unmapped_Key, 0x10, 0x20);
-  addSIRC12Key("tuner", Unmapped_Key, 0x10, 0x21);
+  addSIRC12Key("phono", PhonoInput_Key, 0x10, 0x20);
+  addSIRC12Key("tuner", TunerInput_Key, 0x10, 0x21);
   addSIRC12Key("video1", Unmapped_Key, 0x10, 0x22);
-  addSIRC12Key("tape", Unmapped_Key, 0x10, 0x23);
-  addSIRC12Key("cd", Unmapped_Key, 0x10, 0x25);
+  addSIRC12Key("tape", TapeInput_Key, 0x10, 0x23);
+  addSIRC12Key("cd", CDInput_Key, 0x10, 0x25);
   addSIRC12Key("power_on", PowerOn_Key, 0x10, 0x2E);
   addSIRC12Key("video3", Unmapped_Key, 0x10, 0x42);
-  addSIRC12Key("tv", Unmapped_Key, 0x10, 0x6A);
-  addSIRC12Key("dvd", Unmapped_Key, 0x10, 0x7D);
+  addSIRC12Key("tv", CableInput_Key, 0x10, 0x6A);
+  addSIRC12Key("dvd", DVDInput_Key, 0x10, 0x7D);
 
-  addSIRC15Key("md/dat", Unmapped_Key, 0x10, 0x69);
+  addSIRC15Key("md/dat", MDInput_Key, 0x10, 0x69);
 }
 
 
@@ -299,18 +299,18 @@ SonyAudio1::SonyAudio1(
   addSIRC12Key("MEMORY", Program_Key, 0x0D, 0x0E);
   addSIRC12Key("TUNER-BAND", TunerBand_Key, 0x0D, 0x0F);
   addSIRC12Key("TUNING_MODE", Unmapped_Key, 0x0D, 0x17);
-  addSIRC12Key("STEREO-MONO", Audio_Key, 0x0D, 0x21);
+  addSIRC12Key("STEREO-MONO", FMMode_Key, 0x0D, 0x21);
 
   addSIRC12Key("DIR_MODE", Unmapped_Key, 0x0E, 0x14);
   addSIRC12Key("REC", Record_Key, 0x0E, 0x1E);
-  addSIRC12Key("TAPE", Unmapped_Key, 0x0E, 0x34);
+  addSIRC12Key("TAPE", TapeInput_Key, 0x0E, 0x34);
 
-  addSIRC12Key("tuner", Unmapped_Key, 0x10, 0x0F); // "Tune Up"
+  addSIRC12Key("tuner", TunerInput_Key, 0x10, 0x0F); // "Tune Up"
   addSIRC12Key("VOL+", VolumeUp_Key, 0x10, 0x12);
   addSIRC12Key("VOL-", VolumeDown_Key, 0x10, 0x13);
   addSIRC12Key("ON-OFF", Power_Key, 0x10, 0x15);
   addSIRC12Key("effect_on_off", Unmapped_Key, 0x10, 0x1F);
-  addSIRC12Key("cd", Unmapped_Key, 0x10, 0x25);
+  addSIRC12Key("cd", CDInput_Key, 0x10, 0x25);
   addSIRC12Key("DISPLAY", Info_Key, 0x10, 0x4B);
   addSIRC12Key("dimmer", Unmapped_Key, 0x10, 0x4D);
   addSIRC12Key("karaoke_mpx", Unmapped_Key, 0x10, 0x5F);
@@ -363,7 +363,7 @@ SonyAudio1::SonyAudio1(
   addSIRC20Key("KEY_NEXT", FastForward_Key, 0x39, 0x1A, 0x34); // "Fast Forward"
   addSIRC20Key("KEY_STOP", Stop_Key, 0x39, 0x1A, 0x38);
   addSIRC20Key("KEY_PAUSE", Pause_Key, 0x39, 0x1A, 0x39);
-  addSIRC20Key("d_skip", DiscSelect_Key, 0x39, 0x1A, 0x3E);
+  addSIRC20Key("d_skip", NextDisc_Key, 0x39, 0x1A, 0x3E);
   addSIRC20Key("up", Up_Key, 0x39, 0x1A, 0x78);
   addSIRC20Key("down", Down_Key, 0x39, 0x1A, 0x79);
   addSIRC20Key("left", Left_Key, 0x39, 0x1A, 0x7A);
@@ -379,7 +379,7 @@ SonyAudio1a::SonyAudio1a(
 {
   setKeysetName("Audio Keyset 1a");
 
-  addSIRC12Key("tape", Unmapped_Key, 0x10, 0x23);
+  addSIRC12Key("tape", TapeInput_Key, 0x10, 0x23);
 
 //  addSIRC20Key("select", Select_Key, 0x39, 0x1A, 0x32); // Doesn't make sense
   addSIRC20Key("play", Play_Key, 0x39, 0x1A, 0x32);
@@ -491,7 +491,7 @@ SonyDVD1::SonyDVD1(
   addSIRC20Key("RecStop", RecordStop_Key, 0x49, 0x1A, 0x3D);
   addSIRC20Key("RecPause", RecordPause_Key, 0x49, 0x1A, 0x3E);
 
-  addSIRC20Key("DNR", Unmapped_Key, 0x49, 0x1A, 0x48);
+  addSIRC20Key("DNR", NoiseReduction_Key, 0x49, 0x1A, 0x48);
   addSIRC20Key("SEARCH_MODE", Unmapped_Key, 0x49, 0x1A, 0x4B);
   addSIRC20Key("Picture_Navi", Unmapped_Key, 0x49, 0x1A, 0x50);
   addSIRC20Key("TV_DVD", Unmapped_Key, 0x49, 0x1A, 0x51);
@@ -522,7 +522,7 @@ SonyDVD1::SonyDVD1(
   addSIRC20Key("ALBUM-PLUS", Unmapped_Key, 0x62, 0x1A, 0x2A);
   addSIRC20Key("F1", Unmapped_Key, 0x62, 0x1A, 0x2E); // "HDD"
   addSIRC20Key("F2", Unmapped_Key, 0x62, 0x1A, 0x2F); // "DVD"
-  addSIRC20Key("DiscSkip", DiscSelect_Key, 0x62, 0x1A, 0x3E);
+  addSIRC20Key("DiscSkip", NextDisc_Key, 0x62, 0x1A, 0x3E);
   addSIRC20Key("Favorites", Favorites_Key, 0x62, 0x1A, 0x5E);
   addSIRC20Key("Purple", Blue_Key, 0x62, 0x1A, 0x66);
   addSIRC20Key("Red", Red_Key, 0x62, 0x1A, 0x67);
@@ -615,7 +615,7 @@ SonyVCR1::SonyVCR1(
   addSIRC12Key("<<", Rewind_Key, 0x0B, 0x1B);
   addSIRC12Key(">>", FastForward_Key, 0x0B, 0x1C);
   addSIRC12Key("rec", Record_Key, 0x0B, 0x1D);
-  addSIRC12Key("ant/sw", Unmapped_Key, 0x0B, 0x2A);  // "tv/vcr"
+  addSIRC12Key("ant/sw", AntennaInput_Key, 0x0B, 0x2A);  // "tv/vcr"
   addSIRC12Key("power_on", PowerOn_Key, 0x0B, 0x2E);
   addSIRC12Key("Power Off", PowerOff_Key, 0x0B, 0x2F);
   addSIRC12Key("menu", Menu_Key, 0x0B, 0x4D);
@@ -701,16 +701,16 @@ SonyReceiver1::SonyReceiver1(
   addSIRC15Key("MUTING", Mute_Key, 0x30, 0x14);
   addSIRC15Key("POWER", Power_Key, 0x30, 0x15);
   addSIRC15Key("VIDEO2", Unmapped_Key, 0x30, 0x1E);
-  addSIRC15Key("TUNER", Unmapped_Key, 0x30, 0x21);
+  addSIRC15Key("TUNER", TunerInput_Key, 0x30, 0x21);
   addSIRC15Key("VIDEO1", Unmapped_Key, 0x30, 0x22);
   addSIRC15Key("SA_CD", Unmapped_Key, 0x30, 0x25);
   addSIRC15Key("VIDEO3", Unmapped_Key, 0x30, 0x42);
   addSIRC15Key("DISPLAY", Info_Key, 0x30, 0x4B);
   addSIRC15Key("SLEEP", Sleep_Key, 0x30, 0x60);
   addSIRC15Key("TV", Unmapped_Key, 0x30, 0x6A);
-  addSIRC15Key("DVD", Unmapped_Key, 0x30, 0x7D);
+  addSIRC15Key("DVD", DVDInput_Key, 0x30, 0x7D);
 
-  addSIRC15Key("SAT", Unmapped_Key, 0xB0, 0x03);
+  addSIRC15Key("SAT", SatInput_Key, 0xB0, 0x03);
   addSIRC15Key("2CH", Unmapped_Key, 0xB0, 0x09);
   addSIRC15Key("AFD", Unmapped_Key, 0xB0, 0x0A);
   addSIRC15Key("MOVIE", Unmapped_Key, 0xB0, 0x0B);
index e21edd6..c905811 100644 (file)
@@ -1,5 +1,5 @@
 #include "tivo.h"
-#include "necprotocol.h"
+#include "protocols/lircprotocol.h"
 
 Tivo1::Tivo1(
   QObject *guiObject,
@@ -9,7 +9,17 @@ Tivo1::Tivo1(
       Tivo_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, LIRC_NEC);
+  LIRCProtocol *lp = new LIRCProtocol(
+    guiObject, index,
+    560, 560,
+    560, 1680,
+    110000, true);
+
+  threadableProtocol = lp;
+
+  lp->setHeaderPair(9000, 4500);
+  lp->setTrailerPulse(560);
+  lp->setRepeatPair(9000, 2250);
 
   setPreData(0xA10C, 16);
 
index 24030fa..c828c2f 100644 (file)
@@ -1,6 +1,5 @@
 #include "toshiba.h"
-#include "necprotocol.h"
-//#include "pirmakenames.h"
+#include "protocols/necprotocol.h"
 
 ToshibaTV1::ToshibaTV1(
   QObject *guiObject,
@@ -12,7 +11,7 @@ ToshibaTV1::ToshibaTV1(
 {
   addControlledDevice(Toshiba_Make, "21S03D", TV_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x02FD, 16);
   setPreData(0x40, 8);
@@ -35,10 +34,10 @@ ToshibaTV1::ToshibaTV1(
   addKey("MUTE", Mute_Key, 0x10, 8);
   addKey("BLANK", PictureMode_Key, 0x11, 8); // "Contrast", "picture_preset"
   addKey("POWER", Power_Key, 0x12, 8);
-  addKey("mts", Unmapped_Key, 0x13, 8); // "audio_stereo_2channel"
+  addKey("mts", FMMode_Key, 0x13, 8); // "audio_stereo_2channel"
   addKey("SCART", Input_Key, 0x14, 8); // "AV", "inputs", "source"
   addKey("sleep", Sleep_Key, 0x15, 8);  // Clock
-  addKey("CALL", Unmapped_Key, 0x16, 8);
+  addKey("CALL", Call_Key, 0x16, 8);
   addKey("ent", Enter_Key, 0x17, 8);  // "ch_rtn"
   addKey("TXT/MIX", Teletext_Key, 0x17, 8);
   addKey("fav+", Unmapped_Key, 0x19, 8);
@@ -54,7 +53,7 @@ ToshibaTV1::ToshibaTV1(
   addKey("P-", Down_Key, 0x1F, 8);
   addKey("OK", Select_Key, 0x21, 8);
   addKey("POP_DIR", Unmapped_Key, 0x26, 8);
-  addKey("textindex", Unmapped_Key, 0x2B, 8);
+  addKey("textindex", TeletextIndex_Key, 0x2B, 8);
   addKey("textpages", Unmapped_Key, 0x2C, 8);
   addKey("a/d", Unmapped_Key, 0x44, 8);
   addKey("RED", Red_Key, 0x48, 8);
@@ -63,9 +62,9 @@ ToshibaTV1::ToshibaTV1(
   addKey("pip_ch_up", PIPChannelUp_Key, 0x4A, 8); // Yellow
   addKey("BLUE", Blue_Key, 0x4B, 8);
   addKey("pip_ch_down", PIPChannelDown_Key, 0x4B, 8); // Blue
-  addKey("still", Unmapped_Key, 0x4C, 8);
-  addKey("locate", Unmapped_Key, 0x4E, 8);
-  addKey("source", Unmapped_Key, 0x4F, 8);
+  addKey("still", PIPPause_Key, 0x4C, 8);
+  addKey("locate", PIPMove_Key, 0x4E, 8);
+  addKey("source", PIPSource_Key, 0x4F, 8);
   addKey("pip", PIP_Key, 0x51, 8);
   addKey("Double_Arrow", Unmapped_Key, 0x52, 8); // "swap", but not pip!; "back"
   addKey("swap", PIPSwap_Key, 0x53, 8); // Reduce
@@ -76,7 +75,7 @@ ToshibaTV1::ToshibaTV1(
   addKey("cap/text", Captions_Key, 0x57, 8); // Image
   addKey("exit", Exit_Key, 0x58, 8);
   addKey("SIZE", AspectRatio_Key, 0x59, 8); // "WIDE"
-  addKey("DOULBY", Unmapped_Key, 0x5A, 8);
+  addKey("DOULBY", NoiseReduction_Key, 0x5A, 8);
   addKey("1/2", Audio_Key, 0x63, 8); // "cap1/cap2"
   addKey("MENU", Menu_Key, 0x5B, 8);
   addKey("CLOCK", Timer_Key, 0x71, 8);  // "TIMER"
@@ -209,7 +208,7 @@ ToshibaVCR1::ToshibaVCR1(
       Toshiba_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
   setPreData(0x44, 16);
 
@@ -263,7 +262,7 @@ ToshibaDisc1::ToshibaDisc1(
       Toshiba_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0xA25D, 16);
   setPreData(0x45, 8);
@@ -294,7 +293,7 @@ ToshibaDisc1::ToshibaDisc1(
   addKey("skip+", Next_Key, 0x24, 8);
   addKey("+10", DoubleDigit_Key, 0x25, 8);
   addKey("100", PlusOneHundred_Key, 0x25, 8);
-  addKey("T", Unmapped_Key, 0x26, 8); // direct access to title by number
+  addKey("T", Unmapped_Key, 0x26, 8); // "Index", direct access to title by number
   addKey("SUBTITLE", Captions_Key, 0x28, 8);
   addKey("KEY_ANGLE", Angle_Key, 0x29, 8);
   addKey("MEMORY", Program_Key, 0x2A, 8);
@@ -303,7 +302,7 @@ ToshibaDisc1::ToshibaDisc1(
   addKey("RANDOM", Random_Key, 0x2E, 8);
   addKey("FL_DIMMER", Unmapped_Key, 0x41, 8); // "FlDim"
   addKey("3D", Unmapped_Key, 0x43, 8);
-  addKey("disc", DiscSelect_Key, 0x4A, 8); // "DISC SELECT"
+  addKey("disc", NextDisc_Key, 0x4A, 8); // "DISC SELECT"
   addKey("vol+", VolumeUp_Key, 0x4D, 8);
   addKey("right", Right_Key, 0x4D, 8); // "vol+"
   addKey("vol-", VolumeDown_Key, 0x51, 8);
index eecfbd2..9a2c02a 100644 (file)
@@ -1,5 +1,6 @@
 #include "westinghouse.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
+#include "protocols/sircprotocol.h"
 
 WestinghouseTV1::WestinghouseTV1(
   QObject *guiObject,
@@ -9,7 +10,7 @@ WestinghouseTV1::WestinghouseTV1(
       Westinghouse_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, false);
 
 //  setPreData(0x807F, 16);
   setPreData(0x01, 8);
@@ -21,7 +22,7 @@ WestinghouseTV1::WestinghouseTV1(
   addKey("DVI", Unmapped_Key, 0x06, 8);
   addKey("ASPECT_RATIO", AspectRatio_Key, 0x07, 8);
   addKey("KEY_BACK", PrevChannel_Key, 0x08, 8);
-  addKey("VGA", Unmapped_Key, 0x09, 8);
+  addKey("VGA", PCInput_Key, 0x09, 8);
   addKey("YPbPr", Unmapped_Key, 0x0A, 8);
   addKey("AV", Unmapped_Key, 0x0B, 8);
   addKey("S-Video", Unmapped_Key, 0x0C, 8);
@@ -55,63 +56,53 @@ WestinghouseTV2::WestinghouseTV2(
       Westinghouse_Make,
       index)
 {
-  NECProtocol *np = new NECProtocol(
-    guiObject,
-    index,
-    600, 500,
-    1200, 500,
-    45000, true,
-    LIRC_NEC);
+  addControlledDevice(Westinghouse_Make, "LVM-42W2", TV_Device);
 
-  threadableProtocol = np;
+  threadableProtocol = new SIRCProtocol(guiObject, index);
 
-  np->setHeaderPair(2400, 500);
-
-//  np->setMinimumRepetitions(3);
-
-  addKey("Power", Power_Key, 0xA90, 12);
-  addKey("PIP", PIP_Key, 0xDB0, 12);
-  addKey("PIPSwap", PIPSwap_Key, 0xFB0, 12);
-  addKey("Mute", Mute_Key, 0x290, 12);
-  addKey("Sleep", Sleep_Key, 0x6D0, 12);
-  addKey("CC", Captions_Key, 0x310, 12);
-  addKey("Backlight", Unmapped_Key, 0x190, 12);
-  addKey("A", Unmapped_Key, 0x570, 12);
-  addKey("B", Unmapped_Key, 0xD70, 12);
-  addKey("C", Unmapped_Key, 0x370, 12);
-  addKey("1", One_Key, 0x010, 12);
-  addKey("2", Two_Key, 0x810, 12);
-  addKey("3", Three_Key, 0x410, 12);
-  addKey("4", Four_Key, 0xC10, 12);
-  addKey("5", Five_Key, 0x210, 12);
-  addKey("6", Six_Key, 0xA10, 12);
-  addKey("7", Seven_Key, 0x610, 12);
-  addKey("8", Eight_Key, 0xE10, 12);
-  addKey("9", Nine_Key, 0x110, 12);
-  addKey("0", Zero_Key, 0x910, 12);
-  addKey(".", Unmapped_Key, 0x510, 12);
-  addKey("EnterNumPad", Enter_Key, 0xD10, 12);
-  addKey("Input", Input_Key, 0xA50, 12);
-  addKey("Zoom", Zoom_Key, 0x390, 12);
-  addKey("Vol+", VolumeUp_Key, 0x490, 12);
-  addKey("Vol-", VolumeDown_Key, 0xC90, 12);
-  addKey("Ch+", ChannelUp_Key, 0x090, 12);
-  addKey("Ch-", ChannelDown_Key, 0x890, 12);
-  addKey("Menu", Menu_Key, 0x070, 12);
-  addKey("Info", Info_Key, 0x5D0, 12);
-  addKey("Up", Up_Key, 0x2F0, 12);
-  addKey("Down", Down_Key, 0xAF0, 12);
-  addKey("Left", Left_Key, 0x2D0, 12);
-  addKey("Right", Right_Key, 0xCD0, 12);
-  addKey("EnterNavigation", Select_Key, 0xA70, 12);
-  addKey("Retry", Unmapped_Key, 0xDD0, 12);
-  addKey("EPG", Guide_Key, 0x710, 12);
-  addKey("YPbPr1", Unmapped_Key, 0x130, 12);
-  addKey("YPbPr2", Unmapped_Key, 0x930, 12);
-  addKey("PC", Unmapped_Key, 0xC30, 12);
-  addKey("Video", Unmapped_Key, 0x030, 12);
-  addKey("HDMI", Unmapped_Key, 0x430, 12);
-  addKey("SVideo", Unmapped_Key, 0xB30, 12);
-  addKey("TV", Unmapped_Key, 0x250, 12);
-  addKey("DVI", Unmapped_Key, 0x230, 12);
+  addSIRC12Key("1", One_Key, 0x01, 0x00);
+  addSIRC12Key("2", Two_Key, 0x01, 0x01);
+  addSIRC12Key("3", Three_Key, 0x01, 0x02);
+  addSIRC12Key("4", Four_Key, 0x01, 0x03);
+  addSIRC12Key("5", Five_Key, 0x01, 0x04);
+  addSIRC12Key("6", Six_Key, 0x01, 0x05);
+  addSIRC12Key("7", Seven_Key, 0x01, 0x06);
+  addSIRC12Key("8", Eight_Key, 0x01, 0x07);
+  addSIRC12Key("9", Nine_Key, 0x01, 0x08);
+  addSIRC12Key("0", Zero_Key, 0x01, 0x09);
+  addSIRC12Key(".", Unmapped_Key, 0x01, 0x0A);
+  addSIRC12Key("EnterNumPad", Enter_Key, 0x01, 0x0B);
+  addSIRC12Key("CC", Captions_Key, 0x01, 0x0C);
+  addSIRC12Key("EPG", Guide_Key, 0x01, 0x0E);
+  addSIRC12Key("Ch+", ChannelUp_Key, 0x01, 0x10);
+  addSIRC12Key("Ch-", ChannelDown_Key, 0x01, 0x11);
+  addSIRC12Key("Vol+", VolumeUp_Key, 0x01, 0x12);
+  addSIRC12Key("Vol-", VolumeDown_Key, 0x01, 0x13);
+  addSIRC12Key("Mute", Mute_Key, 0x01, 0x14);
+  addSIRC12Key("Power", Power_Key, 0x01, 0x15);
+  addSIRC12Key("Backlight", Unmapped_Key, 0x01, 0x18);
+  addSIRC12Key("Zoom", Zoom_Key, 0x01, 0x1C);
+  addSIRC12Key("TV", Unmapped_Key, 0x01, 0x24);
+  addSIRC12Key("Input", Input_Key, 0x01, 0x25);
+  addSIRC12Key("Right", Right_Key, 0x01, 0x33);
+  addSIRC12Key("Left", Left_Key, 0x01, 0x34);
+  addSIRC12Key("Sleep", Sleep_Key, 0x01, 0x36);
+  addSIRC12Key("Retry", Unmapped_Key, 0x01, 0x3B);
+  addSIRC12Key("Info", Info_Key, 0x01, 0x3A);
+  addSIRC12Key("Video", Unmapped_Key, 0x01, 0x40);
+  addSIRC12Key("HDMI", HDMIInput_Key, 0x01, 0x42);
+  addSIRC12Key("PC", PCInput_Key, 0x01, 0x43);
+  addSIRC12Key("DVI", Unmapped_Key, 0x01, 0x44);
+  addSIRC12Key("YPbPr1", Unmapped_Key, 0x01, 0x48);
+  addSIRC12Key("YPbPr2", Unmapped_Key, 0x01, 0x49);
+  addSIRC12Key("SVideo", Unmapped_Key, 0x01, 0x4D);
+  addSIRC12Key("PIP", PIP_Key, 0x01, 0x5B);
+  addSIRC12Key("PIPSwap", PIPSwap_Key, 0x01, 0x5F);
+  addSIRC12Key("Menu", Menu_Key, 0x01, 0x60);
+  addSIRC12Key("EnterNavigation", Select_Key, 0x01, 0x65);
+  addSIRC12Key("A", Unmapped_Key, 0x01, 0x6A);
+  addSIRC12Key("B", Unmapped_Key, 0x01, 0x6B);
+  addSIRC12Key("C", Unmapped_Key, 0x01, 0x6C);
+  addSIRC12Key("Up", Up_Key, 0x01, 0x74);
+  addSIRC12Key("Down", Down_Key, 0x01, 0x75);
 }
index 705505a..8105b67 100644 (file)
@@ -1,5 +1,5 @@
 #include "yamaha.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
 
 
 YamahaDVD1::YamahaDVD1(
@@ -10,7 +10,7 @@ YamahaDVD1::YamahaDVD1(
       Yamaha_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x3EC1, 16);
   setPreData(0x7C, 8);
@@ -79,12 +79,12 @@ YamahaAudio1::YamahaAudio1(
       Yamaha_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x9E61, 16);
   setPreData(0x79, 8);
 
-  addKey("MODE", Unmapped_Key, 0x00, 8);
+  addKey("MODE", Mode_Key, 0x00, 8);
   addKey("OPEN", Eject_Key, 0x01, 8);
   addKey("PLAY", Play_Key, 0x02, 8);
   addKey("SKIP_BACK", Previous_Key, 0x04, 8); // "-", "PREV"
@@ -129,8 +129,8 @@ YamahaAudio1::YamahaAudio1(
   addKey("22", Unmapped_Key, 0x4C, 8);
   addKey("23", Unmapped_Key, 0x4D, 8);
   addKey("24", Unmapped_Key, 0x4E, 8);
-  addKey("DISC_SKIP_FORWARD", DiscSelect_Key, 0x4F, 8);
-  addKey("DISC_SKIP_REVERSE", Unmapped_Key, 0x50, 8);
+  addKey("DISC_SKIP_FORWARD", NextDisc_Key, 0x4F, 8);
+  addKey("DISC_SKIP_REVERSE", PrevDisc_Key, 0x50, 8);
   addKey("DISC_SCAN", Unmapped_Key, 0x53, 8);
   addKey("PAUSE", Pause_Key, 0x55, 8);
   addKey("STOP", Stop_Key, 0x56, 8);
@@ -160,7 +160,11 @@ YamahaAudio2::YamahaAudio2(
       Yamaha_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  addControlledDevice(Yamaha_Make, "RX-395-RDS", Audio_Device);
+  addControlledDevice(Yamaha_Make, "AX-570", Audio_Device);
+  addControlledDevice(Yamaha_Make, "CDX-570", Audio_Device);
+
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x5EA1, 16);
   setPreData(0x7A, 8);
@@ -186,11 +190,11 @@ YamahaAudio2::YamahaAudio2(
   addKey("ch-", ChannelDown_Key, 0x11, 8);
   addKey("abcde", TunerBand_Key, 0x12, 8); // "A/B/C/D/E" "tuner-toggle"
   addKey("GO_VCR2", Unmapped_Key, 0x13, 8);
-  addKey("phono", Unmapped_Key, 0x14, 8);
-  addKey("cd", Unmapped_Key, 0x15, 8);
-  addKey("tuner", Unmapped_Key, 0x16, 8);
-  addKey("dvdld", Unmapped_Key, 0x17, 8); // "d-tv/cbl", "AUX"
-  addKey("tapemonitor", Unmapped_Key, 0x18, 8); // "Tape/MD_Monitor", "DAT"
+  addKey("phono", PhonoInput_Key, 0x14, 8);
+  addKey("cd", CDInput_Key, 0x15, 8);
+  addKey("tuner", TunerInput_Key, 0x16, 8);
+  addKey("dvdld", DVDInput_Key, 0x17, 8); // "d-tv/cbl", "AUX"
+  addKey("tapemonitor", TapeInput_Key, 0x18, 8); // "Tape/MD_Monitor", "DAT"
   addKey("TAPE2", Unmapped_Key, 0x19, 8);
   addKey("vol+", VolumeUp_Key, 0x1A, 8);
   addKey("vol-", VolumeDown_Key, 0x1B, 8);
@@ -200,10 +204,10 @@ YamahaAudio2::YamahaAudio2(
   addKey("Power", Power_Key, 0x1F, 8); // "STANDBY"
 
   addKey("TapeDirB", Unmapped_Key, 0x40, 8);
-  addKey("DiscSkip", Unmapped_Key, 0x4F, 8); // "CD_DISC"
+  addKey("DiscSkip", NextDisc_Key, 0x4F, 8); // "CD_DISC"
   addKey("right", Right_Key, 0x52, 8);  // "DSP+", "DELAY_TIME+"
   addKey("left", Left_Key, 0x53, 8); // "DSP-", "DELAY_TIME-"
-  addKey("tvdbs", Unmapped_Key, 0x54, 8); // "SAT/D-TV" "d-tv/cbl alt"
+  addKey("tvdbs", SatInput_Key, 0x54, 8); // "SAT/D-TV" "d-tv/cbl alt"
   addKey("vaux", Unmapped_Key, 0x55, 8); // "GO_CDV1"
   addKey("effect", Unmapped_Key, 0x56, 8);
   addKey("sleep", Sleep_Key, 0x57, 8);
@@ -211,13 +215,13 @@ YamahaAudio2::YamahaAudio2(
   addKey("effect-", Unmapped_Key, 0x59, 8); // "DSP_Prg-"
   addKey("EQ_ON/FLAT", Unmapped_Key, 0x5A, 8);
   addKey("EQ_PRESET_SKIP", Unmapped_Key, 0x5B, 8);
-  addKey("REAR_LEVEL_+", Unmapped_Key, 0x5E, 8);
-  addKey("REAR_LEVEL_-", Unmapped_Key, 0x5F, 8);
+  addKey("REAR_LEVEL_+", RearVolumeUp_Key, 0x5E, 8);
+  addKey("REAR_LEVEL_-", RearVolumeDown_Key, 0x5F, 8);
 
   addKey("FRONT_EFFECT_LEVEL_+", Unmapped_Key, 0x80, 8);
   addKey("FRONT_EFFECT_LEVEL_-", Unmapped_Key, 0x81, 8);
-  addKey("CENTRE_LEVEL_+", Unmapped_Key, 0x82, 8);
-  addKey("CENTRE_LEVEL_-", Unmapped_Key, 0x83, 8);
+  addKey("CENTRE_LEVEL_+", CenterVolumeUp_Key, 0x82, 8);
+  addKey("CENTRE_LEVEL_-", CenterVolumeDown_Key, 0x83, 8);
   addKey("CENTRE_MODE", Unmapped_Key, 0x84, 8);
   addKey("test", Unmapped_Key, 0x85, 8); // "DSP_TEST"
   addKey("level", Unmapped_Key, 0x86, 8); // "Time/Level"
@@ -314,7 +318,7 @@ YamahaAudio3::YamahaAudio3(
       Yamaha_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0xFE01, 16);
   setPreData(0x7F, 8);
@@ -354,7 +358,6 @@ YamahaAudio3::YamahaAudio3(
 }
 
 
-// This one is strange, need to look at it harder:
 YamahaAudio4::YamahaAudio4(
   QObject *guiObject,
   unsigned int index)
@@ -363,126 +366,9 @@ YamahaAudio4::YamahaAudio4(
       Yamaha_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, LIRC_NEC);
-
-  setPreData(0x857A, 16);
-
-  addKey("CD_PLAY", Play_Key, 0xF708, 16);
-  addKey("CD_PAUSE/STOP", Pause_Key, 0xF609, 16);
-  addKey("CD_PAUSE/STOP", Stop_Key, 0xF609, 16);
-  addKey("CD_SEARCH_>", FastForward_Key, 0xF30C, 16); // Might be wrong
-  addKey("CD_SEARCH_<", Rewind_Key, 0xF20D, 16); // And this
-  addKey("CD_TRACK_+", Next_Key, 0xF50A, 16);
-  addKey("CD_TRACK_-", Previous_Key, 0xF40B, 16);
-  addKey("CD_DISK", Unmapped_Key, 0xB04F, 16);
-  addKey("TAPE_PLAY", Unmapped_Key, 0xFF00, 16);
-  addKey("TAPE_STOP", Unmapped_Key, 0xFC03, 16);
-  addKey("TAPE_SEARCH_>", Unmapped_Key, 0xFD02, 16);
-  addKey("TAPE_SEARCH_<", Unmapped_Key, 0xFE01, 16);
-  addKey("TAPE_DIR_A", Unmapped_Key, 0xF807, 16);
-  addKey("TAPE_DIR_B", Unmapped_Key, 0xBF40, 16);
-  addKey("TAPE_REC/PAUSE", Unmapped_Key, 0xFB04, 16);
-  addKey("TAPE_REC/MUTE", Unmapped_Key, 0xFA05, 16);
-  addKey("TAPE_A/B", Unmapped_Key, 0xF906, 16);
-  addKey("AMP_AUX", Unmapped_Key, 0xE817, 16);
-  addKey("AMP_TAPE1", Unmapped_Key, 0xE718, 16);
-  addKey("AMP_TAPE2", Unmapped_Key, 0xE619, 16);
-  addKey("AMP_TUNER", Unmapped_Key, 0xE916, 16);
-  addKey("AMP_CD", Unmapped_Key, 0xEA15, 16);
-  addKey("AMP_PHONO", Unmapped_Key, 0xEB14, 16);
-  addKey("AMP_SLEEP", Sleep_Key, 0xA857, 16);
-  addKey("AMP_POWER", Power_Key, 0xE01F, 16);
-  addKey("VOL_UP", VolumeUp_Key, 0xE51A, 16);
-  addKey("VOL_DOWN", VolumeDown_Key, 0xE41B, 16);
-  addKey("TUNER_PRESET_+", ChannelUp_Key, 0xEF10, 16);
-  addKey("TUNER_PRESET_-", ChannelDown_Key, 0xEE11, 16);
-  addKey("TUNER_ABCDE", TunerBand_Key, 0xED12, 16);
-  addKey("EQ_PRESET_SKIP", Unmapped_Key, 0xA45B, 16);
-  addKey("EQ_ON/FLAT", Unmapped_Key, 0xA55A, 16);
-  addKey("PHONO_PLAY/CUT", Unmapped_Key, 0xF10E, 16);
-}
-
-
-YamahaAudio5::YamahaAudio5(
-  QObject *guiObject,
-  unsigned int index)
-  : PIRKeysetMetaData(
-      "Audio Keyset 5",
-      Yamaha_Make,
-      index)
-{
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
-
-//  setPreData(0xA25D, 16);
-  setPreData(0x45, 8);
-
-  addKey("Pause", Pause_Key, 0x00, 8);
-  addKey("1", One_Key, 0x01, 8);
-  addKey("2", Two_Key, 0x02, 8);
-  addKey("3", Three_Key, 0x03, 8);
-  addKey("4", Four_Key, 0x04, 8);
-  addKey("5", Five_Key, 0x05, 8);
-  addKey("6", Six_Key, 0x06, 8);
-  addKey("7", Seven_Key, 0x07, 8);
-  addKey("8", Eight_Key, 0x08, 8);
-  addKey("9", Nine_Key, 0x09, 8);
-  addKey("0", Zero_Key, 0x0A, 8);
-  addKey("Power", Power_Key, 0x12, 8);
-  addKey("Forward", FastForward_Key, 0x13, 8);
-  addKey("Stop", Stop_Key, 0x14, 8);
-  addKey("Play", Play_Key, 0x15, 8);
-  addKey("Display", Info_Key, 0x16, 8);
-  addKey("Rewind", Rewind_Key, 0x19, 8);
-  addKey("Select", Select_Key, 0x21, 8);
-  addKey("Return", Exit_Key, 0x22, 8);
-  addKey("SkipBack", Replay_Key, 0x23, 8);
-  addKey("SkipForward", Advance_Key, 0x24, 8);
-  addKey("+10", DoubleDigit_Key, 0x25, 8);
-  addKey("Index", Unmapped_Key, 0x26, 8);
-  addKey("Right", Right_Key, 0x4D, 8);
-  addKey("Left", Left_Key, 0x51, 8);
-  addKey("Up", Up_Key, 0x80, 8);
-  addKey("Down", Down_Key, 0x81, 8);
-  addKey("Menu", DiscMenu_Key, 0x84, 8);
-  addKey("Title", DiscTitle_Key, 0xDE, 8);
-  addKey("Clear", Clear_Key, 0xEF, 8);
-}
+  addControlledDevice(Yamaha_Make, "GX-50", Audio_Device);
 
-
-YamahaAudio6::YamahaAudio6(
-  QObject *guiObject,
-  unsigned int index)
-  : PIRKeysetMetaData(
-      "Audio Keyset 6",
-      Yamaha_Make,
-      index)
-{
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
-
-//  setPreData(0x8B74, 16);
-  setPreData(0xD1, 8);
-
-  addKey("A/B/C/D/E", TunerBand_Key, 0x0D, 8);
-  addKey("1", One_Key, 0x0E, 8);
-  addKey("2", Two_Key, 0x0F, 8);
-  addKey("3", Three_Key, 0x10, 8);
-  addKey("4", Four_Key, 0x11, 8);
-  addKey("5", Five_Key, 0x12, 8);
-  addKey("6", Six_Key, 0x13, 8);
-  addKey("7", Seven_Key, 0x14, 8);
-  addKey("8", Eight_Key, 0x15, 8);
-}
-
-
-YamahaAudio7::YamahaAudio7(
-  QObject *guiObject,
-  unsigned int index)
-  : PIRKeysetMetaData(
-      "Audio Keyset 7",
-      Yamaha_Make,
-      index)
-{
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x1EE1, 16);
   setPreData(0x78, 8);
@@ -498,7 +384,7 @@ YamahaAudio7::YamahaAudio7(
   addKey("time", Unmapped_Key, 0x0A, 8);
   addKey("prog", Program_Key, 0x0B, 8);
   addKey("repeat", Repeat_Key, 0x0C, 8);
-  addKey("disc_skip", DiscSelect_Key, 0x0D, 8);
+  addKey("disc_skip", NextDisc_Key, 0x0D, 8);
   addKey("power", Power_Key, 0x0F, 8);
   addKey("0", Zero_Key, 0x10, 8);
   addKey("1", One_Key, 0x11, 8);
@@ -543,7 +429,7 @@ YamahaTV1::YamahaTV1(
       Yamaha_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x20DF, 16);
   setPreData(0x04, 8);
@@ -575,7 +461,7 @@ YamahaKaraoke1::YamahaKaraoke1(
       Yamaha_Make,
       index)
 {
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0xDE21, 16);
   setPreData(0x7B, 8);
@@ -583,12 +469,12 @@ YamahaKaraoke1::YamahaKaraoke1(
   addKey("POWER", Power_Key, 0x80, 8);
   addKey("VOL+", VolumeUp_Key, 0x82, 8);
   addKey("VOL-", VolumeDown_Key, 0x83, 8);
-  addKey("LD", Unmapped_Key, 0x8C, 8);
-  addKey("CD/CDG", Unmapped_Key, 0x8D, 8);
-  addKey("VCR", Unmapped_Key, 0x8E, 8);
-  addKey("TAPE", Unmapped_Key, 0x8F, 8);
+  addKey("LD", LDInput_Key, 0x8C, 8);
+  addKey("CD/CDG", CDInput_Key, 0x8D, 8);
+  addKey("VCR", VCRInput_Key, 0x8E, 8);
+  addKey("TAPE", TapeInput_Key, 0x8F, 8);
   addKey("AUX2", Unmapped_Key, 0x90, 8);
-  addKey("AUX1", Unmapped_Key, 0x91, 8);
+  addKey("AUX1", AuxInput_Key, 0x91, 8);
   addKey("B_SYMBOL", Unmapped_Key, 0x96, 8);
   addKey("SQUARE_SYMBOL", Unmapped_Key, 0x97, 8);
   addKey("HASH", Unmapped_Key, 0x98, 8);
index 3ce4c5a..8811777 100644 (file)
@@ -93,30 +93,6 @@ public:
     unsigned int index);
 };
 
-class YamahaAudio5: public PIRKeysetMetaData
-{
-public:
-  YamahaAudio5(
-    QObject *guiObject,
-    unsigned int index);
-};
-
-class YamahaAudio6: public PIRKeysetMetaData
-{
-public:
-  YamahaAudio6(
-    QObject *guiObject,
-    unsigned int index);
-};
-
-class YamahaAudio7: public PIRKeysetMetaData
-{
-public:
-  YamahaAudio7(
-    QObject *guiObject,
-    unsigned int index);
-};
-
 class YamahaTV1: public PIRKeysetMetaData
 {
 public:
index 2532e13..3b129e6 100644 (file)
@@ -1,5 +1,5 @@
 #include "zenith.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
 
 // Based solely on LIRC Zenith_C32V37 config file
 ZenithC32V37::ZenithC32V37(
@@ -12,7 +12,7 @@ ZenithC32V37::ZenithC32V37(
 {
   addControlledDevice(Zenith_Make, "C32V37", TV_Device);
 
-  threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x20DF, 16);
   setPreData(0x04, 8);
@@ -49,7 +49,7 @@ ZenithC32V37::ZenithC32V37(
   addKey("front", Unmapped_Key, 0x51, 8);
   addKey("exit", Exit_Key, 0x5B, 8);
   addKey("pip", PIP_Key, 0x60, 8);
-  addKey("pcin", Unmapped_Key, 0x61, 8);
+  addKey("pcin", PCInput_Key, 0x61, 8);
   addKey("swap", PIPSwap_Key, 0x63, 8);
   addKey("freeze", PIPPause_Key, 0x65, 8);
   addKey("pipch+", PIPChannelUp_Key, 0x71, 8);
index 405fcff..25a348a 100644 (file)
@@ -33,6 +33,7 @@ MainWindow::MainWindow(QWidget *parent)
   : QMainWindow(parent),
     ui(new Ui::MainWindow),
     selectKeysetForm(0),
+    secondaryForm(0),
     documentationForm(0),
     aboutForm(0),
     currentKeyset(0)
@@ -48,6 +49,9 @@ MainWindow::MainWindow(QWidget *parent)
   // Set up the keyset selection window:
   selectKeysetForm = new PIRSelectKeysetForm(this);
 
+  // Set up the secondary buttons window:
+  secondaryForm = new PIRSecondaryForm(this);
+
   myKeysets->populateGuiWidget(selectKeysetForm);
 
   // Remember any favorites the user has already set:
@@ -64,6 +68,7 @@ MainWindow::MainWindow(QWidget *parent)
   }
 
   enableButtons();
+  secondaryForm->enableButtons(myKeysets, currentKeyset);
 
   connect(
     ui->favoriteKeysetsWidget,
@@ -243,9 +248,10 @@ void MainWindow::enableButtons()
   emit stopEnabled(myKeysets->hasKey(currentKeyset, Stop_Key));
   emit ejectEnabled(myKeysets->hasKey(currentKeyset, Eject_Key));
 
+/*
   // Media2 keys:
   emit discTitleEnabled(myKeysets->hasKey(currentKeyset, DiscTitle_Key));
-  emit discSelectEnabled(myKeysets->hasKey(currentKeyset, DiscSelect_Key));
+  emit discSelectEnabled(myKeysets->hasKey(currentKeyset, NextDisc_Key));
   emit vhsSpeedEnabled(myKeysets->hasKey(currentKeyset, VHSSpeed_Key));
   emit trackingMinusEnabled(myKeysets->hasKey(currentKeyset, TrackingMinus_Key));
   emit trackingPlusEnabled(myKeysets->hasKey(currentKeyset, TrackingPlus_Key));
@@ -278,6 +284,7 @@ void MainWindow::enableButtons()
   emit pipChannelDownEnabled(myKeysets->hasKey(currentKeyset, PIPChannelDown_Key));
   emit pipPauseEnabled(myKeysets->hasKey(currentKeyset, PIPPause_Key));
   emit pipSizeEnabled(myKeysets->hasKey(currentKeyset, PIPSize_Key));
+*/
 }
 
 
@@ -295,7 +302,7 @@ void MainWindow::receivedExternalWarning(
 
 void MainWindow::on_powerButton_pressed()
 {
-  startRepeating(currentKeyset, Power_Key);
+  startRepeating(Power_Key);
 }
 
 void MainWindow::on_powerButton_released()
@@ -305,7 +312,7 @@ void MainWindow::on_powerButton_released()
 
 void MainWindow::on_mainChannelUpButton_pressed()
 {
-  startRepeating(currentKeyset, ChannelUp_Key);
+  startRepeating(ChannelUp_Key);
 }
 
 void MainWindow::on_mainChannelUpButton_released()
@@ -315,7 +322,7 @@ void MainWindow::on_mainChannelUpButton_released()
 
 void MainWindow::on_mainChannelDownButton_pressed()
 {
-  startRepeating(currentKeyset, ChannelDown_Key);
+  startRepeating(ChannelDown_Key);
 }
 
 void MainWindow::on_mainChannelDownButton_released()
@@ -325,7 +332,7 @@ void MainWindow::on_mainChannelDownButton_released()
 
 void MainWindow::on_mainVolumeUp_pressed()
 {
-  startRepeating(currentKeyset, VolumeUp_Key);
+  startRepeating(VolumeUp_Key);
 }
 
 void MainWindow::on_mainVolumeUp_released()
@@ -335,7 +342,7 @@ void MainWindow::on_mainVolumeUp_released()
 
 void MainWindow::on_mainVolumeDownButton_pressed()
 {
-  startRepeating(currentKeyset, VolumeDown_Key);
+  startRepeating(VolumeDown_Key);
 }
 
 void MainWindow::on_mainVolumeDownButton_released()
@@ -348,7 +355,7 @@ void MainWindow::on_mainVolumeDownButton_released()
 
 void MainWindow::on_redButton_pressed()
 {
-  startRepeating(currentKeyset, Red_Key);
+  startRepeating(Red_Key);
 }
 
 void MainWindow::on_redButton_released()
@@ -358,7 +365,7 @@ void MainWindow::on_redButton_released()
 
 void MainWindow::on_greenButton_pressed()
 {
-  startRepeating(currentKeyset, Green_Key);
+  startRepeating(Green_Key);
 }
 
 void MainWindow::on_greenButton_released()
@@ -368,7 +375,7 @@ void MainWindow::on_greenButton_released()
 
 void MainWindow::on_yellowButton_pressed()
 {
-  startRepeating(currentKeyset, Yellow_Key);
+  startRepeating(Yellow_Key);
 }
 
 void MainWindow::on_yellowButton_released()
@@ -378,7 +385,7 @@ void MainWindow::on_yellowButton_released()
 
 void MainWindow::on_blueButton_pressed()
 {
-  startRepeating(currentKeyset, Blue_Key);
+  startRepeating(Blue_Key);
 }
 
 void MainWindow::on_blueButton_released()
@@ -388,7 +395,7 @@ void MainWindow::on_blueButton_released()
 
 void MainWindow::on_aspectRatioButton_pressed()
 {
-  startRepeating(currentKeyset, AspectRatio_Key);
+  startRepeating(AspectRatio_Key);
 }
 
 void MainWindow::on_aspectRatioButton_released()
@@ -398,7 +405,7 @@ void MainWindow::on_aspectRatioButton_released()
 
 void MainWindow::on_surroundButton_pressed()
 {
-  startRepeating(currentKeyset, Surround_Key);
+  startRepeating(Surround_Key);
 }
 
 void MainWindow::on_surroundButton_released()
@@ -408,7 +415,7 @@ void MainWindow::on_surroundButton_released()
 
 void MainWindow::on_audioButton_pressed()
 {
-  startRepeating(currentKeyset, Audio_Key);
+  startRepeating(Audio_Key);
 }
 
 void MainWindow::on_audioButton_released()
@@ -418,7 +425,7 @@ void MainWindow::on_audioButton_released()
 
 void MainWindow::on_infoButton_pressed()
 {
-  startRepeating(currentKeyset, Info_Key);
+  startRepeating(Info_Key);
 }
 
 void MainWindow::on_infoButton_released()
@@ -428,7 +435,7 @@ void MainWindow::on_infoButton_released()
 
 void MainWindow::on_captionButton_pressed()
 {
-  startRepeating(currentKeyset, Captions_Key);
+  startRepeating(Captions_Key);
 }
 
 void MainWindow::on_captionButton_released()
@@ -438,7 +445,7 @@ void MainWindow::on_captionButton_released()
 
 void MainWindow::on_inputButton_pressed()
 {
-  startRepeating(currentKeyset, Input_Key);
+  startRepeating(Input_Key);
 }
 
 void MainWindow::on_inputButton_released()
@@ -448,7 +455,7 @@ void MainWindow::on_inputButton_released()
 
 void MainWindow::on_sleepButton_pressed()
 {
-  startRepeating(currentKeyset, Sleep_Key);
+  startRepeating(Sleep_Key);
 }
 
 void MainWindow::on_sleepButton_released()
@@ -458,7 +465,7 @@ void MainWindow::on_sleepButton_released()
 
 void MainWindow::on_muteButton_pressed()
 {
-  startRepeating(currentKeyset, Mute_Key);
+  startRepeating(Mute_Key);
 }
 
 void MainWindow::on_muteButton_released()
@@ -471,7 +478,7 @@ void MainWindow::on_muteButton_released()
 
 void MainWindow::on_oneButton_pressed()
 {
-  startRepeating(currentKeyset, One_Key);
+  startRepeating(One_Key);
 }
 
 void MainWindow::on_oneButton_released()
@@ -481,7 +488,7 @@ void MainWindow::on_oneButton_released()
 
 void MainWindow::on_twoButton_pressed()
 {
-  startRepeating(currentKeyset, Two_Key);
+  startRepeating(Two_Key);
 }
 
 void MainWindow::on_twoButton_released()
@@ -491,7 +498,7 @@ void MainWindow::on_twoButton_released()
 
 void MainWindow::on_threeButton_pressed()
 {
-  startRepeating(currentKeyset, Three_Key);
+  startRepeating(Three_Key);
 }
 
 void MainWindow::on_threeButton_released()
@@ -501,7 +508,7 @@ void MainWindow::on_threeButton_released()
 
 void MainWindow::on_fourButton_pressed()
 {
-  startRepeating(currentKeyset, Four_Key);
+  startRepeating(Four_Key);
 }
 
 void MainWindow::on_fourButton_released()
@@ -511,7 +518,7 @@ void MainWindow::on_fourButton_released()
 
 void MainWindow::on_fiveButton_pressed()
 {
-  startRepeating(currentKeyset, Five_Key);
+  startRepeating(Five_Key);
 }
 
 void MainWindow::on_fiveButton_released()
@@ -521,7 +528,7 @@ void MainWindow::on_fiveButton_released()
 
 void MainWindow::on_sixButton_pressed()
 {
-  startRepeating(currentKeyset, Six_Key);
+  startRepeating(Six_Key);
 }
 
 void MainWindow::on_sixButton_released()
@@ -531,7 +538,7 @@ void MainWindow::on_sixButton_released()
 
 void MainWindow::on_sevenButton_pressed()
 {
-  startRepeating(currentKeyset, Seven_Key);
+  startRepeating(Seven_Key);
 }
 
 void MainWindow::on_sevenButton_released()
@@ -541,7 +548,7 @@ void MainWindow::on_sevenButton_released()
 
 void MainWindow::on_eightButton_pressed()
 {
-  startRepeating(currentKeyset, Eight_Key);
+  startRepeating(Eight_Key);
 }
 
 void MainWindow::on_eightButton_released()
@@ -551,7 +558,7 @@ void MainWindow::on_eightButton_released()
 
 void MainWindow::on_nineButton_pressed()
 {
-  startRepeating(currentKeyset, Nine_Key);
+  startRepeating(Nine_Key);
 }
 
 void MainWindow::on_nineButton_released()
@@ -561,7 +568,7 @@ void MainWindow::on_nineButton_released()
 
 void MainWindow::on_zeroButton_pressed()
 {
-  startRepeating(currentKeyset, Zero_Key);
+  startRepeating(Zero_Key);
 }
 
 void MainWindow::on_zeroButton_released()
@@ -571,7 +578,7 @@ void MainWindow::on_zeroButton_released()
 
 void MainWindow::on_enterButton_pressed()
 {
-  startRepeating(currentKeyset, Enter_Key);
+  startRepeating(Enter_Key);
 }
 
 void MainWindow::on_enterButton_released()
@@ -581,7 +588,7 @@ void MainWindow::on_enterButton_released()
 
 void MainWindow::on_clearButton_pressed()
 {
-  startRepeating(currentKeyset, Clear_Key);
+  startRepeating(Clear_Key);
 }
 
 void MainWindow::on_clearButton_released()
@@ -591,7 +598,7 @@ void MainWindow::on_clearButton_released()
 
 void MainWindow::on_prevChannelButton_pressed()
 {
-  startRepeating(currentKeyset, PrevChannel_Key);
+  startRepeating(PrevChannel_Key);
 }
 
 void MainWindow::on_prevChannelButton_released()
@@ -601,7 +608,7 @@ void MainWindow::on_prevChannelButton_released()
 
 void MainWindow::on_plusOneHundredButton_pressed()
 {
-  startRepeating(currentKeyset, PlusOneHundred_Key);
+  startRepeating(PlusOneHundred_Key);
 }
 
 void MainWindow::on_plusOneHundredButton_released()
@@ -611,7 +618,7 @@ void MainWindow::on_plusOneHundredButton_released()
 
 void MainWindow::on_dashButton_pressed()
 {
-  startRepeating(currentKeyset, Dash_Key);
+  startRepeating(Dash_Key);
 }
 
 void MainWindow::on_dashButton_released()
@@ -621,7 +628,7 @@ void MainWindow::on_dashButton_released()
 
 void MainWindow::on_doubleDigitButton_pressed()
 {
-  startRepeating(currentKeyset, DoubleDigit_Key);
+  startRepeating(DoubleDigit_Key);
 }
 
 void MainWindow::on_doubleDigitButton_released()
@@ -634,7 +641,7 @@ void MainWindow::on_doubleDigitButton_released()
 
 void MainWindow::on_upButton_pressed()
 {
-  startRepeating(currentKeyset, Up_Key);
+  startRepeating(Up_Key);
 }
 
 void MainWindow::on_upButton_released()
@@ -644,7 +651,7 @@ void MainWindow::on_upButton_released()
 
 void MainWindow::on_leftButton_pressed()
 {
-  startRepeating(currentKeyset, Left_Key);
+  startRepeating(Left_Key);
 }
 
 void MainWindow::on_leftButton_released()
@@ -654,7 +661,7 @@ void MainWindow::on_leftButton_released()
 
 void MainWindow::on_rightButton_pressed()
 {
-  startRepeating(currentKeyset, Right_Key);
+  startRepeating(Right_Key);
 }
 
 void MainWindow::on_rightButton_released()
@@ -664,7 +671,7 @@ void MainWindow::on_rightButton_released()
 
 void MainWindow::on_downButton_pressed()
 {
-  startRepeating(currentKeyset, Down_Key);
+  startRepeating(Down_Key);
 }
 
 void MainWindow::on_downButton_released()
@@ -674,7 +681,7 @@ void MainWindow::on_downButton_released()
 
 void MainWindow::on_selectButton_pressed()
 {
-  startRepeating(currentKeyset, Select_Key);
+  startRepeating(Select_Key);
 }
 
 void MainWindow::on_selectButton_released()
@@ -684,7 +691,7 @@ void MainWindow::on_selectButton_released()
 
 void MainWindow::on_menuButton_pressed()
 {
-  startRepeating(currentKeyset, Menu_Key);
+  startRepeating(Menu_Key);
 }
 
 void MainWindow::on_menuButton_released()
@@ -694,7 +701,7 @@ void MainWindow::on_menuButton_released()
 
 void MainWindow::on_exitButton_pressed()
 {
-  startRepeating(currentKeyset, Exit_Key);
+  startRepeating(Exit_Key);
 }
 
 void MainWindow::on_exitButton_released()
@@ -704,7 +711,7 @@ void MainWindow::on_exitButton_released()
 
 void MainWindow::on_guideButton_pressed()
 {
-  startRepeating(currentKeyset, Guide_Key);
+  startRepeating(Guide_Key);
 }
 
 void MainWindow::on_guideButton_released()
@@ -714,7 +721,7 @@ void MainWindow::on_guideButton_released()
 
 void MainWindow::on_discMenuButton_pressed()
 {
-  startRepeating(currentKeyset, DiscMenu_Key);
+  startRepeating(DiscMenu_Key);
 }
 
 void MainWindow::on_discMenuButton_released()
@@ -727,7 +734,7 @@ void MainWindow::on_discMenuButton_released()
 
 void MainWindow::on_mediaPreviousButton_pressed()
 {
-  startRepeating(currentKeyset, Previous_Key);
+  startRepeating(Previous_Key);
 }
 
 void MainWindow::on_mediaPreviousButton_released()
@@ -737,7 +744,7 @@ void MainWindow::on_mediaPreviousButton_released()
 
 void MainWindow::on_mediaNextButton_pressed()
 {
-  startRepeating(currentKeyset, Next_Key);
+  startRepeating(Next_Key);
 }
 
 void MainWindow::on_mediaNextButton_released()
@@ -747,7 +754,7 @@ void MainWindow::on_mediaNextButton_released()
 
 void MainWindow::on_replayButton_pressed()
 {
-  startRepeating(currentKeyset, Replay_Key);
+  startRepeating(Replay_Key);
 }
 
 void MainWindow::on_replayButton_released()
@@ -757,7 +764,7 @@ void MainWindow::on_replayButton_released()
 
 void MainWindow::on_advanceButton_pressed()
 {
-  startRepeating(currentKeyset, Advance_Key);
+  startRepeating(Advance_Key);
 }
 
 void MainWindow::on_advanceButton_released()
@@ -767,7 +774,7 @@ void MainWindow::on_advanceButton_released()
 
 void MainWindow::on_stepBackButton_pressed()
 {
-  startRepeating(currentKeyset, StepBack_Key);
+  startRepeating(StepBack_Key);
 }
 
 void MainWindow::on_stepBackButton_released()
@@ -777,7 +784,7 @@ void MainWindow::on_stepBackButton_released()
 
 void MainWindow::on_stepForwardButton_pressed()
 {
-  startRepeating(currentKeyset, StepForward_Key);
+  startRepeating(StepForward_Key);
 }
 
 void MainWindow::on_stepForwardButton_released()
@@ -787,7 +794,7 @@ void MainWindow::on_stepForwardButton_released()
 
 void MainWindow::on_reverseButton_pressed()
 {
-  startRepeating(currentKeyset, Rewind_Key);
+  startRepeating(Rewind_Key);
 }
 
 void MainWindow::on_reverseButton_released()
@@ -797,7 +804,7 @@ void MainWindow::on_reverseButton_released()
 
 void MainWindow::on_fastForwardButton_pressed()
 {
-  startRepeating(currentKeyset, FastForward_Key);
+  startRepeating(FastForward_Key);
 }
 
 void MainWindow::on_fastForwardButton_released()
@@ -807,7 +814,7 @@ void MainWindow::on_fastForwardButton_released()
 
 void MainWindow::on_playButton_pressed()
 {
-  startRepeating(currentKeyset, Play_Key);
+  startRepeating(Play_Key);
 }
 
 void MainWindow::on_playButton_released()
@@ -817,7 +824,7 @@ void MainWindow::on_playButton_released()
 
 void MainWindow::on_pauseButton_pressed()
 {
-  startRepeating(currentKeyset, Pause_Key);
+  startRepeating(Pause_Key);
 }
 
 void MainWindow::on_pauseButton_released()
@@ -827,7 +834,7 @@ void MainWindow::on_pauseButton_released()
 
 void MainWindow::on_stopButton_pressed()
 {
-  startRepeating(currentKeyset, Stop_Key);
+  startRepeating(Stop_Key);
 }
 
 void MainWindow::on_stopButton_released()
@@ -837,7 +844,7 @@ void MainWindow::on_stopButton_released()
 
 void MainWindow::on_ejectButton_pressed()
 {
-  startRepeating(currentKeyset, Eject_Key);
+  startRepeating(Eject_Key);
 }
 
 void MainWindow::on_ejectButton_released()
@@ -846,11 +853,12 @@ void MainWindow::on_ejectButton_released()
 }
 
 
+/*
 // Media2 tab slots:
 
 void MainWindow::on_discTitleButton_pressed()
 {
-  startRepeating(currentKeyset, DiscTitle_Key);
+  startRepeating(DiscTitle_Key);
 }
 
 void MainWindow::on_discTitleButton_released()
@@ -860,7 +868,7 @@ void MainWindow::on_discTitleButton_released()
 
 void MainWindow::on_discSelectButton_pressed()
 {
-  startRepeating(currentKeyset, DiscSelect_Key);
+  startRepeating(NextDisc_Key);
 }
 
 void MainWindow::on_discSelectButton_released()
@@ -870,7 +878,7 @@ void MainWindow::on_discSelectButton_released()
 
 void MainWindow::on_vhsSpeedButton_pressed()
 {
-  startRepeating(currentKeyset, VHSSpeed_Key);
+  startRepeating(VHSSpeed_Key);
 }
 
 void MainWindow::on_vhsSpeedButton_released()
@@ -880,7 +888,7 @@ void MainWindow::on_vhsSpeedButton_released()
 
 void MainWindow::on_trackingPlusButton_pressed()
 {
-  startRepeating(currentKeyset, TrackingPlus_Key);
+  startRepeating(TrackingPlus_Key);
 }
 
 void MainWindow::on_trackingPlusButton_released()
@@ -890,7 +898,7 @@ void MainWindow::on_trackingPlusButton_released()
 
 void MainWindow::on_trackingMinusButton_pressed()
 {
-  startRepeating(currentKeyset, TrackingMinus_Key);
+  startRepeating(TrackingMinus_Key);
 }
 
 void MainWindow::on_trackingMinusButton_released()
@@ -900,7 +908,7 @@ void MainWindow::on_trackingMinusButton_released()
 
 void MainWindow::on_autoTrackingButton_pressed()
 {
-  startRepeating(currentKeyset, AutoTracking_Key);
+  startRepeating(AutoTracking_Key);
 }
 
 void MainWindow::on_autoTrackingButton_released()
@@ -910,7 +918,7 @@ void MainWindow::on_autoTrackingButton_released()
 
 void MainWindow::on_pageUpButton_pressed()
 {
-  startRepeating(currentKeyset, PageUp_Key);
+  startRepeating(PageUp_Key);
 }
 
 void MainWindow::on_pageUpButton_released()
@@ -920,7 +928,7 @@ void MainWindow::on_pageUpButton_released()
 
 void MainWindow::on_pageDownButton_pressed()
 {
-  startRepeating(currentKeyset, PageDown_Key);
+  startRepeating(PageDown_Key);
 }
 
 void MainWindow::on_pageDownButton_released()
@@ -930,7 +938,7 @@ void MainWindow::on_pageDownButton_released()
 
 void MainWindow::on_slowButton_pressed()
 {
-  startRepeating(currentKeyset, Slow_Key);
+  startRepeating(Slow_Key);
 }
 
 void MainWindow::on_slowButton_released()
@@ -940,7 +948,7 @@ void MainWindow::on_slowButton_released()
 
 void MainWindow::on_slowMinusButton_pressed()
 {
-  startRepeating(currentKeyset, SlowMinus_Key);
+  startRepeating(SlowMinus_Key);
 }
 
 void MainWindow::on_slowMinusButton_released()
@@ -950,7 +958,7 @@ void MainWindow::on_slowMinusButton_released()
 
 void MainWindow::on_slowPlusButton_pressed()
 {
-  startRepeating(currentKeyset, SlowPlus_Key);
+  startRepeating(SlowPlus_Key);
 }
 
 void MainWindow::on_slowPlusButton_released()
@@ -960,7 +968,7 @@ void MainWindow::on_slowPlusButton_released()
 
 void MainWindow::on_programButton_pressed()
 {
-  startRepeating(currentKeyset, Program_Key);
+  startRepeating(Program_Key);
 }
 
 void MainWindow::on_programButton_released()
@@ -970,7 +978,7 @@ void MainWindow::on_programButton_released()
 
 void MainWindow::on_tunerBandButton_pressed()
 {
-  startRepeating(currentKeyset, TunerBand_Key);
+  startRepeating(TunerBand_Key);
 }
 
 void MainWindow::on_tunerBandButton_released()
@@ -980,7 +988,7 @@ void MainWindow::on_tunerBandButton_released()
 
 void MainWindow::on_repeatButton_pressed()
 {
-  startRepeating(currentKeyset, Repeat_Key);
+  startRepeating(Repeat_Key);
 }
 
 void MainWindow::on_repeatButton_released()
@@ -990,7 +998,7 @@ void MainWindow::on_repeatButton_released()
 
 void MainWindow::on_repeatABButton_pressed()
 {
-  startRepeating(currentKeyset, RepeatAB_Key);
+  startRepeating(RepeatAB_Key);
 }
 
 void MainWindow::on_repeatABButton_released()
@@ -1000,7 +1008,7 @@ void MainWindow::on_repeatABButton_released()
 
 void MainWindow::on_randomButton_pressed()
 {
-  startRepeating(currentKeyset, Random_Key);
+  startRepeating(Random_Key);
 }
 
 void MainWindow::on_randomButton_released()
@@ -1013,7 +1021,7 @@ void MainWindow::on_randomButton_released()
 
 void MainWindow::on_pictureModeButton_pressed()
 {
-  startRepeating(currentKeyset, PictureMode_Key);
+  startRepeating(PictureMode_Key);
 }
 
 void MainWindow::on_pictureModeButton_released()
@@ -1023,7 +1031,7 @@ void MainWindow::on_pictureModeButton_released()
 
 void MainWindow::on_soundModeButton_pressed()
 {
-  startRepeating(currentKeyset, SoundMode_Key);
+  startRepeating(SoundMode_Key);
 }
 
 void MainWindow::on_soundModeButton_released()
@@ -1033,7 +1041,7 @@ void MainWindow::on_soundModeButton_released()
 
 void MainWindow::on_liveTVButton_pressed()
 {
-  startRepeating(currentKeyset, LiveTV_Key);
+  startRepeating(LiveTV_Key);
 }
 
 void MainWindow::on_liveTVButton_released()
@@ -1043,7 +1051,7 @@ void MainWindow::on_liveTVButton_released()
 
 void MainWindow::on_favoritesButton_pressed()
 {
-  startRepeating(currentKeyset, Favorites_Key);
+  startRepeating(Favorites_Key);
 }
 
 void MainWindow::on_favoritesButton_released()
@@ -1053,7 +1061,7 @@ void MainWindow::on_favoritesButton_released()
 
 void MainWindow::on_teletextButton_pressed()
 {
-  startRepeating(currentKeyset, Teletext_Key);
+  startRepeating(Teletext_Key);
 }
 
 void MainWindow::on_teletextButton_released()
@@ -1063,7 +1071,7 @@ void MainWindow::on_teletextButton_released()
 
 void MainWindow::on_teletextHoldButton_pressed()
 {
-  startRepeating(currentKeyset, TeletextHold_Key);
+  startRepeating(TeletextHold_Key);
 }
 
 void MainWindow::on_teletextHoldButton_released()
@@ -1073,7 +1081,7 @@ void MainWindow::on_teletextHoldButton_released()
 
 void MainWindow::on_teletextRevealButton_pressed()
 {
-  startRepeating(currentKeyset, TeletextReveal_Key);
+  startRepeating(TeletextReveal_Key);
 }
 
 void MainWindow::on_teletextRevealButton_released()
@@ -1083,7 +1091,7 @@ void MainWindow::on_teletextRevealButton_released()
 
 void MainWindow::on_teletextSizeButton_pressed()
 {
-  startRepeating(currentKeyset, TeletextSize_Key);
+  startRepeating(TeletextSize_Key);
 }
 
 void MainWindow::on_teletextSizeButton_released()
@@ -1093,7 +1101,7 @@ void MainWindow::on_teletextSizeButton_released()
 
 void MainWindow::on_pipOnOffButton_pressed()
 {
-  startRepeating(currentKeyset, PIP_Key);
+  startRepeating(PIP_Key);
 }
 
 void MainWindow::on_pipOnOffButton_released()
@@ -1103,7 +1111,7 @@ void MainWindow::on_pipOnOffButton_released()
 
 void MainWindow::on_pipSwapButton_pressed()
 {
-  startRepeating(currentKeyset, PIPSwap_Key);
+  startRepeating(PIPSwap_Key);
 }
 
 void MainWindow::on_pipSwapButton_released()
@@ -1113,7 +1121,7 @@ void MainWindow::on_pipSwapButton_released()
 
 void MainWindow::on_pipPositionButton_pressed()
 {
-  startRepeating(currentKeyset, PIPMove_Key);
+  startRepeating(PIPMove_Key);
 }
 
 void MainWindow::on_pipPositionButton_released()
@@ -1123,7 +1131,7 @@ void MainWindow::on_pipPositionButton_released()
 
 void MainWindow::on_pipSourceButton_pressed()
 {
-  startRepeating(currentKeyset, PIPSource_Key);
+  startRepeating(PIPSource_Key);
 }
 
 void MainWindow::on_pipSourceButton_released()
@@ -1133,7 +1141,7 @@ void MainWindow::on_pipSourceButton_released()
 
 void MainWindow::on_pipChannelUpButton_pressed()
 {
-  startRepeating(currentKeyset, PIPChannelUp_Key);
+  startRepeating(PIPChannelUp_Key);
 }
 
 void MainWindow::on_pipChannelUpButton_released()
@@ -1143,7 +1151,7 @@ void MainWindow::on_pipChannelUpButton_released()
 
 void MainWindow::on_pipChannelDownButton_pressed()
 {
-  startRepeating(currentKeyset, PIPChannelDown_Key);
+  startRepeating(PIPChannelDown_Key);
 }
 
 void MainWindow::on_pipChannelDownButton_released()
@@ -1153,7 +1161,7 @@ void MainWindow::on_pipChannelDownButton_released()
 
 void MainWindow::on_pipPauseButton_pressed()
 {
-  startRepeating(currentKeyset, PIPPause_Key);
+  startRepeating(PIPPause_Key);
 }
 
 void MainWindow::on_pipPauseButton_released()
@@ -1163,13 +1171,14 @@ void MainWindow::on_pipPauseButton_released()
 
 void MainWindow::on_pipSizeButton_pressed()
 {
-  startRepeating(currentKeyset, PIPSize_Key);
+  startRepeating(PIPSize_Key);
 }
 
 void MainWindow::on_pipSizeButton_released()
 {
   stopRepeating();
 }
+*/
 
 
 
@@ -1180,6 +1189,16 @@ void MainWindow::on_actionSelectKeyset_triggered()
   selectKeysetForm->show();
 }
 
+void MainWindow::on_actionSecondary_Buttons_triggered()
+{
+  if (!secondaryForm)
+  {
+    secondaryForm = new PIRSecondaryForm(this);
+  }
+
+  secondaryForm->show();
+}
+
 void MainWindow::on_actionAbout_triggered()
 {
   if (!aboutForm)
@@ -1226,6 +1245,7 @@ void MainWindow::keysetSelectionChanged(
     myKeysets->getDisplayName(currentKeyset));
 
   enableButtons();
+  secondaryForm->enableButtons(myKeysets, currentKeyset);
 }
 
 
@@ -1375,14 +1395,13 @@ void MainWindow::populateFavorites()
 
 
 void MainWindow::startRepeating(
-  unsigned int id,
   PIRKeyName name)
 {
   QMutexLocker locker(&commandIFMutex);
   if (!commandInFlight)
   {
     commandInFlight = true;
-    emit buttonPressed(id, name);
+    emit buttonPressed(currentKeyset, name);
   }
 }
 
@@ -1392,3 +1411,4 @@ void MainWindow::stopRepeating()
   QMutexLocker locker(&stopRepeatingMutex);
   stopRepeatingFlag = true;
 }
+
index b80c2ca..0a6f601 100644 (file)
@@ -5,7 +5,7 @@
 #include <QListWidgetItem>
 //#include <QThread>
 
-//#include "selectionwindow.h"
+#include "pirsecondaryform.h"
 #include "pirselectkeysetform.h"
 #include "pirdocumentationform.h"
 #include "piraboutform.h"
@@ -35,6 +35,11 @@ public:
 
   void showExpanded();
 
+  void startRepeating(
+    PIRKeyName name);
+
+  void stopRepeating();
+
 signals:
   // Main keys
   void powerEnabled(bool);
@@ -100,6 +105,7 @@ signals:
   void replayEnabled(bool);
   void ejectEnabled(bool);
 
+/*
   // Media2 Keys
   void discTitleEnabled(bool);
   void discSelectEnabled(bool);
@@ -135,6 +141,7 @@ signals:
   void pipChannelDownEnabled(bool);
   void pipPauseEnabled(bool);
   void pipSizeEnabled(bool);
+*/
 
   void keysetMakeChanged(QString);
   void keysetNameChanged(QString);
@@ -268,6 +275,7 @@ private slots:
   void on_ejectButton_pressed();
   void on_ejectButton_released();
 
+/*
   // Media2 tab slots:
   void on_discTitleButton_pressed();
   void on_discTitleButton_released();
@@ -335,6 +343,7 @@ private slots:
   void on_pipPauseButton_released();
   void on_pipSizeButton_pressed();
   void on_pipSizeButton_released();
+*/
 
   // Favorites tab actions:
   void on_addKeysetButton_clicked();
@@ -342,6 +351,7 @@ private slots:
 
   // Menu actions:
   void on_actionSelectKeyset_triggered();
+  void on_actionSecondary_Buttons_triggered();
   void on_actionAbout_triggered();
   void on_actionDocumentation_triggered();
 
@@ -354,17 +364,12 @@ private slots:
 private:
   void enableButtons();
 
-  void startRepeating(
-    unsigned int id,
-    PIRKeyName name);
-
-  void stopRepeating();
-
   void populateFavorites();
 
   Ui::MainWindow *ui;
 
   PIRSelectKeysetForm *selectKeysetForm;
+  PIRSecondaryForm *secondaryForm;
   PIRDocumentationForm *documentationForm;
   PIRAboutForm *aboutForm;
 
index 81dc0ac..6e5e237 100644 (file)
         </item>
        </layout>
       </widget>
-      <widget class="QWidget" name="media2Tab">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <attribute name="title">
-        <string>Media2</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_5">
-        <property name="margin">
-         <number>8</number>
-        </property>
-        <item row="0" column="0">
-         <widget class="QPushButton" name="discTitleButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Disc Title</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QPushButton" name="discSelectButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Disc Select</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0">
-         <widget class="QPushButton" name="autoTrackingButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Auto Tracking</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="1">
-         <widget class="QPushButton" name="trackingMinusButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Tracking -</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="2">
-         <widget class="QPushButton" name="trackingPlusButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Tracking +</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="0">
-         <widget class="QPushButton" name="slowButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Slow</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="1">
-         <widget class="QPushButton" name="slowMinusButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Slow -</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="2">
-         <widget class="QPushButton" name="slowPlusButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>slow +</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="3">
-         <widget class="QPushButton" name="programButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Program</string>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="0">
-         <widget class="QPushButton" name="tunerBandButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Tuner Band</string>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="1">
-         <widget class="QPushButton" name="repeatButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Repeat</string>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="2">
-         <widget class="QPushButton" name="repeatABButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>RepeatAB</string>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="3">
-         <widget class="QPushButton" name="randomButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Random</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="3">
-         <widget class="QPushButton" name="pageUpButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Page Up</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QPushButton" name="vhsSpeedButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>SP/LP/EP</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="3">
-         <widget class="QPushButton" name="pageDownButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Page Down</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="tvTab">
-       <attribute name="title">
-        <string>TV</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_6">
-        <property name="margin">
-         <number>8</number>
-        </property>
-        <item row="3" column="0">
-         <widget class="QPushButton" name="teletextButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Teletext</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="1">
-         <widget class="QPushButton" name="teletextHoldButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Txt Hold</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="3">
-         <widget class="QPushButton" name="teletextRevealButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Txt Reveal</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="4">
-         <widget class="QPushButton" name="teletextSizeButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Txt Size</string>
-          </property>
-         </widget>
-        </item>
-        <item row="6" column="0">
-         <widget class="QPushButton" name="pipChannelUpButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>PIP Ch Up</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/br_up_icon&amp;48.png</normaloff>:/icons/br_up_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="6" column="1">
-         <widget class="QPushButton" name="pipChannelDownButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>PIP Ch Down</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/br_down_icon&amp;48.png</normaloff>:/icons/br_down_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="6" column="3">
-         <widget class="QPushButton" name="pipPauseButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>PIP Pause</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/playback_pause_icon&amp;48.png</normaloff>:/icons/playback_pause_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="6" column="4">
-         <widget class="QPushButton" name="pipSizeButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>PIP Size</string>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="0">
-         <widget class="QPushButton" name="pipOnOffButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Picture in Picture</string>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="1">
-         <widget class="QPushButton" name="pipSwapButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>PIP Swap</string>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="3">
-         <widget class="QPushButton" name="pipPositionButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>PIP Move</string>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="4">
-         <widget class="QPushButton" name="pipSourceButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>PIP Source</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0">
-         <widget class="QPushButton" name="pictureModeButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Picture Mode</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="1">
-         <widget class="QPushButton" name="soundModeButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Sound Mode</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="4">
-         <widget class="QPushButton" name="favoritesButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Favorites</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="3">
-         <widget class="QPushButton" name="liveTVButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Live TV</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="favoritesTab">
-       <attribute name="title">
-        <string>Favorite</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_8">
-        <property name="margin">
-         <number>8</number>
-        </property>
-        <item row="0" column="0">
-         <widget class="QPushButton" name="addKeysetButton">
-          <property name="text">
-           <string>Add Current Keyset</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QPushButton" name="removeKeysetButton">
-          <property name="text">
-           <string>Remove Selected Keyset</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0" colspan="2">
-         <widget class="QListWidget" name="favoriteKeysetsWidget"/>
-        </item>
-       </layout>
-      </widget>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menuBar">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>800</width>
-     <height>22</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menuPierogi">
-    <property name="title">
-     <string>Pierogi</string>
-    </property>
-    <addaction name="actionSelectKeyset"/>
-    <addaction name="actionDocumentation"/>
-    <addaction name="actionAbout"/>
-   </widget>
-   <addaction name="menuPierogi"/>
-  </widget>
-  <action name="actionSelectKeyset">
-   <property name="text">
-    <string>Select Keyset</string>
-   </property>
-  </action>
-  <action name="actionAbout">
-   <property name="text">
-    <string>About</string>
-   </property>
-  </action>
-  <action name="actionDocumentation">
-   <property name="text">
-    <string>Documentation</string>
-   </property>
-  </action>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources>
-  <include location="PierogiResources.qrc"/>
- </resources>
- <connections>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>reverseEnabled(bool)</signal>
-   <receiver>reverseButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>492</x>
-     <y>239</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>fastForwardEnabled(bool)</signal>
-   <receiver>fastForwardButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>678</x>
-     <y>239</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>pauseEnabled(bool)</signal>
-   <receiver>pauseButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>306</x>
-     <y>337</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>playEnabled(bool)</signal>
-   <receiver>playButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>120</x>
-     <y>337</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>stopEnabled(bool)</signal>
-   <receiver>stopButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>492</x>
-     <y>337</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>replayEnabled(bool)</signal>
-   <receiver>replayButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>492</x>
-     <y>141</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>advanceEnabled(bool)</signal>
-   <receiver>advanceButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>678</x>
-     <y>141</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>plusOneHundredEnabled(bool)</signal>
-   <receiver>plusOneHundredButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>677</x>
-     <y>106</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>keysetMakeChanged(QString)</signal>
-   <receiver>makeLabel</receiver>
-   <slot>setText(QString)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>399</x>
-     <y>283</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>dashEnabled(bool)</signal>
-   <receiver>dashButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>683</x>
-     <y>107</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>doubleDigitEnabled(bool)</signal>
-   <receiver>doubleDigitButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>683</x>
-     <y>289</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>greenEnabled(bool)</signal>
-   <receiver>greenButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>305</x>
-     <y>153</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>redEnabled(bool)</signal>
-   <receiver>redButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>116</x>
-     <y>153</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>yellowEnabled(bool)</signal>
-   <receiver>yellowButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>494</x>
-     <y>153</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>blueEnabled(bool)</signal>
-   <receiver>blueButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>683</x>
-     <y>153</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>inputEnabled(bool)</signal>
-   <receiver>inputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>305</x>
-     <y>334</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>captionsEnabled(bool)</signal>
-   <receiver>captionButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>116</x>
-     <y>334</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>sleepEnabled(bool)</signal>
-   <receiver>sleepButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>494</x>
-     <y>334</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>muteEnabled(bool)</signal>
-   <receiver>muteButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>683</x>
-     <y>334</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>audioEnabled(bool)</signal>
-   <receiver>audioButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>497</x>
-     <y>246</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>aspectRatioEnabled(bool)</signal>
-   <receiver>aspectRatioButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>107</x>
-     <y>246</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>ejectEnabled(bool)</signal>
-   <receiver>ejectButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>692</x>
-     <y>373</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>programEnabled(bool)</signal>
-   <receiver>programButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>302</x>
-     <y>199</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>discTitleEnabled(bool)</signal>
-   <receiver>discTitleButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>107</x>
-     <y>294</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>trackingMinusEnabled(bool)</signal>
-   <receiver>trackingMinusButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>107</x>
-     <y>389</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>trackingPlusEnabled(bool)</signal>
-   <receiver>trackingPlusButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>107</x>
-     <y>389</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>autoTrackingEnabled(bool)</signal>
-   <receiver>autoTrackingButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>497</x>
-     <y>389</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>vhsSpeedEnabled(bool)</signal>
-   <receiver>vhsSpeedButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>692</x>
-     <y>389</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>surroundEnabled(bool)</signal>
-   <receiver>surroundButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>302</x>
-     <y>246</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>discSelectEnabled(bool)</signal>
-   <receiver>discSelectButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>497</x>
-     <y>294</y>
-    </hint>
-   </hints>
-  </connection>
+      <widget class="QWidget" name="favoritesTab">
+       <attribute name="title">
+        <string>Favorite</string>
+       </attribute>
+       <layout class="QGridLayout" name="gridLayout_8">
+        <property name="margin">
+         <number>8</number>
+        </property>
+        <item row="0" column="0">
+         <widget class="QPushButton" name="addKeysetButton">
+          <property name="text">
+           <string>Add Current Keyset</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1">
+         <widget class="QPushButton" name="removeKeysetButton">
+          <property name="text">
+           <string>Remove Selected Keyset</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" colspan="2">
+         <widget class="QListWidget" name="favoriteKeysetsWidget"/>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>800</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuPierogi">
+    <property name="title">
+     <string>Pierogi</string>
+    </property>
+    <addaction name="actionSelectKeyset"/>
+    <addaction name="actionSecondary_Buttons"/>
+    <addaction name="actionDocumentation"/>
+    <addaction name="actionAbout"/>
+   </widget>
+   <addaction name="menuPierogi"/>
+  </widget>
+  <action name="actionSelectKeyset">
+   <property name="text">
+    <string>Select Keyset</string>
+   </property>
+  </action>
+  <action name="actionAbout">
+   <property name="text">
+    <string>About</string>
+   </property>
+  </action>
+  <action name="actionDocumentation">
+   <property name="text">
+    <string>Documentation</string>
+   </property>
+  </action>
+  <action name="actionSecondary_Buttons">
+   <property name="text">
+    <string>Secondary Buttons</string>
+   </property>
+  </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources>
+  <include location="PierogiResources.qrc"/>
+ </resources>
+ <connections>
   <connection>
    <sender>MainWindow</sender>
-   <signal>oneEnabled(bool)</signal>
-   <receiver>oneButton</receiver>
+   <signal>fourEnabled(bool)</signal>
+   <receiver>fourButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>792</x>
-     <y>33</y>
+     <x>86</x>
+     <y>442</y>
     </hint>
     <hint type="destinationlabel">
      <x>45</x>
-     <y>110</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>twoEnabled(bool)</signal>
-   <receiver>twoButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>177</x>
-     <y>443</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>230</x>
-     <y>110</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>threeEnabled(bool)</signal>
-   <receiver>threeButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>479</x>
-     <y>439</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>417</x>
-     <y>110</y>
+     <y>187</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>fourEnabled(bool)</signal>
-   <receiver>fourButton</receiver>
+   <signal>fiveEnabled(bool)</signal>
+   <receiver>fiveButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>86</x>
+     <x>269</x>
      <y>442</y>
     </hint>
     <hint type="destinationlabel">
-     <x>45</x>
+     <x>230</x>
      <y>187</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>fiveEnabled(bool)</signal>
-   <receiver>fiveButton</receiver>
+   <signal>volumeDownEnabled(bool)</signal>
+   <receiver>mainVolumeDownButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>269</x>
-     <y>442</y>
+     <x>796</x>
+     <y>232</y>
     </hint>
     <hint type="destinationlabel">
-     <x>230</x>
-     <y>187</y>
+     <x>546</x>
+     <y>294</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>sixEnabled(bool)</signal>
-   <receiver>sixButton</receiver>
+   <signal>enterEnabled(bool)</signal>
+   <receiver>enterButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>438</x>
+     <x>547</x>
      <y>441</y>
     </hint>
     <hint type="destinationlabel">
      <x>417</x>
-     <y>187</y>
+     <y>344</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>sevenEnabled(bool)</signal>
-   <receiver>sevenButton</receiver>
+   <signal>redEnabled(bool)</signal>
+   <receiver>redButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>90</x>
-     <y>442</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>45</x>
-     <y>266</y>
+     <x>116</x>
+     <y>153</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>eightEnabled(bool)</signal>
-   <receiver>eightButton</receiver>
+   <signal>yellowEnabled(bool)</signal>
+   <receiver>yellowButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>254</x>
-     <y>443</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>230</x>
-     <y>266</y>
+     <x>494</x>
+     <y>153</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>nineEnabled(bool)</signal>
-   <receiver>nineButton</receiver>
+   <signal>oneEnabled(bool)</signal>
+   <receiver>oneButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>550</x>
-     <y>442</y>
+     <x>792</x>
+     <y>33</y>
     </hint>
     <hint type="destinationlabel">
-     <x>417</x>
-     <y>266</y>
+     <x>45</x>
+     <y>110</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>powerEnabled(bool)</signal>
-   <receiver>powerButton</receiver>
+   <signal>captionsEnabled(bool)</signal>
+   <receiver>captionButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>375</x>
-     <y>443</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>299</x>
-     <y>164</y>
+     <x>116</x>
+     <y>334</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>leftEnabled(bool)</signal>
-   <receiver>leftButton</receiver>
+   <signal>inputEnabled(bool)</signal>
+   <receiver>inputButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>104</x>
-     <y>442</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>119</x>
-     <y>246</y>
+     <x>305</x>
+     <y>334</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>zeroEnabled(bool)</signal>
-   <receiver>zeroButton</receiver>
+   <signal>sleepEnabled(bool)</signal>
+   <receiver>sleepButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>325</x>
-     <y>440</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>230</x>
-     <y>344</y>
+     <x>494</x>
+     <y>334</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>enterEnabled(bool)</signal>
-   <receiver>enterButton</receiver>
+   <signal>audioEnabled(bool)</signal>
+   <receiver>audioButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>547</x>
-     <y>441</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>417</x>
-     <y>344</y>
+     <x>497</x>
+     <y>246</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>upEnabled(bool)</signal>
-   <receiver>upButton</receiver>
+   <signal>muteEnabled(bool)</signal>
+   <receiver>muteButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>350</x>
-     <y>25</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>355</x>
-     <y>139</y>
+     <x>683</x>
+     <y>334</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>selectEnabled(bool)</signal>
-   <receiver>selectButton</receiver>
+   <signal>aspectRatioEnabled(bool)</signal>
+   <receiver>aspectRatioButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>310</x>
-     <y>440</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>309</x>
-     <y>245</y>
+     <x>107</x>
+     <y>246</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>stepBackEnabled(bool)</signal>
-   <receiver>stepBackButton</receiver>
+   <signal>ejectEnabled(bool)</signal>
+   <receiver>ejectButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>120</x>
-     <y>239</y>
+     <x>692</x>
+     <y>373</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>menuEnabled(bool)</signal>
-   <receiver>menuButton</receiver>
+   <signal>sixEnabled(bool)</signal>
+   <receiver>sixButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>577</x>
-     <y>85</y>
+     <x>438</x>
+     <y>441</y>
     </hint>
     <hint type="destinationlabel">
-     <x>570</x>
-     <y>138</y>
+     <x>417</x>
+     <y>187</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>downEnabled(bool)</signal>
-   <receiver>downButton</receiver>
+   <signal>eightEnabled(bool)</signal>
+   <receiver>eightButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>363</x>
+     <x>254</x>
      <y>443</y>
     </hint>
     <hint type="destinationlabel">
-     <x>372</x>
-     <y>346</y>
+     <x>230</x>
+     <y>266</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>rightEnabled(bool)</signal>
-   <receiver>rightButton</receiver>
+   <signal>pauseEnabled(bool)</signal>
+   <receiver>pauseButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>702</x>
-     <y>48</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>699</x>
-     <y>232</y>
+     <x>306</x>
+     <y>337</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>exitEnabled(bool)</signal>
-   <receiver>exitButton</receiver>
+   <signal>fastForwardEnabled(bool)</signal>
+   <receiver>fastForwardButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>578</x>
-     <y>441</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>583</x>
-     <y>343</y>
+     <x>678</x>
+     <y>239</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>channelDownEnabled(bool)</signal>
-   <receiver>mainChannelDownButton</receiver>
+   <signal>playEnabled(bool)</signal>
+   <receiver>playButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>222</x>
-     <y>27</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>51</x>
-     <y>294</y>
+     <x>120</x>
+     <y>337</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>channelUpEnabled(bool)</signal>
-   <receiver>mainChannelUpButton</receiver>
+   <signal>stopEnabled(bool)</signal>
+   <receiver>stopButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>102</x>
-     <y>26</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>51</x>
-     <y>164</y>
+     <x>492</x>
+     <y>337</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>volumeUpEnabled(bool)</signal>
-   <receiver>mainVolumeUp</receiver>
+   <signal>replayEnabled(bool)</signal>
+   <receiver>replayButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>621</x>
-     <y>24</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>546</x>
-     <y>164</y>
+     <x>492</x>
+     <y>141</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>volumeDownEnabled(bool)</signal>
-   <receiver>mainVolumeDownButton</receiver>
+   <signal>doubleDigitEnabled(bool)</signal>
+   <receiver>doubleDigitButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>796</x>
-     <y>232</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>546</x>
-     <y>294</y>
+     <x>683</x>
+     <y>289</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>prevChannelEnabled(bool)</signal>
-   <receiver>prevChannelButton</receiver>
+   <signal>reverseEnabled(bool)</signal>
+   <receiver>reverseButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>595</x>
-     <y>443</y>
+     <x>399</x>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>602</x>
-     <y>110</y>
+     <x>492</x>
+     <y>239</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>clearEnabled(bool)</signal>
-   <receiver>clearButton</receiver>
+   <signal>nineEnabled(bool)</signal>
+   <receiver>nineButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>43</x>
-     <y>443</y>
+     <x>550</x>
+     <y>442</y>
     </hint>
     <hint type="destinationlabel">
-     <x>45</x>
-     <y>344</y>
+     <x>417</x>
+     <y>266</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>guideEnabled(bool)</signal>
-   <receiver>guideButton</receiver>
+   <signal>powerEnabled(bool)</signal>
+   <receiver>powerButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
+     <x>375</x>
+     <y>443</y>
     </hint>
     <hint type="destinationlabel">
-     <x>151</x>
-     <y>337</y>
+     <x>299</x>
+     <y>164</y>
     </hint>
    </hints>
   </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>keysetNameChanged(QString)</signal>
-   <receiver>nameLabel</receiver>
-   <slot>setText(QString)</slot>
+  <connection>
+   <sender>MainWindow</sender>
+   <signal>zeroEnabled(bool)</signal>
+   <receiver>zeroButton</receiver>
+   <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
+     <x>325</x>
+     <y>440</y>
     </hint>
     <hint type="destinationlabel">
-     <x>399</x>
-     <y>301</y>
+     <x>230</x>
+     <y>344</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>nextEnabled(bool)</signal>
-   <receiver>mediaNextButton</receiver>
+   <signal>leftEnabled(bool)</signal>
+   <receiver>leftButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
+     <x>104</x>
+     <y>442</y>
     </hint>
     <hint type="destinationlabel">
-     <x>306</x>
-     <y>141</y>
+     <x>119</x>
+     <y>246</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>previousEnabled(bool)</signal>
-   <receiver>mediaPreviousButton</receiver>
+   <signal>sevenEnabled(bool)</signal>
+   <receiver>sevenButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
+     <x>90</x>
+     <y>442</y>
     </hint>
     <hint type="destinationlabel">
-     <x>120</x>
-     <y>141</y>
+     <x>45</x>
+     <y>266</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>stepForwardEnabled(bool)</signal>
-   <receiver>stepForwardButton</receiver>
+   <signal>prevChannelEnabled(bool)</signal>
+   <receiver>prevChannelButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
+     <x>595</x>
+     <y>443</y>
     </hint>
     <hint type="destinationlabel">
-     <x>306</x>
-     <y>239</y>
+     <x>602</x>
+     <y>110</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>infoEnabled(bool)</signal>
-   <receiver>infoButton</receiver>
+   <signal>guideEnabled(bool)</signal>
+   <receiver>guideButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>695</x>
-     <y>264</y>
+     <x>151</x>
+     <y>337</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>discMenuEnabled(bool)</signal>
-   <receiver>discMenuButton</receiver>
+   <signal>clearEnabled(bool)</signal>
+   <receiver>clearButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>43</x>
+     <y>443</y>
     </hint>
     <hint type="destinationlabel">
-     <x>137</x>
-     <y>405</y>
+     <x>45</x>
+     <y>344</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pageUpEnabled(bool)</signal>
-   <receiver>pageUpButton</receiver>
-   <slot>setEnabled(bool)</slot>
+   <signal>keysetNameChanged(QString)</signal>
+   <receiver>nameLabel</receiver>
+   <slot>setText(QString)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>695</x>
-     <y>105</y>
+     <x>399</x>
+     <y>301</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pageDownEnabled(bool)</signal>
-   <receiver>pageDownButton</receiver>
+   <signal>nextEnabled(bool)</signal>
+   <receiver>mediaNextButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>695</x>
-     <y>211</y>
+     <x>306</x>
+     <y>141</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>slowEnabled(bool)</signal>
-   <receiver>slowButton</receiver>
+   <signal>stepForwardEnabled(bool)</signal>
+   <receiver>stepForwardButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>104</x>
-     <y>317</y>
+     <x>306</x>
+     <y>239</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>slowMinusEnabled(bool)</signal>
-   <receiver>slowMinusButton</receiver>
+   <signal>previousEnabled(bool)</signal>
+   <receiver>mediaPreviousButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>301</x>
-     <y>317</y>
+     <x>120</x>
+     <y>141</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>slowPlusEnabled(bool)</signal>
-   <receiver>slowPlusButton</receiver>
+   <signal>discMenuEnabled(bool)</signal>
+   <receiver>discMenuButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <y>239</y>
     </hint>
     <hint type="destinationlabel">
-     <x>498</x>
-     <y>317</y>
+     <x>137</x>
+     <y>405</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>tunerBandEnabled(bool)</signal>
-   <receiver>tunerBandButton</receiver>
+   <signal>infoEnabled(bool)</signal>
+   <receiver>infoButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <y>239</y>
     </hint>
     <hint type="destinationlabel">
-     <x>104</x>
-     <y>422</y>
+     <x>695</x>
+     <y>264</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>repeatEnabled(bool)</signal>
-   <receiver>repeatButton</receiver>
+   <signal>upEnabled(bool)</signal>
+   <receiver>upButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>350</x>
+     <y>25</y>
     </hint>
     <hint type="destinationlabel">
-     <x>301</x>
-     <y>422</y>
+     <x>355</x>
+     <y>139</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>repeatABEnabled(bool)</signal>
-   <receiver>repeatABButton</receiver>
+   <signal>stepBackEnabled(bool)</signal>
+   <receiver>stepBackButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>498</x>
-     <y>422</y>
+     <x>120</x>
+     <y>239</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>randomEnabled(bool)</signal>
-   <receiver>randomButton</receiver>
+   <signal>selectEnabled(bool)</signal>
+   <receiver>selectButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>310</x>
+     <y>440</y>
     </hint>
     <hint type="destinationlabel">
-     <x>695</x>
-     <y>422</y>
+     <x>309</x>
+     <y>245</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pictureModeEnabled(bool)</signal>
-   <receiver>pictureModeButton</receiver>
+   <signal>menuEnabled(bool)</signal>
+   <receiver>menuButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>577</x>
+     <y>85</y>
     </hint>
     <hint type="destinationlabel">
-     <x>104</x>
-     <y>105</y>
+     <x>570</x>
+     <y>138</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>soundModeEnabled(bool)</signal>
-   <receiver>soundModeButton</receiver>
+   <signal>rightEnabled(bool)</signal>
+   <receiver>rightButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>702</x>
+     <y>48</y>
     </hint>
     <hint type="destinationlabel">
-     <x>301</x>
-     <y>105</y>
+     <x>699</x>
+     <y>232</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>liveTVEnabled(bool)</signal>
-   <receiver>liveTVButton</receiver>
+   <signal>downEnabled(bool)</signal>
+   <receiver>downButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>363</x>
+     <y>443</y>
     </hint>
     <hint type="destinationlabel">
-     <x>498</x>
-     <y>105</y>
+     <x>372</x>
+     <y>346</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>favoritesEnabled(bool)</signal>
-   <receiver>favoritesButton</receiver>
+   <signal>twoEnabled(bool)</signal>
+   <receiver>twoButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>177</x>
+     <y>443</y>
     </hint>
     <hint type="destinationlabel">
-     <x>695</x>
-     <y>105</y>
+     <x>230</x>
+     <y>110</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>teletextEnabled(bool)</signal>
-   <receiver>teletextButton</receiver>
+   <signal>threeEnabled(bool)</signal>
+   <receiver>threeButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>479</x>
+     <y>439</y>
     </hint>
     <hint type="destinationlabel">
-     <x>104</x>
-     <y>211</y>
+     <x>417</x>
+     <y>110</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>teletextHoldEnabled(bool)</signal>
-   <receiver>teletextHoldButton</receiver>
+   <signal>blueEnabled(bool)</signal>
+   <receiver>blueButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>301</x>
-     <y>211</y>
+     <x>683</x>
+     <y>153</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>teletextRevealEnabled(bool)</signal>
-   <receiver>teletextRevealButton</receiver>
+   <signal>advanceEnabled(bool)</signal>
+   <receiver>advanceButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>498</x>
-     <y>211</y>
+     <x>678</x>
+     <y>141</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pipEnabled(bool)</signal>
-   <receiver>pipOnOffButton</receiver>
+   <signal>plusOneHundredEnabled(bool)</signal>
+   <receiver>plusOneHundredButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>104</x>
-     <y>317</y>
+     <x>677</x>
+     <y>106</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pipSwapEnabled(bool)</signal>
-   <receiver>pipSwapButton</receiver>
+   <signal>dashEnabled(bool)</signal>
+   <receiver>dashButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>301</x>
-     <y>317</y>
+     <x>683</x>
+     <y>107</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pipMoveEnabled(bool)</signal>
-   <receiver>pipPositionButton</receiver>
-   <slot>setEnabled(bool)</slot>
+   <signal>keysetMakeChanged(QString)</signal>
+   <receiver>makeLabel</receiver>
+   <slot>setText(QString)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>498</x>
-     <y>317</y>
+     <x>399</x>
+     <y>283</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pipSourceEnabled(bool)</signal>
-   <receiver>pipSourceButton</receiver>
+   <signal>greenEnabled(bool)</signal>
+   <receiver>greenButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>695</x>
-     <y>317</y>
+     <x>305</x>
+     <y>153</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pipChannelUpEnabled(bool)</signal>
-   <receiver>pipChannelUpButton</receiver>
+   <signal>surroundEnabled(bool)</signal>
+   <receiver>surroundButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>399</x>
-     <y>239</y>
+     <y>222</y>
     </hint>
     <hint type="destinationlabel">
-     <x>104</x>
-     <y>422</y>
+     <x>302</x>
+     <y>246</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pipChannelDownEnabled(bool)</signal>
-   <receiver>pipChannelDownButton</receiver>
+   <signal>exitEnabled(bool)</signal>
+   <receiver>exitButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>578</x>
+     <y>441</y>
     </hint>
     <hint type="destinationlabel">
-     <x>301</x>
-     <y>422</y>
+     <x>583</x>
+     <y>343</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pipPauseEnabled(bool)</signal>
-   <receiver>pipPauseButton</receiver>
+   <signal>channelUpEnabled(bool)</signal>
+   <receiver>mainChannelUpButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>102</x>
+     <y>26</y>
     </hint>
     <hint type="destinationlabel">
-     <x>498</x>
-     <y>422</y>
+     <x>51</x>
+     <y>164</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>pipSizeEnabled(bool)</signal>
-   <receiver>pipSizeButton</receiver>
+   <signal>channelDownEnabled(bool)</signal>
+   <receiver>mainChannelDownButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>222</x>
+     <y>27</y>
     </hint>
     <hint type="destinationlabel">
-     <x>695</x>
-     <y>422</y>
+     <x>51</x>
+     <y>294</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MainWindow</sender>
-   <signal>teletextSizeEnabled(bool)</signal>
-   <receiver>teletextSizeButton</receiver>
+   <signal>volumeUpEnabled(bool)</signal>
+   <receiver>mainVolumeUp</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
+     <x>621</x>
+     <y>24</y>
     </hint>
     <hint type="destinationlabel">
-     <x>695</x>
-     <y>211</y>
+     <x>546</x>
+     <y>164</y>
     </hint>
    </hints>
   </connection>
diff --git a/necprotocol.cpp b/necprotocol.cpp
deleted file mode 100644 (file)
index d3de072..0000000
+++ /dev/null
@@ -1,455 +0,0 @@
-#include "necprotocol.h"
-
-#include "pirexception.h"
-#include <string>
-//#include <iostream>
-
-// Some global communications stuff:
-#include <QMutex>
-extern bool commandInFlight;
-extern QMutex commandIFMutex;
-
-// The official NEC protocol, as I understand it, has the following attributes:
-// A "zero" is encoded with a 560 usec pulse, 560 usec space.
-// A "one" is encoded with a 560 usec pulse, and 3*560 (1680) usec space.
-// The header is a 9000 usec pulse, 4500 usec space.
-// Commands end with a trailing 560 usec pulse.
-// A repeat block is a 9000 usec pulse, 2250 usec space, then trailing pulse.
-// Each command runs for 110000 usec before another can be executed.
-
-// For standard NEC, use this constructor:
-NECProtocol::NECProtocol(
-  QObject *guiObject,
-  unsigned int index,
-  NECKeyFormat fmt)
-  : PIRProtocol(guiObject, index, 110000, true),
-    zeroPulse(560),
-    zeroSpace(560),
-    onePulse(560),
-    oneSpace(1680),
-    headerPulse(9000),
-    headerSpace(4500),
-    hasHeaderPair(true),
-    trailerPulse(560),
-    hasTrailerPulse(true),
-    repeatPulse(9000),
-    repeatSpace(2250),
-    hasRepeatPair(true),
-    repeatNeedsHeader(false),
-    fullHeadlessRepeat(false),
-    elevenBitToggle(false),
-    encodingFormat(fmt)
-{
-}
-
-// For non-standard NEC, use this constructor:
-NECProtocol::NECProtocol(
-  QObject *guiObject,
-  unsigned int index,
-  unsigned int zPulse,
-  unsigned int zSpace,
-  unsigned int oPulse,
-  unsigned int oSpace,
-  unsigned int gSpace,
-  bool iclflag,
-  NECKeyFormat fmt)
-  : PIRProtocol(guiObject, index, gSpace, iclflag),
-    zeroPulse(zPulse),
-    zeroSpace(zSpace),
-    onePulse(oPulse),
-    oneSpace(oSpace),
-    hasHeaderPair(false),
-    hasTrailerPulse(false),
-    hasRepeatPair(false),
-    repeatNeedsHeader(false),
-    fullHeadlessRepeat(false),
-    elevenBitToggle(false),
-    encodingFormat(fmt)
-{
-}
-
-void NECProtocol::setHeaderPair(
-  unsigned int pulse,
-  unsigned int space)
-{
-  headerPulse = pulse;
-  headerSpace = space;
-  hasHeaderPair = true;
-}
-
-void NECProtocol::setTrailerPulse(
-  unsigned int pulse)
-{
-  trailerPulse = pulse;
-  hasTrailerPulse = true;
-}
-
-void NECProtocol::setRepeatPair(
-  unsigned int pulse,
-  unsigned int space)
-{
-  repeatPulse = pulse;
-  repeatSpace = space;
-  hasRepeatPair = true;
-}
-
-void NECProtocol::setRepeatNeedsHeader(
-  bool flag)
-{
-  repeatNeedsHeader = flag;
-}
-
-void NECProtocol::setFullHeadlessRepeat(
-  bool flag)
-{
-  fullHeadlessRepeat = flag;
-}
-
-void NECProtocol::setElevenBitToggle(
-  bool flag)
-{
-  elevenBitToggle = flag;
-}
-
-void NECProtocol::startSendingCommand(
-  unsigned int threadableID,
-  PIRKeyName command)
-{
-  // Exceptions here are problematic; I'll try to weed them out by putting the
-  // whole thing in a try/catch block:
-  try
-  {
-    // First, check if we are meant to be the recipient of this command:
-    if (threadableID != id) return;
-
-    // An object that helps keep track of the number of commands:
-//    PIRCommandCounter commandCounter;
-
-    // Ok, we're going to lock down this method and make sure
-    // only one guy at a time passes this point:
-//    QMutexLocker commandLocker(&commandMutex);
-
-    clearRepeatFlag();
-
-    KeycodeCollection::const_iterator i = keycodes.find(command);
-
-    // Do we even have this key defined?
-    if (i == keycodes.end())
-    {
-      std::string s = "Tried to send a non-existent command.\n";
-      throw PIRException(s);
-    }
-
-    // construct the device:
-    PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
-
-    int repeatCount = 0;
-    int commandDuration = 0;
-    while (repeatCount < MAX_REPEAT_COUNT)
-    {
-      // If we are currently repeating, and have a special "repeat signal",
-      // use that signal.  Otherwise, generate a normal command string.
-      if (hasRepeatPair && repeatCount)
-      {
-        commandDuration = generateRepeatCommand(rx51device);
-      }
-      else if (fullHeadlessRepeat && repeatCount)
-      {
-        commandDuration = generateHeadlessCommand((*i).second, rx51device);
-      }
-      else if (elevenBitToggle && (repeatCount % 2))
-      {
-        commandDuration = generateToggledCommand((*i).second, rx51device);
-      }
-      else
-      {
-        commandDuration = generateStandardCommand((*i).second, rx51device);
-      }
-
-      // Now, tell the device to send the whole command:
-      rx51device.sendCommandToDevice();
-
-      // sleep until the next repetition of command:
-      sleepUntilRepeat(commandDuration);
-
-      // Check whether we've reached the minimum required number of repetitons:
-      if (repeatCount >= minimumRepetitions)
-      {
-        // Check whether we've been asked to stop:
-        if (checkRepeatFlag())
-        {
-          QMutexLocker cifLocker(&commandIFMutex);
-          commandInFlight = false;
-          return;
-        }
-      }
-
-      ++repeatCount;
-    }
-  }
-  catch (PIRException e)
-  {
-    // inform the gui:
-    emit commandFailed(e.getError().c_str());
-  }
-
-  QMutexLocker cifLocker(&commandIFMutex);
-  commandInFlight = false;
-}
-
-
-int NECProtocol::generateStandardCommand(
-  const CommandSequence &bits,
-  PIRRX51Hardware &rx51device)
-{
-  int duration = 0;
-
-  // First, the "header" pulse (if any):
-  if (hasHeaderPair)
-  {
-    rx51device.addPair(headerPulse, headerSpace);
-    duration += (headerPulse + headerSpace);
-  }
-
-  // Now, check the encoding format:
-  switch(encodingFormat)
-  {
-  case Standard_NEC:
-    // Standard NEC is made up of an eight-bit "address" and an eight-bit
-    // "command".  First the address bits are sent (in reverse order), then
-    // the address bits are inverted and sent again (in reverse order).
-    // Next, we do the same to the command bits.
-    // - "preData" should contain 8-bit value
-    // - "bits" should contain 8-bit value
-    duration += pushReverseBits(preData, rx51device);
-    duration += pushInvertedReverseBits(preData, rx51device);
-    duration += pushReverseBits(bits, rx51device);
-    duration += pushInvertedReverseBits(bits, rx51device);
-    break;
-  case Extended_NEC:
-    // In extended NEC, the address has been extended to 16 bits, but only
-    // the reversed bits are sent, not inverted.  The command portion stays
-    // the same.
-    // - "preData" should contain 16-bit value
-    // - "bits" should contain 8-bit value
-    duration += pushReverseBits(preData, rx51device);
-    duration += pushReverseBits(bits, rx51device);
-    duration += pushInvertedReverseBits(bits, rx51device);
-    break;
-  case LIRC_NEC: default:
-    // In this case, we just dump the raw bits into the device:
-    duration += pushBits(preData, rx51device);
-    duration += pushBits(bits, rx51device);
-    duration += pushBits(postData, rx51device);
-    break;
-  }
-
-  // Finally add the "trail":
-  if (hasTrailerPulse)
-  {
-    rx51device.addSingle(trailerPulse);
-    duration += trailerPulse;
-  }
-
-  return duration;
-}
-
-
-int NECProtocol::generateHeadlessCommand(
-  const CommandSequence &bits,
-  PIRRX51Hardware &rx51device)
-{
-  int duration = 0;
-
-  // First, the "pre" data:
-  duration += pushBits(preData, rx51device);
-
-  // Next, add the actual command:
-  duration += pushBits(bits, rx51device);
-
-  // Next, add the "post" data:
-  duration += pushBits(postData, rx51device);
-
-  // Finally add the "trail":
-  if (hasTrailerPulse)
-  {
-    rx51device.addSingle(trailerPulse);
-    duration += trailerPulse;
-  }
-
-  return duration;
-}
-
-
-int NECProtocol::generateRepeatCommand(
-  PIRRX51Hardware &rx51device)
-{
-  int duration = 0;
-
-  // Do we need the header?
-  if (repeatNeedsHeader)
-  {
-    // Do we even have a header?
-    if (hasHeaderPair)
-    {
-      // Ok, then add the header to the repeat:
-      rx51device.addPair(headerPulse, headerSpace);
-      duration += (headerPulse + headerSpace);
-    }
-  }
-
-  // Add the repeat pulse:
-  rx51device.addPair(repeatPulse, repeatSpace);
-  duration += (repeatPulse + repeatSpace);
-
-  // Finally add the trailer:
-  if (hasTrailerPulse)
-  {
-    rx51device.addSingle(trailerPulse);
-    duration += trailerPulse;
-  }
-
-  return duration;
-}
-
-
-// NOTE!  The following is a special command to toggle the last eleven bits
-// of the fifteen-bit commands used by Denon, Sharp, and a few others.  It
-// assumes the command sequence will contain all fifteen bits.  If this
-// is not the case, it will work incorrectly!
-int NECProtocol::generateToggledCommand(
-  const CommandSequence &bits,
-  PIRRX51Hardware &rx51device)
-{
-  int duration = 0;
-
-  CommandSequence::const_iterator i = bits.begin();
-
-  int bitcount = 0;
-  // First 4 bits:
-  while ((bitcount < 4) && (i != bits.end()))
-  {
-    if (*i)
-    {
-      // Send pulse for "one":
-      rx51device.addPair(onePulse, oneSpace);
-      duration += (onePulse + oneSpace);
-    }
-    else
-    {
-      // Send pulse for "zero":
-      rx51device.addPair(zeroPulse, zeroSpace);
-      duration += (zeroPulse + zeroSpace);
-    }
-    ++i;
-    ++bitcount;
-  }
-
-  // Now, invert the last eleven bits:
-  while (i != bits.end())
-  {
-    if (*i)
-    {
-      // Send pulse for "zero":
-      rx51device.addPair(zeroPulse, zeroSpace);
-      duration += (zeroPulse + zeroSpace);
-    }
-    else
-    {
-      // Send pulse for "one":
-      rx51device.addPair(onePulse, oneSpace);
-      duration += (onePulse + oneSpace);
-    }
-    ++i;
-  }
-
-  // Add trail on end:
-  if (hasTrailerPulse)
-  {
-    rx51device.addSingle(trailerPulse);
-    duration += trailerPulse;
-  }
-
-  return duration;
-}
-
-
-int NECProtocol::pushBits(
-  const CommandSequence &bits,
-  PIRRX51Hardware &rx51device)
-{
-  int duration = 0;
-  CommandSequence::const_iterator i = bits.begin();
-  while (i != bits.end())
-  {
-    if (*i)
-    {
-      // Send the pulse for "One":
-      rx51device.addPair(onePulse, oneSpace);
-      duration += (onePulse + oneSpace);
-    }
-    else
-    {
-      // Send the pulse for "Zero":
-      rx51device.addPair(zeroPulse, zeroSpace);
-      duration += (zeroPulse + zeroSpace);
-    }
-    ++i;
-  }
-
-  return duration;
-}
-
-
-int NECProtocol::pushReverseBits(
-  const CommandSequence &bits,
-  PIRRX51Hardware &rx51device)
-{
-  int duration = 0;
-  CommandSequence::const_reverse_iterator i = bits.rbegin();
-  while (i != bits.rend())
-  {
-    if (*i)
-    {
-      // Send the pulse for "One":
-      rx51device.addPair(onePulse, oneSpace);
-      duration += (onePulse + oneSpace);
-    }
-    else
-    {
-      // Send the pulse for "Zero":
-      rx51device.addPair(zeroPulse, zeroSpace);
-      duration += (zeroPulse + zeroSpace);
-    }
-    ++i;
-  }
-
-  return duration;
-}
-
-
-int NECProtocol::pushInvertedReverseBits(
-  const CommandSequence &bits,
-  PIRRX51Hardware &rx51device)
-{
-  int duration = 0;
-  CommandSequence::const_reverse_iterator i = bits.rbegin();
-  while (i != bits.rend())
-  {
-    if (*i)
-    {
-      // Send the pulse for "Zero":
-      rx51device.addPair(zeroPulse, zeroSpace);
-      duration += (zeroPulse + zeroSpace);
-    }
-    else
-    {
-      // Send the pulse for "One":
-      rx51device.addPair(onePulse, oneSpace);
-      duration += (onePulse + oneSpace);
-    }
-    ++i;
-  }
-
-  return duration;
-}
diff --git a/necprotocol.h b/necprotocol.h
deleted file mode 100644 (file)
index ef6e1cc..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-#ifndef NECPROTOCOL_H
-#define NECPROTOCOL_H
-
-#include "pirprotocol.h"
-#include "pirrx51hardware.h"
-
-//
-// The "NEC" Protocol is, more or less, followed by the majority of
-// remotes defined in the LIRC config files, which means it is probably
-// followed by most of the remotes out there.
-//
-// Remotes using this protocol seem to use a frequency of 38000 Hz, lead off
-// each command with a signal that should be unique to the manufacturer,
-// and mostly define 0s and 1s by the length of time between pulses...
-//
-
-//
-// There exist two well-defined NEC protocols: "standard" and "extended".
-// Some remotes might not fit into either format; LIRC has given up and
-// simply recorded the exact set of IR pulses as bits, rather than attempt
-// to follow the standard encodings.  I'll use the following enum to
-// describe which mechanism the key data follows:
-//
-
-enum NECKeyFormat
-{
-  Standard_NEC,
-  Extended_NEC,
-  LIRC_NEC
-};
-
-class NECProtocol: public PIRProtocol
-{
-public:
-  // An NEC protocol will always have differing times for "zero" and "one".
-  // Also, all protocols have some space set between commands.  However,
-  // some protocols specify a fixed delay between the end of one
-  // command and the start of the next, and others specify each command be
-  // started at a precise interval (so the spacing between the end of one
-  // and the start of another may vary).
-
-  // Constructor for standard NEC:
-  NECProtocol(
-    QObject *guiObject,
-    unsigned int index,
-    NECKeyFormat type);
-
-  // Constructor for non-standard NEC:
-  NECProtocol(
-    QObject *guiObject,
-    unsigned int index,
-    unsigned int zPulse,
-    unsigned int zSpace,
-    unsigned int oPulse,
-    unsigned int oSpace,
-    unsigned int gapSpace,
-    bool iclflag,
-    NECKeyFormat type);
-
-  void setHeaderPair(
-    unsigned int pulse,
-    unsigned int space);
-
-  void setTrailerPulse(
-    unsigned int pulse);
-
-  void setRepeatPair(
-    unsigned int pulse,
-    unsigned int space);
-
-  void setRepeatNeedsHeader(
-    bool flag);
-
-  void setFullHeadlessRepeat(
-    bool flag);
-
-  void setElevenBitToggle(
-    bool flag);
-
-public slots:
-  void startSendingCommand(
-    unsigned int threadableID,
-    PIRKeyName command);
-
-private:
-  // First, define what is used to represent 0 and 1:
-  unsigned int zeroPulse;
-  unsigned int zeroSpace;
-  unsigned int onePulse;
-  unsigned int oneSpace;
-
-  // Some administrative data that most NEC Protocol remotes have:
-  unsigned int headerPulse;
-  unsigned int headerSpace;
-  bool hasHeaderPair;
-
-  // A tailing on-request, not followed by a specific off time:
-  unsigned int trailerPulse;
-  bool hasTrailerPulse;
-
-  // A pulse that means "repeat the last command":
-  unsigned int repeatPulse;
-  unsigned int repeatSpace;
-  bool hasRepeatPair;
-  bool repeatNeedsHeader; // Put the header ahead of the repeat pulse
-  bool fullHeadlessRepeat; // Repeat full command but without header
-  bool elevenBitToggle; // A few remotes toggle the last eleven bits on repeat
-
-  // A flag used to determine how to encode the bits:
-  NECKeyFormat encodingFormat;
-
-  int generateStandardCommand(
-    const CommandSequence &bits,
-    PIRRX51Hardware &device);
-
-  int generateHeadlessCommand(
-    const CommandSequence &bits,
-    PIRRX51Hardware &device);
-
-  int generateRepeatCommand(
-    PIRRX51Hardware &device);
-
-  int generateToggledCommand(
-    const CommandSequence &bits,
-    PIRRX51Hardware &device);
-
-  int pushBits(
-    const CommandSequence &bits,
-    PIRRX51Hardware &device);
-
-  int pushReverseBits(
-    const CommandSequence &bits,
-    PIRRX51Hardware &device);
-
-  int pushInvertedReverseBits(
-    const CommandSequence &bits,
-    PIRRX51Hardware &device);
-};
-
-#endif // NECPROTOCOL_H
index 12e9876..9ffeae9 100644 (file)
@@ -28,14 +28,11 @@ DEPLOYMENTFOLDERS = sudoers_stuff loadModule
 # MOBILITY +=
 
 SOURCES += main.cpp mainwindow.cpp \
-    necprotocol.cpp \
-    rc5protocol.cpp \
     pirmakenames.cpp \
     pirdocumentationform.cpp \
     piraboutform.cpp \
     pirexception.cpp \
     pirkeysetwidgetitem.cpp \
-    pirprotocol.cpp \
     keysets/apple.cpp \
     keysets/ei.cpp \
     keysets/goldstar.cpp \
@@ -66,23 +63,29 @@ SOURCES += main.cpp mainwindow.cpp \
     keysets/denon.cpp \
     keysets/pinnacle.cpp \
     keysets/magnavox.cpp \
-    rc6protocol.cpp \
     keysets/philips.cpp \
     keysets/tivo.cpp \
     keysets/elgato.cpp \
-    sircprotocol.cpp \
-    jvcprotocol.cpp \
-    sharpprotocol.cpp
+    protocols/jvcprotocol.cpp \
+    protocols/necprotocol.cpp \
+    protocols/pirprotocol.cpp \
+    protocols/rc5protocol.cpp \
+    protocols/rc6protocol.cpp \
+    protocols/sharpprotocol.cpp \
+    protocols/sircprotocol.cpp \
+    protocols/pioneerprotocol.cpp \
+    protocols/lircprotocol.cpp \
+    protocols/samsungprotocol.cpp \
+    keysets/pioneer.cpp \
+    protocols/spaceprotocol.cpp \
+    pirsecondaryform.cpp
 HEADERS += mainwindow.h \
     pirkeynames.h \
-    necprotocol.h \
-    rc5protocol.h \
     pirmakenames.h \
     pirdocumentationform.h \
     piraboutform.h \
     pirexception.h \
     pirkeysetwidgetitem.h \
-    pirprotocol.h \
     keysets/apple.h \
     keysets/ei.h \
     keysets/goldstar.h \
@@ -113,17 +116,27 @@ HEADERS += mainwindow.h \
     keysets/denon.h \
     keysets/pinnacle.h \
     keysets/magnavox.h \
-    rc6protocol.h \
     keysets/philips.h \
     keysets/tivo.h \
     keysets/elgato.h \
-    sircprotocol.h \
-    jvcprotocol.h \
-    sharpprotocol.h
+    protocols/jvcprotocol.h \
+    protocols/necprotocol.h \
+    protocols/pirprotocol.h \
+    protocols/rc5protocol.h \
+    protocols/rc6protocol.h \
+    protocols/sharpprotocol.h \
+    protocols/sircprotocol.h \
+    protocols/pioneerprotocol.h \
+    protocols/lircprotocol.h \
+    protocols/samsungprotocol.h \
+    keysets/pioneer.h \
+    protocols/spaceprotocol.h \
+    pirsecondaryform.h
 FORMS += mainwindow.ui \
     pirdocumentationform.ui \
     piraboutform.ui \
-    pirselectkeysetform.ui
+    pirselectkeysetform.ui \
+    pirsecondaryform.ui
 
 # Please do not modify the following two lines. Required for deployment.
 include(deployment.pri)
@@ -184,7 +197,6 @@ OTHER_FILES += \
     www/PierogiIcon.png \
     www/SelectKeysetWindow.png \
     www/UtilityTab.png \
-    qtc_packaging/debian_fremantle/postrm.needsfixing \
     www/FavoriteTab.png \
     www/Media2Tab.png \
     www/TVTab.png \
index c513a18..ee3493d 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.0, 2012-01-30T20:37:02. -->
+<!-- Written by Qt Creator 2.4.0, 2012-02-03T10:02:18. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -79,7