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>
Mon, 3 Sep 2012 01:09:19 +0000 (21:09 -0400)
committerJohn Pietrzak <john@pietrzak.org>
Mon, 3 Sep 2012 01:09:19 +0000 (21:09 -0400)
Pierogi now has per-keyset editable data, allowing much greater
flexibility and control over individual keysets.  The favorites system
has been completely revamped to work as per-keyset data; favorites are
now retrieved via a pop-up menu on the main screen.  Keyset nicknames
have also been added.  Also in this version, a new "audio" panel, and
a first pass at keysets for ADB (I-Can), Anitech, Blaupunkt, Lifetec,
Medion, Sylvania, Triax, and Viewsonic.

91 files changed:
PierogiResources.qrc
dialogs/pireditkeysetdialog.cpp [new file with mode: 0644]
dialogs/pireditkeysetdialog.h [new file with mode: 0644]
dialogs/pireditkeysetdialog.ui [new file with mode: 0644]
dialogs/pirfavoritesdialog.cpp [new file with mode: 0644]
dialogs/pirfavoritesdialog.h [new file with mode: 0644]
dialogs/pirfavoritesdialog.ui [new file with mode: 0644]
dialogs/pirtabschoicedialog.cpp
forms/piraudiodeviceform.cpp [new file with mode: 0644]
forms/piraudiodeviceform.h [new file with mode: 0644]
forms/piraudiodeviceform.ui [new file with mode: 0644]
forms/pirfavoritesform.cpp [deleted file]
forms/pirfavoritesform.h [deleted file]
forms/pirfavoritesform.ui [deleted file]
forms/pirmedia2form.cpp
forms/pirvcrform.cpp [new file with mode: 0644]
forms/pirvcrform.h [new file with mode: 0644]
forms/pirvcrform.ui [new file with mode: 0644]
forms/pirvideodiscform.cpp [new file with mode: 0644]
forms/pirvideodiscform.h [new file with mode: 0644]
forms/pirvideodiscform.ui [new file with mode: 0644]
icons/folder_plus_icon&32.png [new file with mode: 0755]
keysets/adb.cpp [new file with mode: 0644]
keysets/adb.h [new file with mode: 0644]
keysets/admiral.cpp
keysets/aiwa.cpp
keysets/anitech.cpp [new file with mode: 0644]
keysets/anitech.h [new file with mode: 0644]
keysets/arcam.cpp
keysets/blaupunkt.cpp [new file with mode: 0644]
keysets/blaupunkt.h [new file with mode: 0644]
keysets/bose.cpp
keysets/cambridge.cpp
keysets/daewoo.cpp
keysets/denon.cpp
keysets/goldstar.cpp
keysets/grundig.cpp
keysets/harmankardon.cpp
keysets/hitachi.cpp
keysets/hyundai.cpp
keysets/jvc.cpp
keysets/kenwood.cpp
keysets/lg.cpp
keysets/lifetec.cpp [new file with mode: 0644]
keysets/lifetec.h [new file with mode: 0644]
keysets/loewe.cpp
keysets/magnavox.cpp
keysets/mce.cpp
keysets/mce.h
keysets/medion.cpp [new file with mode: 0644]
keysets/medion.h [new file with mode: 0644]
keysets/mitsubishi.cpp
keysets/nad.cpp
keysets/orion.cpp
keysets/panasonic.cpp
keysets/philips.cpp
keysets/pioneer.cpp
keysets/saba.cpp
keysets/samsung.cpp
keysets/sanyo.cpp
keysets/sharp.cpp
keysets/sony.cpp
keysets/sylvania.cpp [new file with mode: 0644]
keysets/sylvania.h [new file with mode: 0644]
keysets/technics.cpp
keysets/thomson.cpp
keysets/triax.cpp [new file with mode: 0644]
keysets/triax.h [new file with mode: 0644]
keysets/universum.cpp
keysets/viewsonic.cpp [new file with mode: 0644]
keysets/viewsonic.h [new file with mode: 0644]
keysets/yamaha.cpp
mainwindow.cpp
mainwindow.h
pierogi.pro
pierogi.pro.user
pirkeynames.h
pirkeysetmanager.cpp
pirkeysetmanager.h
pirkeysetmetadata.cpp
pirkeysetwidgetitem.cpp
pirkeysetwidgetitem.h
pirmakenames.cpp
pirmakenames.h
pirpanelmanager.cpp
pirpanelmanager.h
pirpanelnames.h
pirselectkeysetform.cpp
pirselectkeysetform.h
qtc_packaging/debian_fremantle/changelog
qtc_packaging/debian_fremantle/control

index b5ac296..acafd40 100644 (file)
@@ -35,5 +35,6 @@
         <file>icons/red_pause.png</file>
         <file>icons/delete_icon&amp;48.png</file>
         <file>icons/align_just_icon&amp;32.png</file>
+        <file>icons/folder_plus_icon&amp;32.png</file>
     </qresource>
 </RCC>
diff --git a/dialogs/pireditkeysetdialog.cpp b/dialogs/pireditkeysetdialog.cpp
new file mode 100644 (file)
index 0000000..c0662c3
--- /dev/null
@@ -0,0 +1,250 @@
+#include "pireditkeysetdialog.h"
+#include "ui_pireditkeysetdialog.h"
+
+#include "mainwindow.h"
+#include "pirkeysetwidgetitem.h"
+
+#include <QSettings>
+
+#include "pirmakenames.h"
+extern PIRMakeMgr makeManager;
+
+/*
+PIREditKeysetDialog::PIREditKeysetDialog(QWidget *parent) :
+  QDialog(parent),
+  ui(new Ui::PIREditKeysetDialog)
+{
+  ui->setupUi(this);
+}
+*/
+
+PIREditKeysetDialog::PIREditKeysetDialog(
+  MainWindow *mw)
+  : QDialog(mw),
+    ui(new Ui::PIREditKeysetDialog),
+    mainWindow(mw)
+{
+  ui->setupUi(this);
+
+  connect(
+    this,
+    SIGNAL(accepted()),
+    this,
+    SLOT(enactChanges()),
+    Qt::QueuedConnection);
+}
+
+PIREditKeysetDialog::~PIREditKeysetDialog()
+{
+  delete ui;
+}
+
+
+void PIREditKeysetDialog::setupDialog(
+  PIRKeysetWidgetItem *kwi)
+{
+  ui->keysetNameLabel->setText(
+    kwi->text());
+
+  ui->addToFavoritesCheckBox->setChecked(kwi->isFavorite());
+
+  if (kwi->hasNickname())
+  {
+    ui->nicknameLineEdit->setText(kwi->getNickname());
+  }
+
+  keysetItem = kwi;
+}
+
+
+void PIREditKeysetDialog::enactChanges()
+{
+  // Did the nickname change?
+  bool nickChanged = false;
+  QString newNick = ui->nicknameLineEdit->text();
+  if (newNick != keysetItem->getNickname())
+  {
+    nickChanged = true;
+
+    keysetItem->setNickname(newNick);
+
+    // Need to update the display name:
+    QString newDisplayName;
+    if (!newNick.isEmpty())
+    {
+      newDisplayName = newNick;
+      newDisplayName.append(" (");
+      newDisplayName.append(makeManager.getMakeString(keysetItem->getMake()));
+      newDisplayName.append(" ");
+      newDisplayName.append(keysetItem->getInternalName());
+      newDisplayName.append(")");
+
+      updateQSettingsNickname();
+    }
+    else
+    {
+      newDisplayName = makeManager.getMakeString(keysetItem->getMake());
+      newDisplayName.append(" ");
+      newDisplayName.append(keysetItem->getInternalName());
+
+      removeQSettingsNickname();
+    }
+
+    keysetItem->setText(newDisplayName);
+  }
+
+  // Did the favorites setting change?
+  if (keysetItem->isFavorite())
+  {
+    if (!ui->addToFavoritesCheckBox->isChecked())
+    {
+      // Remove it from the favorites list:
+      keysetItem->setFavorite(false);
+      mainWindow->removeFromFavorites(keysetItem->getID());
+    }
+    else
+    {
+      // It's already in the favorites list, but if the nickname changed,
+      // we still need to update its entry:
+      if (nickChanged)
+      {
+        mainWindow->removeFromFavorites(keysetItem->getID());
+        mainWindow->addToFavorites(keysetItem);
+      }
+    }
+  }
+  else
+  {
+    if (ui->addToFavoritesCheckBox->isChecked())
+    {
+      keysetItem->setFavorite(true);
+      mainWindow->addToFavorites(keysetItem);
+    }
+  }
+
+  // Finally, clean up the dialog box for the next user:
+  ui->nicknameLineEdit->clear();
+}
+
+
+// Creating a new QSettings array entry, or updating an existing one, is
+// relatively painless:
+void PIREditKeysetDialog::updateQSettingsNickname()
+{
+  QSettings settings("pietrzak.org", "Pierogi");
+
+  // Try to find an existing entry:
+  int size = settings.beginReadArray("userNames");
+  int index = 0;
+  QString name;
+  QString makeStr;
+  PIRMakeName makeID;
+
+  while (index < size)
+  {
+    settings.setArrayIndex(index);
+    name = settings.value("keysetName").toString();
+
+    if (name == keysetItem->getInternalName())
+    {
+      makeStr = settings.value("keysetMake").toString();
+      makeID = makeManager.getMakeID(makeStr);
+
+      if (makeID == keysetItem->getMake())
+      {
+        // We've found a match, so we just need to update it:
+        settings.endArray();
+        settings.beginWriteArray("userNames");
+        settings.setArrayIndex(index);
+        settings.setValue("keysetNickname", keysetItem->getNickname());
+        settings.endArray();
+
+        // And we're done!
+        return;
+      }
+    }
+
+    ++index;
+  }
+
+  settings.endArray();
+
+  // There was no existing entry, so we just need to make one:
+  settings.beginWriteArray("userNames");
+  settings.setArrayIndex(size);
+
+  settings.setValue(
+    "keysetName",
+    keysetItem->getInternalName());
+
+  settings.setValue(
+    "keysetMake",
+    makeManager.getMakeString(keysetItem->getMake()));
+
+  settings.setValue(
+    "keysetNickname",
+    keysetItem->getNickname());
+
+  settings.endArray();
+}
+
+
+// Removing an entry from a QSettings array is, unfortunately, quite painful:
+struct stringTriple
+{
+  QString keysetName;
+  QString keysetMake;
+  QString keysetNickname;
+};
+
+typedef std::map <int, stringTriple> PIRSettingsData;
+
+void PIREditKeysetDialog::removeQSettingsNickname()
+{
+  QSettings settings("pietrzak.org", "Pierogi");
+
+  int size = settings.beginReadArray("userNames");
+  int index = 0;
+  int index2 = 0;
+  PIRSettingsData backupData;
+  QString nameToRemove = keysetItem->getInternalName();
+  QString makeToRemove = makeManager.getMakeString(keysetItem->getMake());
+
+  while (index < size)
+  {
+    settings.setArrayIndex(index);
+
+    if ( (settings.value("keysetName").toString() != nameToRemove)
+      && (settings.value("keysetMake").toString() != makeToRemove) )
+    {
+      backupData[index2].keysetName =
+        settings.value("keysetName").toString();
+      backupData[index2].keysetMake =
+        settings.value("keysetMake").toString();
+      backupData[index2].keysetNickname =
+        settings.value("keysetNickname").toString();
+      ++index2;
+    }
+
+    ++index;
+  }
+
+  // Close the array, blow it away, and create a new one:
+
+  settings.endArray();
+  settings.remove("userNames");
+  settings.beginWriteArray("userNames");
+
+  size = index2;
+  index = 0;
+
+  while (index < size)
+  {
+    settings.setArrayIndex(index);
+    settings.setValue("keysetName", backupData[index].keysetName);
+    settings.setValue("keysetMake", backupData[index].keysetMake);
+    settings.setValue("keysetNickname", backupData[index].keysetNickname);
+    ++index;
+  }
+  settings.endArray();
+}
diff --git a/dialogs/pireditkeysetdialog.h b/dialogs/pireditkeysetdialog.h
new file mode 100644 (file)
index 0000000..dc69a9d
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef PIREDITKEYSETDIALOG_H
+#define PIREDITKEYSETDIALOG_H
+
+#include <QDialog>
+
+class PIRKeysetWidgetItem;
+class MainWindow;
+
+namespace Ui {
+class PIREditKeysetDialog;
+}
+
+class PIREditKeysetDialog : public QDialog
+{
+  Q_OBJECT
+  
+public:
+//  explicit PIREditKeysetDialog(QWidget *parent = 0);
+
+  PIREditKeysetDialog(
+    MainWindow *mw);
+
+  ~PIREditKeysetDialog();
+
+  void setupDialog(
+    PIRKeysetWidgetItem *kwi);
+  
+private slots:
+  void enactChanges();
+
+private:
+  void updateQSettingsNickname();
+  void removeQSettingsNickname();
+
+  Ui::PIREditKeysetDialog *ui;
+
+  MainWindow *mainWindow;
+  PIRKeysetWidgetItem *keysetItem;
+};
+
+#endif // PIREDITKEYSETDIALOG_H
diff --git a/dialogs/pireditkeysetdialog.ui b/dialogs/pireditkeysetdialog.ui
new file mode 100644 (file)
index 0000000..ad58a57
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIREditKeysetDialog</class>
+ <widget class="QDialog" name="PIREditKeysetDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Keyset Settings</string>
+  </property>
+  <property name="modal">
+   <bool>true</bool>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout_2">
+   <property name="margin">
+    <number>8</number>
+   </property>
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QLabel" name="keysetNameLabel">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="frameShape">
+        <enum>QFrame::NoFrame</enum>
+       </property>
+       <property name="text">
+        <string>Keyset Name</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="Line" name="line">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="addToFavoritesCheckBox">
+       <property name="text">
+        <string>Add keyset to favorites list</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <item>
+        <widget class="QLabel" name="nicknameLabel">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string>Nickname</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLineEdit" name="nicknameLineEdit"/>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>PIREditKeysetDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>PIREditKeysetDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/dialogs/pirfavoritesdialog.cpp b/dialogs/pirfavoritesdialog.cpp
new file mode 100644 (file)
index 0000000..3b522ef
--- /dev/null
@@ -0,0 +1,158 @@
+#include "pirfavoritesdialog.h"
+#include "ui_pirfavoritesdialog.h"
+
+//#include <QListWidget>
+
+#include "mainwindow.h"
+#include "pirkeysetwidgetitem.h"
+#include <QMaemo5InformationBox>
+
+/*
+PIRFavoritesDialog::PIRFavoritesDialog(QWidget *parent) :
+  QDialog(parent),
+  ui(new Ui::PIRFavoritesDialog)
+{
+  ui->setupUi(this);
+}
+*/
+
+
+PIRFavoritesDialog::PIRFavoritesDialog(
+  MainWindow *mw)
+  : QDialog(0),
+    ui(new Ui::PIRFavoritesDialog),
+    mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+
+PIRFavoritesDialog::~PIRFavoritesDialog()
+{
+  delete ui;
+}
+
+
+void PIRFavoritesDialog::selectPrevFavKeyset()
+{
+  int size = ui->favoritesListWidget->count();
+
+  if (size == 0)
+  {
+    // No favorites, so nothing to do!
+    return;
+  }
+
+  int position = ui->favoritesListWidget->currentRow();
+
+  --position;
+  if (position < 0)
+  {
+    position = size - 1;
+  }
+
+  ui->favoritesListWidget->setCurrentRow(
+    position,
+    QItemSelectionModel::ClearAndSelect);
+
+  mainWindow->keysetSelectionChanged(
+    ui->favoritesListWidget->currentItem());
+
+  // Tell the user about the change:
+  QMaemo5InformationBox::information(
+    0,
+    ui->favoritesListWidget->item(position)->text());
+}
+
+
+void PIRFavoritesDialog::selectNextFavKeyset()
+{
+  int size = ui->favoritesListWidget->count();
+
+  if (size == 0)
+  {
+    // No favorites, so just return:
+    return;
+  }
+
+  int position = ui->favoritesListWidget->currentRow();
+
+  ++position;
+  if (position == size)
+  {
+    position = 0;
+  }
+
+  ui->favoritesListWidget->setCurrentRow(
+    position,
+    QItemSelectionModel::ClearAndSelect);
+
+  mainWindow->keysetSelectionChanged(
+    ui->favoritesListWidget->currentItem());
+
+  // Tell the user about the change:
+  QMaemo5InformationBox::information(
+    0,
+    ui->favoritesListWidget->item(position)->text());
+}
+
+
+void PIRFavoritesDialog::addItem(
+  PIRKeysetWidgetItem *item)
+{
+  PIRKeysetWidgetItem *itemCopy = new PIRKeysetWidgetItem(item);
+  ui->favoritesListWidget->addItem(itemCopy);
+  ui->favoritesListWidget->sortItems();
+}
+
+
+int PIRFavoritesDialog::getCount()
+{
+  return ui->favoritesListWidget->count();
+}
+
+
+PIRKeysetWidgetItem *PIRFavoritesDialog::getItem(
+  int index)
+{
+  return dynamic_cast<PIRKeysetWidgetItem *>(
+    ui->favoritesListWidget->item(index));
+}
+
+
+void PIRFavoritesDialog::removeItem(
+  unsigned int keysetID)
+{
+  // Find the keyset in the list (if it is there):
+  int count = ui->favoritesListWidget->count();
+  int index = 0;
+  PIRKeysetWidgetItem *kwi;
+
+  while (index < count)
+  {
+    kwi = dynamic_cast<PIRKeysetWidgetItem *>(
+         ui->favoritesListWidget->item(index));
+
+    if (kwi->getID() == keysetID)
+    {
+      // Deleting the item removes it from the list:
+      delete kwi;
+      return;
+    }
+
+    ++index;
+  }
+}
+
+
+QListWidget *PIRFavoritesDialog::getFavoritesListWidget()
+{
+  return ui->favoritesListWidget;
+}
+
+
+void PIRFavoritesDialog::on_favoritesListWidget_itemClicked()
+{
+  // Exit from the dialog:
+  accept();
+}
diff --git a/dialogs/pirfavoritesdialog.h b/dialogs/pirfavoritesdialog.h
new file mode 100644 (file)
index 0000000..4b233f0
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef PIRFAVORITESDIALOG_H
+#define PIRFAVORITESDIALOG_H
+
+#include <QDialog>
+
+class QListWidget;
+class PIRKeysetWidgetItem;
+class QListWidgetItem;
+class MainWindow;
+
+namespace Ui {
+class PIRFavoritesDialog;
+}
+
+class PIRFavoritesDialog : public QDialog
+{
+  Q_OBJECT
+  
+public:
+//  explicit PIRFavoritesDialog(QWidget *parent = 0);
+
+  PIRFavoritesDialog(
+    MainWindow *mw);
+
+  ~PIRFavoritesDialog();
+
+  QListWidget *getFavoritesListWidget();
+
+  void addItem(
+    PIRKeysetWidgetItem *item);
+
+  int getCount();
+
+  PIRKeysetWidgetItem *getItem(
+    int index);
+
+  void removeItem(
+    unsigned int keysetID);
+
+  void selectPrevFavKeyset();
+  void selectNextFavKeyset();
+
+private slots:
+  void on_favoritesListWidget_itemClicked();
+  
+private:
+  Ui::PIRFavoritesDialog *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRFAVORITESDIALOG_H
diff --git a/dialogs/pirfavoritesdialog.ui b/dialogs/pirfavoritesdialog.ui
new file mode 100644 (file)
index 0000000..e59385f
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRFavoritesDialog</class>
+ <widget class="QDialog" name="PIRFavoritesDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Choose Favorite Keyset</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="margin">
+    <number>8</number>
+   </property>
+   <item>
+    <widget class="QListWidget" name="favoritesListWidget"/>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index 41a84f6..7cf9a4f 100644 (file)
@@ -22,6 +22,9 @@ PIRTabsChoiceDialog::PIRTabsChoiceDialog(
     new PIRTabsWidgetItem("Video Media Panels", VideoMedia_Tabs));
 
   ui->tabsChoiceListWidget->addItem(
+    new PIRTabsWidgetItem("Audio Device Panels", Audio_Tabs));
+
+  ui->tabsChoiceListWidget->addItem(
     new PIRTabsWidgetItem("Recording Panels", Record_Tabs));
 
   ui->tabsChoiceListWidget->addItem(
diff --git a/forms/piraudiodeviceform.cpp b/forms/piraudiodeviceform.cpp
new file mode 100644 (file)
index 0000000..0a26846
--- /dev/null
@@ -0,0 +1,202 @@
+#include "piraudiodeviceform.h"
+#include "ui_piraudiodeviceform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRAudioDeviceForm::PIRAudioDeviceForm(
+  MainWindow *mw)
+  : QWidget(0),
+    ui(new Ui::PIRAudioDeviceForm),
+    mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRAudioDeviceForm::~PIRAudioDeviceForm()
+{
+  delete ui;
+}
+
+
+void PIRAudioDeviceForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
+  emit cdEnabled(keyset->hasKey(id, CDInput_Key));
+  emit tapeEnabled(keyset->hasKey(id, TapeInput_Key));
+  emit phonoEnabled(keyset->hasKey(id, PhonoInput_Key));
+  emit auxEnabled(keyset->hasKey(id, AuxInput_Key));
+  emit tunerEnabled(keyset->hasKey(id, TunerInput_Key));
+  emit fmEnabled(keyset->hasKey(id, FM_Key));
+  emit amEnabled(keyset->hasKey(id, AM_Key));
+  emit lwEnabled(keyset->hasKey(id, LW_Key));
+  emit fmModeEnabled(keyset->hasKey(id, FMMode_Key));
+  emit repeatEnabled(keyset->hasKey(id, Repeat_Key));
+  emit repeatABEnabled(keyset->hasKey(id, RepeatAB_Key));
+  emit randomEnabled(keyset->hasKey(id, Random_Key));
+  emit nextDiscEnabled(keyset->hasKey(id, NextDisc_Key));
+  emit prevDiscEnabled(keyset->hasKey(id, PrevDisc_Key));
+  emit sleepEnabled(keyset->hasKey(id, Sleep_Key));
+  emit infoEnabled(keyset->hasKey(id, Info_Key));
+}
+
+void PIRAudioDeviceForm::on_cdButton_pressed()
+{
+  mainWindow->startRepeating(CDInput_Key);
+}
+
+void PIRAudioDeviceForm::on_cdButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_tapeButton_pressed()
+{
+  mainWindow->startRepeating(TapeInput_Key);
+}
+
+void PIRAudioDeviceForm::on_tapeButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_phonoButton_pressed()
+{
+  mainWindow->startRepeating(PhonoInput_Key);
+}
+
+void PIRAudioDeviceForm::on_phonoButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_auxButton_pressed()
+{
+  mainWindow->startRepeating(AuxInput_Key);
+}
+
+void PIRAudioDeviceForm::on_auxButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_tunerButton_pressed()
+{
+  mainWindow->startRepeating(TunerInput_Key);
+}
+
+void PIRAudioDeviceForm::on_tunerButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_fmButton_pressed()
+{
+  mainWindow->startRepeating(FM_Key);
+}
+
+void PIRAudioDeviceForm::on_fmButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_amButton_pressed()
+{
+  mainWindow->startRepeating(AM_Key);
+}
+
+void PIRAudioDeviceForm::on_amButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_lwButton_pressed()
+{
+  mainWindow->startRepeating(LW_Key);
+}
+
+void PIRAudioDeviceForm::on_lwButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_fmModeButton_pressed()
+{
+  mainWindow->startRepeating(FMMode_Key);
+}
+
+void PIRAudioDeviceForm::on_fmModeButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_repeatButton_pressed()
+{
+  mainWindow->startRepeating(Repeat_Key);
+}
+
+void PIRAudioDeviceForm::on_repeatButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_repeatABButton_pressed()
+{
+  mainWindow->startRepeating(RepeatAB_Key);
+}
+
+void PIRAudioDeviceForm::on_repeatABButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_randomButton_pressed()
+{
+  mainWindow->startRepeating(Random_Key);
+}
+
+void PIRAudioDeviceForm::on_randomButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_nextDiscButton_pressed()
+{
+  mainWindow->startRepeating(NextDisc_Key);
+}
+
+void PIRAudioDeviceForm::on_nextDiscButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_prevDiscButton_pressed()
+{
+  mainWindow->startRepeating(PrevDisc_Key);
+}
+
+void PIRAudioDeviceForm::on_prevDiscButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_sleepButton_pressed()
+{
+  mainWindow->startRepeating(Sleep_Key);
+}
+
+void PIRAudioDeviceForm::on_sleepButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAudioDeviceForm::on_infoButton_pressed()
+{
+  mainWindow->startRepeating(Info_Key);
+}
+
+void PIRAudioDeviceForm::on_infoButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/piraudiodeviceform.h b/forms/piraudiodeviceform.h
new file mode 100644 (file)
index 0000000..e7d0054
--- /dev/null
@@ -0,0 +1,87 @@
+#ifndef PIRAUDIODEVICEFORM_H
+#define PIRAUDIODEVICEFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRAudioDeviceForm;
+}
+
+class PIRAudioDeviceForm : public QWidget
+{
+  Q_OBJECT
+  
+public:
+//  explicit PIRAudioDeviceForm(QWidget *parent = 0);
+
+  PIRAudioDeviceForm(
+    MainWindow *mw);
+
+  ~PIRAudioDeviceForm();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void cdEnabled(bool);
+  void tapeEnabled(bool);
+  void phonoEnabled(bool);
+  void auxEnabled(bool);
+  void tunerEnabled(bool);
+  void fmEnabled(bool);
+  void amEnabled(bool);
+  void lwEnabled(bool);
+  void fmModeEnabled(bool);
+  void repeatEnabled(bool);
+  void repeatABEnabled(bool);
+  void randomEnabled(bool);
+  void nextDiscEnabled(bool);
+  void prevDiscEnabled(bool);
+  void sleepEnabled(bool);
+  void infoEnabled(bool);
+  
+private slots:
+  void on_cdButton_pressed();
+  void on_cdButton_released();
+  void on_tapeButton_pressed();
+  void on_tapeButton_released();
+  void on_phonoButton_pressed();
+  void on_phonoButton_released();
+  void on_auxButton_pressed();
+  void on_auxButton_released();
+  void on_tunerButton_pressed();
+  void on_tunerButton_released();
+  void on_fmButton_pressed();
+  void on_fmButton_released();
+  void on_amButton_pressed();
+  void on_amButton_released();
+  void on_lwButton_pressed();
+  void on_lwButton_released();
+  void on_fmModeButton_pressed();
+  void on_fmModeButton_released();
+  void on_repeatButton_pressed();
+  void on_repeatButton_released();
+  void on_repeatABButton_pressed();
+  void on_repeatABButton_released();
+  void on_randomButton_pressed();
+  void on_randomButton_released();
+  void on_nextDiscButton_pressed();
+  void on_nextDiscButton_released();
+  void on_prevDiscButton_pressed();
+  void on_prevDiscButton_released();
+  void on_sleepButton_pressed();
+  void on_sleepButton_released();
+  void on_infoButton_pressed();
+  void on_infoButton_released();
+
+private:
+  Ui::PIRAudioDeviceForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRAUDIODEVICEFORM_H
diff --git a/forms/piraudiodeviceform.ui b/forms/piraudiodeviceform.ui
new file mode 100644 (file)
index 0000000..20cac6b
--- /dev/null
@@ -0,0 +1,504 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRAudioDeviceForm</class>
+ <widget class="QWidget" name="PIRAudioDeviceForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <widget class="QPushButton" name="cdButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>CD</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="tapeButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Tape</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="phonoButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Phono</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="3">
+    <widget class="QPushButton" name="auxButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Aux</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="tunerButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Tuner</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="fmButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>FM</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="amButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>AM / MW</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <widget class="QPushButton" name="lwButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>LW</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QPushButton" name="fmModeButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>FM Stereo/Mono</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" 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="2" 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="3" column="0">
+    <widget class="QPushButton" name="nextDiscButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Next Disc</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1">
+    <widget class="QPushButton" name="prevDiscButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Previous Disc</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="2">
+    <widget class="QPushButton" name="sleepButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Sleep</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="3">
+    <widget class="QPushButton" name="infoButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Info</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" 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>Repeat A-B</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>cdEnabled(bool)</signal>
+   <receiver>cdButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>103</x>
+     <y>65</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>tapeEnabled(bool)</signal>
+   <receiver>tapeButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>301</x>
+     <y>65</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>phonoEnabled(bool)</signal>
+   <receiver>phonoButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>498</x>
+     <y>65</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>auxEnabled(bool)</signal>
+   <receiver>auxButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>696</x>
+     <y>65</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>tunerEnabled(bool)</signal>
+   <receiver>tunerButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>103</x>
+     <y>183</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>fmEnabled(bool)</signal>
+   <receiver>fmButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>301</x>
+     <y>183</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>amEnabled(bool)</signal>
+   <receiver>amButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>498</x>
+     <y>183</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>lwEnabled(bool)</signal>
+   <receiver>lwButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>696</x>
+     <y>183</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>fmModeEnabled(bool)</signal>
+   <receiver>fmModeButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>103</x>
+     <y>300</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>repeatEnabled(bool)</signal>
+   <receiver>repeatButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>301</x>
+     <y>300</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>repeatABEnabled(bool)</signal>
+   <receiver>repeatABButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>498</x>
+     <y>300</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>randomEnabled(bool)</signal>
+   <receiver>randomButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>696</x>
+     <y>300</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>nextDiscEnabled(bool)</signal>
+   <receiver>nextDiscButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>103</x>
+     <y>418</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>prevDiscEnabled(bool)</signal>
+   <receiver>prevDiscButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>301</x>
+     <y>418</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>sleepEnabled(bool)</signal>
+   <receiver>sleepButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>498</x>
+     <y>418</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAudioDeviceForm</sender>
+   <signal>infoEnabled(bool)</signal>
+   <receiver>infoButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>696</x>
+     <y>418</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>cdEnabled(bool)</signal>
+  <signal>tapeEnabled(bool)</signal>
+  <signal>phonoEnabled(bool)</signal>
+  <signal>auxEnabled(bool)</signal>
+  <signal>tunerEnabled(bool)</signal>
+  <signal>fmEnabled(bool)</signal>
+  <signal>amEnabled(bool)</signal>
+  <signal>lwEnabled(bool)</signal>
+  <signal>fmModeEnabled(bool)</signal>
+  <signal>repeatEnabled(bool)</signal>
+  <signal>repeatABEnabled(bool)</signal>
+  <signal>randomEnabled(bool)</signal>
+  <signal>nextDiscEnabled(bool)</signal>
+  <signal>prevDiscEnabled(bool)</signal>
+  <signal>sleepEnabled(bool)</signal>
+  <signal>infoEnabled(bool)</signal>
+ </slots>
+</ui>
diff --git a/forms/pirfavoritesform.cpp b/forms/pirfavoritesform.cpp
deleted file mode 100644 (file)
index adaa656..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-#include "pirfavoritesform.h"
-#include "ui_pirfavoritesform.h"
-
-#include "mainwindow.h"
-//#include "pirkeysetmanager.h"
-#include "pirkeysetwidgetitem.h"
-
-#include <QMaemo5InformationBox>
-
-PIRFavoritesForm::PIRFavoritesForm(
-  MainWindow *mw)
-  : QWidget(0),
-    ui(new Ui::PIRFavoritesForm),
-    mainWindow(mw)
-{
-  ui->setupUi(this);
-}
-
-PIRFavoritesForm::~PIRFavoritesForm()
-{
-  delete ui;
-}
-
-
-void PIRFavoritesForm::selectPrevFavKeyset()
-{
-  int size = ui->favoriteKeysetsWidget->count();
-
-  if (size == 0)
-  {
-    // No favorites, so nothing to do!
-    return;
-  }
-
-  int position = ui->favoriteKeysetsWidget->currentRow();
-
-  --position;
-  if (position < 0)
-  {
-    position = size - 1;
-  }
-
-  ui->favoriteKeysetsWidget->setCurrentRow(
-    position,
-    QItemSelectionModel::ClearAndSelect);
-
-  mainWindow->keysetSelectionChanged(
-    ui->favoriteKeysetsWidget->currentItem());
-
-  // Tell the user about the change:
-  QMaemo5InformationBox::information(
-    0,
-    ui->favoriteKeysetsWidget->item(position)->text());
-}
-
-
-void PIRFavoritesForm::selectNextFavKeyset()
-{
-  int size = ui->favoriteKeysetsWidget->count();
-
-  if (size == 0)
-  {
-    // No favorites, so just return:
-    return;
-  }
-
-  int position = ui->favoriteKeysetsWidget->currentRow();
-
-  ++position;
-  if (position == size)
-  {
-    position = 0;
-  }
-
-  ui->favoriteKeysetsWidget->setCurrentRow(
-    position,
-    QItemSelectionModel::ClearAndSelect);
-
-  mainWindow->keysetSelectionChanged(
-    ui->favoriteKeysetsWidget->currentItem());
-
-  // Tell the user about the change:
-  QMaemo5InformationBox::information(
-    0,
-    ui->favoriteKeysetsWidget->item(position)->text());
-}
-
-
-void PIRFavoritesForm::addItem(
-  PIRKeysetWidgetItem *item)
-{
-  ui->favoriteKeysetsWidget->addItem(item);
-}
-
-
-QListWidget *PIRFavoritesForm::getFavoritesListWidget()
-{
-  return ui->favoriteKeysetsWidget;
-}
-
-
-void PIRFavoritesForm::on_addKeysetButton_clicked()
-{
-  mainWindow->addCurrentKeyset(ui->favoriteKeysetsWidget);
-}
-
-
-void PIRFavoritesForm::on_removeKeysetButton_clicked()
-{
-  mainWindow->removeFavoriteKeyset(ui->favoriteKeysetsWidget);
-}
diff --git a/forms/pirfavoritesform.h b/forms/pirfavoritesform.h
deleted file mode 100644 (file)
index 5e86b54..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef PIRFAVORITESFORM_H
-#define PIRFAVORITESFORM_H
-
-#include <QWidget>
-
-class MainWindow;
-//class PIRKeysetManager;
-class PIRKeysetWidgetItem;
-class QListWidget;
-
-namespace Ui {
-class PIRFavoritesForm;
-}
-
-class PIRFavoritesForm : public QWidget
-{
-  Q_OBJECT
-  
-public:
-//  explicit PIRFavoritesForm(QWidget *parent = 0);
-  PIRFavoritesForm(
-    MainWindow *mw);
-
-  ~PIRFavoritesForm();
-
-  void selectPrevFavKeyset();
-  void selectNextFavKeyset();
-
-  void addItem(
-    PIRKeysetWidgetItem *item);
-
-  QListWidget *getFavoritesListWidget();
-
-private slots:
-  void on_addKeysetButton_clicked();
-  void on_removeKeysetButton_clicked();
-  
-private:
-  Ui::PIRFavoritesForm *ui;
-
-  MainWindow *mainWindow;
-};
-
-#endif // PIRFAVORITESFORM_H
diff --git a/forms/pirfavoritesform.ui b/forms/pirfavoritesform.ui
deleted file mode 100644 (file)
index 316e1c3..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>PIRFavoritesForm</class>
- <widget class="QWidget" name="PIRFavoritesForm">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>800</width>
-    <height>480</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <property name="margin">
-    <number>0</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>
- <resources/>
- <connections/>
-</ui>
index 0020cd5..0738eb8 100644 (file)
@@ -22,7 +22,7 @@ void PIRMedia2Form::enableButtons(
   const PIRKeysetManager *km,
   unsigned int id)
 {
-  emit tunerBandEnabled(km->hasKey(id, TunerBand_Key));
+  emit tunerBandEnabled(km->hasKey(id, TunerInput_Key));
   emit programEnabled(km->hasKey(id, Program_Key));
   emit memoryEnabled(km->hasKey(id, Memory_Key));
   emit callEnabled(km->hasKey(id, Call_Key));
@@ -43,7 +43,7 @@ void PIRMedia2Form::enableButtons(
 
 void PIRMedia2Form::on_tunerBandButton_pressed()
 {
-  mainWindow->startRepeating(TunerBand_Key);
+  mainWindow->startRepeating(TunerInput_Key);
 }
 
 void PIRMedia2Form::on_tunerBandButton_released()
diff --git a/forms/pirvcrform.cpp b/forms/pirvcrform.cpp
new file mode 100644 (file)
index 0000000..be23444
--- /dev/null
@@ -0,0 +1,14 @@
+#include "pirvcrform.h"
+#include "ui_pirvcrform.h"
+
+PIRVCRForm::PIRVCRForm(QWidget *parent) :
+  QWidget(parent),
+  ui(new Ui::PIRVCRForm)
+{
+  ui->setupUi(this);
+}
+
+PIRVCRForm::~PIRVCRForm()
+{
+  delete ui;
+}
diff --git a/forms/pirvcrform.h b/forms/pirvcrform.h
new file mode 100644 (file)
index 0000000..776394e
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef PIRVCRFORM_H
+#define PIRVCRFORM_H
+
+#include <QWidget>
+
+namespace Ui {
+class PIRVCRForm;
+}
+
+class PIRVCRForm : public QWidget
+{
+  Q_OBJECT
+  
+public:
+  explicit PIRVCRForm(QWidget *parent = 0);
+  ~PIRVCRForm();
+  
+private:
+  Ui::PIRVCRForm *ui;
+};
+
+#endif // PIRVCRFORM_H
diff --git a/forms/pirvcrform.ui b/forms/pirvcrform.ui
new file mode 100644 (file)
index 0000000..c8b1fb0
--- /dev/null
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRVCRForm</class>
+ <widget class="QWidget" name="PIRVCRForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <widget class="QPushButton" name="autoTrackingButton">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>310</y>
+     <width>131</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <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>
+  <widget class="QPushButton" name="vhsSpeedButton">
+   <property name="geometry">
+    <rect>
+     <x>470</x>
+     <y>300</y>
+     <width>99</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <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>
+  <widget class="QPushButton" name="trackingMinusButton">
+   <property name="geometry">
+    <rect>
+     <x>180</x>
+     <y>300</y>
+     <width>109</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="text">
+    <string>Tracking -</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="slowPlusButton">
+   <property name="geometry">
+    <rect>
+     <x>390</x>
+     <y>220</y>
+     <width>86</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="text">
+    <string>Slow +</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="trackingPlusButton">
+   <property name="geometry">
+    <rect>
+     <x>330</x>
+     <y>290</y>
+     <width>112</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="text">
+    <string>Tracking +</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="slowButton">
+   <property name="geometry">
+    <rect>
+     <x>210</x>
+     <y>220</y>
+     <width>71</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="text">
+    <string>Slow</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="slowMinusButton">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>220</y>
+     <width>83</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="text">
+    <string>Slow -</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="indexSearchButton">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>110</y>
+     <width>171</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Index Search (VISS)</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="markIndexButton">
+   <property name="geometry">
+    <rect>
+     <x>210</x>
+     <y>120</y>
+     <width>114</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Mark Index</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="eraseIndexButton">
+   <property name="geometry">
+    <rect>
+     <x>390</x>
+     <y>120</y>
+     <width>114</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Erase Index</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/forms/pirvideodiscform.cpp b/forms/pirvideodiscform.cpp
new file mode 100644 (file)
index 0000000..8ca5da9
--- /dev/null
@@ -0,0 +1,14 @@
+#include "pirvideodiscform.h"
+#include "ui_pirvideodiscform.h"
+
+PIRVideoDiscForm::PIRVideoDiscForm(QWidget *parent) :
+  QWidget(parent),
+  ui(new Ui::PIRVideoDiscForm)
+{
+  ui->setupUi(this);
+}
+
+PIRVideoDiscForm::~PIRVideoDiscForm()
+{
+  delete ui;
+}
diff --git a/forms/pirvideodiscform.h b/forms/pirvideodiscform.h
new file mode 100644 (file)
index 0000000..63670e5
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef PIRVIDEODISCFORM_H
+#define PIRVIDEODISCFORM_H
+
+#include <QWidget>
+
+namespace Ui {
+class PIRVideoDiscForm;
+}
+
+class PIRVideoDiscForm : public QWidget
+{
+  Q_OBJECT
+  
+public:
+  explicit PIRVideoDiscForm(QWidget *parent = 0);
+  ~PIRVideoDiscForm();
+  
+private:
+  Ui::PIRVideoDiscForm *ui;
+};
+
+#endif // PIRVIDEODISCFORM_H
diff --git a/forms/pirvideodiscform.ui b/forms/pirvideodiscform.ui
new file mode 100644 (file)
index 0000000..330bcf0
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRVideoDiscForm</class>
+ <widget class="QWidget" name="PIRVideoDiscForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <widget class="QPushButton" name="discTitleButton">
+   <property name="geometry">
+    <rect>
+     <x>380</x>
+     <y>170</y>
+     <width>114</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Title Menu</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="discSelectButton">
+   <property name="geometry">
+    <rect>
+     <x>240</x>
+     <y>50</y>
+     <width>114</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Select Disc</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="repeatButton">
+   <property name="geometry">
+    <rect>
+     <x>70</x>
+     <y>170</y>
+     <width>114</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Repeat</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="repeatABButton">
+   <property name="geometry">
+    <rect>
+     <x>220</x>
+     <y>170</y>
+     <width>114</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Repeat A-B</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="prevDiscButton">
+   <property name="geometry">
+    <rect>
+     <x>80</x>
+     <y>50</y>
+     <width>114</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Previous Disc</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="nextDiscButton">
+   <property name="geometry">
+    <rect>
+     <x>390</x>
+     <y>50</y>
+     <width>114</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Next Disc</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/icons/folder_plus_icon&32.png b/icons/folder_plus_icon&32.png
new file mode 100755 (executable)
index 0000000..ae88939
Binary files /dev/null and b/icons/folder_plus_icon&32.png differ
diff --git a/keysets/adb.cpp b/keysets/adb.cpp
new file mode 100644 (file)
index 0000000..d4a70df
--- /dev/null
@@ -0,0 +1,235 @@
+#include "adb.h"
+#include "protocols/mceprotocol.h"
+#include "protocols/necprotocol.h"
+#include "protocols/nokia32protocol.h"
+
+ADBSTB1::ADBSTB1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Receiver Keyset 1",
+      ADB_Make,
+      index)
+{
+  addControlledDevice(ADB_Make, "I-CAN 2840C", Other_Device);
+}
+
+
+void ADBSTB1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new MCEProtocol(guiObject, index, 0x8059);
+
+  setPreData(0x24, 7);
+
+  addKey("num_0", Zero_Key, 0x00, 8);
+  addKey("num_1", One_Key, 0x01, 8);
+  addKey("num_2", Two_Key, 0x02, 8);
+  addKey("num_3", Three_Key, 0x03, 8);
+  addKey("num_4", Four_Key, 0x04, 8);
+  addKey("num_5", Five_Key, 0x05, 8);
+  addKey("num_6", Six_Key, 0x06, 8);
+  addKey("num_7", Seven_Key, 0x07, 8);
+  addKey("num_8", Eight_Key, 0x08, 8);
+  addKey("num_9", Nine_Key, 0x09, 8);
+  addKey("exit", Exit_Key, 0x0A, 8);
+  addKey("Power", Power_Key, 0x0C, 8);
+  addKey("CH+", ChannelUp_Key, 0x20, 8);
+  addKey("CH-", ChannelDown_Key, 0x21, 8);
+  addKey("Menu", Menu_Key, 0x54, 8);
+  addKey("Last_ch", PrevChannel_Key, 0x55, 8);
+  addKey("up_arrow", Up_Key, 0x58, 8);
+  addKey("down_arrow", Down_Key, 0x59, 8);
+  addKey("left_arrow", Left_Key, 0x5A, 8);
+  addKey("right_arrow", Right_Key, 0x5B, 8);
+  addKey("Select", Select_Key, 0x5C, 8);
+  addKey("Info", Info_Key, 0xCB, 8);
+  addKey("Guide", Guide_Key, 0xCC, 8);
+  addKey("Interactive Menu", Unmapped_Key, 0xFB, 8);
+}
+
+
+ADBSTB2::ADBSTB2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Receiver Keyset 2",
+      ADB_Make,
+      index)
+{
+  addControlledDevice(ADB_Make, "5720 CDX", Other_Device);
+}
+
+
+void ADBSTB2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x0E86, 16);
+
+  addKey("0", Zero_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("exit", Exit_Key, 0x0A, 8);
+  addKey("up arrow", Up_Key, 0x0B, 8);
+  addKey("down arrow", Down_Key, 0x0C, 8);
+  addKey("vol up", VolumeUp_Key, 0x0D, 8);
+  addKey("vol down", VolumeDown_Key, 0x0E, 8);
+  addKey("mute", Mute_Key, 0x0F, 8);
+  addKey("channel up", ChannelUp_Key, 0x10, 8);
+  addKey("menu", Menu_Key, 0x11, 8);
+  addKey("power", Power_Key, 0x12, 8);
+  addKey("program guide", Guide_Key, 0x13, 8);
+  addKey("return", Exit_Key, 0x14, 8);
+  addKey("select", Select_Key, 0x15, 8);
+  addKey("red", Red_Key, 0x16, 8);
+  addKey("green", Green_Key, 0x17, 8);
+  addKey("yellow", Yellow_Key, 0x18, 8);
+  addKey("blue", Blue_Key, 0x19, 8);
+  addKey("channel down", ChannelDown_Key, 0x1A, 8);
+  addKey("left arrow", Left_Key, 0x1B, 8);
+  addKey("right arrow", Right_Key, 0x1C, 8);
+  addKey("rewind", Rewind_Key, 0x1D, 8);
+  addKey("My TV", Unmapped_Key, 0x1E, 8);
+  addKey("record", Record_Key, 0x21, 8);
+  addKey("play", Play_Key, 0x23, 8);
+  addKey("pause", Pause_Key, 0x23, 8);
+  addKey("stop", Stop_Key, 0x24, 8);
+  addKey("fast fwd", FastForward_Key, 0x26, 8);
+  addKey("Teletext", Teletext_Key, 0x27, 8);
+  addKey("Settings", Unmapped_Key, 0x29, 8);
+  addKey("On Demand", Unmapped_Key, 0x2A, 8);
+  addKey("info", Info_Key, 0x2D, 8);
+}
+
+
+ADBSTB3::ADBSTB3(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Receiver Keyset 3",
+      ADB_Make,
+      index)
+{
+  addControlledDevice(ADB_Make, "7820sx", Other_Device);
+}
+
+
+void ADBSTB3::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new MCEProtocol(guiObject, index, 0x8051);
+
+  setPreData(0x11, 7);
+
+  addKey("vod", Unmapped_Key, 0x01, 8);
+  addKey("5", Five_Key, 0x20, 8);
+  addKey("power", Power_Key, 0x21, 8);
+  addKey("9", Nine_Key, 0x22, 8);
+  addKey("select", Select_Key, 0x23, 8);
+  addKey("down arrow", Down_Key, 0x24, 8);
+  addKey("4", Four_Key, 0x28, 8);
+  addKey("2", Two_Key, 0x29, 8);
+  addKey("8", Eight_Key, 0x2A, 8);
+  addKey("up arrow", Up_Key, 0x2B, 8);
+  addKey("menu", Menu_Key, 0x2C, 8);
+  addKey("green", Green_Key, 0x2D, 8);
+  addKey("program guide", Guide_Key, 0x2E, 8);
+  addKey("1", One_Key, 0x30, 8);
+  addKey("7", Seven_Key, 0x32, 8);
+  addKey("0", Zero_Key, 0x33, 8);
+  addKey("left arrow", Left_Key, 0x34, 8);
+  addKey("channel up", ChannelUp_Key, 0x35, 8);
+  addKey("channel down", ChannelDown_Key, 0x37, 8);
+  addKey("6", Six_Key, 0x38, 8);
+  addKey("3", Three_Key, 0x39, 8);
+  addKey("last (prev ch)", PrevChannel_Key, 0x3A, 8);
+  addKey("right arrow", Right_Key, 0x3B, 8);
+  addKey("display", Info_Key, 0x3C, 8);
+  addKey("yellow", Yellow_Key, 0x3D, 8);
+  addKey("red", Red_Key, 0x3E, 8);
+  addKey("blue", Blue_Key, 0x3F, 8);
+  addKey("record", Record_Key, 0x44, 8);
+  addKey("play", Play_Key, 0x45, 8);
+  addKey("pause", Pause_Key, 0x46, 8);
+  addKey("stop", Stop_Key, 0x47, 8);
+  addKey("rewind", Rewind_Key, 0x48, 8);
+  addKey("fast fwd", FastForward_Key, 0x49, 8);
+}
+
+
+ADBSTB4::ADBSTB4(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Receiver Keyset 4",
+      ADB_Make,
+      index)
+{
+  addControlledDevice(ADB_Make, "I-CAN 3000", Other_Device);
+}
+
+
+void ADBSTB4::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new Nokia32Protocol(guiObject, index);
+
+  setPreData(0x2190, 16);
+  setPostData(0x26, 7);
+
+  addKey("0", Zero_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("Power", Power_Key, 0x0C, 8);
+  addKey("Mute", Mute_Key, 0x0D, 8);
+  addKey("Info", Info_Key, 0x0F, 8);
+  addKey("VOL+", VolumeUp_Key, 0x10, 8);
+  addKey("VOL-", VolumeDown_Key, 0x11, 8);
+  addKey("CH+", ChannelUp_Key, 0x20, 8);
+  addKey("CH-", ChannelDown_Key, 0x21, 8);
+  addKey("Last_ch", PrevChannel_Key, 0x43, 8);
+  addKey("up_arrow", Up_Key, 0x58, 8);
+  addKey("down_arrow", Down_Key, 0x59, 8);
+  addKey("left_arrow", Left_Key, 0x5A, 8);
+  addKey("right_arrow", Right_Key, 0x5B, 8);
+  addKey("Select", Select_Key, 0x5C, 8);
+  addKey("Guide", Guide_Key, 0xCC, 8);
+  addKey("Enter", Enter_Key, 0xDB, 8);
+  addKey("exit", Exit_Key, 0xE0, 8);
+}
diff --git a/keysets/adb.h b/keysets/adb.h
new file mode 100644 (file)
index 0000000..f04eed0
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef ADB_H
+#define ADB_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class ADBSTB1: public PIRKeysetMetaData
+{
+public:
+  ADBSTB1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+
+class ADBSTB2: public PIRKeysetMetaData
+{
+public:
+  ADBSTB2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+
+class ADBSTB3: public PIRKeysetMetaData
+{
+public:
+  ADBSTB3(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+
+class ADBSTB4: public PIRKeysetMetaData
+{
+public:
+  ADBSTB4(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // ADB_H
index 58c8d2c..b231b62 100644 (file)
@@ -111,7 +111,7 @@ void AdmiralTV2::populateProtocol(
   addKey("PIP/main picture swap", PIPSwap_Key, 0x105A, 13);
   addKey("Select PIP source", PIPSource_Key, 0x105F, 13);
   addKey("PIP Freeze", PIPPause_Key, 0x1065, 13);
-  addKey("PIP Freeze", PIPSize_Key, 0x1068, 13);
+  addKey("PIP Size", PIPSize_Key, 0x1068, 13);
   addKey("red", Red_Key, 0x106B, 13);
   addKey("green", Green_Key, 0x106C, 13);
   addKey("yellow", Yellow_Key, 0x106D, 13);
@@ -166,9 +166,9 @@ void AdmiralVCR1::populateProtocol(
   addSharpKey("stop", Stop_Key, 0x03, 0x27);
   addSharpKey("rec", Record_Key, 0x03, 0x28);
   addSharpKey("slow", Slow_Key, 0x03, 0x29);
-  addSharpKey("dpss+", Unmapped_Key, 0x03, 0x2F);
+  addSharpKey("dpss+", Next_Key, 0x03, 0x2F);
 
-  addSharpKey("dpss-", Unmapped_Key, 0x03, 0x30);
+  addSharpKey("dpss-", Previous_Key, 0x03, 0x30);
   addSharpKey("eject", Eject_Key, 0x03, 0x33);
   addSharpKey("vcr-input", Input_Key, 0x03, 0x34);
 
@@ -178,5 +178,5 @@ void AdmiralVCR1::populateProtocol(
   addSharpKey("vcr-display", Info_Key, 0x03, 0x8C);
   addSharpKey("on_screen", Unmapped_Key, 0x03, 0x8D);
 
-  addSharpKey("add/erase", Unmapped_Key, 0x03, 0xB5);
+  addSharpKey("add/erase", IndexMark_Key, 0x03, 0xB5);
 }
index 2d58566..331f369 100644 (file)
@@ -55,7 +55,7 @@ void AiwaVCR1::populateProtocol(
 //  addKey("ONETOUCH", Unmapped_Key, 0x19, 8); // need sub-keyset for this
   addKey("STOP", Stop_Key, 0x1A, 8);
   addKey("TIMER/PRG", Timer_Key, 0x1C, 8);
-  addKey("T-REC", Unmapped_Key, 0x1E, 8);
+  addKey("T-REC", RecordTimed_Key, 0x1E, 8);
   addKey("CLEAR", Clear_Key, 0x1F, 8); // "CANCEL"
 
   addKey("CHAN_UP", ChannelUp_Key, 0x40, 8);
@@ -69,7 +69,7 @@ void AiwaVCR1::populateProtocol(
   addKey("AD-Skip", Advance_Key, 0x49, 8);
   addKey("SUPER_CLEAR", Unmapped_Key, 0x4B, 8);
   addKey("RESET", Reset_Key, 0x4C, 8); // "Counter_Reset"
-  addKey("INDEXSRCH", Unmapped_Key, 0x4D, 8);
+  addKey("INDEXSRCH", IndexSearch_Key, 0x4D, 8);
   addKey("SP/LP", VHSSpeed_Key, 0x50, 8);
   addKey("MEMORY", Memory_Key, 0x51, 8);
   addKey("AUTO", Unmapped_Key, 0x53, 8);
@@ -82,11 +82,11 @@ void AiwaVCR1::populateProtocol(
   addKey("Rev(Jog)", StepBack_Key, 0x74, 8);
 
   addKey("MENU", Menu_Key, 0x81, 8);
-  addKey("VPS/PDC", Unmapped_Key, 0x82, 8);
+  addKey("VPS/PDC", RecordPDC_Key, 0x82, 8);
 //  addKey("NEXT", Next_Key, 0x83, 8);
   addKey("MENURIGHT", Right_Key, 0x83, 8);
   addKey("MENULEFT", Left_Key, 0x84, 8);
-  addKey("OTPB", Unmapped_Key, 0x89, 8);
+  addKey("OTPB", OneTouchPlayBack_Key, 0x89, 8);
   addKey("MENUUP", Up_Key, 0x8D, 8);
   addKey("MENUDOWN", Down_Key, 0x8E, 8);
 
@@ -152,7 +152,7 @@ void AiwaVCR2::populateProtocol(
   addKey("clear", Clear_Key, 0x1F, 8);
 
   addKey("child-lock", Unmapped_Key, 0x3F, 8);
-  addKey("viss", Unmapped_Key, 0x41, 8);
+  addKey("viss", IndexSearch_Key, 0x41, 8);
   addKey("showview", Unmapped_Key, 0x47, 8);
   addKey("speed", VHSSpeed_Key, 0x48, 8);
   addKey("av", Unmapped_Key, 0x56, 8);
@@ -166,7 +166,7 @@ void AiwaVCR2::populateProtocol(
 
   addKey("fav.program", Unmapped_Key, 0xB3, 8);
   addKey("rec-end-search", Next_Key, 0xB5, 8); // might be wrong
-  addKey("otpb", Unmapped_Key, 0xBF, 8);
+  addKey("otpb", OneTouchPlayBack_Key, 0xBF, 8);
   addKey("ad-skip", Advance_Key, 0xDD, 8);
 }
 
@@ -206,7 +206,7 @@ void AiwaVCR3::populateProtocol(
   addKey("9", Nine_Key, 0x09, 8);
   addKey("ch+", ChannelUp_Key, 0x0A, 8);
   addKey("ch-", ChannelDown_Key, 0x0B, 8);
-  addKey("t-rec", Unmapped_Key, 0x0D, 8);
+  addKey("t-rec", RecordTimed_Key, 0x0D, 8);
   addKey("audio", Audio_Key, 0x0E, 8);
   addKey("-/--", DoubleDigit_Key, 0x0F, 8);
   addKey("tv/vcr", Input_Key, 0x12, 8);
@@ -218,7 +218,7 @@ void AiwaVCR3::populateProtocol(
   addKey("ff", FastForward_Key, 0x18, 8);
   addKey("rew", Rewind_Key, 0x19, 8);
   addKey("pause", Pause_Key, 0x1A, 8);
-  addKey("otpb", Unmapped_Key, 0x1B, 8);
+  addKey("otpb", OneTouchPlayBack_Key, 0x1B, 8);
   addKey("vidplus", Unmapped_Key, 0x1D, 8);
   addKey("speed", VHSSpeed_Key, 0x1E, 8);
   addKey("slow", Slow_Key, 0x1F, 8);
@@ -271,7 +271,8 @@ void AiwaAudio1::populateProtocol(
 
   addKey("volume_up", VolumeUp_Key, 0x11, 8);
   addKey("volume_down", VolumeDown_Key, 0x12, 8);
-  addKey("tuner_band", TunerBand_Key, 0x13, 8);
+  addKey("tuner_band", AM_Key, 0x13, 8);  // This is a hack
+  addKey("tuner_band", FM_Key, 0x13, 8);  // This too
   addKey("tape_play", Unmapped_Key, 0x14, 8);
   addKey("tape_stop", Unmapped_Key, 0x15, 8);
   addKey("tape_next", Unmapped_Key, 0x16, 8);
@@ -417,7 +418,7 @@ void AiwaAudio2::populateProtocol(
   addKey("shift1", Unmapped_Key, 0x17, 8); // "edit/check"
   addKey("shift2", Program_Key, 0x19, 8); // "prgm"
   addKey("TAPE", TapeInput_Key, 0x1B, 8); // "Deck"
-  addKey("shiftplus10", TunerBand_Key, 0x1C, 8); // "band"
+  addKey("shiftplus10", Unmapped_Key, 0x1C, 8); // "band"
   addKey("VIDEO", AuxInput_Key, 0x1D, 8); // "aux"
   addKey("function", Unmapped_Key, 0x1E, 8);
   addKey("CD", CDInput_Key, 0x1F, 8);
@@ -441,9 +442,9 @@ void AiwaAudio2::populateProtocol(
   addKey("voldown", VolumeDown_Key, 0x4E, 8);
 
   addKey("vocal_fader", Unmapped_Key, 0x50, 8); // "KARAOKE"
-  addKey("cd1", Unmapped_Key, 0x51, 8); // "DDP_1"
-  addKey("cd2", Unmapped_Key, 0x52, 8); // "DDP_2"
-  addKey("cd3", Unmapped_Key, 0x53, 8); // "DDP_3"
+  addKey("cd1", DiscOne_Key, 0x51, 8); // "DDP_1"
+  addKey("cd2", DiscTwo_Key, 0x52, 8); // "DDP_2"
+  addKey("cd3", DiscThree_Key, 0x53, 8); // "DDP_3"
   addKey("DISCSKIP", NextDisc_Key, 0x56, 8);
   addKey("Treble", Unmapped_Key, 0x57, 8);
   addKey("MANUAL", Unmapped_Key, 0x58, 8);
@@ -731,9 +732,9 @@ void AiwaAudio6::populateProtocol(
 
   setPreData(0x0048, 13);
 
-  addKey("fm", Unmapped_Key, 0x00, 8);
-  addKey("am", Unmapped_Key, 0x01, 8); // "MW"
-  addKey("LW", Unmapped_Key, 0x02, 8);
+  addKey("fm", FM_Key, 0x00, 8);
+  addKey("am", AM_Key, 0x01, 8); // "MW"
+  addKey("LW", LW_Key, 0x02, 8);
   addKey("t_up", ChannelUp_Key, 0x03, 8);
   addKey("power", Power_Key, 0x04, 8);
   addKey("t_down", ChannelDown_Key, 0x05, 8);
@@ -780,7 +781,7 @@ void AiwaCarStereo1::populateProtocol(
   addKey("vol-", VolumeDown_Key, 0x10, 8);
   addKey("disc_tune+", ChannelUp_Key, 0x11, 8);
   addKey("disc_tune-", ChannelDown_Key, 0x12, 8);
-  addKey("radio_band", TunerBand_Key, 0x13, 8);
+  addKey("radio_band", TunerInput_Key, 0x13, 8);
   addKey("tape", TapeInput_Key, 0x14, 8);
   addKey("ff_next", FastForward_Key, 0x16, 8);
   addKey("rew_prev", Rewind_Key, 0x17, 8);
diff --git a/keysets/anitech.cpp b/keysets/anitech.cpp
new file mode 100644 (file)
index 0000000..0d09f9d
--- /dev/null
@@ -0,0 +1,86 @@
+#include "anitech.h"
+#include "protocols/rc5protocol.h"
+
+AnitechTV1::AnitechTV1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 1",
+      Anitech_Make,
+      index)
+{
+  addControlledDevice(Anitech_Make, "M 3740", TV_Device);
+}
+
+
+void AnitechTV1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new RC5Protocol(guiObject, index);
+
+  addKey("SLEEP", Sleep_Key, 0x1026, 13);
+  addKey("POWER", Power_Key, 0x100C, 13);
+  addKey("MUTE", Mute_Key, 0x100D, 13);
+  addKey("DISPLAY", Info_Key, 0x100F, 13);
+  addKey("CH_UP", ChannelUp_Key, 0x1020, 13);
+  addKey("CH_DOWN", ChannelDown_Key, 0x1021, 13);
+  addKey("VOL_UP", VolumeUp_Key, 0x1010, 13);
+  addKey("VOL_DOWN", VolumeDown_Key, 0x1011, 13);
+}
+
+
+AnitechVCR1::AnitechVCR1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "VCR Keyset 1",
+      Anitech_Make,
+      index)
+{
+}
+
+
+void AnitechVCR1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new RC5Protocol(guiObject, index);
+
+  addKey("POWER", Power_Key, 0x114C, 13);
+  addKey("M", Unmapped_Key, 0x117B, 13);
+  addKey("KEY", Unmapped_Key, 0x017F, 13);
+  addKey("1", One_Key, 0x1141, 13);
+  addKey("2", Two_Key, 0x1142, 13);
+  addKey("+", Right_Key, 0x1160, 13); // bit of a hack
+  addKey("3", Three_Key, 0x1143, 13);
+  addKey("4", Four_Key, 0x1144, 13);
+  addKey("5", Five_Key, 0x1145, 13);
+  addKey("6", Six_Key, 0x1146, 13);
+  addKey("-", Left_Key, 0x1161, 13);  // another hack
+  addKey("7", Seven_Key, 0x1147, 13);
+  addKey("8", Eight_Key, 0x1148, 13);
+  addKey("9", Nine_Key, 0x1149, 13);
+  addKey("-/--", DoubleDigit_Key, 0x114A, 13);
+  addKey("0", Zero_Key, 0x1140, 13);
+  addKey("X", Unmapped_Key, 0x1171, 13);
+  addKey("CLOCK", Clock_Key, 0x115D, 13);
+  addKey("REC", Record_Key, 0x1177, 13);
+  addKey("TREC", RecordTimed_Key, 0x1167, 13);
+  addKey("REV_PLAY", Unmapped_Key, 0x116F, 13);
+  addKey("REWIND", Rewind_Key, 0x116C, 13);
+  addKey("PLAY", Play_Key, 0x1175, 13);
+  addKey("FWD", FastForward_Key, 0x116E, 13);
+  addKey("SLOW", Slow_Key, 0x114E, 13);
+  addKey("N", Unmapped_Key, 0x116A, 13);
+  addKey("STOP", Stop_Key, 0x1176, 13);
+  addKey("PAUSE", Pause_Key, 0x1169, 13);
+}
diff --git a/keysets/anitech.h b/keysets/anitech.h
new file mode 100644 (file)
index 0000000..2e82def
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef ANITECH_H
+#define ANITECH_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class AnitechTV1: public PIRKeysetMetaData
+{
+public:
+  AnitechTV1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class AnitechVCR1: public PIRKeysetMetaData
+{
+public:
+  AnitechVCR1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // ANITECH_H
index ac220de..010e0b2 100644 (file)
@@ -46,8 +46,8 @@ void ArcamReceiver1::populateProtocol(
   addKey("trim", Unmapped_Key, 0x1425, 13);
   addKey("sleep", Sleep_Key, 0x142A, 13);
 
-  addKey("am", TunerBand_Key, 0x1434, 13); // Also wrong!
-  addKey("fm", TunerInput_Key, 0x1435, 13); // Not right!
+  addKey("am", AM_Key, 0x1434, 13);
+  addKey("fm", FM_Key, 0x1435, 13);
   addKey("tmode", FMMode_Key, 0x1436, 13); // ?
   addKey("info", Info_Key, 0x1437, 13);
   addKey("p+", ChannelUp_Key, 0x1438, 13);
diff --git a/keysets/blaupunkt.cpp b/keysets/blaupunkt.cpp
new file mode 100644 (file)
index 0000000..cd7b56c
--- /dev/null
@@ -0,0 +1,60 @@
+#include "blaupunkt.h"
+#include "protocols/kaseikyoprotocol.h"
+
+BlaupunktVCR1::BlaupunktVCR1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "VCR Keyset 1",
+      Blaupunkt_Make,
+      index)
+{
+}
+
+
+void BlaupunktVCR1::populateProtocol(
+   QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new KaseikyoProtocol(guiObject, index);
+
+  setPreData(0x2002, 16);
+
+  addKaseikyoKey("ok", Select_Key, 0x009, 0x58);
+  addKaseikyoKey("up", Up_Key, 0x009, 0x02);
+  addKaseikyoKey("down", Down_Key, 0x009, 0x03);
+  addKaseikyoKey("left", Left_Key, 0x009, 0x05);
+  addKaseikyoKey("right", Right_Key, 0x009, 0x04);
+  addKaseikyoKey("menu", Menu_Key, 0x009, 0x56);
+  addKaseikyoKey("exit", Exit_Key, 0x009, 0x66);
+  addKaseikyoKey("power", Power_Key, 0x009, 0x3D);
+  addKaseikyoKey("prog+", ChannelUp_Key, 0x009, 0x34);
+  addKaseikyoKey("prog-", ChannelDown_Key, 0x009, 0x35);
+  addKaseikyoKey("vt_hold", TeletextHold_Key, 0x009, 0x66);
+  addKaseikyoKey("vt_mix", TeletextMix_Key, 0x009, 0x58);
+  addKaseikyoKey("vt_off", TeletextOff_Key, 0x009, 0x66);
+  addKaseikyoKey("vt_on", Teletext_Key, 0x009, 0x56);
+  addKaseikyoKey("adjust", Unmapped_Key, 0x009, 0x57);
+  addKaseikyoKey("stop", Stop_Key, 0x009, 0x00);
+  addKaseikyoKey("play", Play_Key, 0x009, 0x0A);
+  addKaseikyoKey("rew", Rewind_Key, 0x009, 0x02);
+  addKaseikyoKey("ffwd", FastForward_Key, 0x009, 0x03);
+  addKaseikyoKey("rec", Record_Key, 0x009, 0x08);
+  addKaseikyoKey("pause", Pause_Key, 0x009, 0x06);
+  addKaseikyoKey("1", One_Key, 0x009, 0x10);
+  addKaseikyoKey("2", Two_Key, 0x009, 0x11);
+  addKaseikyoKey("3", Three_Key, 0x009, 0x12);
+  addKaseikyoKey("4", Four_Key, 0x009, 0x13);
+  addKaseikyoKey("5", Five_Key, 0x009, 0x14);
+  addKaseikyoKey("6", Six_Key, 0x009, 0x15);
+  addKaseikyoKey("7", Seven_Key, 0x009, 0x16);
+  addKaseikyoKey("8", Eight_Key, 0x009, 0x17);
+  addKaseikyoKey("9", Nine_Key, 0x009, 0x18);
+  addKaseikyoKey("0", Zero_Key, 0x009, 0x19);
+  addKaseikyoKey("av", Input_Key, 0x009, 0xC0);
+  addKaseikyoKey("n/nm", Unmapped_Key, 0x009, 0x3B);
+}
diff --git a/keysets/blaupunkt.h b/keysets/blaupunkt.h
new file mode 100644 (file)
index 0000000..6b9a15c
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef BLAUPUNKT_H
+#define BLAUPUNKT_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class BlaupunktVCR1: public PIRKeysetMetaData
+{
+public:
+  BlaupunktVCR1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // BLAUPUNKT_H
index 3679330..68efcb3 100644 (file)
@@ -26,7 +26,7 @@ void BoseRadio1::populateProtocol(
   addKey("Mute", Mute_Key, 0x01, 8);
   addKey("Volume_Down", VolumeDown_Key, 0x02, 8);
   addKey("Volume_Up", VolumeUp_Key, 0x03, 8);
-  addKey("FM_AM", TunerBand_Key, 0x06, 8);
+  addKey("FM_AM", TunerInput_Key, 0x06, 8);
   addKey("1", One_Key, 0x07, 8);
   addKey("2", Two_Key, 0x08, 8);
   addKey("3", Three_Key, 0x09, 8);
@@ -80,13 +80,13 @@ void BoseRadio2::populateProtocol(
 
   addKey("on/off", Power_Key, 0x00, 8);
   addKey("4", Four_Key, 0x08, 8);
-  addKey("am", Red_Key, 0x10, 8); // sort of a hack to get AM in
+  addKey("am", AM_Key, 0x10, 8);
   addKey("6", Six_Key, 0x20, 8);
   addKey("trackprev", Previous_Key, 0x30, 8);
   addKey("trackprev", ChannelDown_Key, 0x30, 8);
   addKey("volup", VolumeUp_Key, 0x40,8);
   addKey("cdstop", Stop_Key, 0x50, 8);
-  addKey("fm", Green_Key, 0x60, 8); // also hack
+  addKey("fm", FM_Key, 0x60, 8);
   addKey("2", Two_Key, 0x70, 8);
   addKey("mute", Mute_Key, 0x80, 8);
   addKey("5", Five_Key, 0x88, 8);
@@ -129,7 +129,7 @@ void BoseRadio3::populateProtocol(
   addKey("VOL-", VolumeDown_Key, 0x02, 8);
   addKey("VOL+", VolumeUp_Key, 0x03, 8);
   addKey("STATION", Unmapped_Key, 0x04, 8);
-  addKey("AM/FM", TunerBand_Key, 0x05, 8);
+  addKey("AM/FM", TunerInput_Key, 0x05, 8);
   addKey("1", One_Key, 0x07, 8);
   addKey("2", Two_Key, 0x08, 8);
   addKey("3", Three_Key, 0x09, 8);
@@ -175,7 +175,7 @@ void BoseHomeTheater1::populateProtocol(
   addKey("mute", Mute_Key, 0x01, 8);
   addKey("vol down", VolumeDown_Key, 0x02, 8);
   addKey("vol up", VolumeUp_Key, 0x03, 8);
-  addKey("AM", Unmapped_Key, 0x05, 8);
+  addKey("AM", AM_Key, 0x05, 8);
   addKey("Video2", CableInput_Key, 0x0D, 8);
   addKey("Video1", AntennaInput_Key, 0x0E, 8);
   addKey("AUX", AuxInput_Key, 0x0F, 8);
@@ -202,7 +202,7 @@ void BoseHomeTheater1::populateProtocol(
   addKey("play", Play_Key, 0x55, 8);
   addKey("rewind", Rewind_Key, 0x57, 8);
   addKey("fast fwd", FastForward_Key, 0x58, 8);
-  addKey("FM", TunerBand_Key, 0x59, 8);
+  addKey("FM", FM_Key, 0x59, 8);
 
   addKey("right arrow", Right_Key, 0x60, 8);
   addKey("display/info", Info_Key, 0x80, 8);
index 0462dd0..253ef74 100644 (file)
@@ -158,7 +158,7 @@ void CambridgeAudio2::populateProtocol(
   addKey("DDEX_DTSES", Unmapped_Key, 0x17, 8);
   addKey("STEREO", Unmapped_Key, 0x1A, 8);
   addKey("APS", Unmapped_Key, 0x1B, 8);
-  addKey("TUNER_AM_FM", TunerBand_Key, 0x1C, 8);
+  addKey("TUNER_AM_FM", TunerInput_Key, 0x1C, 8);
   addKey("STORE", Memory_Key, 0x1D, 8);
   addKey("MODE", Mode_Key, 0x1E, 8);
   addKey("VOLUME_DOWN", VolumeDown_Key, 0x1F, 8);
index 607b305..2433cf4 100644 (file)
@@ -464,11 +464,11 @@ void DaewooVCR1::populateProtocol(
   addKey("CLEAR", Clear_Key, 0x4A, 8);
   addKey("OK", Select_Key, 0x4B, 8); // enter key?
   addKey("DISPLAY", Info_Key, 0x4C, 8);
-  addKey("VPS/PDC", Unmapped_Key, 0x4F, 8);
+  addKey("VPS/PDC", RecordPDC_Key, 0x4F, 8);
 
   addKey("POWER", Power_Key, 0x5B, 8);
 
-  addKey("ShowView", Unmapped_Key, 0x8C, 8);
+  addKey("ShowView", Unmapped_Key, 0x8C, 8); // vhsplus+, etc.
   addKey("PRESET", Unmapped_Key, 0x9E, 8);
   addKey("MENU/TV", Menu_Key, 0xCA, 8);
 }
@@ -533,9 +533,9 @@ void DaewooVCR2::populateProtocol(
   addKey("qs", Unmapped_Key, 0x27, 8);
   addKey("ok", Select_Key, 0x29, 8);
   addKey("left", Left_Key, 0x31, 8);
-  addKey("indexup", Unmapped_Key, 0x33, 8);
+  addKey("indexup", Next_Key, 0x33, 8);
   addKey("right", Right_Key, 0x35, 8);
   addKey("av", AuxInput_Key, 0x36, 8);
   addKey("sv/v+", Unmapped_Key, 0x39, 8);
-  addKey("indexdown", Unmapped_Key, 0x3F, 8);
+  addKey("indexdown", Previous_Key, 0x3F, 8);
 }
index 759caef..be57e3a 100644 (file)
@@ -293,7 +293,7 @@ void DenonReceiver1::populateProtocol(
   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("Shift", Unmapped_Key, 0x0C, 0xCD);
   addSharpKey("channel-", ChannelDown_Key, 0x0C, 0xD5);
   addSharpKey("channel+", ChannelUp_Key, 0x0C, 0xD6);
   addSharpKey("Dimmer", Unmapped_Key, 0x0C, 0xDF);
@@ -457,7 +457,7 @@ void DenonReceiver1d::populateProtocol(
   addSharpKey("DECK", Unmapped_Key, 0x04, 0x75);
 
   addSharpKey("panel", Info_Key, 0x0C, 0x7E);
-  addSharpKey("TUNER", TunerInput_Key, 0x0C, 0xDD);
+  addSharpKey("TUNER", Unmapped_Key, 0x0C, 0xDD);
 }
 
 
@@ -557,7 +557,7 @@ void DenonReceiver2::populateProtocol(
   addSharpKey("tun_6", Six_Key, 0x13, 0x47);
   addSharpKey("tun_7", Seven_Key, 0x13, 0x48);
   addSharpKey("tun_8", Eight_Key, 0x13, 0x49);
-  addSharpKey("tun_shift", TunerBand_Key, 0x13, 0x4A);
+  addSharpKey("tun_shift", Unmapped_Key, 0x13, 0x4A);
   addSharpKey("amp_vol-down", VolumeDown_Key, 0x13, 0x4C);
   addSharpKey("amp_vol-up", VolumeUp_Key, 0x13, 0x4D);
   addSharpKey("amp_power", Power_Key, 0x13, 0x50);
@@ -781,7 +781,8 @@ void DenonAudio1::populateProtocol(
   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", TunerBand_Key, 0x0C, 0xD7);
+  addSharpKey("TUNER BAND", FM_Key, 0x0C, 0xD7); // this is a hack
+  addSharpKey("TUNER BAND", AM_Key, 0x0C, 0xD7); // this too
   addSharpKey("TUNER KEY_UP", ChannelUp_Key, 0x0C, 0xD9);
   addSharpKey("TUNER KEY_DOWN", ChannelDown_Key, 0x0C, 0xDA);
   addSharpKey("panel", Info_Key, 0x0C, 0xDE);
@@ -936,7 +937,7 @@ void DenonAudio2::populateProtocol(
   addKey("Volume_Down", VolumeDown_Key, 0x02, 8);
   addKey("Remain", Unmapped_Key, 0x03, 8);
   addKey("A.Edit", Unmapped_Key, 0x04, 8);
-  addKey("Tuner_Band", TunerBand_Key, 0x07, 8);
+  addKey("Tuner_Band", TunerInput_Key, 0x07, 8);
   addKey("Tape_1/2", Unmapped_Key, 0x09, 8);
   addKey("P.Mode", Unmapped_Key, 0x0B, 8);
   addKey("EQ_Pattern", Unmapped_Key, 0x11, 8);
@@ -1051,7 +1052,7 @@ void DenonAudio4::populateProtocol(
 //  setPreData(0x4040, 16);
   setPreData(0x0202, 16);
 
-  addKey("fm/am", TunerBand_Key, 0x00, 8);
+  addKey("fm/am", TunerInput_Key, 0x00, 8);
   addKey("rds", Unmapped_Key, 0x01, 8);
   addKey("1", One_Key, 0x02, 8);
   addKey("6", Six_Key, 0x03, 8);
index e9fbbf0..b68577c 100644 (file)
@@ -176,12 +176,12 @@ void GoldStarVCR1::populateProtocol(
   addKey("display", Info_Key, 0x1E, 8);
   addKey("clear", Clear_Key, 0x1F, 8);
   addKey("child_lock", Unmapped_Key, 0x3F, 8);
-  addKey("viss", Unmapped_Key, 0x41, 8);
+  addKey("viss", IndexSearch_Key, 0x41, 8);
   addKey("tracking+", TrackingPlus_Key, 0x44, 8);
   addKey("tracking-", TrackingMinus_Key, 0x45, 8);
-  addKey("show_view", Unmapped_Key, 0x47, 8);
+  addKey("show_view", Unmapped_Key, 0x47, 8); // vhsplus+, etc.
   addKey("sp/lp", VHSSpeed_Key, 0x48, 8);
-  addKey("vps", Unmapped_Key, 0x49, 8);
+  addKey("vps", RecordPDC_Key, 0x49, 8);
   addKey("start", Unmapped_Key, 0x4A, 8);
   addKey("length", Unmapped_Key, 0x4B, 8);
   addKey("clock_count", Clock_Key, 0x4C, 8); // "memory"
index 0081b8a..3b5aca7 100644 (file)
@@ -341,7 +341,8 @@ void GrundigAudio2::populateProtocol(
   addKey("0", Zero_Key, 0x0B, 8);
   addKey("tuning_up", ChannelUp_Key, 0x0C, 8);
   addKey("random", Random_Key, 0x0D, 8);
-  addKey("band", TunerBand_Key, 0x0E, 8);
+  addKey("band", FM_Key, 0x0E, 8);  // This is a hack
+  addKey("band", AM_Key, 0x0E, 8);  // This too
   addKey("cd", CDInput_Key, 0x0F, 8);
 
   addKey("3", Three_Key, 0x11, 8);
@@ -447,7 +448,7 @@ void GrundigVCR1a::populateProtocol(
 
   GrundigVCR1::populateProtocol(guiObject);
 
-  addKey("INDEX", Unmapped_Key, 0x0170, 13);
+  addKey("INDEX", IndexSearch_Key, 0x0170, 13);
   addKey("PAUSE", Pause_Key, 0x1169, 13);
 }
 
index 8ba3adb..fa8a093 100644 (file)
@@ -37,8 +37,8 @@ void HarmanKardonAmp1::populateProtocol(
 
   addKey("CD_DISC", NextDisc_Key, 0x50, 8);
 
-  addKey("FM", TunerBand_Key, 0x81, 8); // "am/fm"
-  addKey("AM", Unmapped_Key, 0x82, 8);
+  addKey("FM", FM_Key, 0x81, 8); // "am/fm"
+  addKey("AM", AM_Key, 0x82, 8);
   addKey("TUNEUP", ChannelUp_Key, 0x84, 8);
   addKey("TUNEDN", ChannelDown_Key, 0x85, 8);
   addKey("mem", Memory_Key, 0x86, 8);
index d1321e1..6f7bd79 100644 (file)
@@ -486,7 +486,7 @@ void HitachiAudio1::populateProtocol(
   addKey("POWER", Power_Key, 0x00, 8);
   addKey("VOLUME_UP", VolumeUp_Key, 0x01, 8);
   addKey("VOLUME_DOWN", VolumeDown_Key, 0x02, 8);
-  addKey("TUNER_BAND", TunerBand_Key, 0x07, 8);
+  addKey("TUNER_BAND", TunerInput_Key, 0x07, 8);
   addKey("CASSETTE_TAPE_1/2", Unmapped_Key, 0x09, 8);
   addKey("CD_PLAY/PAUSE", Play_Key, 0x12, 8);
   addKey("CD_PLAY/PAUSE", Pause_Key, 0x12, 8);
@@ -576,7 +576,7 @@ void HitachiVCR1::populateProtocol(
   addKey("CLEAR", Reset_Key, 0x41, 8); // "reset", "0000"
   addKey("Disp", Info_Key, 0x42, 8);
   addKey("Enter", Select_Key, 0x44, 8);
-  addKey("Index", Unmapped_Key, 0x45, 8);
+  addKey("Index", IndexSearch_Key, 0x45, 8);
   addKey("Count/Clock", Clock_Key, 0x46, 8);
   addKey("SpinRight", Right_Key, 0x7F, 8);
   addKey("SpinLeft", Left_Key, 0x7E, 8);
index d0b6920..796d66c 100644 (file)
@@ -131,7 +131,7 @@ void HyundaiAudio1::populateProtocol(
   addKey("Down", Down_Key, 0x11, 8);
   addKey("Setup", Menu_Key, 0x19, 8);
   addKey("Pause", Pause_Key, 0x1A, 8);
-  addKey("Band", TunerBand_Key, 0x1B, 8);
+  addKey("Band", TunerInput_Key, 0x1B, 8);
   addKey("Play", Play_Key, 0x44, 8);
   addKey("Stop", Stop_Key, 0x45, 8);
   addKey(">>", FastForward_Key, 0x40, 8);
index ca01639..6b17505 100644 (file)
@@ -666,7 +666,7 @@ void JVCAudio1::populateProtocol(
   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("TUNER-BAND", TunerInput_Key, 0x5BA3, 16);
   addKey("AHB-PRO", Unmapped_Key, 0x75A3, 16);
   addKey("AUTO-PRESET", Unmapped_Key, 0x77A3, 16);
 
@@ -836,7 +836,7 @@ void JVCAudio2::populateProtocol(
   addKey("vol+", VolumeUp_Key, 0x01, 8);
   addKey("vol-", VolumeDown_Key, 0x02, 8);
   addKey("ACTIVE_HYPER_BASS", EnhancedBass_Key, 0x04, 8); // "bass"
-  addKey("band", TunerBand_Key, 0x0B, 8);  // "TUNER_BAND"
+  addKey("band", TunerInput_Key, 0x0B, 8);  // "TUNER_BAND"
   addKey("aux", AuxInput_Key, 0x0D, 8);
 
   addKey("enter", Enter_Key, 0x11, 8);
index 0756fba..4679767 100644 (file)
@@ -51,8 +51,8 @@ void KenwoodAudio1::populateProtocol(
   addKey("8", Eight_Key, 0x88, 8);
   addKey("9", Nine_Key, 0x89, 8);
   addKey("TUNER_DOWN", ChannelDown_Key, 0x8C, 8);
-  addKey("TUNER_AM", Unmapped_Key, 0x8E, 8);
-  addKey("TUNER_BAND", TunerBand_Key, 0x8F, 8); // "Tuner_FM"
+  addKey("TUNER_AM", AM_Key, 0x8E, 8);
+  addKey("TUNER_BAND", FM_Key, 0x8F, 8); // "Tuner_FM"
 
   addKey("PHONO", PhonoInput_Key, 0x90, 8);
   addKey("SELECT_TUNER", TunerInput_Key, 0x91, 8);
@@ -168,7 +168,8 @@ void KenwoodComponent1::populateProtocol(
   addKey("7", Seven_Key, 0x87, 8);
   addKey("8", Eight_Key, 0x88, 8);
   addKey("9", Nine_Key, 0x89, 8);
-  addKey("BAND", TunerBand_Key, 0x8F, 8);
+  addKey("BAND", AM_Key, 0x8F, 8);  // This is a hack
+  addKey("BAND", FM_Key, 0x8F, 8);  // This too
 
   addKey("Phono-play", Unmapped_Key, 0x90, 8);
   addKey("TUNER", TunerInput_Key, 0x91, 8);
@@ -308,7 +309,7 @@ void KenwoodComponent3::populateProtocol(
   addKey("tuning>>", FastForward_Key, 0x03, 8); // "SEARCH_FWD"
   addKey("stop", Stop_Key, 0x04, 8);
   addKey("</>", TapeInput_Key, 0x05, 8); // "TAPE"
-  addKey("tuner/band", TunerBand_Key, 0x06, 8); // "TUNER"
+  addKey("tuner/band", TunerInput_Key, 0x06, 8); // "TUNER"
   addKey("cd_play_pause", Play_Key, 0x07, 8); // "CD"
   addKey("cd_play_pause", Pause_Key, 0x07, 8);
   addKey("A/B", RepeatAB_Key, 0x08, 8); // "A_B"
index 9a419a1..0fd4e6e 100644 (file)
@@ -29,7 +29,6 @@ void LGTV1::populateProtocol(
 
   threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
-//  setPreData(0x20DF, 16);
   setPreData(0x04, 8);
 
   addKey("p+", ChannelUp_Key, 0x00, 8);
@@ -375,7 +374,6 @@ void LGDisc1::populateProtocol(
 
   threadableProtocol = new NECXProtocol(guiObject, index, true);
 
-//  setPreData(0x3434, 16);
   setPreData(0x2C2C, 16);
 
   addKey("cd-dvd", Unmapped_Key, 0x03, 8);
@@ -404,7 +402,8 @@ void LGDisc1::populateProtocol(
   addKey("program", Program_Key, 0x4D, 8);
   addKey("repeat", Repeat_Key, 0x4E, 8);
   addKey("pause", Pause_Key, 0x4F, 8);
-  addKey("band", TunerBand_Key, 0x59, 8);
+  addKey("band", FM_Key, 0x59, 8); // This is a hack
+  addKey("band", AM_Key, 0x59, 8); // This too
   addKey("dimmer", Unmapped_Key, 0x5E, 8);
   addKey("rds", Unmapped_Key, 0x60, 8);
   addKey("exit_cancel", Unmapped_Key, 0x69, 8);
@@ -413,7 +412,7 @@ void LGDisc1::populateProtocol(
   addKey("pty", Unmapped_Key, 0x71, 8);
   addKey("i_ii", Unmapped_Key, 0x7A, 8);
   addKey("text", Unmapped_Key, 0x7B, 8);
-  addKey("tv_radio", Unmapped_Key, 0x82, 8);
+  addKey("tv_radio", TunerInput_Key, 0x82, 8);
 //  addKey("aux", Unmapped_Key, 0x8A, 8);
   addKey("open-close", Eject_Key, 0x9A, 8);
   addKey("audio", Audio_Key, 0xA0, 8);
@@ -463,7 +462,6 @@ void LGDisc2::populateProtocol(
 
   threadableProtocol = new NECXProtocol(guiObject, index, true);
 
-//  setPreData(0xB4B4, 16);
   setPreData(0x2D2D, 16);
 
   addKey("POWER", Power_Key, 0x30, 8);
@@ -564,7 +562,6 @@ void LGVCR1::populateProtocol(
 
   threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
-//  setPreData(0x7689, 16);
   setPreData(0x6E, 8);
 
   addKey("eject", Eject_Key, 0x00, 8);
@@ -594,7 +591,7 @@ void LGVCR1::populateProtocol(
   addKey("ok", Select_Key, 0x1E, 8);
   addKey("clear/reset", Clear_Key, 0x1F, 8);  // might be wrong
   addKey("timer-prog", Program_Key, 0x3A, 8);
-  addKey("viss", Unmapped_Key, 0x41, 8); // "marker-search"
+  addKey("viss", IndexSearch_Key, 0x41, 8); // "marker-search"
   addKey("trk-", TrackingMinus_Key, 0x44, 8);
   addKey("trk+", TrackingPlus_Key, 0x45, 8);
   addKey("*", Unmapped_Key, 0x47, 8);
diff --git a/keysets/lifetec.cpp b/keysets/lifetec.cpp
new file mode 100644 (file)
index 0000000..2c93984
--- /dev/null
@@ -0,0 +1,212 @@
+#include "lifetec.h"
+#include "protocols/sircprotocol.h"
+#include "protocols/necprotocol.h"
+#include "protocols/necxprotocol.h"
+#include "protocols/rc5protocol.h"
+
+
+LifetecTV1::LifetecTV1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 1",
+      Lifetec_Make,
+      index)
+{
+}
+
+
+void LifetecTV1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new SIRCProtocol(guiObject, index);
+
+  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("power", Power_Key, 0x01, 0x15);
+  addSIRC12Key("prog+", ChannelUp_Key, 0x01, 0x10);
+  addSIRC12Key("prog-", ChannelDown_Key, 0x01, 0x11);
+  addSIRC12Key("vol-", VolumeDown_Key, 0x01, 0x13);
+  addSIRC12Key("vol+", VolumeUp_Key, 0x01, 0x12);
+  addSIRC12Key("tonaus", Mute_Key, 0x01, 0x14);
+  addSIRC12Key("menu", Menu_Key, 0x01, 0x60);
+  addSIRC12Key("exit", Exit_Key, 0x01, 0x34);
+  addSIRC12Key("links", Left_Key, 0x01, 0x62);
+  addSIRC12Key("rechts", Right_Key, 0x01, 0x61);
+  addSIRC12Key("hoch", Up_Key, 0x01, 0x74);
+  addSIRC12Key("runter", Down_Key, 0x01, 0x75);
+  addSIRC12Key("ok", Select_Key, 0x01, 0x65);
+  addSIRC12Key("text", Unmapped_Key, 0x01, 0x3F);
+  addSIRC12Key("textaus", Unmapped_Key, 0x01, 0x38);
+  addSIRC12Key("texttransparent", Unmapped_Key, 0x01, 0x5B);
+  addSIRC12Key("text+", Unmapped_Key, 0x01, 0x3A);
+  addSIRC12Key("textseitenscrolling", Unmapped_Key, 0x03, 0x4A);
+  addSIRC12Key("rew", Rewind_Key, 0x03, 0x4C);
+  addSIRC12Key("play", Play_Key, 0x03, 0x4E);
+  addSIRC12Key("f.f.", FastForward_Key, 0x03, 0x4F);
+  addSIRC12Key("rec", Record_Key, 0x01, 0x5B);
+  addSIRC12Key("stop", Stop_Key, 0x03, 0x4D);
+  addSIRC12Key("pause", Pause_Key, 0x03, 0x48);
+}
+
+
+LifetecTV2::LifetecTV2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 2",
+      Lifetec_Make,
+      index)
+{
+}
+
+
+void LifetecTV2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new RC5Protocol(guiObject, index);
+
+  addKey("POWER", Power_Key, 0x100C, 13);
+  addKey("1", One_Key, 0x1001, 13);
+  addKey("2", Two_Key, 0x1002, 13);
+  addKey("3", Three_Key, 0x1003, 13);
+  addKey("4", Four_Key, 0x1004, 13);
+  addKey("5", Five_Key, 0x1005, 13);
+  addKey("6", Six_Key, 0x1006, 13);
+  addKey("7", Seven_Key, 0x1007, 13);
+  addKey("8", Eight_Key, 0x1008, 13);
+  addKey("9", Nine_Key, 0x1009, 13);
+  addKey("0", Zero_Key, 0x1000, 13);
+  addKey("MUTE", Mute_Key, 0x100D, 13);
+  addKey("INFO", Info_Key, 0x100F, 13);
+  addKey("UP", Up_Key, 0x1020, 13);
+  addKey("DOWN", Down_Key, 0x1021, 13);
+  addKey("LEFT", Left_Key, 0x1011, 13);
+  addKey("RIGHT", Right_Key, 0x1010, 13);
+  addKey("TV", Unmapped_Key, 0x103C, 13);
+  addKey("OK", Select_Key, 0x1029, 13);
+  addKey("RED", Red_Key, 0x1037, 13);
+  addKey("GREEN", Green_Key, 0x1036, 13);
+  addKey("YELLOW", Yellow_Key, 0x1032, 13);
+  addKey("BLUE", Blue_Key, 0x1034, 13);
+  addKey("F1", Unmapped_Key, 0x001C, 13);
+  addKey("F2", Unmapped_Key, 0x001D, 13);
+  addKey("F3", Unmapped_Key, 0x001E, 13);
+  addKey("F4", Unmapped_Key, 0x001F, 13);
+  addKey("REWIND", Rewind_Key, 0x1165, 13);
+  addKey("STOP", Stop_Key, 0x1176, 13);
+  addKey("PLAY", Play_Key, 0x1175, 13);
+  addKey("FORWARD", FastForward_Key, 0x1166, 13);
+}
+
+
+LifetecVCR1::LifetecVCR1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "VCR Keyset 1",
+      Lifetec_Make,
+      index)
+{
+}
+
+
+void LifetecVCR1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, false);
+
+  setPreData(0x7B80, 16);
+
+  addKey("power", Power_Key, 0x13, 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, 0x00, 8);
+  addKey("CH-", ChannelDown_Key, 0x0B, 8);
+  addKey("CH+", ChannelUp_Key, 0x0A, 8);
+  addKey("REC/OTR", Record_Key, 0x15, 8);
+  addKey("PAUSE/STILL", Pause_Key, 0x1A, 8);
+  addKey("<<", Rewind_Key, 0x19, 8);
+  addKey("PLAY/SLOW", Play_Key, 0x16, 8);
+  addKey("PLAY/SLOW", Slow_Key, 0x16, 8);
+  addKey(">>", FastForward_Key, 0x18, 8);
+  addKey("stop", Stop_Key, 0x17, 8);
+  addKey("ENTER", Select_Key, 0x45, 8);
+  addKey("INDEX", IndexSearch_Key, 0x14, 8);
+  addKey("CANCEL", Clear_Key, 0x4A, 8);
+  addKey("MENU", Menu_Key, 0x50, 8);
+  addKey("TIMER_REC", RecordTimed_Key, 0x0D, 8);
+  addKey("SHOWVIEW", Unmapped_Key, 0x1D, 8); // vhsplus+, etc.
+  addKey("CALL", Call_Key, 0x5F, 8);
+  addKey("CLOCK/COUNTER", Unmapped_Key, 0x51, 8);
+  addKey("COUNTER_RESET", Reset_Key, 0x4C, 8);
+  addKey("ZERO_RETURN", Unmapped_Key, 0x4B, 8);
+  addKey("SPEED_SP/LP", VHSSpeed_Key, 0x1E, 8);
+  addKey("TV/VCR", Input_Key, 0x12, 8);
+  addKey("AUDIO_SELECT", Audio_Key, 0x0E, 8);
+  addKey("EJECT", Eject_Key, 0x4E, 8);
+}
+
+
+LifetecAudio1::LifetecAudio1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 1",
+      Lifetec_Make,
+      index)
+{
+}
+
+
+void LifetecAudio1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECXProtocol(guiObject, index, false);
+
+  setPreData(0xA4A4, 16);
+
+  addKey("power", Power_Key, 0x16, 8);
+  addKey("play", Play_Key, 0x13, 8);
+  addKey("rew", Rewind_Key, 0x04, 8);
+  addKey("ff", FastForward_Key, 0x0C, 8);
+  addKey("stop", Stop_Key, 0x1B, 8);
+  addKey("mute", Mute_Key, 0x17, 8);
+  addKey("vol+", VolumeUp_Key, 0x20, 8);
+  addKey("vol-", VolumeDown_Key, 0x60, 8);
+}
diff --git a/keysets/lifetec.h b/keysets/lifetec.h
new file mode 100644 (file)
index 0000000..09b5613
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef LIFETEC_H
+#define LIFETEC_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class LifetecTV1: public PIRKeysetMetaData
+{
+public:
+  LifetecTV1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+
+class LifetecTV2: public PIRKeysetMetaData
+{
+public:
+  LifetecTV2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+
+class LifetecVCR1: public PIRKeysetMetaData
+{
+public:
+  LifetecVCR1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+
+class LifetecAudio1: public PIRKeysetMetaData
+{
+public:
+  LifetecAudio1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // LIFETEC_H
index 22e3129..9c676d5 100644 (file)
@@ -115,9 +115,9 @@ void LoeweVCR1::populateProtocol(
   addKey("TV", Input_Key, 0x15, 8);
   addKey("LP", VHSSpeed_Key, 0x48, 8);
   addKey("REST", Clock_Key, 0x4C, 8);
-  addKey("VISS", Unmapped_Key, 0x41, 8);
-  addKey("MARK", Unmapped_Key, 0x50, 8);
-  addKey("ERASE", Unmapped_Key, 0x42, 8);
+  addKey("VISS", IndexSearch_Key, 0x41, 8);
+  addKey("MARK", IndexMark_Key, 0x50, 8);
+  addKey("ERASE", IndexErase_Key, 0x42, 8);
   addKey("0000", Reset_Key, 0x4D, 8);
 }
 
index ce4e36a..ebe1e75 100644 (file)
@@ -120,7 +120,7 @@ void MagnavoxVCR1::populateProtocol(
   addKey("TvVolumeDn", Unmapped_Key, 0x1011, 13);
   addKey("TvChUp", Unmapped_Key, 0x1020, 13);
   addKey("TvChDn", Unmapped_Key, 0x1021, 13);
-  addKey("SkipSrch", Unmapped_Key, 0x016A, 13);
+  addKey("SkipSrch", IndexSearch_Key, 0x016A, 13); // Might be wrong
   addKey("FrameAdvance", StepForward_Key, 0x016B, 13);
   addKey("VcrChUp", Unmapped_Key, 0x1160, 13);
   addKey("VcrChDn", Unmapped_Key, 0x1161, 13);
@@ -137,7 +137,7 @@ void MagnavoxVCR1::populateProtocol(
   addKey("Memo", Unmapped_Key, 0x117B, 13);
   addKey("Speed", VHSSpeed_Key, 0x117A, 13);
   addKey("VcrTv", Unmapped_Key, 0x117E, 13);
-  addKey("2xPlay", Unmapped_Key, 0x116A, 13);
+  addKey("2xPlay", PlayX2_Key, 0x116A, 13);
 }
 
 
index 1740a02..ef6c9ac 100644 (file)
@@ -53,8 +53,8 @@ void MCERemote1::populateProtocol(
   addKey("Record", Record_Key, 0x17, 8);
   addKey("Pause", Pause_Key, 0x18, 8);
   addKey("Stop", Stop_Key, 0x19, 8);
-  addKey("Skip", Advance_Key, 0x1A, 8);
-  addKey("Replay", Replay_Key, 0x1B, 8);
+  addKey("Skip", Advance_Key, 0x1A, 8); // next?
+  addKey("Replay", Replay_Key, 0x1B, 8); // previous?
 
   addKey("Hash", Unmapped_Key, 0x1C, 8); // "Caps Lock"
   addKey("Star", Unmapped_Key, 0x1D, 8); // "Mouse"
@@ -83,10 +83,10 @@ void MCERemote1::populateProtocol(
   addKey("DVD angle", Angle_Key, 0x4B, 8);
   addKey("DVD audio", Audio_Key, 0x4C, 8);
   addKey("DVD subtitle", Captions_Key, 0x4D, 8);
-
   addKey("Print", Unmapped_Key, 0x4E, 8);
-  addKey("Radio", TunerInput_Key, 0x50, 8);
 
+  addKey("Radio", TunerInput_Key, 0x50, 8);
+  addKey("title", DiscTitle_Key, 0x51, 8);
   addKey("Teletext", Teletext_Key, 0x5A, 8);
   addKey("Red", Red_Key, 0x5B, 8);
   addKey("Green", Green_Key, 0x5C, 8);
@@ -259,3 +259,29 @@ void MCERemote1g::populateProtocol(
 
   setPreData(0x74, 7);
 }
+
+
+MCEXboxRemote1::MCEXboxRemote1(
+  unsigned int index)
+  : MCERemote1g(index)
+{
+  setKeysetName("XBox 360 Remote 1");
+}
+
+
+void MCEXboxRemote1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  MCERemote1g::populateProtocol(guiObject);
+
+  addKey("A", Green_Key, 0x12, 8);
+  addKey("X", Blue_Key, 0x13, 8);
+  addKey("B", Red_Key, 0x25, 8);
+  addKey("Y", Yellow_Key, 0x26, 8);
+}
index e43d7d5..8e6011c 100644 (file)
@@ -85,4 +85,14 @@ public:
     QObject *guiObject);
 };
 
+class MCEXboxRemote1: public MCERemote1g
+{
+public:
+  MCEXboxRemote1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
 #endif // MCE_H
diff --git a/keysets/medion.cpp b/keysets/medion.cpp
new file mode 100644 (file)
index 0000000..947967f
--- /dev/null
@@ -0,0 +1,249 @@
+#include "medion.h"
+#include "protocols/necprotocol.h"
+#include "protocols/paceprotocol.h"
+
+MedionSTB1::MedionSTB1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV DVR Keyset 1",
+      Medion_Make,
+      index)
+{
+  addControlledDevice(Medion_Make, "HDD-DVR 0905", Other_Device);
+}
+
+
+void MedionSTB1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x6917, 16);
+
+  addKey("power", Power_Key, 0x0E, 8);
+  addKey("vol+", VolumeUp_Key, 0x49, 8);
+  addKey("vol-", VolumeDown_Key, 0x43, 8);
+  addKey("ch+", ChannelUp_Key, 0x51, 8);
+  addKey("ch-", ChannelDown_Key, 0x4D, 8);
+  addKey("left", Left_Key, 0x1C, 8);
+  addKey("right", Right_Key, 0x48, 8);
+  addKey("up", Up_Key, 0x44, 8);
+  addKey("down", Down_Key, 0x1D, 8);
+  addKey("ok", Select_Key, 0x5C, 8);
+  addKey("mute", Mute_Key, 0x16, 8);
+  addKey("menu", Menu_Key, 0x54, 8);
+  addKey("epg", Guide_Key, 0x12, 8);
+  addKey("exit", Exit_Key, 0x42, 8);
+  addKey("1", One_Key, 0x13, 8);
+  addKey("2", Two_Key, 0x10, 8);
+  addKey("3", Three_Key, 0x11, 8);
+  addKey("4", Four_Key, 0x0F, 8);
+  addKey("5", Five_Key, 0x0C, 8);
+  addKey("6", Six_Key, 0x0D, 8);
+  addKey("7", Seven_Key, 0x0B, 8);
+  addKey("8", Eight_Key, 0x08, 8);
+  addKey("9", Nine_Key, 0x09, 8);
+  addKey("0", Zero_Key, 0x47, 8);
+  addKey("av", Input_Key, 0x1F, 8);
+  addKey("-/--", DoubleDigit_Key, 0x50, 8);
+  addKey("rew", Rewind_Key, 0x15, 8);
+  addKey("play", Play_Key, 0x1B, 8);
+  addKey("fwd", FastForward_Key, 0x55, 8);
+  addKey("rec", Record_Key, 0x02, 8);
+  addKey("stop", Stop_Key, 0x59, 8);
+  addKey("pause", Pause_Key, 0x19, 8);
+  addKey("u1", Unmapped_Key, 0x04, 8);
+  addKey("u2", Unmapped_Key, 0x14, 8);
+  addKey("u3", Unmapped_Key, 0x03, 8);
+  addKey("u4", Unmapped_Key, 0x00, 8);
+  addKey("einbl", Unmapped_Key, 0x5A, 8);
+  addKey("red", Red_Key, 0x17, 8);
+  addKey("green", Green_Key, 0x52, 8);
+  addKey("yellow", Yellow_Key, 0x53, 8);
+  addKey("blue", Blue_Key, 0x18, 8);
+  addKey("pink", Unmapped_Key, 0x4C, 8);
+}
+  
+
+
+MedionDVD1::MedionDVD1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "DVD Keyset 1",
+      Medion_Make,
+      index)
+{
+}
+
+
+void MedionDVD1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, false, false);
+
+  setPreData(0x00, 8);
+
+  addKey("POWER", Power_Key, 0x00, 8);
+  addKey("PAUSE", Pause_Key, 0x03, 8);
+  addKey("PLAY", Play_Key, 0x06, 8);
+  addKey("EJECT", Eject_Key, 0x0C, 8);
+  addKey("SETUP", Menu_Key, 0x0F, 8);
+
+  addKey("STOP", Stop_Key, 0x13, 8);
+
+  addKey("1", One_Key, 0x4B, 8);
+  addKey("2", Two_Key, 0x47, 8);
+  addKey("3", Three_Key, 0x43, 8);
+  addKey("4", Four_Key, 0x4A, 8);
+  addKey("5", Five_Key, 0x46, 8);
+  addKey("6", Six_Key, 0x42, 8);
+  addKey("7", Seven_Key, 0x49, 8);
+  addKey("8", Eight_Key, 0x45, 8);
+  addKey("9", Nine_Key, 0x41, 8);
+  addKey("0", Zero_Key, 0x44, 8);
+
+  addKey("FFWD", FastForward_Key, 0x50, 8);
+  addKey("NEXT", Next_Key, 0x51, 8);
+  addKey("VOLPLUS", VolumeUp_Key, 0x52, 8);
+  addKey("MUTE", Mute_Key, 0x53, 8);
+  addKey("FREV", Rewind_Key, 0x54, 8);
+  addKey("PREV", Previous_Key, 0x55, 8);
+  addKey("VOLMINUS", VolumeDown_Key, 0x56, 8);
+  addKey("SUBTITLE", Captions_Key, 0x5E, 8);
+}
+
+
+MedionDVD2::MedionDVD2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "DVD Keyset 2",
+      Medion_Make,
+      index)
+{
+}
+
+
+void MedionDVD2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new PaceProtocol(guiObject, index);
+
+  setPreData(0x5, 3);
+
+  addKey("ZOOM", Zoom_Key, 0x12, 6);
+  addKey("PREV", Previous_Key, 0x15, 6);
+  addKey("NEXT", Next_Key, 0x16, 6);
+  addKey("MENU", DiscMenu_Key, 0x17, 6);
+  addKey("MUTE", Mute_Key, 0x18, 6);
+  addKey("PLAY", Play_Key, 0x19, 6);
+  addKey("PAUSE", Pause_Key, 0x1A, 6);
+  addKey("8", Eight_Key, 0x1C, 6);
+  addKey("4", Four_Key, 0x1D, 6);
+  addKey("POWER", Power_Key, 0x1E, 6);
+  addKey("INDEX", Unmapped_Key, 0x1F, 6);
+
+  addKey("INFO", Info_Key, 0x20, 6);
+  addKey("RIGHT", Right_Key, 0x21, 6);
+  addKey("STOP", Stop_Key, 0x22, 6);
+  addKey("CLEAR", Clear_Key, 0x23, 6);
+  addKey("7", Seven_Key, 0x24, 6);
+  addKey("3", Three_Key, 0x25, 6);
+  addKey("EJECT", Eject_Key, 0x26, 6);
+  addKey("TITLE", DiscTitle_Key, 0x27, 6);
+  addKey("UP", Up_Key, 0x28, 6);
+  addKey("OK", Select_Key, 0x29, 6);
+  addKey("DOWN", Down_Key, 0x2A, 6);
+  addKey("0", Zero_Key, 0x2B, 6);
+  addKey("6", Six_Key, 0x2C, 6);
+  addKey("2", Two_Key, 0x2D, 6);
+  addKey("CAMERA", Angle_Key, 0x2E, 6);
+
+  addKey("EXIT", Exit_Key, 0x30, 6);
+  addKey("LEFT", Left_Key, 0x31, 6);
+  addKey("FORWARD", FastForward_Key, 0x32, 6);
+  addKey("9", Nine_Key, 0x33, 6);
+  addKey("5", Five_Key, 0x34, 6);
+  addKey("1", One_Key, 0x35, 6);
+  addKey("BACKWARD", Rewind_Key, 0x37, 6);
+}
+
+
+MedionVCR1::MedionVCR1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "VCR Keyset 1",
+      Medion_Make,
+      index)
+{
+}
+
+
+void MedionVCR1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, false);
+
+  setPreData(0x7B80, 16);
+
+  addKey("PowerOff", Power_Key, 0x13, 8);
+  addKey("Eject", Eject_Key, 0x4E, 8);
+  addKey("TimerRec", RecordTimed_Key, 0x0D, 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, 0x00, 8);
+  addKey("TV/VCR", Input_Key, 0x12, 8);
+  addKey("CannelTracking+", ChannelUp_Key, 0x0A, 8);
+  addKey("CannelTracking+", TrackingPlus_Key, 0x0A, 8);
+  addKey("ChannelTracking-", ChannelDown_Key, 0x0B, 8);
+  addKey("ChannelTracking-", TrackingMinus_Key, 0x0B, 8);
+  addKey("SpeedSP/LP", VHSSpeed_Key, 0x1E, 8);
+  addKey("Rec-EndSearch", Unmapped_Key, 0x47, 8);
+  addKey("Call", Call_Key, 0x5F, 8);
+  addKey("REC/OTR", Record_Key, 0x15, 8);
+  addKey("Pause/Still", Pause_Key, 0x1A, 8);
+  addKey("Play", Play_Key, 0x16, 8);
+  addKey("FastReturn", Rewind_Key, 0x19, 8);
+  addKey("FastForward", FastForward_Key, 0x18, 8);
+  addKey("Stop", Stop_Key, 0x17, 8);
+  addKey("ShowView/Program", Unmapped_Key, 0x1D, 8); // vhsplus+, etc.
+  addKey("Enter", Select_Key, 0x45, 8);
+  addKey("Menu", Menu_Key, 0x50, 8);
+  addKey("Cancel", Exit_Key, 0x4A, 8);
+  addKey("Index", IndexSearch_Key, 0x14, 8);
+  addKey("ATR", AutoTracking_Key, 0x52, 8);
+  addKey("Clock/Counter", Unmapped_Key, 0x51, 8);
+  addKey("ZeroReturn", Unmapped_Key, 0x4B, 8);
+  addKey("CounterReset", Reset_Key, 0x4C, 8);
+  addKey("AudioSelect", Audio_Key, 0x0E, 8);
+}
diff --git a/keysets/medion.h b/keysets/medion.h
new file mode 100644 (file)
index 0000000..6c17e2f
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef MEDION_H
+#define MEDION_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class MedionSTB1: public PIRKeysetMetaData
+{
+public:
+  MedionSTB1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+
+class MedionDVD1: public PIRKeysetMetaData
+{
+public:
+  MedionDVD1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+
+class MedionDVD2: public PIRKeysetMetaData
+{
+public:
+  MedionDVD2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+
+class MedionVCR1: public PIRKeysetMetaData
+{
+public:
+  MedionVCR1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // MEDION_H
index ef6900c..ae94c7d 100644 (file)
@@ -95,7 +95,7 @@ void MitsubishiTV1::populateProtocol(
   addKey("DEGAUSS", Unmapped_Key, 0xCE, 8);
   addKey("DEMO", Unmapped_Key, 0x62, 8);
   addKey("PRESET", Unmapped_Key, 0xA2, 8);
-  addKey("BAND", TunerBand_Key, 0xAE, 8);
+  addKey("BAND", TunerInput_Key, 0xAE, 8);
   addKey("AFT", Unmapped_Key, 0xA6, 8);
   addKey("SKIP", Unmapped_Key, 0xB6, 8);
   addKey("REALNAME", Unmapped_Key, 0xDA, 8);
@@ -208,7 +208,7 @@ void MitsubishiVCR1::populateProtocol(
   addKey("DAILY/WEEKLY", Unmapped_Key, 0xF2, 8);
   addKey("COUNT_RES", Unmapped_Key, 0xDC, 8);
   addKey("display", Info_Key, 0xE4, 8); // "DATA_SCRN"
-  addKey("x2", Unmapped_Key, 0x5C, 8);
+  addKey("x2", PlayX2_Key, 0x5C, 8);
   addKey("audio/video", Unmapped_Key, 0x02, 8);
   addKey("adjust+", Right_Key, 0x82, 8);
   addKey("cancel", Exit_Key, 0xD0, 8);
index 606ab35..878f437 100644 (file)
@@ -55,8 +55,8 @@ void NADAudio1::populateProtocol(
   addKey("TapeA-Rewind", Unmapped_Key, 0x57, 8);
 
   addKey("Standby", Power_Key, 0x80, 8);  // "RCVR_POWER"
-  addKey("Input-TunerFM", Unmapped_Key, 0x81, 8);
-  addKey("Input-TunerAM", Unmapped_Key, 0x82, 8);
+  addKey("Input-TunerFM", FM_Key, 0x81, 8);
+  addKey("Input-TunerAM", AM_Key, 0x82, 8);
   addKey("Input-CD", CDInput_Key, 0x85, 8);
   addKey("VolumeUp", VolumeUp_Key, 0x88, 8);
   addKey("Input-Disc", PhonoInput_Key, 0x89, 8);
@@ -93,7 +93,6 @@ void NADAudio1::populateProtocol(
 
   addKey("Tuner-PresetLeft", ChannelDown_Key, 0xD1, 8);
   addKey("Tuner-PresetRight", ChannelUp_Key, 0xD2, 8);
-  addKey("FM/AM", TunerBand_Key, 0xDD, 8); // "tuner"
   addKey("FM/AM", TunerInput_Key, 0xDD, 8); // "tuner"
   addKey("TapeB-Rev", Unmapped_Key, 0xDE, 8);
 }
@@ -149,7 +148,7 @@ void NADTuner1::populateProtocol(
 
   addKey("tuner-fm-mute", Unmapped_Key, 0x37, 8);
   addKey("tuner-blend", Unmapped_Key, 0x35, 8);
-  addKey("tuner-am-fm-dab", TunerBand_Key, 0xDD, 8);
+  addKey("tuner-am-fm-dab", TunerInput_Key, 0xDD, 8);
 
   addKey("Standby", Power_Key, 0x80, 8);  // "RCVR_POWER"
   addKey("VolumeUp", VolumeUp_Key, 0x88, 8);
index 3fea824..4bfcb33 100644 (file)
@@ -225,13 +225,13 @@ void OrionVCR1::populateProtocol(
   addKey("CH9", Nine_Key, 0x09, 8);
   addKey("CHUP", Up_Key, 0x0A, 8);
   addKey("CHDN", Down_Key, 0x0B, 8);
-  addKey("TIMER_REC", Timer_Key, 0x0D, 8);
+  addKey("TIMER_REC", RecordTimed_Key, 0x0D, 8);
   addKey("AUDIOSELECT", Audio_Key, 0x0E, 8);
   addKey("CH10+", DoubleDigit_Key, 0x0F, 8);
 
   addKey("TVVCR", Input_Key, 0x12, 8);
   addKey("POWER", Power_Key, 0x13, 8);
-  addKey("INDEX", Unmapped_Key, 0x14, 8);
+  addKey("INDEX", IndexSearch_Key, 0x14, 8);
   addKey("RECOTR", Record_Key, 0x15, 8);
   addKey("PLAY", Play_Key, 0x16, 8);
   addKey("STOP", Stop_Key, 0x17, 8);
@@ -239,7 +239,7 @@ void OrionVCR1::populateProtocol(
   addKey("REW", Rewind_Key, 0x19, 8);
   addKey("PAUSESTILL", Pause_Key, 0x1A, 8);
   addKey("CLOCKSET", Unmapped_Key, 0x1C, 8);
-  addKey("SHOWVIEW", Unmapped_Key, 0x1D, 8);
+  addKey("SHOWVIEW", Unmapped_Key, 0x1D, 8); // vhsplus+, etc.
   addKey("SPEEDSPLP", VHSSpeed_Key, 0x1E, 8);
 
   addKey("PRESET", Unmapped_Key, 0x40, 8);
index cee2505..21647cc 100644 (file)
@@ -448,10 +448,10 @@ void PanasonicVCR1::populateProtocol(
   addKaseikyoKey("INFO", Info_Key, 0x009, 0x39);
   addKaseikyoKey("-/--", DoubleDigit_Key, 0x009, 0x3B);
   addKaseikyoKey("POWER", Power_Key, 0x009, 0x3D);
-  addKaseikyoKey("INDEX", Unmapped_Key, 0x009, 0x40);
+  addKaseikyoKey("INDEX", IndexSearch_Key, 0x009, 0x40);
   addKaseikyoKey("time_search", Unmapped_Key, 0x009, 0x44);
-  addKaseikyoKey("INDEXL", Unmapped_Key, 0x009, 0x49);
-  addKaseikyoKey("INDEXR", Unmapped_Key, 0x009, 0x4A);
+  addKaseikyoKey("INDEXL", Previous_Key, 0x009, 0x49);
+  addKaseikyoKey("INDEXR", Next_Key, 0x009, 0x4A);
   addKaseikyoKey("mem_rep", Unmapped_Key, 0x009, 0x53);
   addKaseikyoKey("COUNTER_RESET", Unmapped_Key, 0x009, 0x54);
   addKaseikyoKey("TAPE_REMAIN", Unmapped_Key, 0x009, 0x55);
@@ -462,7 +462,7 @@ void PanasonicVCR1::populateProtocol(
   addKaseikyoKey("TRACKING_AUTO", AutoTracking_Key, 0x009, 0xB0);
   addKaseikyoKey("TRACKING_PLUS", TrackingPlus_Key, 0x009, 0xB1);
   addKaseikyoKey("TRACKING_MINUS", TrackingMinus_Key, 0x009, 0xB2);
-  addKaseikyoKey("TIMERREC", Timer_Key, 0x009, 0xB4);
+  addKaseikyoKey("TIMERREC", RecordTimed_Key, 0x009, 0xB4);
   addKaseikyoKey("AV", Unmapped_Key, 0x009, 0xC0);
   addKaseikyoKey("DIRECT_TV_REC", Unmapped_Key, 0x009, 0xC2);
   addKaseikyoKey("mesecam", Unmapped_Key, 0x009, 0xC9);
@@ -481,7 +481,7 @@ void PanasonicVCR1::populateProtocol(
   addKaseikyoKey("rotatedown", Unmapped_Key, 0x019, 0x03);
   addKaseikyoKey("set", Unmapped_Key, 0x019, 0x04);
   addKaseikyoKey("clear", Unmapped_Key, 0x019, 0x05);
-  addKaseikyoKey("VPS/PDC", Unmapped_Key, 0x019, 0x06);
+  addKaseikyoKey("VPS/PDC", RecordPDC_Key, 0x019, 0x06);
   addKaseikyoKey("OffTimer", Sleep_Key, 0x019, 0x08);
   addKaseikyoKey("CANCEL", Clear_Key, 0x019, 0x09);
   addKaseikyoKey("SPEED", VHSSpeed_Key, 0x019, 0x0A);
@@ -489,7 +489,7 @@ void PanasonicVCR1::populateProtocol(
   addKaseikyoKey("RADIO_TUNE", Unmapped_Key, 0x019, 0x38);
   addKaseikyoKey("MENU", Menu_Key, 0x019, 0x56);
   addKaseikyoKey("OK", Select_Key, 0x019, 0x58);
-  addKaseikyoKey("SHOWVIEW", Unmapped_Key, 0x019, 0x5D);
+  addKaseikyoKey("SHOWVIEW", Unmapped_Key, 0x019, 0x5D); // vhsplus+, etc.
   addKaseikyoKey("DISPLAY", Unmapped_Key, 0x019, 0x5F);
   addKaseikyoKey("EXIT", Exit_Key, 0x019, 0x66);
   addKaseikyoKey("CHECK+", Unmapped_Key, 0x019, 0x90);
@@ -535,7 +535,7 @@ void PanasonicVCR1a::populateProtocol(
 
   addKaseikyoKey("OSD", Info_Key, 0x009, 0x57);
   addKaseikyoKey("AV", Input_Key, 0x009, 0xC0);
-  addKaseikyoKey("DISPLAY", Info_Key, 0x019, 0x5F);
+  addKaseikyoKey("DISPLAY", Unmapped_Key, 0x019, 0x5F);
 }
 
 
@@ -619,7 +619,7 @@ void PanasonicVCR2::populateProtocol(
   addPanOldKey("PLAY", Play_Key, 0x02, 0x0A);
   addPanOldKey("REV_PLAY", Unmapped_Key, 0x02, 0x0B);
   addPanOldKey("F.ADV", StepForward_Key, 0x02, 0x0C);
-  addPanOldKey("x2", Unmapped_Key, 0x02, 0x0E);
+  addPanOldKey("x2", PlayX2_Key, 0x02, 0x0E);
   addPanOldKey("SLOW", Slow_Key, 0x02, 0x0F);
   addPanOldKey("1", One_Key, 0x02, 0x10);
   addPanOldKey("2", Two_Key, 0x02, 0x11);
@@ -641,10 +641,10 @@ void PanasonicVCR2::populateProtocol(
   addPanOldKey("MEMORY_SEARCH", Memory_Key, 0x02, 0x32);
   addPanOldKey("RESET_INDEX", Reset_Key, 0x02, 0x33);
   addPanOldKey("INTRO_SCAN", Unmapped_Key, 0x02, 0x34);
-  addPanOldKey("timer_rec", Timer_Key, 0x02, 0x36);
+  addPanOldKey("timer_rec", RecordTimed_Key, 0x02, 0x36);
   addPanOldKey("AUDIO-SELECT", Audio_Key, 0x02, 0x3D);
 
-  addPanOldKey("VPS", VHSSpeed_Key, 0x03, 0x06); // Might be wrong
+  addPanOldKey("VPS", RecordPDC_Key, 0x03, 0x06);
   addPanOldKey("prog", Program_Key, 0x03, 0x2C);
   addPanOldKey("next", Next_Key, 0x03, 0x3A);
 
@@ -848,7 +848,7 @@ void PanasonicAudio1::populateProtocol(
   addKaseikyoKey("vol+", VolumeUp_Key, 0xC2A, 0xB0);
   addKaseikyoKey("vol-", VolumeDown_Key, 0xC2A, 0xB1);
   addKaseikyoKey("cd", CDInput_Key, 0xC2A, 0xB6);
-  addKaseikyoKey("tuner-band", TunerBand_Key, 0xC2A, 0xB8);
+  addKaseikyoKey("tuner-band", TunerInput_Key, 0xC2A, 0xB8);
   addKaseikyoKey("sleep", Sleep_Key, 0xC2A, 0xBC);
   addKaseikyoKey("power", Power_Key, 0xC2A, 0xBF);
 
index f8da887..15c1b1f 100644 (file)
@@ -1037,10 +1037,10 @@ void PhilipsVCR1::populateProtocol(
   addKey("-/--", DoubleDigit_Key, 0x114A, 13);
   addKey("100", PlusOneHundred_Key, 0x114A, 13);
   addKey("VCR-Dash", Dash_Key, 0x114A, 13);
-  addKey("Index", Unmapped_Key, 0x0170, 13);
+  addKey("Index", IndexSearch_Key, 0x0170, 13);
   addKey("reset", Reset_Key, 0x1171, 13); // "clear"
   addKey("play<", Unmapped_Key, 0x116F, 13);
-  addKey("x>", Unmapped_Key, 0x116A, 13); // "X2_PLAY"
+  addKey("x>", PlayX2_Key, 0x116A, 13); // "X2_PLAY"
   addKey("speed", VHSSpeed_Key, 0x117A, 13); // "SP/LP"
   addKey("Childlock", Unmapped_Key, 0x017F, 13);
   addKey("System", Unmapped_Key, 0x094A, 13);
@@ -1153,14 +1153,14 @@ void PhilipsVCR1c::populateProtocol(
   addKey("Previous", Previous_Key, 0x0171, 13);
   addKey("Next", Next_Key, 0x0170, 13);
   addKey("SET_CLOCK", Unmapped_Key, 0x1164, 13);
-  addKey("VPS", Unmapped_Key, 0x114B, 13);
+  addKey("VPS", RecordPDC_Key, 0x114B, 13);
   addKey("Cassette", Eject_Key, 0x017E, 13);
   addKey("DECODER", Unmapped_Key, 0x0169, 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("SHOWVIEW", Unmapped_Key, 0x0145, 13); // vhsplus+, etc.
   addKey("DW", Unmapped_Key, 0x0144, 13); // "D/W"
   addKey("SPEED-", SlowMinus_Key, 0x1165, 13);
   addKey("SPEED+", SlowPlus_Key, 0x1166, 13);
@@ -1422,7 +1422,7 @@ void PhilipsAudio1::populateProtocol(
   addKey("tuner_next", Next_Key, 0x1460, 13); // "presetUp"
   addKey("tuner_previous", Previous_Key, 0x1461, 13); // "presetDown"
   addKey("tuner_program", Program_Key, 0x047A, 13); // Create Preset
-  addKey("tuner", TunerBand_Key, 0x147F, 13);
+  addKey("tuner", TunerInput_Key, 0x147F, 13);
   addKey("tape_power", Unmapped_Key, 0x148C, 13);
   addKey("tape_next", Unmapped_Key, 0x14A0, 13);
   addKey("tape_previous", Unmapped_Key, 0x14A1, 13);
index 3ae1695..e444b62 100644 (file)
@@ -295,7 +295,7 @@ void PioneerAudio1::populateProtocol(
   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("FM/AM", TunerInput_Key, 0xA6, 0x49); // "BAND"
   addNECKey("aux", AuxInput_Key, 0xA6, 0x4C);
   addNECKey("TAPE1_PLAY", Unmapped_Key, 0xA6, 0x5A);
   addNECKey("KARAOKE", Unmapped_Key, 0xA6, 0x69);
@@ -489,7 +489,8 @@ void PioneerAudio3::populateProtocol(
   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_band", AM_Key, 0xA4, 0x13); // This is a hack
+  addNECKey("tuner_band", FM_Key, 0xA4, 0x13); // This too
   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
@@ -668,7 +669,8 @@ void PioneerAudio5::populateProtocol(
   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("TUNER_BAND", AM_Key, 0x18E7, 16);  // This is a hack
+  addKey("TUNER_BAND", FM_Key, 0x18E7, 16);  // This too
   addKey("1", One_Key, 0x00FF, 16);
   addKey("2", Two_Key, 0x807F, 16);
   addKey("3", Three_Key, 0x40BF, 16);
index c90e6a7..15127dd 100644 (file)
@@ -59,8 +59,8 @@ void SabaTV1::populateProtocol(
   addKey("Clock", Unmapped_Key, 0x38, 7); // "C"
   addKey("Menu", Menu_Key, 0x39, 7); // "Install"
   addKey("Ch.setup", Unmapped_Key, 0x3B, 7); // "B"
-  addKey("Mark", Unmapped_Key, 0x3C, 7);
-  addKey("Scan/Erase", Unmapped_Key, 0x3D, 7); // "Index"
+  addKey("Mark", IndexMark_Key, 0x3C, 7);
+  addKey("Scan/Erase", IndexSearch_Key, 0x3D, 7); // "Index"
 }
 
 
index 7cbfd67..2001f37 100644 (file)
@@ -409,12 +409,12 @@ void SamsungVCR1::populateProtocol(
   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("BAND", TunerInput_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("mark/search", IndexSearch_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);
@@ -425,7 +425,7 @@ void SamsungVCR1::populateProtocol(
   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("VPS", RecordPDC_Key, 0x38, 8);
   addKey("progressive/speed", VHSSpeed_Key, 0x3A, 8); // "SP-LP"
   addKey("Q_PRO", Unmapped_Key, 0x3D, 8);
 
index 23a5957..5af60c6 100644 (file)
@@ -36,7 +36,7 @@ void SanyoVCR1::populateProtocol(
   addKey("3", Three_Key, 0x06, 8);
   addKey("4", Four_Key, 0x07, 8);
   addKey("TV/VCR", Input_Key, 0x08, 8);
-  addKey("x2", Unmapped_Key, 0x0B, 8);
+  addKey("x2", PlayX2_Key, 0x0B, 8);
   addKey("5", Five_Key, 0x0C, 8);
   addKey("6", Six_Key, 0x0D, 8);
   addKey("7", Seven_Key, 0x0E, 8);
@@ -47,25 +47,25 @@ void SanyoVCR1::populateProtocol(
   addKey("FF", FastForward_Key, 0x13, 8);
   addKey("Play", Play_Key, 0x14, 8);
   addKey("Rec", Record_Key, 0x15, 8);
-  addKey("Index", Unmapped_Key, 0x19, 8);
+  addKey("Index", IndexSearch_Key, 0x19, 8);
   addKey("Slow", Slow_Key, 0x1A, 8);
   addKey("+100", PlusOneHundred_Key, 0x1B, 8);
   addKey("9", Nine_Key, 0x1C, 8);
   addKey("0", Zero_Key, 0x1D, 8);
   addKey("Input", Unmapped_Key, 0x1E, 8);  // need a subclass for this?
-  addKey("ATR", Unmapped_Key, 0x1F, 8);
+  addKey("ATR", AutoTracking_Key, 0x1F, 8);
   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);
   addKey("Ok", Select_Key, 0x4B, 8);
   addKey("Display", Info_Key, 0x4C, 8);
-  addKey("VPS", Unmapped_Key, 0x4F, 8); // "vps/pdc", "dpc"
+  addKey("VPS", RecordPDC_Key, 0x4F, 8); // "vps/pdc", "dpc"
   addKey("Monitor", Unmapped_Key, 0x51, 8);
   addKey("Clock", Clock_Key, 0x56, 8);
   addKey("Power", Power_Key, 0x5B, 8);
   addKey("SP/LP", VHSSpeed_Key, 0x5E, 8);
-  addKey("ShowView", Unmapped_Key, 0x8C, 8);
+  addKey("ShowView", Unmapped_Key, 0x8C, 8); // vhsplus+, etc.
   addKey("Right", Right_Key, 0x94, 8);
   addKey("Left", Left_Key, 0x95, 8);
   addKey("Down", Down_Key, 0x96, 8);
index 1214b07..eb83536 100644 (file)
@@ -153,9 +153,11 @@ void SharpTV1a::populateProtocol(
   addSharpKey("Stop", Stop_Key, 0x01, 0x27);
   addSharpKey("REC", Record_Key, 0x01, 0x28);
   addSharpKey("Slow", Slow_Key, 0x01, 0x29);
-  addSharpKey("DPSS+", Unmapped_Key, 0x01, 0x2F);
+  addSharpKey("DPSS+", SlowPlus_Key, 0x01, 0x2F);
+  addSharpKey("DPSS+", Next_Key, 0x01, 0x2F);
 
-  addSharpKey("DPSS-", Unmapped_Key, 0x01, 0x30);
+  addSharpKey("DPSS-", SlowMinus_Key, 0x01, 0x30);
+  addSharpKey("DPSS-", Previous_Key, 0x01, 0x30);
   addSharpKey("Input", Input_Key, 0x01, 0x34);
   addSharpKey("ZeroBack", Unmapped_Key, 0x01, 0x83);
   addSharpKey("SkipSearch", Advance_Key, 0x01, 0x90);
@@ -332,11 +334,13 @@ void SharpVCR1::populateProtocol(
   addSharpKey("Slow", Slow_Key, 0x03, 0x29);
   addSharpKey("CLOCK", Clock_Key, 0x03, 0x2C);
   addSharpKey("DPSS+", SlowPlus_Key, 0x03, 0x2F); // "slow+"
+  addSharpKey("DPSS+", Next_Key, 0x03, 0x2F);
   addSharpKey("DPSS-", SlowMinus_Key, 0x03, 0x30); // "slow-"
-  addSharpKey("x2", Unmapped_Key, 0x03, 0x31);
+  addSharpKey("DPSS-", Previous_Key, 0x03, 0x30); // "slow-"
+  addSharpKey("x2", PlayX2_Key, 0x03, 0x31);
   addSharpKey("EJECT", Eject_Key, 0x03, 0x33);
   addSharpKey("InputSelect", Input_Key, 0x03, 0x34); // "simul"
-  addSharpKey("SEARCH", Unmapped_Key, 0x03, 0x37);
+  addSharpKey("SEARCH", IndexSearch_Key, 0x03, 0x37);
   addSharpKey("ZeroBack", Unmapped_Key, 0x03, 0x83);  // "MEMORY"
   addSharpKey("cancel", Unmapped_Key, 0x03, 0x84);  // could be exit key
   addSharpKey("TRACKING_UP", TrackingPlus_Key, 0x03, 0x85);
index 78f6581..1940c01 100644 (file)
@@ -381,7 +381,7 @@ void SonyAudio1::populateProtocol(
   addSIRC12Key("DSG", Unmapped_Key, 0x0C, 0x31);
 
   addSIRC12Key("MEMORY", Program_Key, 0x0D, 0x0E);
-  addSIRC12Key("TUNER-BAND", TunerBand_Key, 0x0D, 0x0F);
+  addSIRC12Key("TUNER-BAND", TunerInput_Key, 0x0D, 0x0F);
   addSIRC12Key("TUNING_MODE", Unmapped_Key, 0x0D, 0x17);
   addSIRC12Key("STEREO-MONO", FMMode_Key, 0x0D, 0x21);
 
@@ -389,7 +389,7 @@ void SonyAudio1::populateProtocol(
   addSIRC12Key("REC", Record_Key, 0x0E, 0x1E);
   addSIRC12Key("TAPE", TapeInput_Key, 0x0E, 0x34);
 
-  addSIRC12Key("tuner", TunerInput_Key, 0x10, 0x0F); // "Tune Up"
+  addSIRC12Key("tuner", ChannelUp_Key, 0x10, 0x0F); // "Tune Up"
   addSIRC12Key("VOL+", VolumeUp_Key, 0x10, 0x12);
   addSIRC12Key("VOL-", VolumeDown_Key, 0x10, 0x13);
   addSIRC12Key("ON-OFF", Power_Key, 0x10, 0x15);
@@ -743,7 +743,7 @@ void SonyDVD1c::populateProtocol(
 SonyDVD2::SonyDVD2(
   unsigned int index)
   : PIRKeysetMetaData(
-      "DVD Keyset 1",
+      "DVD Keyset 2",
       Sony_Make,
       index)
 {
diff --git a/keysets/sylvania.cpp b/keysets/sylvania.cpp
new file mode 100644 (file)
index 0000000..b73140b
--- /dev/null
@@ -0,0 +1,77 @@
+#include "sylvania.h"
+#include "protocols/necprotocol.h"
+
+SylvaniaTV1::SylvaniaTV1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 1",
+      Sylvania_Make,
+      index)
+{
+  addControlledDevice(Sylvania_Make, "6513DD", TV_Device);
+  addControlledDevice(Sylvania_Make, "6519DD", TV_Device);
+}
+
+
+void SylvaniaTV1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x2287, 16);
+
+  addKey("A-B", RepeatAB_Key, 0x43, 8);
+  addKey("open close", Eject_Key, 0x44, 8);
+  addKey("rewind", Rewind_Key, 0x52, 8);
+  addKey("fast fwd", FastForward_Key, 0x53, 8);
+  addKey("pause", Pause_Key, 0x5B, 8);
+  addKey("mode", Mode_Key, 0x5C, 8);
+  addKey("f.rew/prev track", Previous_Key, 0x5D, 8);
+  addKey("play", Play_Key, 0x5E, 8);
+  addKey("f.fwd/next track", Next_Key, 0x5F, 8);
+  addKey("stop", Stop_Key, 0x60, 8);
+  addKey("title", DiscTitle_Key, 0x70, 8);
+  addKey("repeat", Repeat_Key, 0x70, 8);
+  addKey("menu", DiscMenu_Key, 0x71, 8);
+  addKey("select", Select_Key, 0x72, 8);
+  addKey("return", Exit_Key, 0x72, 8);
+  addKey("last (prev ch)", PrevChannel_Key, 0x73, 8);
+  addKey("angle", Angle_Key, 0x79, 8);
+  addKey("subtitle", Captions_Key, 0x7A, 8);
+  addKey("audio", Audio_Key, 0x7B, 8);
+  addKey("v.surr", Surround_Key, 0x81, 8);
+  addKey("right arrow", Right_Key, 0xC6, 8);
+  addKey("left arrow", Left_Key, 0xC7, 8);
+  addKey("channel down", ChannelDown_Key, 0xC8, 8);
+  addKey("picture", PictureMode_Key, 0xC9, 8);
+  addKey("sleep", Sleep_Key, 0xCB, 8);
+  addKey("select", Unmapped_Key, 0xCD, 8); // Two select keys?
+  addKey("display", Info_Key, 0xCF, 8);
+  addKey("channel up", ChannelUp_Key, 0xD0, 8);
+  addKey("1", One_Key, 0xDF, 8);
+  addKey("power", Power_Key, 0xE0, 8);
+  addKey("2", Two_Key, 0xE1, 8);
+  addKey("3", Three_Key, 0xE2, 8);
+  addKey("4", Four_Key, 0xE3, 8);
+  addKey("5", Five_Key, 0xE4, 8);
+  addKey("6", Six_Key, 0xE5, 8);
+  addKey("7", Seven_Key, 0xE6, 8);
+  addKey("8", Eight_Key, 0xE7, 8);
+  addKey("9", Nine_Key, 0xE8, 8);
+  addKey("0", Zero_Key, 0xE9, 8);
+  addKey("+10", DoubleDigit_Key, 0xEC, 8);
+  addKey("+100", PlusOneHundred_Key, 0xEC, 8);
+  addKey("setup", Unmapped_Key, 0xEF, 8);
+  addKey("search mode", Unmapped_Key, 0xEF, 8);
+  addKey("vol up", VolumeUp_Key, 0xF0, 8);
+  addKey("vol down", VolumeDown_Key, 0xF1, 8);
+  addKey("mute", Mute_Key, 0xF3, 8);
+  addKey("up arrow", Up_Key, 0xF6, 8);
+  addKey("down arrow", Down_Key, 0xF7, 8);
+}
diff --git a/keysets/sylvania.h b/keysets/sylvania.h
new file mode 100644 (file)
index 0000000..9ec3eff
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef SYLVANIA_H
+#define SYLVANIA_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class SylvaniaTV1: public PIRKeysetMetaData
+{
+public:
+  SylvaniaTV1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // SYLVANIA_H
index 1b12d09..fc8d376 100644 (file)
@@ -138,7 +138,7 @@ void TechnicsAudio2::populateProtocol(
   addKaseikyoKey("CD", CDInput_Key, 0x005, 0x94);
 
   addKaseikyoKey("AUTO/MONO", FMMode_Key, 0x045, 0x33);
-  addKaseikyoKey("TUNER/BAND", TunerBand_Key, 0x045, 0xA4);
+  addKaseikyoKey("TUNER/BAND", TunerInput_Key, 0x045, 0xA4);
 
   addKaseikyoKey("DECKSTOP", Unmapped_Key, 0x085, 0x00);
   addKaseikyoKey("DECK<<", Unmapped_Key, 0x085, 0x02);
@@ -207,7 +207,7 @@ void TechnicsAudio3::populateProtocol(
   addKaseikyoKey("muting", Mute_Key, 0x00A, 0x32);
   addKaseikyoKey("VCR/VDP", VCRInput_Key, 0x00A, 0x86);
   addKaseikyoKey("phono", PhonoInput_Key, 0x00A, 0x90);
-  addKaseikyoKey("Amp.Tuner", TunerInput_Key, 0x00A, 0x92);
+  addKaseikyoKey("Amp.Tuner", Unmapped_Key, 0x00A, 0x92);
   addKaseikyoKey("cd", CDInput_Key, 0x00A, 0x94);
   addKaseikyoKey("tape", TapeInput_Key, 0x00A, 0x96);
   addKaseikyoKey("TAPE2", Unmapped_Key, 0x00A, 0x97);
@@ -224,7 +224,7 @@ void TechnicsAudio3::populateProtocol(
   addKaseikyoKey("auto/mono", FMMode_Key, 0x04A, 0x33);
   addKaseikyoKey("Tuner.Preset.up", ChannelUp_Key, 0x04A, 0x34);
   addKaseikyoKey("Tuner.Preset.down", ChannelDown_Key, 0x04A, 0x35);
-  addKaseikyoKey("tuner/band", TunerBand_Key, 0x04A, 0xA4);
+  addKaseikyoKey("tuner/band", TunerInput_Key, 0x04A, 0xA4);
 
   addKaseikyoKey("tape_stop", Unmapped_Key, 0x08A, 0x00);
   addKaseikyoKey("tape_open/close", Unmapped_Key, 0x08A, 0x01);
index aa56a3c..6ce906b 100644 (file)
@@ -189,7 +189,7 @@ void ThomsonVCR1::populateProtocol(
   addKey("RED", Red_Key, 0x39, 7); // "vcr_Lock"
   addKey("GREEN", Green_Key, 0x3B, 7);
   addKey("vcr_timer", Timer_Key, 0x3B, 7);
-  addKey("INDEX_MARK", Unmapped_Key, 0x3C, 7); // "vcr_zoom"?
+  addKey("INDEX_MARK", IndexSearch_Key, 0x3C, 7);
   addKey("Reset_counter", Reset_Key, 0x3D, 7);
   addKey("EXIT", Exit_Key, 0x3E, 7); // "vcr_clear" -- need child keyset?
 }
@@ -394,7 +394,7 @@ void ThomsonAudio1::populateProtocol(
   addKey("trackBack", Previous_Key, 0x90, 8);
   addKey("volUp", VolumeUp_Key, 0x91, 8);
   addKey("soundEffect", Unmapped_Key, 0x93, 8);
-  addKey("band", TunerBand_Key, 0x94, 8);
+  addKey("band", TunerInput_Key, 0x94, 8);
   addKey("mode", Mode_Key, 0x95, 8);
   addKey("select", Select_Key, 0x99, 8); // ?
   addKey("presUp", ChannelUp_Key, 0x9C, 8);
diff --git a/keysets/triax.cpp b/keysets/triax.cpp
new file mode 100644 (file)
index 0000000..e98aaf7
--- /dev/null
@@ -0,0 +1,140 @@
+#include "triax.h"
+#include "protocols/rc5protocol.h"
+#include "protocols/necprotocol.h"
+
+TriaxSTB1::TriaxSTB1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Satellite Receiver 1",
+      Triax_Make,
+      index)
+{
+  addControlledDevice(Triax_Make, "DVB 40S", Other_Device);
+}
+
+
+void TriaxSTB1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new RC5Protocol(guiObject, index);
+
+  addKey("Power", Power_Key, 0x128C, 13);
+  addKey("1", One_Key, 0x1281, 13);
+  addKey("2", Two_Key, 0x1282, 13);
+  addKey("3", Three_Key, 0x1283, 13);
+  addKey("4", Four_Key, 0x1284, 13);
+  addKey("5", Five_Key, 0x1285, 13);
+  addKey("6", Six_Key, 0x1286, 13);
+  addKey("7", Seven_Key, 0x1287, 13);
+  addKey("8", Eight_Key, 0x1288, 13);
+  addKey("9", Nine_Key, 0x1289, 13);
+  addKey("0", Zero_Key, 0x1280, 13);
+  addKey("Mute", Mute_Key, 0x0286, 13);
+  addKey("Help", Unmapped_Key, 0x128F, 13);
+  addKey("Left", Left_Key, 0x0295, 13);
+  addKey("Right", Right_Key, 0x0296, 13);
+  addKey("Up", Up_Key, 0x0290, 13);
+  addKey("Down", Down_Key, 0x0291, 13);
+  addKey("Guide", Guide_Key, 0x028F, 13);
+  addKey("Menu", Menu_Key, 0x02AA, 13);
+  addKey("TV/Sat", Input_Key, 0x12A8, 13);
+  addKey("Plus", Unmapped_Key, 0x12AF, 13);
+}
+
+
+TriaxSTB2::TriaxSTB2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Satellite Receiver 2",
+      Triax_Make,
+      index)
+{
+}
+
+
+void TriaxSTB2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0xDF00, 16);
+
+  addKey("f2", Unmapped_Key, 0x00, 8);
+  addKey("3", Three_Key, 0x01, 8);
+  addKey("channel up", ChannelUp_Key, 0x02, 8);
+  addKey("menu", Menu_Key, 0x03, 8);
+  addKey("2", Two_Key, 0x05, 8);
+  addKey("satellite", Input_Key, 0x06, 8);
+  addKey("1", One_Key, 0x09, 8);
+  addKey("select", Select_Key, 0x0A, 8);
+  addKey("vol down", VolumeDown_Key, 0x0B, 8);
+  addKey("power", Power_Key, 0x0C, 8);
+  addKey("vol up", VolumeUp_Key, 0x0D, 8);
+  addKey("f1", Unmapped_Key, 0x0E, 8);
+  addKey("f0", Unmapped_Key, 0x0F, 8);
+  addKey("info", Info_Key, 0x10, 8);
+  addKey("blue", Blue_Key, 0x10, 8);
+  addKey("audio", Audio_Key, 0x14, 8);
+  addKey("yellow", Yellow_Key, 0x14, 8);
+  addKey("sleep", Sleep_Key, 0x18, 8);
+  addKey("green", Green_Key, 0x18, 8);
+  addKey("tv/radio", TunerInput_Key, 0x1A, 8);
+  addKey("mosaic", PIP_Key, 0x1C, 8);
+  addKey("red", Red_Key, 0x1C, 8);
+  addKey("channel down", ChannelDown_Key, 0x1E, 8);
+  addKey("right arrow", Right_Key, 0x40, 8);
+  addKey("0", Zero_Key, 0x41, 8);
+  addKey("9", Nine_Key, 0x42, 8);
+  addKey("6", Six_Key, 0x43, 8);
+  addKey("up arrow", Up_Key, 0x44, 8);
+  addKey("teletext", Teletext_Key, 0x45, 8);
+  addKey("8", Eight_Key, 0x46, 8);
+  addKey("5", Five_Key, 0x47, 8);
+  addKey("down arrow", Down_Key, 0x48, 8);
+  addKey("exit", Exit_Key, 0x49, 8);
+  addKey("7", Seven_Key, 0x4A, 8);
+  addKey("4", Four_Key, 0x4B, 8);
+  addKey("left arrow", Left_Key, 0x4C, 8);
+  addKey("zoom", Zoom_Key, 0x50, 8);
+  addKey("mute", Mute_Key, 0x55, 8);
+  addKey("prev track", Previous_Key, 0x57, 8);
+  addKey("last (prev ch)", PrevChannel_Key, 0x59, 8);
+  addKey("next track", Next_Key, 0x5B, 8);
+  addKey("fav", Favorites_Key, 0x5C, 8);
+  addKey("program guide", Guide_Key, 0x5D, 8);
+}
+
+
+TriaxSTB2a::TriaxSTB2a(
+  unsigned int index)
+  : TriaxSTB2(index)
+{
+  setKeysetName("Satellite Receiver 2a");
+}
+
+
+void TriaxSTB2a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  TriaxSTB2::populateProtocol(guiObject);
+
+  setPreData(0x6681, 16);
+}
diff --git a/keysets/triax.h b/keysets/triax.h
new file mode 100644 (file)
index 0000000..5fcae4b
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef TRIAX_H
+#define TRIAX_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class TriaxSTB1: public PIRKeysetMetaData
+{
+public:
+  TriaxSTB1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class TriaxSTB2: public PIRKeysetMetaData
+{
+public:
+  TriaxSTB2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class TriaxSTB2a: public TriaxSTB2
+{
+public:
+  TriaxSTB2a(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // TRIAX_H
index 6097475..c6f9be5 100644 (file)
@@ -48,7 +48,7 @@ void UniversumVCR1::populateProtocol(
   addKey("play", Play_Key, 0x14, 8);
   addKey("rec", Record_Key, 0x15, 8);
   addKey("type", Unmapped_Key, 0x18, 8);
-  addKey("index", Unmapped_Key, 0x19, 8);
+  addKey("index", IndexSearch_Key, 0x19, 8);
   addKey("slow", Slow_Key, 0x1A, 8);
   addKey("9", Nine_Key, 0x1C, 8);
   addKey("0", Zero_Key, 0x1D, 8);
@@ -61,12 +61,12 @@ void UniversumVCR1::populateProtocol(
   addKey("clear", Clear_Key, 0x4A, 8);
   addKey("ok", Select_Key, 0x4B, 8);
   addKey("display", Info_Key, 0x4C, 8);
-  addKey("dpc_plus/vps/pdc", Unmapped_Key, 0x4F, 8);
+  addKey("dpc_plus/vps/pdc", RecordPDC_Key, 0x4F, 8);
   addKey("Surround", Surround_Key, 0x50, 8);
   addKey("remain", Unmapped_Key, 0x57, 8);
   addKey("power", Power_Key, 0x5B, 8);
   addKey("sp/lp", VHSSpeed_Key, 0x5E, 8);
-  addKey("showview", Unmapped_Key, 0x8C, 8);
+  addKey("showview", Unmapped_Key, 0x8C, 8); // vhsplus+, etc.
   addKey("pip", PIP_Key, 0x8D, 8);
   addKey("strobe", Unmapped_Key, 0x9A, 8);
   addKey("preset", Unmapped_Key, 0x9E, 8);
@@ -113,7 +113,7 @@ void UniversumVCR2::populateProtocol(
   addKey("0", Zero_Key, 0x1140, 13);
   addKey("+", ChannelUp_Key, 0x1160, 13);
   addKey("-", ChannelDown_Key, 0x1161, 13);
-  addKey("SEL/VPS", Unmapped_Key, 0x114B, 13);
+  addKey("SEL/VPS", RecordPDC_Key, 0x114B, 13);
   addKey("CLEAR", Clear_Key, 0x1171, 13);
   addKey("RECORD", Record_Key, 0x1177, 13);
   addKey("STILL", Pause_Key, 0x1169, 13);
@@ -174,9 +174,9 @@ void UniversumVCR3::populateProtocol(
   addKey("once", Unmapped_Key, 0x58, 8);
   addKey("daily", Unmapped_Key, 0x49, 8);
   addKey("weekly", Unmapped_Key, 0x4D, 8);
-  addKey("timer_rec", Unmapped_Key, 0x0D, 8);
+  addKey("timer_rec", RecordTimed_Key, 0x0D, 8);
   addKey("clock_counter", Unmapped_Key, 0x51, 8);
-  addKey("aft_vps", Unmapped_Key, 0x46, 8);
+  addKey("aft_vps", RecordPDC_Key, 0x46, 8);
   addKey("preset", Unmapped_Key, 0x40, 8);
   addKey("memory", Memory_Key, 0x4B, 8);
   addKey("reset", Reset_Key, 0x4C, 8);
@@ -398,9 +398,9 @@ void UniversumAudio1::populateProtocol(
 
   setPreData(0x1010, 16);
 
-  addKey("FM", TunerBand_Key, 0x00, 8);
-  addKey("MW", Unmapped_Key, 0x01, 8);
-  addKey("LW", Unmapped_Key, 0x02, 8);
+  addKey("FM", FM_Key, 0x00, 8);
+  addKey("MW", AM_Key, 0x01, 8);
+  addKey("LW", LW_Key, 0x02, 8);
   addKey("CDP", CDInput_Key, 0x03, 8);
   addKey("CD_PLAY", Play_Key, 0x04, 8);
   addKey("CD_STOP", Stop_Key, 0x05, 8);
diff --git a/keysets/viewsonic.cpp b/keysets/viewsonic.cpp
new file mode 100644 (file)
index 0000000..169c6f5
--- /dev/null
@@ -0,0 +1,114 @@
+#include "viewsonic.h"
+#include "protocols/necprotocol.h"
+
+ViewsonicProjector1::ViewsonicProjector1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Projector Keyset 1",
+      Viewsonic_Make,
+      index)
+{
+  addControlledDevice(Viewsonic_Make, "PJ750", Other_Device);
+}
+
+
+void ViewsonicProjector1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x4587, 16);
+
+  addKey("power", Power_Key, 0x17, 8);
+  addKey("RGB", Unmapped_Key, 0x18, 8);
+  addKey("video", PictureMode_Key, 0x19, 8);
+  addKey("menu", Menu_Key, 0x20, 8);
+  addKey("select", Select_Key, 0x21, 8);
+  addKey("reset", Reset_Key, 0x22, 8);
+  addKey("auto", Unmapped_Key, 0x24, 8);
+  addKey("up", Up_Key, 0x28, 8);
+  addKey("right", Right_Key, 0x2A, 8);
+  addKey("down", Down_Key, 0x2C, 8);
+  addKey("left", Left_Key, 0x2E, 8);
+  addKey("position", Unmapped_Key, 0x30, 8);
+  addKey("blank screen", Unmapped_Key, 0x41, 8);
+  addKey("vol-", VolumeDown_Key, 0x50, 8);
+  addKey("vol+", VolumeUp_Key, 0x51, 8);
+  addKey("mute", Mute_Key, 0x52, 8);
+  addKey("magnify+", Unmapped_Key, 0xB1, 8);
+  addKey("magnify-", Unmapped_Key, 0xB2, 8);
+  addKey("magnify off", Unmapped_Key, 0xB3, 8);
+  addKey("freeze", Pause_Key, 0xB4, 8);
+  addKey("keystone", Unmapped_Key, 0xB6, 8);
+}
+
+
+ViewsonicProjector2::ViewsonicProjector2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Projector Keyset 2",
+      Viewsonic_Make,
+      index)
+{
+  addControlledDevice(Viewsonic_Make, "PJ250", Other_Device);
+}
+
+
+void ViewsonicProjector2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x1586, 16);
+
+  addKey("7", Seven_Key, 0x03, 8);
+  addKey("Video", AuxInput_Key, 0x03, 8);
+  addKey("5", Five_Key, 0x04, 8);
+  addKey("RGB", ComponentInput_Key, 0x04, 8);
+  addKey("4", Four_Key, 0x05, 8);
+  addKey("Digital", PCInput_Key, 0x05, 8);
+  addKey("tv/vcr", Input_Key, 0x06, 8);
+  addKey("Power On", Power_Key, 0x08, 8);
+  addKey("0", Zero_Key, 0x10, 8);
+  addKey("Aspect", AspectRatio_Key, 0x10, 8);
+  addKey("sleep", Sleep_Key, 0x14, 8);
+  addKey("select", Select_Key, 0x17, 8);
+  addKey("exit", Exit_Key, 0x25, 8);
+  addKey("9", Nine_Key, 0x2B, 8);
+  addKey("YCbCr", Unmapped_Key, 0x2B, 8);
+  addKey("6", Six_Key, 0x2C, 8);
+  addKey("YPbPr", Unmapped_Key, 0x2C, 8);
+  addKey("pip on/off", PIP_Key, 0x30, 8);
+  addKey("1", One_Key, 0x32, 8);
+  addKey("Horiz Keystone", Unmapped_Key, 0x32, 8);
+  addKey("enter", Enter_Key, 0x34, 8);
+  addKey("Menu", Menu_Key, 0x46, 8);
+  addKey("Mute", Mute_Key, 0x47, 8);
+  addKey("last/prev ch", PrevChannel_Key, 0x48, 8);
+  addKey("L-", Unmapped_Key, 0x4C, 8);
+  addKey("Freeze", Pause_Key, 0x4C, 8);
+  addKey("right arrow", Right_Key, 0x5C, 8);
+  addKey("left arrow", Left_Key, 0x5D, 8);
+  addKey("up arrow", Up_Key, 0x5E, 8);
+  addKey("down arrow", Down_Key, 0x5F, 8);
+  addKey("L+", Unmapped_Key, 0x89, 8);
+  addKey("Zoom", Zoom_Key, 0x89, 8);
+  addKey("3", Three_Key, 0x8B, 8);
+  addKey("Vert Keystone", Unmapped_Key, 0x8B, 8);
+  addKey("8", Eight_Key, 0xC6, 8);
+  addKey("S-Video", SVideoInput_Key, 0xC6, 8);
+  addKey("Increase (+)", Unmapped_Key, 0xDE, 8);
+  addKey("Decrease (-)", Unmapped_Key, 0xDF, 8);
+}
diff --git a/keysets/viewsonic.h b/keysets/viewsonic.h
new file mode 100644 (file)
index 0000000..0ff5d6f
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef VIEWSONIC_H
+#define VIEWSONIC_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class ViewsonicProjector1: public PIRKeysetMetaData
+{
+public:
+  ViewsonicProjector1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class ViewsonicProjector2: public PIRKeysetMetaData
+{
+public:
+  ViewsonicProjector2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // VIEWSONIC_H
index 55e4127..03caebe 100644 (file)
@@ -244,7 +244,7 @@ void YamahaAudio2::populateProtocol(
   addKey("vcr", Unmapped_Key, 0x0F, 8);
   addKey("ch+", ChannelUp_Key, 0x10, 8);
   addKey("ch-", ChannelDown_Key, 0x11, 8);
-  addKey("abcde", TunerBand_Key, 0x12, 8); // "A/B/C/D/E" "tuner-toggle"
+  addKey("abcde", Unmapped_Key, 0x12, 8); // "A/B/C/D/E" "tuner-toggle"
   addKey("GO_VCR2", Unmapped_Key, 0x13, 8);
   addKey("phono", PhonoInput_Key, 0x14, 8);
   addKey("cd", CDInput_Key, 0x15, 8);
@@ -531,7 +531,7 @@ void YamahaAudio4::populateProtocol(
   addKey("tape_back", Unmapped_Key, 0x45, 8);
   addKey("rec", Record_Key, 0x46, 8);
   addKey("tape1/2", Unmapped_Key, 0x47, 8);
-  addKey("tuner", TunerBand_Key, 0x4B, 8);
+  addKey("tuner", TunerInput_Key, 0x4B, 8);
   addKey("sleep", Sleep_Key, 0x4F, 8);
   addKey("up_arrow", Up_Key, 0x55, 8);
   addKey("down_arrow", Down_Key, 0x56, 8);
index 78744b4..bdce733 100644 (file)
@@ -19,6 +19,7 @@
 #include "pirdocumentationform.h"
 #include "piraboutform.h"
 #include "dialogs/pirtabschoicedialog.h"
+#include "dialogs/pirfavoritesdialog.h"
 
 #include "pirkeysetmanager.h"
 #include "pirpanelmanager.h"
@@ -65,21 +66,16 @@ MainWindow::MainWindow(QWidget *parent)
   // Display the panels:
   myPanels->updateTabSet();
 
-  // Add the corner button:
-  insertCornerButton();
-
   // Construct the rest of the forms:
   selectKeysetForm = new PIRSelectKeysetForm(this);
-  myKeysets->populateSelectionWidget(selectKeysetForm);
+  favoritesDialog = new PIRFavoritesDialog(this);
+  myKeysets->populateListWidgets(selectKeysetForm, favoritesDialog);
 
   selectDeviceForm = new PIRSelectDeviceForm(this);
   PIRKeysetMetaData::populateDevices(selectDeviceForm);
 
   preferencesForm = new PIRPreferencesForm(this, myKeysets);
 
-  // Remember any favorites the user has already set:
-  populateFavorites();
-
   // Retrieve the user's preferences:
   QSettings settings("pietrzak.org", "Pierogi");
   if (settings.contains("currentKeysetName"))
@@ -90,9 +86,12 @@ MainWindow::MainWindow(QWidget *parent)
       currentKeyset);
   }
 
+  // Add the corner buttons:
+  insertCornerButtons();
+
   enableButtons();
 
-  QListWidget *fkw = myPanels->getFavoritesListWidget();
+  QListWidget *fkw = favoritesDialog->getFavoritesListWidget();
 
   connect(
     fkw,
@@ -376,34 +375,11 @@ void MainWindow::finalCleanup()
 }
 
 
-void MainWindow::addCurrentKeyset(
-  QListWidget *qlw)
+void MainWindow::addToFavorites(
+  PIRKeysetWidgetItem *kwi)
 {
-  // Is the current keyset already a favorite?
-  int count = qlw->count();
-  int index = 0;
-  PIRKeysetWidgetItem *kwi = NULL;
-  while (index < count)
-  {
-    kwi = dynamic_cast<PIRKeysetWidgetItem *>(
-      qlw->item(index));
-
-    if (kwi && (kwi->getID() == currentKeyset))
-    {
-      // Current keyset already in list!  No need to continue.
-      return;
-    }
-    ++index;
-  }
-
-  // Ok, add the current keyset to the favorites:
-  PIRMakeName make = myKeysets->getMake(currentKeyset);
-
-  QString name = makeManager.getMakeString(make);
-  name.append(" ");
-  name.append(myKeysets->getDisplayName(currentKeyset));
-
-  qlw->addItem(new PIRKeysetWidgetItem(name, currentKeyset, make));
+  //Add keyset to the favorites:
+  favoritesDialog->addItem(new PIRKeysetWidgetItem(kwi));
 
   // And, add the keyset id to the persistent list:
   QSettings settings("pietrzak.org", "Pierogi");
@@ -416,22 +392,18 @@ void MainWindow::addCurrentKeyset(
 
   settings.setValue(
     "keysetMake",
-    makeManager.getMakeString(myKeysets->getMake(currentKeyset)));
+    makeManager.getMakeString(kwi->getMake()));
 
-  settings.setValue("keysetName", myKeysets->getDisplayName(currentKeyset));
+  settings.setValue("keysetName", kwi->getInternalName());
 
   settings.endArray();
 }
 
 
-void MainWindow::removeFavoriteKeyset(
-  QListWidget *qlw)
+void MainWindow::removeFromFavorites(
+  unsigned int keysetID)
 {
-  // Deleting an item removes it from the list, so just grab the currently
-  // selected item and delete it:
-  QListWidgetItem *item = qlw->currentItem();
-
-  if (item) delete item;
+  favoritesDialog->removeItem(keysetID);
 
   // Remove this item from the persistent list.  Well, actually, it seems a
   // little more convenient to just blow away the existing list of favorites
@@ -441,7 +413,7 @@ void MainWindow::removeFavoriteKeyset(
 
   settings.remove("favorites");
 
-  int count = qlw->count();
+  int count = favoritesDialog->getCount();
 
   // If the count is empty, we can stop right here:
   if (count == 0) return;
@@ -452,7 +424,7 @@ void MainWindow::removeFavoriteKeyset(
   settings.beginWriteArray("favorites");
   while (index < count)
   {
-    kwi = dynamic_cast<PIRKeysetWidgetItem *>(qlw->item(index));
+    kwi = favoritesDialog->getItem(index);
 
     settings.setArrayIndex(index);
     id = kwi->getID();
@@ -469,6 +441,7 @@ void MainWindow::removeFavoriteKeyset(
 }
 
 
+/*
 void MainWindow::populateFavorites()
 {
   QSettings settings("pietrzak.org", "Pierogi");
@@ -491,7 +464,7 @@ void MainWindow::populateFavorites()
     if (kwi)
     {
       // Keyset does exist, so continue:
-      myPanels->addFavoritesItem(kwi);
+      favoritesDialog->addItem(kwi);
     }
 
     ++index;
@@ -499,6 +472,7 @@ void MainWindow::populateFavorites()
 
   settings.endArray();
 }
+*/
 
 
 void MainWindow::startRepeating(
@@ -535,24 +509,25 @@ void MainWindow::stopRepeating()
 
 void MainWindow::selectPrevFavKeyset()
 {
-  myPanels->selectPrevFavKeyset();
+  favoritesDialog->selectPrevFavKeyset();
 }
 
 
 void MainWindow::selectNextFavKeyset()
 {
-  myPanels->selectNextFavKeyset();
+  favoritesDialog->selectNextFavKeyset();
 }
 
 
-void MainWindow::insertCornerButton()
+void MainWindow::insertCornerButtons()
 {
-  // Set up the dialog box:
+  // Set up the dialog boxes:
   PIRTabsChoiceDialog *tcd = new PIRTabsChoiceDialog(this);
+//  favoritesDialog = new PIRFavoritesDialog(this);
 
-  // Next, set up the corner button itself:
+  // Next, set up the corner buttons:
   QPushButton *button =
-    new QPushButton(QIcon(":/icons/align_just_icon&32.png"), "");
+    new QPushButton(QIcon(":/icons/folder_plus_icon&32.png"), "");
 
   button->setFlat(true);
 
@@ -563,7 +538,21 @@ void MainWindow::insertCornerButton()
     SLOT(exec()),
     Qt::QueuedConnection);
 
-  ui->mainTabWidget->setCornerWidget(button);
+  ui->mainTabWidget->setCornerWidget(button, Qt::TopRightCorner);
+
+  button =
+    new QPushButton(QIcon(":/icons/align_just_icon&32.png"), "");
+
+  button->setFlat(true);
+
+  connect(
+    button,
+    SIGNAL(clicked()),
+    favoritesDialog,
+    SLOT(exec()),
+    Qt::QueuedConnection);
+
+  ui->mainTabWidget->setCornerWidget(button, Qt::TopLeftCorner);
 }
 
 
index 7b321ff..ef6f19a 100644 (file)
@@ -16,6 +16,8 @@ class PIRSelectDeviceForm;
 class PIRPreferencesForm;
 class PIRDocumentationForm;
 class PIRAboutForm;
+class PIRFavoritesDialog;
+class PIRKeysetWidgetItem;
 
 class PIRKeysetManager;
 class PIRPanelManager;
@@ -53,11 +55,11 @@ public:
   void stopRepeating();
 
   // Favorites panel actions:
-  void addCurrentKeyset(
-    QListWidget *qlw);
+  void addToFavorites(
+    PIRKeysetWidgetItem *kwi);
 
-  void removeFavoriteKeyset(
-    QListWidget *qlw);
+  void removeFromFavorites(
+    unsigned int keysetID);
 
   void enableButtons();
 
@@ -73,7 +75,7 @@ public:
     return currentKeyset;
   }
 
-  void insertCornerButton();
+  void insertCornerButtons();
   void disableUpdates();
   void enableUpdates();
   void clearTabs();
@@ -119,6 +121,7 @@ private:
   PIRPreferencesForm *preferencesForm;
   PIRDocumentationForm *documentationForm;
   PIRAboutForm *aboutForm;
+  PIRFavoritesDialog *favoritesDialog;
 
   PIRKeysetManager *myKeysets;
   PIRPanelManager *myPanels;
index 5f13397..0d16845 100644 (file)
@@ -145,7 +145,6 @@ SOURCES += main.cpp mainwindow.cpp \
     forms/pirkeypadform.cpp \
     forms/pirmenuform.cpp \
     forms/pirmediaform.cpp \
-    forms/pirfavoritesform.cpp \
     pirpanelmanager.cpp \
     protocols/nokia32protocol.cpp \
     protocols/kathreinprotocol.cpp \
@@ -189,7 +188,20 @@ SOURCES += main.cpp mainwindow.cpp \
     dialogs/pirtabswidgetitem.cpp \
     keysets/technisat.cpp \
     keysets/strong.cpp \
-    keysets/proview.cpp
+    keysets/proview.cpp \
+    dialogs/pireditkeysetdialog.cpp \
+    keysets/adb.cpp \
+    keysets/triax.cpp \
+    keysets/sylvania.cpp \
+    keysets/anitech.cpp \
+    keysets/viewsonic.cpp \
+    forms/pirvcrform.cpp \
+    forms/pirvideodiscform.cpp \
+    forms/piraudiodeviceform.cpp \
+    dialogs/pirfavoritesdialog.cpp \
+    keysets/medion.cpp \
+    keysets/blaupunkt.cpp \
+    keysets/lifetec.cpp
 HEADERS += mainwindow.h \
     pirkeynames.h \
     pirmakenames.h \
@@ -309,7 +321,6 @@ HEADERS += mainwindow.h \
     forms/pirkeypadform.h \
     forms/pirmenuform.h \
     forms/pirmediaform.h \
-    forms/pirfavoritesform.h \
     pirpanelnames.h \
     pirpanelmanager.h \
     protocols/nokia32protocol.h \
@@ -354,7 +365,20 @@ HEADERS += mainwindow.h \
     dialogs/pirtabswidgetitem.h \
     keysets/technisat.h \
     keysets/strong.h \
-    keysets/proview.h
+    keysets/proview.h \
+    dialogs/pireditkeysetdialog.h \
+    keysets/adb.h \
+    keysets/sylvania.h \
+    keysets/triax.h \
+    keysets/anitech.h \
+    keysets/viewsonic.h \
+    forms/pirvcrform.h \
+    forms/pirvideodiscform.h \
+    forms/piraudiodeviceform.h \
+    dialogs/pirfavoritesdialog.h \
+    keysets/medion.h \
+    keysets/blaupunkt.h \
+    keysets/lifetec.h
 FORMS += mainwindow.ui \
     pirdocumentationform.ui \
     piraboutform.ui \
@@ -371,13 +395,17 @@ FORMS += mainwindow.ui \
     forms/pirkeypadform.ui \
     forms/pirmenuform.ui \
     forms/pirmediaform.ui \
-    forms/pirfavoritesform.ui \
     forms/pirrecordform.ui \
     forms/piraltmainform.ui \
     pirpreferencesform.ui \
     forms/pirmacroform.ui \
     dialogs/pirtextentrydialog.ui \
-    dialogs/pirtabschoicedialog.ui
+    dialogs/pirtabschoicedialog.ui \
+    dialogs/pireditkeysetdialog.ui \
+    forms/pirvcrform.ui \
+    forms/pirvideodiscform.ui \
+    forms/piraudiodeviceform.ui \
+    dialogs/pirfavoritesdialog.ui
 
 # Please do not modify the following two lines. Required for deployment.
 include(deployment.pri)
@@ -446,7 +474,8 @@ OTHER_FILES += \
     qtc_packaging/debian_fremantle/postrm \
     icons/red_pause.png \
     icons/delete_icon&48.png \
-    icons/align_just_icon&32.png
+    icons/align_just_icon&32.png \
+    icons/folder_plus_icon&32.png
 
 RESOURCES += \
     PierogiResources.qrc
index 48b33d1..98159bc 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.1, 2012-08-30T16:14:55. -->
+<!-- Written by Qt Creator 2.4.1, 2012-09-02T21:07:06. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -79,7 +79,7 @@
       <value type="QString" key="ProjectExplorer.ProcessStep.Arguments">dpkg-buildpackage -sa -S -uc -us</value>
       <value type="QString" key="ProjectExplorer.ProcessStep.Command">/Users/john/QtSDK/Maemo/4.6.2/bin/mad</value>
       <value type="bool" key="ProjectExplorer.ProcessStep.Enabled">false</value>
-      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-1.1.4</value>
+      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-1.1.5</value>
       <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>
       <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
       <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.ProcessStep</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_3_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_5_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_0_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_6_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_2_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_0_1_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_4_armel.deb</value>
        <value type="QString">192.168.0.15</value>
        <value type="QString">192.168.0.15</value>
        <value type="QString">192.168.0.15</value>
+       <value type="QString">192.168.0.15</value>
        <value type="QString">localhost</value>
        <value type="QString">192.168.0.15</value>
        <value type="QString">192.168.0.15</value>
        <value type="QString"></value>
        <value type="QString"></value>
        <value type="QString"></value>
+       <value type="QString"></value>
       </valuelist>
       <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes">
        <value type="QDateTime">2012-01-19T22:18:07</value>
        <value type="QDateTime">2012-02-29T10:48:05</value>
        <value type="QDateTime">2012-02-06T17:22:16</value>
        <value type="QDateTime">2012-03-08T23:20:27</value>
-       <value type="QDateTime">2012-08-30T16:08:14</value>
+       <value type="QDateTime">2012-09-02T20:43:12</value>
        <value type="QDateTime">2012-02-12T23:10:44</value>
        <value type="QDateTime">2012-02-09T18:12:21</value>
        <value type="QDateTime">2012-02-19T10:29:22</value>
        <value type="QDateTime">2012-01-17T13:21:05</value>
        <value type="QDateTime">2012-01-23T09:47:37</value>
        <value type="QDateTime">2012-02-03T10:04:34</value>
+       <value type="QDateTime">2012-09-02T21:07:05</value>
        <value type="QDateTime">2012-03-04T19:56:48</value>
        <value type="QDateTime">2012-01-01T15:35:35</value>
        <value type="QDateTime">2012-03-12T20:02:57</value>
index 27a9222..148a334 100644 (file)
@@ -53,12 +53,9 @@ enum PIRKeyName{
   Play_Key,
   Pause_Key,
   Stop_Key,
-  Record_Key,
-  RecordPause_Key,
-  RecordStop_Key,
-  RecordMute_Key,
   FastForward_Key,
   Rewind_Key,
+  PlayX2_Key,
   Next_Key,
   Previous_Key,
   StepForward_Key,
@@ -74,8 +71,12 @@ enum PIRKeyName{
   SlowMinus_Key,
   Timer_Key,
   Clock_Key,
-  NextDisc_Key,
-  PrevDisc_Key,
+  Record_Key,
+  RecordPause_Key,
+  RecordStop_Key,
+  RecordMute_Key,
+  RecordTimed_Key,
+  RecordPDC_Key,
 
   // Menu control:
   Menu_Key,
@@ -123,8 +124,13 @@ enum PIRKeyName{
   PIPScan_Key,
 
   // DVD / Blue-ray / etc. keys:
+  NextDisc_Key,
+  PrevDisc_Key,
   DiscTitle_Key,
   DiscMenu_Key,
+  DiscOne_Key,
+  DiscTwo_Key,
+  DiscThree_Key,
   Angle_Key,
 
   // VHS / Beta / etc. keys:
@@ -132,6 +138,10 @@ enum PIRKeyName{
   TrackingPlus_Key,
   TrackingMinus_Key,
   AutoTracking_Key,
+  IndexSearch_Key, // also known as VISS
+  IndexMark_Key,
+  IndexErase_Key,
+  OneTouchPlayBack_Key,
 
   // Audio/Video Adjustment Controls:
   PictureMode_Key,
@@ -191,6 +201,13 @@ enum PIRKeyName{
   NextPreset_Key,
   PrevPreset_Key,
 
+  // Audio controls:
+//  TunerBand_Key,
+  FMMode_Key,
+  FM_Key,
+  AM_Key, // also "MW"
+  LW_Key,
+
   // Air Conditioner controls:
   TempUp_Key,
   TempDown_Key,
@@ -213,8 +230,6 @@ enum PIRKeyName{
   Scan_Key,
   Zoom_Key,
   LiveTV_Key,
-  TunerBand_Key,
-  FMMode_Key,
   Mode_Key
 };
 
index 0be5987..0141a4d 100644 (file)
@@ -1,17 +1,23 @@
 #include "pirkeysetmanager.h"
 
+#include <QSettings>
+
 #include "pirkeysetmetadata.h"
 #include "pirselectkeysetform.h"
 #include "pirkeysetwidgetitem.h"
+#include "dialogs/pirfavoritesdialog.h"
 
 #include "keysets/acer.h"
+#include "keysets/adb.h"
 #include "keysets/admiral.h"
 #include "keysets/aiwa.h"
+#include "keysets/anitech.h"
 #include "keysets/aoc.h"
 #include "keysets/apple.h"
 #include "keysets/arcam.h"
 #include "keysets/beko.h"
 #include "keysets/benq.h"
+#include "keysets/blaupunkt.h"
 #include "keysets/bose.h"
 #include "keysets/bush.h"
 #include "keysets/cambridge.h"
 #include "keysets/kenwood.h"
 #include "keysets/lexuz.h"
 #include "keysets/lg.h"
+#include "keysets/lifetec.h"
 #include "keysets/loewe.h"
 #include "keysets/logitech.h"
 #include "keysets/magnavox.h"
 #include "keysets/magnum.h"
 #include "keysets/mce.h"
+#include "keysets/medion.h"
 #include "keysets/mitsubishi.h"
 #include "keysets/motorola.h"
 #include "keysets/nad.h"
@@ -84,6 +92,7 @@
 #include "keysets/sony.h"
 #include "keysets/starsat.h"
 #include "keysets/strong.h"
+#include "keysets/sylvania.h"
 #include "keysets/technics.h"
 #include "keysets/technisat.h"
 #include "keysets/telefunken.h"
 #include "keysets/tivo.h"
 #include "keysets/topfield.h"
 #include "keysets/toshiba.h"
+#include "keysets/triax.h"
 #include "keysets/united.h"
 #include "keysets/universum.h"
 #include "keysets/vestel.h"
 #include "keysets/viewsat.h"
+#include "keysets/viewsonic.h"
 #include "keysets/virgin.h"
 #include "keysets/vizio.h"
 #include "keysets/wd.h"
 // I'll be handling the threading of the keyset commands in this object:
 #include <QMutex>
 
+// Debugging includes:
+//#include <iostream>
+
 // Global communications mechanism:
 extern bool stopRepeatingFlag;
 extern QMutex stopRepeatingMutex;
@@ -125,6 +139,11 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new AcerTV1(++counter));
   setupKeyset(new AcerPC1(++counter));
 
+  setupKeyset(new ADBSTB1(++counter));
+  setupKeyset(new ADBSTB2(++counter));
+  setupKeyset(new ADBSTB3(++counter));
+  setupKeyset(new ADBSTB4(++counter));
+
   setupKeyset(new AdmiralTV1(++counter));
   setupKeyset(new AdmiralTV2(++counter));
   setupKeyset(new AdmiralVCR1(++counter));
@@ -145,6 +164,9 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new AiwaCarStereo1(++counter));
   setupKeyset(new AiwaDVD1(++counter));
 
+  setupKeyset(new AnitechTV1(++counter));
+  setupKeyset(new AnitechVCR1(++counter));
+
   setupKeyset(new AOCTV1(++counter));
 
   setupKeyset(new AppleWhiteRemote(++counter));
@@ -155,6 +177,8 @@ PIRKeysetManager::PIRKeysetManager()
 
   setupKeyset(new BenQTV1(++counter));
 
+  setupKeyset(new BlaupunktVCR1(++counter));
+
   setupKeyset(new BoseRadio1(++counter));
   setupKeyset(new BoseRadio2(++counter));
   setupKeyset(new BoseRadio3(++counter));
@@ -388,6 +412,11 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new LGVCR1b(++counter));
   setupKeyset(new LGAC1(++counter));
 
+  setupKeyset(new LifetecTV1(++counter));
+  setupKeyset(new LifetecTV2(++counter));
+  setupKeyset(new LifetecVCR1(++counter));
+  setupKeyset(new LifetecAudio1(++counter));
+
   setupKeyset(new LoeweTV1(++counter));
   setupKeyset(new LoeweVCR1(++counter));
   setupKeyset(new LoeweDVD1(++counter));
@@ -411,6 +440,11 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new MCERemote1f(++counter));
   setupKeyset(new MCERemote1g(++counter));
 
+  setupKeyset(new MedionSTB1(++counter));
+  setupKeyset(new MedionDVD1(++counter));
+  setupKeyset(new MedionDVD2(++counter));
+  setupKeyset(new MedionVCR1(++counter));
+
   setupKeyset(new MitsubishiTV1(++counter));
   setupKeyset(new MitsubishiTV1a(++counter));
   setupKeyset(new MitsubishiVCR1(++counter));
@@ -629,6 +663,8 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new StrongSat3(++counter));
   setupKeyset(new StrongSat4(++counter));
 
+  setupKeyset(new SylvaniaTV1(++counter));
+
   setupKeyset(new TechnicsAudio1(++counter));
   setupKeyset(new TechnicsAudio1a(++counter));
   setupKeyset(new TechnicsAudio2(++counter));
@@ -683,6 +719,10 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new ToshibaDisc1c(++counter));
   setupKeyset(new ToshibaDisc1d(++counter));
 
+  setupKeyset(new TriaxSTB1(++counter));
+  setupKeyset(new TriaxSTB2(++counter));
+  setupKeyset(new TriaxSTB2a(++counter));
+
   setupKeyset(new UnitedDVD1(++counter));
   setupKeyset(new UnitedDVBT1(++counter));
 
@@ -700,6 +740,9 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new ViewsatSat1(++counter));
   setupKeyset(new ViewsatSat1a(++counter));
 
+  setupKeyset(new ViewsonicProjector1(++counter));
+  setupKeyset(new ViewsonicProjector2(++counter));
+
   setupKeyset(new VirginSTB1(++counter));
 
   setupKeyset(new VizioTV1(++counter));
@@ -808,7 +851,7 @@ PIRKeysetWidgetItem *PIRKeysetManager::makeKeysetItem(
   fullname.append(" ");
   fullname.append(name);
 
-  return new PIRKeysetWidgetItem(fullname, id, getMake(id));
+  return new PIRKeysetWidgetItem(fullname, name, id, getMake(id));
 }
 
 
@@ -878,22 +921,111 @@ void PIRKeysetManager::setupKeyset(
 }
 
 
-void PIRKeysetManager::populateSelectionWidget(
-  PIRSelectKeysetForm *skf) const
+struct PIRUserData
+{
+  bool favorite;
+  QString nickname;
+};
+typedef std::map<QString, PIRUserData> PIRUDInnerMap;
+typedef std::map<int, PIRUDInnerMap> PIRUDOuterMap;
+
+void PIRKeysetManager::populateListWidgets(
+  PIRSelectKeysetForm *skf,
+  PIRFavoritesDialog *fd) const
 {
-  PIRMakeName make;
+  // First, pull out the user's keyset metadata:
+  QSettings settings("pietrzak.org", "Pierogi");
+
+  // Part 1 - The user's keyset nicknames:
+  int size = settings.beginReadArray("userNames");
+  int index = 0;
+  QString makeStr;
+  QString name;
+  PIRMakeName makeID;
+  QString userName;
+  PIRUDOuterMap userData;
+
+  while (index < size)
+  {
+    settings.setArrayIndex(index);
+    name = settings.value("keysetName").toString();
+    makeStr = settings.value("keysetMake").toString();
+    makeID = makeManager.getMakeID(makeStr);
+    userName = settings.value("keysetNickname").toString();
+
+    // Insert an entry into the map.  We initialize the favorites bool to
+    // false here, it'll be changed to true below if needed:
+    userData[makeID][name].nickname = userName;
+    userData[makeID][name].favorite = false;
+    ++index;
+  }
+  settings.endArray();
+
+  // Part 2 - The user's favorites:
+  size = settings.beginReadArray("favorites");
+  index = 0;
+
+  while (index < size)
+  {
+    settings.setArrayIndex(index);
+    name = settings.value("keysetName").toString();
+    makeStr = settings.value("keysetMake").toString();
+    makeID = makeManager.getMakeID(makeStr);
+
+    // Insert an entry into the map:
+    userData[makeID][name].favorite = true;
+
+    ++index;
+  }
+  settings.endArray();
+
+  // Now, we load the data into their respective QLists.
   PIRKeysetWidgetItem *kwi;
+  QString displayString;
+  PIRUDOuterMap::const_iterator outerIter;
+  PIRUDInnerMap::const_iterator innerIter;
 
   PIRKeysetCollection::const_iterator i = keysetsInfo.begin();
 
   while (i != keysetsInfo.end())
   {
     // Create a widget for the keyset:
-    make = i->second->getMake();
-    QString tempString = makeManager.getMakeString(make);
-    tempString.append(" ");
-    tempString.append(i->second->getKeysetName());
-    kwi = new PIRKeysetWidgetItem(tempString, i->first, make);
+    makeID = i->second->getMake();
+    name = i->second->getKeysetName();
+    displayString = makeManager.getMakeString(makeID);
+    displayString.append(" ");
+    displayString.append(name);
+
+    kwi = new PIRKeysetWidgetItem(displayString, name, i->first, makeID);
+
+    outerIter = userData.find(makeID);
+    if (outerIter != userData.end())
+    {
+      innerIter = outerIter->second.find(name);
+      if (innerIter != outerIter->second.end())
+      {
+        // We have user data for this keyset!
+        QString nick = innerIter->second.nickname;
+        if (!nick.isEmpty())
+        {
+          kwi->setNickname(nick);
+
+          displayString = nick;
+          displayString.append(" (");
+          displayString.append(kwi->text());
+          displayString.append(")");
+          kwi->setText(displayString);
+        }
+
+        // If this is a favorite, add it to favorites list:
+        if (innerIter->second.favorite)
+        {
+          kwi->setFavorite(true);
+          fd->addItem(kwi);
+        }
+      }
+    }
+
     skf->addWidgetItem(kwi);
 
     ++i;
@@ -913,3 +1045,4 @@ void PIRKeysetManager::populateDeviceTypes(
   }
 }
 */
+
index af95199..98f5ab7 100644 (file)
@@ -10,6 +10,7 @@
 class QObject;
 class PIRSelectKeysetForm;
 class PIRSelectDeviceForm;
+class PIRFavoritesDialog;
 class PIRKeysetWidgetItem;
 
 #include <map>
@@ -28,8 +29,9 @@ public:
 
   ~PIRKeysetManager();
 
-  void populateSelectionWidget(
-    PIRSelectKeysetForm *skf) const;
+  void populateListWidgets(
+    PIRSelectKeysetForm *skf,
+    PIRFavoritesDialog *fd) const;
 
   bool keysetExists(
     unsigned int keysetID) const;
@@ -63,6 +65,10 @@ public:
     QObject *guiObject,
     unsigned int keysetID);
 
+  void populateFavorites(
+    PIRFavoritesDialog *favoritesDialog,
+    PIRSelectKeysetForm *keysetForm);
+
 private:
   void setupKeyset(
     PIRKeysetMetaData *keyset);
index 05d6011..71b2c33 100644 (file)
@@ -55,7 +55,7 @@ void PIRKeysetMetaData::populateDevices(
     tempString.append(i->first.model);
 
     kwi = new PIRKeysetWidgetItem(
-      tempString, i->second, i->first.make, i->first.type);
+      tempString, i->first.model, i->second, i->first.make, i->first.type);
 
     sdf->addWidgetItem(kwi);
 
index 1fe4ba7..f4fc546 100644 (file)
@@ -1,42 +1,58 @@
 #include "pirkeysetwidgetitem.h"
 
 PIRKeysetWidgetItem::PIRKeysetWidgetItem(
-  QString name,
+  QString displayName,
+  QString in,
   unsigned int i,
   PIRMakeName m)
-  : QListWidgetItem(name),
+  : QListWidgetItem(displayName),
     id(i),
-    make(m)
+    make(m),
+    favorite(false),
+    nicknameNotEmpty(false),
+    internalName(in)
 {
 }
 
 
 PIRKeysetWidgetItem::PIRKeysetWidgetItem(
-  QString name,
+  QString displayName,
+  QString in,
   unsigned int i,
   PIRMakeName m,
   PIRDeviceTypeName t)
-  : QListWidgetItem(name),
+  : QListWidgetItem(displayName),
     id(i),
     make(m),
-    deviceType(t)
+    deviceType(t),
+    favorite(false),
+    nicknameNotEmpty(false),
+    internalName(in)
 {
 }
 
 
-unsigned int PIRKeysetWidgetItem::getID()
+PIRKeysetWidgetItem::PIRKeysetWidgetItem(
+  PIRKeysetWidgetItem *original)
+  : QListWidgetItem(original->text()),
+    id(original->getID()),
+    make(original->getMake()),
+    deviceType(original->getDeviceType()),
+    favorite(original->isFavorite()),
+    nicknameNotEmpty(original->hasNickname()),
+    internalName(original->getInternalName())
 {
-  return id;
+  if (nicknameNotEmpty)
+  {
+    nickname = original->getNickname();
+  }
 }
 
 
-PIRMakeName PIRKeysetWidgetItem::getMake()
+void PIRKeysetWidgetItem::setNickname(
+  QString nn)
 {
-  return make;
-}
+  nickname = nn;
 
-
-PIRDeviceTypeName PIRKeysetWidgetItem::getDeviceType()
-{
-  return deviceType;
+  nicknameNotEmpty = !nn.isEmpty();
 }
index c03d173..5271ef7 100644 (file)
@@ -10,26 +10,98 @@ class PIRKeysetWidgetItem: public QListWidgetItem
 {
 public:
   PIRKeysetWidgetItem(
-    QString name,
+    QString displayName,
+    QString internalName,
     unsigned int id,
     PIRMakeName make);
 
   PIRKeysetWidgetItem(
-    QString name,
+    QString displayName,
+    QString internalName,
     unsigned int id,
     PIRMakeName make,
     PIRDeviceTypeName dt);
 
+  PIRKeysetWidgetItem(
+    PIRKeysetWidgetItem *original);
+
   unsigned int getID();
 
   PIRMakeName getMake();
 
   PIRDeviceTypeName getDeviceType();
 
+  void setFavorite(
+    bool favorite);
+
+  bool isFavorite();
+
+  bool hasNickname();
+
+  void setNickname(
+    QString nn);
+
+  QString getNickname();
+
+  QString getInternalName();
+
 private:
   unsigned int id;
   PIRMakeName make;
   PIRDeviceTypeName deviceType;
+  bool favorite;
+  bool nicknameNotEmpty;
+  QString internalName;
+  QString nickname;
 };
 
+
+inline unsigned int PIRKeysetWidgetItem::getID()
+{
+  return id;
+}
+
+
+inline PIRMakeName PIRKeysetWidgetItem::getMake()
+{
+  return make;
+}
+
+
+inline PIRDeviceTypeName PIRKeysetWidgetItem::getDeviceType()
+{
+  return deviceType;
+}
+
+
+inline void PIRKeysetWidgetItem::setFavorite(
+  bool f)
+{
+  favorite = f;
+}
+
+
+inline bool PIRKeysetWidgetItem::isFavorite()
+{
+  return favorite;
+}
+
+
+inline bool PIRKeysetWidgetItem::hasNickname()
+{
+  return nicknameNotEmpty;
+}
+
+
+inline QString PIRKeysetWidgetItem::getNickname()
+{
+  return nickname;
+}
+
+
+inline QString PIRKeysetWidgetItem::getInternalName()
+{
+  return internalName;
+}
+
 #endif // PIRKEYSETWIDGETITEM_H
index ad947de..dd8c547 100644 (file)
@@ -6,13 +6,16 @@ PIRMakeMgr::PIRMakeMgr()
 {
   makes[Any_Make] = "Any";
   makes[Acer_Make] = "Acer";
+  makes[ADB_Make] = "ADB";
   makes[Admiral_Make] = "Admiral";
   makes[Aiwa_Make] = "Aiwa";
+  makes[Anitech_Make] = "Anitech";
   makes[AOC_Make] = "AOC";
   makes[Apple_Make] = "Apple";
   makes[Arcam_Make] = "Arcam";
   makes[Beko_Make] = "Beko";
   makes[BenQ_Make] = "BenQ";
+  makes[Blaupunkt_Make] = "Blaupunkt";
   makes[Bose_Make] = "Bose";
   makes[Bush_Make] = "Bush";
   makes[Cambridge_Make] = "Cambridge Audio";
@@ -53,10 +56,12 @@ PIRMakeMgr::PIRMakeMgr()
   makes[Kenwood_Make] = "Kenwood";
   makes[Lexuz_Make] = "Lexuz";
   makes[LG_Make] = "LG";
+  makes[Lifetec_Make] = "Lifetec";
   makes[Loewe_Make] = "Loewe";
   makes[Logitech_Make] = "Logitech";
   makes[Magnavox_Make] = "Magnavox";
   makes[Magnum_Make] = "Magnum";
+  makes[Medion_Make] = "Medion";
   makes[Microsoft_Make] = "Microsoft";
   makes[Mitsubishi_Make] = "Mitsubishi";
   makes[Motorola_Make] = "Motorola";
@@ -85,6 +90,7 @@ PIRMakeMgr::PIRMakeMgr()
   makes[Sony_Make] = "Sony";
   makes[Starsat_Make] = "Starsat";
   makes[Strong_Make] = "Strong";
+  makes[Sylvania_Make] = "Sylvania";
   makes[Technics_Make] = "Technics";
   makes[Technisat_Make] = "Technisat";
   makes[Telefunken_Make] = "Telefunken";
@@ -93,10 +99,12 @@ PIRMakeMgr::PIRMakeMgr()
   makes[Tivo_Make] = "TiVo";
   makes[Topfield_Make] = "Topfield";
   makes[Toshiba_Make] = "Toshiba";
+  makes[Triax_Make] = "Triax";
   makes[United_Make] = "United";
   makes[Universum_Make] = "Universum";
   makes[Vestel_Make] = "Vestel";
   makes[Viewsat_Make] = "Viewsat";
+  makes[Viewsonic_Make] = "Viewsonic";
   makes[Virgin_Make] = "Virgin Media";
   makes[Vizio_Make] = "Vizio";
   makes[WD_Make] = "Western Digital";
@@ -104,6 +112,13 @@ PIRMakeMgr::PIRMakeMgr()
   makes[Xcruiser_Make] = "Xcruiser";
   makes[Yamaha_Make] = "Yamaha";
   makes[Zenith_Make] = "Zenith";
+
+  MakeCollection::const_iterator i = makes.begin();
+  while (i != makes.end())
+  {
+    makeIDs[i->second] = i->first;
+    ++i;
+  }
 }
 
 const char *PIRMakeMgr::getMakeString(
@@ -113,6 +128,13 @@ const char *PIRMakeMgr::getMakeString(
 }
 
 
+PIRMakeName PIRMakeMgr::getMakeID(
+  QString name)
+{
+  return makeIDs[name];
+}
+
+
 void PIRMakeMgr::populateComboBox(
   QComboBox *cb)
 {
index 25074f8..3661044 100644 (file)
@@ -7,13 +7,16 @@ class QComboBox;
 enum PIRMakeName{
   Any_Make,
   Acer_Make,
+  ADB_Make,
   Admiral_Make,
   Aiwa_Make,
+  Anitech_Make,
   AOC_Make,
   Apple_Make,
   Arcam_Make,
   Beko_Make,
   BenQ_Make,
+  Blaupunkt_Make,
   Bose_Make,
   Bush_Make,
   Cambridge_Make,
@@ -54,10 +57,12 @@ enum PIRMakeName{
   Kenwood_Make,
   Lexuz_Make,
   LG_Make,
+  Lifetec_Make,
   Loewe_Make,
   Logitech_Make,
   Magnavox_Make,
   Magnum_Make,
+  Medion_Make,
   Microsoft_Make,
   Mitsubishi_Make,
   Motorola_Make,
@@ -86,6 +91,7 @@ enum PIRMakeName{
   Sony_Make,
   Starsat_Make,
   Strong_Make,
+  Sylvania_Make,
   Technics_Make,
   Technisat_Make,
   Telefunken_Make,
@@ -94,10 +100,12 @@ enum PIRMakeName{
   Tivo_Make,
   Topfield_Make,
   Toshiba_Make,
+  Triax_Make,
   United_Make,
   Universum_Make,
   Vestel_Make,
   Viewsat_Make,
+  Viewsonic_Make,
   Virgin_Make,
   Vizio_Make,
   WD_Make,
@@ -111,7 +119,9 @@ enum PIRMakeName{
 // An object of convenience:
 
 #include <map>
+#include <QString>
 typedef std::map<PIRMakeName, const char *> MakeCollection;
+typedef std::map<QString, PIRMakeName> ReverseMakeCollection;
 
 class PIRMakeMgr
 {
@@ -121,11 +131,15 @@ public:
   const char *getMakeString(
     PIRMakeName n);
 
+  PIRMakeName getMakeID(
+    QString name);
+
   void populateComboBox(
     QComboBox *cb);
 
 private:
   MakeCollection makes;
+  ReverseMakeCollection makeIDs;
 };
 
 #endif // PIRMAKENAMES_H
index 11e6094..36e61b5 100644 (file)
@@ -12,7 +12,7 @@
 #include "forms/pirinputform.h"
 #include "forms/piradjustform.h"
 #include "forms/pirairconditionerform.h"
-#include "forms/pirfavoritesform.h"
+#include "forms/piraudiodeviceform.h"
 
 #include "mainwindow.h"
 
@@ -38,7 +38,7 @@ PIRPanelManager::PIRPanelManager(
     inputForm(0),
     adjustForm(0),
     acForm(0),
-    favoritesForm(0),
+    audioDeviceForm(0),
     altMainPanelFlag(false),
     currentTabsName(Universal_Tabs),
     mainWindow(mw)
@@ -83,9 +83,9 @@ PIRPanelManager::PIRPanelManager(
   shortPanelNames[AC_Panel] = "AC";
   longPanelNames[AC_Panel] =
     "A/C Panel - air conditioner controls";
-  shortPanelNames[Favorites_Panel] = "Favorites";
-  longPanelNames[Favorites_Panel] =
-    "Favorites Panel - memorized keysets";
+  shortPanelNames[Audio_Panel] = "Audio";
+  longPanelNames[Audio_Panel] =
+    "Audio Device Panel - various audio related buttons";
 
   mainForm = new PIRMainForm(mainWindow);
   panels[Main_Panel] = mainForm;
@@ -123,8 +123,8 @@ PIRPanelManager::PIRPanelManager(
   acForm = new PIRAirConditionerForm(mainWindow);
   panels[AC_Panel] = acForm;
 
-  favoritesForm = new PIRFavoritesForm(mainWindow);
-  panels[Favorites_Panel] = favoritesForm;
+  audioDeviceForm = new PIRAudioDeviceForm(mainWindow);
+  panels[Audio_Panel] = audioDeviceForm;
 
   // Set up the panel collections:
   PIRPanelNameList pset;
@@ -135,17 +135,17 @@ PIRPanelManager::PIRPanelManager(
   pset.push_back(Keypad_Panel);
   pset.push_back(Menu_Panel);
   pset.push_back(Media_Panel);
-  pset.push_back(Favorites_Panel);
+  pset.push_back(Input_Panel);
   tabLists[Universal_Tabs] = pset;
 
   // The TV collection:
   pset.clear();
   pset.push_back(Main_Panel);
+  pset.push_back(Utility_Panel);
   pset.push_back(Keypad_Panel);
   pset.push_back(Menu_Panel);
   pset.push_back(TV_Panel);
   pset.push_back(Adjust_Panel);
-  pset.push_back(Favorites_Panel);
   tabLists[TV_Tabs] = pset;
 
   // The video media collection:
@@ -155,20 +155,25 @@ PIRPanelManager::PIRPanelManager(
   pset.push_back(Media_Panel);
   pset.push_back(Media2_Panel);
   pset.push_back(Input_Panel);
-  pset.push_back(Favorites_Panel);
   tabLists[VideoMedia_Tabs] = pset;
 
+  // Audio panel collection:
+  pset.clear();
+  pset.push_back(Main_Panel);
+  pset.push_back(Keypad_Panel);
+  pset.push_back(Media_Panel);
+  pset.push_back(Audio_Panel);
+  tabLists[Audio_Tabs] = pset;
+
   // The air conditioner collection:
   pset.clear();
   pset.push_back(AC_Panel);
-  pset.push_back(Favorites_Panel);
   tabLists[AC_Tabs] = pset;
 
   // The recording collection:
   pset.clear();
   pset.push_back(Record_Panel);
   pset.push_back(Keypad_Panel);
-  pset.push_back(Favorites_Panel);
   tabLists[Record_Tabs] = pset;
 }
 
@@ -246,6 +251,7 @@ void PIRPanelManager::commonEnableButtons(
   inputForm->enableButtons(keyset, id);
   adjustForm->enableButtons(keyset, id);
   acForm->enableButtons(keyset, id);
+  audioDeviceForm->enableButtons(keyset, id);
 }
 
 
@@ -277,31 +283,7 @@ void PIRPanelManager::useAltMainPanel()
 }
 
 
-void PIRPanelManager::selectPrevFavKeyset()
-{
-  favoritesForm->selectPrevFavKeyset();
-}
-
-
-void PIRPanelManager::selectNextFavKeyset()
-{
-  favoritesForm->selectNextFavKeyset();
-}
-
-
-void PIRPanelManager::addFavoritesItem(
-  PIRKeysetWidgetItem *item)
-{
-  favoritesForm->addItem(item);
-}
-
-
-QListWidget *PIRPanelManager::getFavoritesListWidget()
-{
-  return favoritesForm->getFavoritesListWidget();
-}
-
-
+/*
 void PIRPanelManager::setupUniversalTabs()
 {
   if (currentTabsName == Universal_Tabs) return;
@@ -345,6 +327,7 @@ void PIRPanelManager::setupRecordTabs()
   currentTabsName = Record_Tabs;
   updateTabSet();
 }
+*/
 
 
 void PIRPanelManager::setupTabs(
index c7d842d..8c065ed 100644 (file)
@@ -15,7 +15,7 @@ class PIRTVForm;
 class PIRInputForm;
 class PIRAdjustForm;
 class PIRAirConditionerForm;
-class PIRFavoritesForm;
+class PIRAudioDeviceForm;
 
 class PIRKeysetWidgetItem;
 class PIRKeysetManager;
@@ -56,20 +56,13 @@ public:
   void useMainPanel();
   void useAltMainPanel();
 
-  void selectPrevFavKeyset();
-  void selectNextFavKeyset();
-  void addFavoritesItem(
-    PIRKeysetWidgetItem *item);
-
-  // This is a hack:
-  QListWidget *getFavoritesListWidget();
-
+/*
   void setupUniversalTabs();
   void setupTVTabs();
   void setupVideoTabs();
   void setupACTabs();
   void setupRecordTabs();
+*/
   void setupTabs(PIRTabBarName name);
 
 private:
@@ -89,7 +82,7 @@ private:
   PIRInputForm *inputForm;
   PIRAdjustForm *adjustForm;
   PIRAirConditionerForm *acForm;
-  PIRFavoritesForm *favoritesForm;
+  PIRAudioDeviceForm *audioDeviceForm;
 
   PIRPanelDisplayNameCollection shortPanelNames;
   PIRPanelDisplayNameCollection longPanelNames;
index 44d48dc..19f3eee 100644 (file)
@@ -15,7 +15,7 @@ enum PIRPanelName
   Input_Panel,
   Adjust_Panel,
   AC_Panel,
-  Favorites_Panel,
+  Audio_Panel,
   Last_Panel_Marker // Used when traversing this enumeration.
 };
 
@@ -25,6 +25,9 @@ enum PIRTabBarName
   Universal_Tabs,
   TV_Tabs,
   VideoMedia_Tabs,
+//  VideoDisc_Tabs,
+//  VideoTape_Tabs,
+  Audio_Tabs,
   AC_Tabs,
   Record_Tabs
 };
index 39ac645..f4c2cb7 100644 (file)
@@ -1,15 +1,22 @@
 #include "pirselectkeysetform.h"
 #include "ui_pirselectkeysetform.h"
-#include "pirkeysetwidgetitem.h"
+
 //#include <QListWidget>
+//#include <QListWidgetItem>
 #include <QKeyEvent>
 
+#include "mainwindow.h"
+#include "pirkeysetwidgetitem.h"
+#include "dialogs/pireditkeysetdialog.h"
+
 extern PIRMakeMgr makeManager;
 
 PIRSelectKeysetForm::PIRSelectKeysetForm(
-  QWidget *parent)
-  : QWidget(parent),
+  MainWindow *mw)
+  : QWidget(mw), // is this right?
     ui(new Ui::PIRSelectKeysetForm),
+    mainWindow(mw),
+    editDialog(0),
     currentMake(Any_Make)
 {
   ui->setupUi(this);
@@ -30,7 +37,7 @@ PIRSelectKeysetForm::PIRSelectKeysetForm(
   connect(
     ui->keysetListWidget,
     SIGNAL(itemActivated(QListWidgetItem *)),
-    parent,
+    mainWindow,
     SLOT(keysetSelectionChanged(QListWidgetItem *)),
     Qt::QueuedConnection);
 
@@ -41,6 +48,17 @@ PIRSelectKeysetForm::PIRSelectKeysetForm(
     this,
     SLOT(filterListByMake(int)),
     Qt::QueuedConnection);
+
+  // Open editor dialog for indivual keysets:
+  connect(
+    ui->keysetListWidget,
+    SIGNAL(itemClicked(QListWidgetItem *)),
+    this,
+    SLOT(openKeysetDialog(QListWidgetItem *)),
+    Qt::QueuedConnection);
+
+  // Go ahead and construct the dialog window right now:
+  editDialog = new PIREditKeysetDialog(mainWindow);
 }
 
 
@@ -151,3 +169,14 @@ void PIRSelectKeysetForm::refilterList()
     ++index;
   }
 }
+
+
+void PIRSelectKeysetForm::openKeysetDialog(
+  QListWidgetItem *item)
+{
+  PIRKeysetWidgetItem *kwi = dynamic_cast<PIRKeysetWidgetItem *>(item);
+
+  editDialog->setupDialog(kwi);
+
+  editDialog->exec();
+}
index bb0ed2b..29e5667 100644 (file)
@@ -7,9 +7,11 @@
 #include "pirmakenames.h"
 
 class QListWidget;
+class QListWidgetItem;
 class PIRKeysetWidgetItem;
 class QKeyEvent;
-//class PIRSearchStringDialog;
+class PIREditKeysetDialog;
+class MainWindow;
 
 namespace Ui {
 class PIRSelectKeysetForm;
@@ -20,7 +22,11 @@ class PIRSelectKeysetForm : public QWidget
   Q_OBJECT
   
 public:
-  explicit PIRSelectKeysetForm(QWidget *parent = 0);
+//  explicit PIRSelectKeysetForm(QWidget *parent = 0);
+
+  PIRSelectKeysetForm(
+    MainWindow *mw);
+
   ~PIRSelectKeysetForm();
 
 /*
@@ -46,6 +52,9 @@ private slots:
 
   void filterListByString(
     QString string);
+
+  void openKeysetDialog(
+    QListWidgetItem *);
   
   void on_searchStringLineEdit_textChanged(const QString &arg1);
   void on_ssClosePushButton_clicked();
@@ -55,6 +64,9 @@ private:
 
   Ui::PIRSelectKeysetForm *ui;
 
+  MainWindow *mainWindow;
+  PIREditKeysetDialog *editDialog;
+
   PIRMakeName currentMake;
   QString searchString;
 };
index f8a8656..2b948ab 100644 (file)
@@ -1,14 +1,17 @@
 pierogi (1.1.6) unstable; urgency=low
-  * Hey, I'm back!  The big change in this update is a move back to real tabbed windows.  I've finally figured out how to quickly customize the tab bar.
-  * First pass at keysets for Cisco, Loewe, Orion, Proview, Strong, Technisat, and Telefunken.
-  * New keysets added for Panasonic, Sony, Toshiba, and Zenith.
+  * A big change this time: the move to support true per-keyset editable config data.  All favorites data has been moved into the keyset configs, and nicknames have been added.  The favorites are now accessed with a pop-up menu.
+  * A new "audio" panel has been added.
+  * First pass at keysets for ADB (I-Can), Anitech, Blaupunkt, Lifetec, Medion, Sylvania, Triax, and Viewsonic.
+  * Many updates to existing keysets, too numerous to mention; mostly to support new audio panel buttons.
 
- -- John Pietrzak <jpietrzak8@gmail.com>  Thu, 30 Aug 2012 16:16:21 -0400
+ -- John Pietrzak <jpietrzak8@gmail.com>  Sun, 02 Sep 2012 20:54:03 -0400
 
 pierogi (1.1.5) unstable; urgency=low
-  * First pass at keysets for Gadmei, Onkyo.
+  * Hey, I'm back!  The big change in this update is a move back to real tabbed windows.  I've finally figured out how to quickly customize the tab bar.
+  * First pass at keysets for Cisco, Gadmei, Loewe, Onkyo, Orion, Proview, Strong, Technisat, and Telefunken.
+  * New keysets added for Panasonic, Sony, Toshiba, and Zenith.
 
- -- John Pietrzak <jpietrzak8@gmail.com>  Thu, 15 Mar 2012 15:11:11 -0400
+ -- John Pietrzak <jpietrzak8@gmail.com>  Thu, 30 Aug 2012 16:16:21 -0400
 
 pierogi (1.1.4) unstable; urgency=low
   * Finally added the ability to search the keyset and device lists using the keyboard.
index 21b3a82..01f6427 100644 (file)
@@ -11,8 +11,8 @@ Architecture: armel
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Universal Infrared (IR) Remote Control for N900
  Pierogi is a Universal Infrared Remote Control app for the Nokia N900.  It is independent from the LIRC server, and stores all configuration info internally.
-XB-Maemo-Upgrade-Description: Lists now searchable
- I've finally set up the keyset and device selection lists to be searchable using the keyboard.  Turns out that it was easier than I expected...  Also in this update, the ability to select a "default keyset", although you can't do much with it yet.  In keysets, a fix to the Digital Stream keyset was made, a new Grundig satellite receiver and Daewoo TV were added, and a new keyset created for Lexuz.
+XB-Maemo-Upgrade-Description: New Favorites, Nicknames
+ With the move to per-keyset editable data, the entire favorites system is revamped, and keyset nicknames have been added.  A new "audio" panel has also been created.  And, a first pass made at keysets for ADB (I-Can), Anitech, Blaupunkt, Lifetec, Medion, Sylvania, Triax, and Viewsonic.
 XSBC-Bugtracker: https://garage.maemo.org/tracker/?func=add&group_id=2286&atid=7641
 XB-Maemo-Display-Name: Pierogi
 XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAEChJREFUaIHtmFmsXudVhp/1TXv/+x/OOZ4TO66dZmBo0jZJoxBQW8ookAq0mIhJQhUXcAGIAhICRClDb4q4YBRDGSoBFS2ikQoUSkpNIEkbnJQ0cVL7xLUd2/GZfKZ/2MP3fYuLE6LUDQEFQi/oe7e/X7/2++71an1rvfAlfAn/vyH/2Q+Hbzp89M47rvm1aw/0XvPs5ea+M5/b+OiJB5/88FX/1Vee4kvjagEC6Dt/+ns++Ya7Xn2ndWX2zkvKLV070Xp72Vy6PG4vLa0/8pcffuytlxcvr3wxSL8Q7qpnBXjzW+64M/QC1hiTUq0xWbHWihjf3TBvwqtene46e377/Z9swztWz59/9ovA+3nYqw9uv/uWH/y27/iat3rv1AcnkARjCSHgQ2FdqNT5Hgf27bpxfsF+/yTms2vPXjkJGL4Ilvo8AXfcfes9P/kTx96/sHtEKKwYURCHMULWjsnmhMlkXSbbG5J1m317Rr073nDknutvPPy2wZ6FA9syOzFbm7X/lwI+z0Jf+dob7jlw3UGsA8ioJlJWZpMpXUzEVGPFUpYW6xSqgeQ80bu/5tpbX/u6L7/1mvvnv+nPPvu3dwFw++2eEye6V1rA8xU4esvRr7/nnm9+z959C7hgVEQEMWxvbtE0nYoYYhxL7DJZjRZlya691zCc2y0qqPcq1+6vDp1f3r7UhbnF2RNPzF5p8rDTdQTQX3rvj11609fedo31EEqPNZa6bnjm7Clyakk5UlW7mN+9gKYZw+EuCBUiUA1203Yt0+01zjz1VJptPWtX1mZ84v6zf/nYE59779LppU++UgLcfwi44caD1zinIKJGDKpIU8/omimYoM4NWdg1J8ElEuhg6MkCvhiSESRNsXkmB665zmyWXncfcLJnz/Dtd9127dtOP33hn/75gUvfe+H0hYuvhIB86NChXbv3zZFF1bsgoLRtw3h7HaMd1hZiTY33Geug7BUSvEUNYKCdXcGZlqpX4Qplbu6oNG3UohDZtXu/XH/TdW8ajj7z4MO7ez/36YdOv/9/WwA33Hr4R3zwrQveOwf1dJvJZJvpeBvjoOh59u4/SGlm9IfzlFUBBkQcMW1Sb62QUkI1I5pw0lF1M7FuSt4TNO/bLUeOvOXab/9O/nh5efNP/uLP/+ETT55a/4Wzj589/j8VYHffvHv41Xfd9jOve/31ryoLb0R2rLO5tUE9ndDrlQyGQ8oS5kYjXGERieQYqSeb1OMVJqufQ0wPX1b0ewOMQSwR5y2+LPHOibGlQVqqasjBa689evjQwg+Ywvhzi5c//hyXl3WPuD3Vnptvvvnwm6wT1dRKypGuS7TNlJynDIZHCMHiQ0CskrqWGDtCWWIlo9aRZhsYU2KrEqO1kCdIEXBZwBbSpRbvS6xLErNRDh9kMBqxf9/gZ1dXZ/c/8fBn/w7IL6cC7pZbD//UzTcfwAqSsgCe6eQyuatxRglFxdxcn6IUvDOogoSC6dYq9fYa0/E5+nuvpywDqut4rVBbEqcrpDglY7DVQeqtc7hynrIsxZrIcDhiNP8V+q6f3//Rum44e/4yT51aO3VlffyRSxfXPnFhaXr8yuLi+Cph9rkqPX/mBtXwDS4MELGoJkUzQkJzLdZYykLRXKtmjzWVqCqqSSfrl6g3zyGFR5p1Uu6Is7GYakERI9urK9pfGGFMQCRjjZHcTDWpx2AwJspoWMnmaq29ysuNN15H09qbjhw58M47bnv1Oy+cX35o5XX7F1evbN136dzGw89IscjiYvMFFej1+vPWW1QziGINYq3HSMA6C0SscWIl03Y1sa2xoS9KDd4SwgDHDIlQhHlyO8UP9mFtKSJCzlHjeF1sb4E4HZPjtthehbM9jIVerxREQLJed2iPrCxfYTxpec1rjtw1HL7+rq7b/r7HP/PYhe3NrSc3Xvfap598fO23zjx14fHnBRR9c8aJ3u6LAksGyVr1K2ZTLzk2zLYv4WW3FsVeNGdJsWO6cVrjbBOLx6Qav+dGMAO0m4iJS2SF/p79KuKxdORmXZmMpTCBLlsVrXCi0uUJvTIznWyrNZ69+4Ys7JojpqBnz5xm45mTjEa7uPPuNx/U3B0M3n+DSP1DbTtjPN7kt379Y+9wVTBzYgPOCkYsYpyEUGCNo4s1WQ1qgqAdmhWNDcaI5BQRalKbIRnEeYwvUR3iwhwxduJDD2OtUlUy21iDXGMkSyg8mUTG4L1Q9voym05w3gAWY5CFXbvwwaDJELspwQecB6FSjJc5W3LnVx/6Tbc9bpK3ZqeHu4A1QgiOohzQNTO6aMg5YyTRzTaxCElB2zXoprTJMSufxQ4ivWqOToV28zLEGSxchw/zpA4wDqHEWQdGMOLxxiBEiuBJeYgSERXEGIrSk2KflHbe712BCw6DINmharTfGxb26Jcd3n/LrUff2BsM1BrBGCPWC84HVDOby4tYEjk1BN9nvD1mtr6E1JcxKM6MKEd7MdqQuzHd+kWsNOKDIbYJX1ZkrOh0E3JL2aski0NzRlONrw6h4lGN5JQQa4mxw7o+IhawDIYVvVGF9yVYxVqDYHnwoSd/zSw9szpeX10mx05SPZXY7gyRRa+iGgwRZ6lnV2imNVkV6wqKahcqGWwPHLRtS1fPaLeexYdK0myb6doSqKXeWpVc17hqH+Vor0g5h+QMucMYg3OKDxbnS5SEdeBDADLCToWc9zjrcSFgTRBjnYjJbF0ZXzQbk+ljy0uXaJuGLjbadTW5m2KkozcYUJRzNLOOWT1jur1CTmNcYUhqURmABHKMWGswRmgmK9pNO7pasdZDzJq7Bgl9CLsVP8C5HmJLxBeIEYwkrAEQBIuIJWsGFJFE2SvxwWMthBDUWof3ha6sbF+wo33zG6Ohe8sNNxzYb51I1oQzJUY6sTbjXA/nCt3aXAXjRHNCxehg/ghuVOGKCqsN4jLV/F4xtsD6nlQLB1SowXvUF0iuxViDQVA8zjmRmOjqTdpp0q5rmEzHIhLI2et00hHbGYNRn/n5CucDxlkRUUmJTtW6D/zBR99hTp04tbqxvvUvKXU55w5rrCRtJKZE1oQNJdXcHlnYf0S2t1apmylt24rxXpwfSujNSWxbMVpKbBNhMMJXFUUlEga7xNgSLyKiCdGEihWxVrouEdOOx1VqMdZI10FKiawiOUUJwchofig2BDFGRXJGsyrglpeXWFpamjiAja3miqasMbY4Z4BAzmCzEEIgGejRZ8v3mc4mqPSYjDep+gPEBEyoEOMwrkDjBGOVLGBcH0ODsSWaZiAexJC6KV09QaQgiSfHCbNZjTEOTYY21kDHaH6eajDCmA5RSAa0U0SsLJ4+dx6eG6efODv+vdiN3103lRpj6BU7cVHKineBqtqNVgv43hz1tGZ74zJrm+tMJhP6VWS0+xCikdw1JALGeUQ8YbAfm1tSOyYTyDgMlqyO7Cu6qKytTalniRgFpGI8UzS3XH/jTRRlj5RaMI7YKQZD1pn8y/0nxn/4Ox/5OkDMsWPH7LmHT14eb20S21piF1EiaIvmDiWDZqwUWO8pqxH90QEwPeoOZo0Qm4aMBRuwxYCMIQM5NeTYktqWFBvUWHJWkvSIuU8bC6azSN3srKxtkxCNjOb7FL0SY/PO3vFcCBhTy3Ra88D9j3545cLKIqDugx/8oAJsbW3n/lxhcnSqWBFRjOyM6G23iTGWspgnm4QyYDqep5nALAqz8QahN8SYRCjm0ay0TaLIkRQzSoGthnSdElOk7oTtrRkx1nT1NooiMkAl0R9WVP0SJJLZWZLAkbWj66KefOK0njx16V1Xj6c0KRy65SsGt2O9FMEgOKwxqEQ0TcmpRUXxrqIq57GhJFQLpAybWy1tSrTdFEMQTA9CxXTa0OVO6mbMxvqEre2JbG6OWb54kenkCk3dIa6PcwN6VZ9Xf9nNzC/spax6iAiaFEGp21ZzhKZN8vM/+9v7lxYvPr9bP58LXbw0/eVTp8ffdfsde+ZSFzE0RHEY/HMBaiZ1E1ocKomi1wOjIHuZTVaZ1pHgStQ0alsnLhhy1yHWqGJlY2OJrD2NMYkaCwTEBHqDOfqDAXPzB9C8BdYi6kj1FFUlK2jOiHj5t0c/Pb46j30+F1p5dmXTD/dW17+qelNVBZw1iChIQnAY4zFkcmbngnEZZwXnHAqkriFGS91MpGkauuiom8ysjlI3ibqJxJgl54wNA4regN6wz559BxmO9hBCSco1AKqZHBNZMzGhbYecO/MM7/+je3/48jNrj75QwBfE62/42q9646/88luOi7ZalIWU5Yi2XcMYSygGGGOxxu+0RmcRIzvku5a6qZluTTV2WWI3I2eLYlXEivUB55xa72Q4t4BxnuD6WNfDWEtOLTEZUqxJqaOLSVOGpo78ye/+6cp9Hz/5dUtnlh6/mu/V6bQ8/I8P/tPSs7dx4MC8NI3T3qCUwC5SnGKtJSdDlojkFkkeVHbGAG8JxuPcPKnrSHlI17VoBmMNRTHHTthn8KFCjMX5gpRaYlRyiojvAx6hIMZNFCObVzb52PFT37jyIuQ/z0IvRBiMbr7+6O5bjAv0ilKM8ZolY10pzlkQ0a6dkVJLzh2KoAJijRzd/000aUVUohahRyhLvA8UvaEYK1ix+GIBsVaMFKgAGFUgJZWui+SkTKednD97lg/9+b1//8jxJ3/1xXi+qIVeiB/9ybf+1du/++5vF2vUGS9F6WlmY3LeIW/FIs6BxOes4Ekpqg9DAYMxjqRGxThxboQxPU2pEWsCObfkHBECTbNFTBlNfZ1NNmVrY5Vffe/v/83qOb57cXFx66U4mhc7PHbsmAX49f7r335leRmiSJdcrusxWROqDqQk5kzXNmisyTGSYmKyMaFtZ2CElDKIRwRy7ohxihWDUCL06bpE09SIVMSIrq+dlaef+hQf+fC9PHTf4rc+R/4lP/KLWujkyZMKCMePa39+7vpd8/611XAksR3Tda0iRkI5T8odOWeUnU6lCr7ogRghJ3LOkBXNUbrYkNsZsaulaxti2zKrt5hOxsxmtXaR/MB9f20+fvzEB//tVPODVy6uXngp4v+Bl1T3Qrz1HW9747FvOXB8194FjHOIZHWuJ854yGMwCRSyqFrnRcQgGBQ0pyhJDTkmUofO2khKEclRzp+7yGceu3DmqafH73vgbz/9nhfw+m+ldC9agRfDZx998hyjw2UzWbvJS+yX/VE0OYiqilgla0ZzVlDJKZNzIkUFFbG2z2R7haaZaoxTbWczGY+35MK5JT5072d/+OwzxY+d+PinPvbf5fKyBAA89ciT9w1vuPPe9eXla/b0u1uKXk8wZa7KAeLnadqZpNhqzkLbNYCVtmu0LPYy3lpCsTKrG3n0xBn+9ZGVj33ykbVffOijj7xv+fz5+uWQhy+8B/5L3HHgVU+/+91/fOx9wI+/5103tPncmwfpqd9YWKjKqizVhVIwGXJmOmlZWd5kbePBlaXN8Idd4/56S8OZBz7w95dgp1k8xKdeLvcv4Uv438C/A7Q6fneUaSRcAAAAAElFTkSuQmCC

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment