New GUI, many changes
authorJohn Pietrzak <john@pietrzak.org>
Thu, 1 Mar 2012 01:10:29 +0000 (20:10 -0500)
committerJohn Pietrzak <john@pietrzak.org>
Thu, 1 Mar 2012 01:10:29 +0000 (20:10 -0500)
This commit includes a new, more flexible GUI based around the concept of
"control panels", a new control panel for Air Conditioners, many new keysets,
and a variety of smaller bug fixes.

106 files changed:
doc/about.html
doc/documentation.html
forms/piradjustform.cpp [new file with mode: 0644]
forms/piradjustform.h [new file with mode: 0644]
forms/piradjustform.ui [new file with mode: 0644]
forms/pirairconditionerform.cpp [new file with mode: 0644]
forms/pirairconditionerform.h [new file with mode: 0644]
forms/pirairconditionerform.ui [new file with mode: 0644]
forms/pirfavoritesform.cpp [new file with mode: 0644]
forms/pirfavoritesform.h [new file with mode: 0644]
forms/pirfavoritesform.ui [new file with mode: 0644]
forms/pirinputform.cpp [new file with mode: 0644]
forms/pirinputform.h [new file with mode: 0644]
forms/pirinputform.ui [new file with mode: 0644]
forms/pirkeypadform.cpp [new file with mode: 0644]
forms/pirkeypadform.h [new file with mode: 0644]
forms/pirkeypadform.ui [new file with mode: 0644]
forms/pirmainform.cpp [new file with mode: 0644]
forms/pirmainform.h [new file with mode: 0644]
forms/pirmainform.ui [new file with mode: 0644]
forms/pirmedia2form.cpp [new file with mode: 0644]
forms/pirmedia2form.h [new file with mode: 0644]
forms/pirmedia2form.ui [new file with mode: 0644]
forms/pirmediaform.cpp [new file with mode: 0644]
forms/pirmediaform.h [new file with mode: 0644]
forms/pirmediaform.ui [new file with mode: 0644]
forms/pirmenuform.cpp [new file with mode: 0644]
forms/pirmenuform.h [new file with mode: 0644]
forms/pirmenuform.ui [new file with mode: 0644]
forms/pirtvform.cpp [new file with mode: 0644]
forms/pirtvform.h [new file with mode: 0644]
forms/pirtvform.ui [new file with mode: 0644]
forms/pirutilityform.cpp [new file with mode: 0644]
forms/pirutilityform.h [new file with mode: 0644]
forms/pirutilityform.ui [new file with mode: 0644]
keysets/aoc.cpp [new file with mode: 0644]
keysets/aoc.h [new file with mode: 0644]
keysets/arcam.cpp [new file with mode: 0644]
keysets/arcam.h [new file with mode: 0644]
keysets/dell.cpp [new file with mode: 0644]
keysets/dell.h [new file with mode: 0644]
keysets/dse.cpp [new file with mode: 0644]
keysets/dse.h [new file with mode: 0644]
keysets/dynex.cpp [new file with mode: 0644]
keysets/dynex.h [new file with mode: 0644]
keysets/foxtel.cpp
keysets/foxtel.h
keysets/harmankardon.cpp [new file with mode: 0644]
keysets/harmankardon.h [new file with mode: 0644]
keysets/kathrein.cpp [new file with mode: 0644]
keysets/kathrein.h [new file with mode: 0644]
keysets/lg.cpp
keysets/logitech.cpp
keysets/logitech.h
keysets/panasonic.cpp
keysets/samsung.cpp
keysets/sharp.cpp
keysets/sony.cpp
keysets/sony.h
keysets/starsat.cpp [new file with mode: 0644]
keysets/starsat.h [new file with mode: 0644]
keysets/viewsat.cpp [new file with mode: 0644]
keysets/viewsat.h [new file with mode: 0644]
keysets/wd.cpp
keysets/wd.h
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
pierogi.pro
pierogi.pro.user
pirkeynames.h
pirkeysetmanager.cpp
pirkeysetmanager.h
pirkeysetmetadata.cpp
pirkeysetmetadata.h
pirkeysetwidgetitem.cpp
pirkeysetwidgetitem.h
pirmakenames.cpp
pirmakenames.h
pirpanelmanager.cpp [new file with mode: 0644]
pirpanelmanager.h [new file with mode: 0644]
pirpanelnames.h [new file with mode: 0644]
pirpanelselectionform.cpp [new file with mode: 0644]
pirpanelselectionform.h [new file with mode: 0644]
pirpanelselectionform.ui [new file with mode: 0644]
pirsecondaryform.cpp [deleted file]
pirsecondaryform.h [deleted file]
pirsecondaryform.ui [deleted file]
pirselectdeviceform.cpp [new file with mode: 0644]
pirselectdeviceform.h [new file with mode: 0644]
pirselectdeviceform.ui [new file with mode: 0644]
pirselectkeysetform.cpp
pirselectkeysetform.h
pirselectkeysetform.ui
protocols/aiwaprotocol.cpp
protocols/dishprotocol.cpp
protocols/jvcprotocol.cpp
protocols/kathreinprotocol.cpp [new file with mode: 0644]
protocols/kathreinprotocol.h [new file with mode: 0644]
protocols/nokia32protocol.cpp [new file with mode: 0644]
protocols/nokia32protocol.h [new file with mode: 0644]
protocols/sharpprotocol.cpp
protocols/sircprotocol.cpp
qtc_packaging/debian_fremantle/changelog
qtc_packaging/debian_fremantle/control

index 7cfaa7f..d534987 100644 (file)
@@ -9,7 +9,7 @@ Pierogi UIRC
 <h2 align="center">A Universal Infrared Remote Control</h2>
 
 <p align="center">
-Version 1.0 - <i>A Fistful of Pierogis</i>
+Version 1.1 - <i>For a Few Pierogies More</i>
 </p>
 
 <p>
index a793cd1..29e7cf7 100644 (file)
@@ -40,39 +40,39 @@ the features of Pierogi is provided below.
 <h2>Using Pierogi</h2>
 
 <p>
-The current Pierogi design is built around a tabbed window, each tab containing
-a group of related buttons.  Depending on the keyset that has been selected,
-some of these buttons will be active, others inactive.  Active buttons are ones
-which have been associated with a command in the current keyset.  Pressing an
+The current Pierogi design is built around a series of control panels, with
+each panel containing a group of related buttons.  Depending on the keyset
+chosen, some of these buttons will be active, others inactive.  Pressing an
 active button will begin repeating the associated command; letting up on the
 button will stop the command.
 </p>
 
 <p>
-Keysets can be chosen using the "Select Keyset" option in the drop-down menu.
-If you have a particular keyset you use often, it can be stored in the
-"favorites" tab for quick access.
+Keysets can be chosen using either the "Select Keyset by Name" or "Select
+Keyset by Device" options in the drop-down menu.  If you have a particular
+keyset you use often, it can be stored in the "favorites" panel for quick
+access.
 </p>
 
 <h3>Main Window</h3>
 
-<h4>Main Tab</h4>
+<h4>Main Panel</h4>
 
-<p>The Main tab contains just the power, volume, mute, and channel buttons.
+<p>The Main panel contains just the power, volume, mute, and channel buttons.
 It is intended to be a quick way to get to the most important, commonly used
-controls.  The name of the current keyset is also provided in this tab.</p>
+controls.  The name of the current keyset is also provided in this panel.</p>
 
-<h4>Utility Tab</h4>
+<h4>Utility Panel</h4>
 
-<p>The Utility tab contains a selection of commonly useful controls, such as
+<p>The Utility panel contains a selection of commonly useful controls, such as
 "Sleep", "Input", "Closed Captions / Subtitles", and the color buttons.
-This tab is intended to be a quick way to reach the most frequently used
+This panel is intended to be a quick way to reach the most frequently used
 buttons; as such, the selection may be updated in future versions of Pierogi.
 </p>
 
-<h4>Keypad Tab</h4>
+<h4>Keypad Panel</h4>
 
-<p>This tab provides a numeric keypad and a handful of associated commands,
+<p>This panel provides a numeric keypad and a handful of associated commands,
 intended mainly for use with televisions.  The "Prev Channel" button should
 take you to the previously selected channel, if any.  The "Dash" button
 should allow you to specify a digital subchannel, as in "16-4".  The "+100"
@@ -82,82 +82,116 @@ Double Digit" button is used on very old televisions that normally expect
 channels to be represented by just a single digit; pressing this should
 allow you to enter a second digit.</p>
 
-<h4>Menu Tab</h4>
+<h4>Menu Panel</h4>
 
-<p>This tab contains buttons used to enter and exit a menu, navigate within
+<p>This panel contains buttons used to enter and exit a menu, navigate within
 a menu, and select menu entries.  The "Menu" button is meant to enter the
 main system menu of a given device; "Guide" is a content-related menu available
 on many modern devices; and "Disc Menu" is used to access the menu interface
 provided with DVD and Blu-Ray media.</p>
 
-<h4>Media Tab</h4>
+<h4>Media Panel</h4>
 
-<p>Many of the most important playback commands are represented on this tab.
+<p>Many of the most important playback commands are represented on this panel.
 "Play", "Pause", and "Stop" are the most common ones, along with "Reverse"
 (often called rewind) and "Fast Forward".  A variety of other less common
 navigation controls are included, along with the "Eject" command.</p>
 
-<h4>Favorite Tab</h4>
+<h4>Media2 Panel</h4>
 
-<p>As there are numerous keysets available in Pierogi, a "Favorite" tab has
-been implemented.  To add a favorite keyset to the tab, first select that
-keyset from the "Select Keyset" window.  Then, navigate to the Favorite tab
-and press "Add Current Keyset".</p>
+<p>This is another panel of media buttons, containing a mix of commands useful
+for DVD players, VCRs, audio devices, and possibly other devices.  The content
+of this page may change in the future.</p>
+
+<h4>TV Panel</h4>
 
-<p>Once you have added some keysets to the favorites list, you can tell
-Pierogi to use one by simply selecting that keyset from the list.</p>
+<p>This panel contains several more TV-oriented buttons, including controls for
+picture-in-picture, teletext, and some graphics and audio controls.  The
+content of this page is subject to change.</p>
 
-<p>A keyset can be removed from the list by selecting it and pressing
-"Remove Selected Keyset".</p>
+<h4>Input Panel</h4>
 
 <p>
-Also note that the volume control keys on the top left side of the N900 can
-be used to step through the list of favorite keysets, no matter what tab
-you are currently using.
+Many devices have multiple sources for their data, whether it be television
+signals piped in over the air or through a cable, or audio from a variety of
+stereo components.  It is unlikely that Pierogi will ever be able to list all
+of the various possible input buttons, but this panel contains a few of them.
 </p>
 
+<h4>Adjust Panel</h4>
+
+<p>
+A handful of the various audio and video adjustment buttons are placed in
+this panel.
+</p>
 
-<h3>Select Keyset Window</h3>
+<h4>Air Conditioner Panel</h4>
 
-<p>The Select Keyset window presents a list of all the keysets currently
-available in Pierogi.  As this list is fairly long, buttons have been added
-at the top of the window that allows you to choose the make and/or type of
-device you are trying to control; all keysets not associated with the chosen
-make or type will be hidden.  To use a keyset, simply select it from the list,
-and then close the window (by pressing the return arrow at the top right of
-the screen).</p>
+<p>
+This panel includes several controls commonly found on remotes used for
+air conditioners.
+</p>
 
-<h3>Secondary Buttons Window</h3>
+<h4>Favorites Panel</h4>
 
-<h4>TV Tab</h4>
+<p>
+As there are numerous keysets available in Pierogi, a "Favorites" panel has
+been implemented.  To add a favorite keyset to the panel, first select that
+keyset from either the "Select Keyset by Name" or "Select Keyset by Device"
+windows.  Then, navigate to the Favorites panel and press "Add Current Keyset".
+</p>
 
-<p>This page contains several more TV-oriented buttons, including controls for
-picture-in-picture, teletext, and some graphics and audio controls.  The
-content of this page is subject to change.</p>
+<p>
+Once you have added some keysets to the favorites list, you can tell
+Pierogi to use one by simply selecting that keyset from the list.  You can
+also switch between keysets on the favorites list by pressing either of the
+volume control keys on the top left side of the N900; this allows you to
+change the keyset regardless of which panel is currently visible.
+</p>
 
-<h4>Media2 Tab</h4>
+<p>
+A keyset can be removed from the list by selecting it and pressing
+"Remove Selected Keyset".
+</p>
 
-<p>This is another page of media buttons, containing a mix of commands useful
-for DVD players, VCRs, audio devices, and possibly other devices.  The content
-of this page may change in the future.</p>
 
-<h4>Input Tab</h4>
+<h3>Select Keyset by Name Window</h3>
 
 <p>
-Many devices have multiple sources for their data, whether it be television
-signals piped in over the air or through a cable, or audio from a variety of
-stereo components.  It is unlikely that Pierogi will ever be able to list all
-of the various possible input buttons, but this tab contains a few of them.
+The Select Keyset by Name window presents a list of all the keysets currently
+available in Pierogi.  As this list is fairly long, a button has been added
+at the top of the window that allows you to filter the list by the make of the
+device you are trying to control; all keysets not associated with the chosen
+make will be hidden.  To use a keyset, simply select it from the list,
+and then close the window (by pressing the return arrow at the top right of
+the screen).
 </p>
 
-<h4>Adjust Tab</h4>
+
+<h3>Select Keyset by Device Window</h3>
+
+<p>
+Similar to the Select by Name window, this window provides a list of the
+devices known to work with Pierogi.  This list can be filtered either by
+the make or the type of device.  Choosing an entry from this list will
+activate the keyset associated with the chosen device.
+</p>
+
+<p>
+Please note that this is nowhere near an exhaustive list of the devices
+Pierogi can control!
+</p>
+
+
+<h3>Manage Panels Window</h3>
 
 <p>
-A handful of the various audio and video adjustment buttons are placed on
-this tab.  Actual volume controls will likely remain on the main window,
-however.
+Each of the panels available in Pierogi can be switched on or off using this
+window.  Simply set a check in the panel's checkbox to make it available in
+the main window, and un-check it to make the panel go away.
 </p>
 
+
 <h2>Design Rationale</h2>
 
 <p>Here I collect my thoughts on the how and why of creating Pierogi.</p>
diff --git a/forms/piradjustform.cpp b/forms/piradjustform.cpp
new file mode 100644 (file)
index 0000000..6889e78
--- /dev/null
@@ -0,0 +1,202 @@
+#include "piradjustform.h"
+#include "ui_piradjustform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRAdjustForm::PIRAdjustForm(MainWindow *mw) :
+  QWidget(0),
+  ui(new Ui::PIRAdjustForm),
+  mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRAdjustForm::~PIRAdjustForm()
+{
+  delete ui;
+}
+
+
+void PIRAdjustForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
+  emit bassUpEnabled(keyset->hasKey(id, BassUp_Key));
+  emit trebleUpEnabled(keyset->hasKey(id, TrebleUp_Key));
+  emit enhancedBassEnabled(keyset->hasKey(id, EnhancedBass_Key));
+  emit noiseReductionEnabled(keyset->hasKey(id, NoiseReduction_Key));
+  emit bassDownEnabled(keyset->hasKey(id, BassDown_Key));
+  emit trebleDownEnabled(keyset->hasKey(id, TrebleDown_Key));
+  emit balanceLeftEnabled(keyset->hasKey(id, BalanceLeft_Key));
+  emit balanceRightEnabled(keyset->hasKey(id, BalanceRight_Key));
+  emit surroundEnabled(keyset->hasKey(id, Surround_Key));
+  emit colorUpEnabled(keyset->hasKey(id, ColorUp_Key));
+  emit brightnessUpEnabled(keyset->hasKey(id, BrightnessUp_Key));
+  emit contrastUpEnabled(keyset->hasKey(id, ContrastUp_Key));
+  emit zoomEnabled(keyset->hasKey(id, Zoom_Key));
+  emit colorDownEnabled(keyset->hasKey(id, ColorDown_Key));
+  emit brightnessDownEnabled(keyset->hasKey(id, BrightnessDown_Key));
+  emit contrastDownEnabled(keyset->hasKey(id, ContrastDown_Key));
+}
+
+
+void PIRAdjustForm::on_bassUpButton_pressed()
+{
+  mainWindow->startRepeating(BassUp_Key);
+}
+
+void PIRAdjustForm::on_bassUpButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_trebleUpButton_pressed()
+{
+  mainWindow->startRepeating(TrebleUp_Key);
+}
+
+void PIRAdjustForm::on_trebleUpButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_enhancedBassButton_pressed()
+{
+  mainWindow->startRepeating(EnhancedBass_Key);
+}
+
+void PIRAdjustForm::on_enhancedBassButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_noiseReductionButton_pressed()
+{
+  mainWindow->startRepeating(NoiseReduction_Key);
+}
+
+void PIRAdjustForm::on_noiseReductionButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_bassDownButton_pressed()
+{
+  mainWindow->startRepeating(BassDown_Key);
+}
+
+void PIRAdjustForm::on_bassDownButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_trebleDownButton_pressed()
+{
+  mainWindow->startRepeating(TrebleDown_Key);
+}
+
+void PIRAdjustForm::on_trebleDownButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_balanceLeftButton_pressed()
+{
+  mainWindow->startRepeating(BalanceLeft_Key);
+}
+
+void PIRAdjustForm::on_balanceLeftButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_balanceRightButton_pressed()
+{
+  mainWindow->startRepeating(BalanceRight_Key);
+}
+
+void PIRAdjustForm::on_balanceRightButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_surroundButton_pressed()
+{
+  mainWindow->startRepeating(Surround_Key);
+}
+
+void PIRAdjustForm::on_surroundButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_colorUpButton_pressed()
+{
+  mainWindow->startRepeating(ColorUp_Key);
+}
+
+void PIRAdjustForm::on_colorUpButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_brightnessUpButton_pressed()
+{
+  mainWindow->startRepeating(BrightnessUp_Key);
+}
+
+void PIRAdjustForm::on_brightnessUpButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_contrastUpButton_pressed()
+{
+  mainWindow->startRepeating(ContrastUp_Key);
+}
+
+void PIRAdjustForm::on_contrastUpButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_zoomButton_pressed()
+{
+  mainWindow->startRepeating(Zoom_Key);
+}
+
+void PIRAdjustForm::on_zoomButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_colorDownButton_pressed()
+{
+  mainWindow->startRepeating(ColorDown_Key);
+}
+
+void PIRAdjustForm::on_colorDownButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_brightnessDownButton_pressed()
+{
+  mainWindow->startRepeating(BrightnessDown_Key);
+}
+
+void PIRAdjustForm::on_brightnessDownButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAdjustForm::on_contrastDownButton_pressed()
+{
+  mainWindow->startRepeating(ContrastDown_Key);
+}
+
+void PIRAdjustForm::on_contrastDownButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/piradjustform.h b/forms/piradjustform.h
new file mode 100644 (file)
index 0000000..043825b
--- /dev/null
@@ -0,0 +1,83 @@
+#ifndef PIRADJUSTFORM_H
+#define PIRADJUSTFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRAdjustForm;
+}
+
+class PIRAdjustForm : public QWidget
+{
+  Q_OBJECT
+  
+public:
+  PIRAdjustForm(MainWindow *mw);
+  ~PIRAdjustForm();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void bassUpEnabled(bool);
+  void trebleUpEnabled(bool);
+  void enhancedBassEnabled(bool);
+  void noiseReductionEnabled(bool);
+  void bassDownEnabled(bool);
+  void trebleDownEnabled(bool);
+  void balanceLeftEnabled(bool);
+  void balanceRightEnabled(bool);
+  void surroundEnabled(bool);
+  void colorUpEnabled(bool);
+  void brightnessUpEnabled(bool);
+  void contrastUpEnabled(bool);
+  void zoomEnabled(bool);
+  void colorDownEnabled(bool);
+  void brightnessDownEnabled(bool);
+  void contrastDownEnabled(bool);
+
+private slots:
+  void on_bassUpButton_pressed();
+  void on_bassUpButton_released();
+  void on_trebleUpButton_pressed();
+  void on_trebleUpButton_released();
+  void on_enhancedBassButton_pressed();
+  void on_enhancedBassButton_released();
+  void on_noiseReductionButton_pressed();
+  void on_noiseReductionButton_released();
+  void on_bassDownButton_pressed();
+  void on_bassDownButton_released();
+  void on_trebleDownButton_pressed();
+  void on_trebleDownButton_released();
+  void on_balanceLeftButton_pressed();
+  void on_balanceLeftButton_released();
+  void on_balanceRightButton_pressed();
+  void on_balanceRightButton_released();
+  void on_colorUpButton_pressed();
+  void on_colorUpButton_released();
+  void on_brightnessUpButton_pressed();
+  void on_brightnessUpButton_released();
+  void on_contrastUpButton_pressed();
+  void on_contrastUpButton_released();
+  void on_colorDownButton_pressed();
+  void on_colorDownButton_released();
+  void on_brightnessDownButton_pressed();
+  void on_brightnessDownButton_released();
+  void on_contrastDownButton_pressed();
+  void on_contrastDownButton_released();
+  void on_surroundButton_pressed();
+  void on_surroundButton_released();
+  void on_zoomButton_pressed();
+  void on_zoomButton_released();
+
+private:
+  Ui::PIRAdjustForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRADJUSTFORM_H
diff --git a/forms/piradjustform.ui b/forms/piradjustform.ui
new file mode 100644 (file)
index 0000000..eee3fbb
--- /dev/null
@@ -0,0 +1,638 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRAdjustForm</class>
+ <widget class="QWidget" name="PIRAdjustForm">
+  <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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="bassUpButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Bass</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="trebleUpButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Treble</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="enhancedBassButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Enhanced Bass</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="3">
+    <widget class="QPushButton" name="noiseReductionButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Noise Reduction</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="bassDownButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Bass</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="trebleDownButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Treble</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="balanceLeftButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Balance</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_left_icon&amp;48.png</normaloff>:/icons/arrow_left_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <widget class="QPushButton" name="balanceRightButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Balance</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_right_icon&amp;48.png</normaloff>:/icons/arrow_right_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QPushButton" name="surroundButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Surround</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QPushButton" name="colorUpButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Color</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="2">
+    <widget class="QPushButton" name="brightnessUpButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Brightness</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="3">
+    <widget class="QPushButton" name="contrastUpButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Contrast</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QPushButton" name="zoomButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Zoom</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1">
+    <widget class="QPushButton" name="colorDownButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Color</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="2">
+    <widget class="QPushButton" name="brightnessDownButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Brightness</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="3">
+    <widget class="QPushButton" name="contrastDownButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Contrast</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../PierogiResources.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>bassUpEnabled(bool)</signal>
+   <receiver>bassUpButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>trebleUpEnabled(bool)</signal>
+   <receiver>trebleUpButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>enhancedBassEnabled(bool)</signal>
+   <receiver>enhancedBassButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>noiseReductionEnabled(bool)</signal>
+   <receiver>noiseReductionButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>bassDownEnabled(bool)</signal>
+   <receiver>bassDownButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>trebleDownEnabled(bool)</signal>
+   <receiver>trebleDownButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>balanceLeftEnabled(bool)</signal>
+   <receiver>balanceLeftButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>balanceRightEnabled(bool)</signal>
+   <receiver>balanceRightButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>surroundEnabled(bool)</signal>
+   <receiver>surroundButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>colorUpEnabled(bool)</signal>
+   <receiver>colorUpButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>brightnessUpEnabled(bool)</signal>
+   <receiver>brightnessUpButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>contrastUpEnabled(bool)</signal>
+   <receiver>contrastUpButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>zoomEnabled(bool)</signal>
+   <receiver>zoomButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>colorDownEnabled(bool)</signal>
+   <receiver>colorDownButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>brightnessDownEnabled(bool)</signal>
+   <receiver>brightnessDownButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAdjustForm</sender>
+   <signal>contrastDownEnabled(bool)</signal>
+   <receiver>contrastDownButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>bassUpEnabled(bool)</signal>
+  <signal>trebleUpEnabled(bool)</signal>
+  <signal>enhancedBassEnabled(bool)</signal>
+  <signal>noiseReductionEnabled(bool)</signal>
+  <signal>bassDownEnabled(bool)</signal>
+  <signal>trebleDownEnabled(bool)</signal>
+  <signal>balanceLeftEnabled(bool)</signal>
+  <signal>balanceRightEnabled(bool)</signal>
+  <signal>surroundEnabled(bool)</signal>
+  <signal>colorUpEnabled(bool)</signal>
+  <signal>brightnessUpEnabled(bool)</signal>
+  <signal>contrastUpEnabled(bool)</signal>
+  <signal>zoomEnabled(bool)</signal>
+  <signal>colorDownEnabled(bool)</signal>
+  <signal>brightnessDownEnabled(bool)</signal>
+  <signal>contrastDownEnabled(bool)</signal>
+ </slots>
+</ui>
diff --git a/forms/pirairconditionerform.cpp b/forms/pirairconditionerform.cpp
new file mode 100644 (file)
index 0000000..d2b0555
--- /dev/null
@@ -0,0 +1,157 @@
+#include "pirairconditionerform.h"
+#include "ui_pirairconditionerform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRAirConditionerForm::PIRAirConditionerForm(MainWindow *mw) :
+  QWidget(0),
+  ui(new Ui::PIRAirConditionerForm),
+  mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRAirConditionerForm::~PIRAirConditionerForm()
+{
+  delete ui;
+}
+
+
+void PIRAirConditionerForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
+  emit oscillateEnabled(keyset->hasKey(id, Oscillate_Key));
+  emit powerEnabled(keyset->hasKey(id, Power_Key));
+  emit timerEnabled(keyset->hasKey(id, Timer_Key));
+  emit modeEnabled(keyset->hasKey(id, Mode_Key));
+  emit fanFasterEnabled(keyset->hasKey(id, FanFaster_Key));
+  emit heatEnabled(keyset->hasKey(id, Heat_Key));
+  emit fanEnabled(keyset->hasKey(id, Fan_Key));
+  emit tempUpEnabled(keyset->hasKey(id, TempUp_Key));
+  emit fanSlowerEnabled(keyset->hasKey(id, FanSlower_Key));
+  emit energySaveEnabled(keyset->hasKey(id, EnergySave_Key));
+  emit coolEnabled(keyset->hasKey(id, Cool_Key));
+  emit tempDownEnabled(keyset->hasKey(id, TempDown_Key));
+}
+
+void PIRAirConditionerForm::on_oscillateButton_pressed()
+{
+  mainWindow->startRepeating(Oscillate_Key);
+}
+
+void PIRAirConditionerForm::on_oscillateButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_powerButton_pressed()
+{
+  mainWindow->startRepeating(Power_Key);
+}
+
+void PIRAirConditionerForm::on_powerButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_timerButton_pressed()
+{
+  mainWindow->startRepeating(Timer_Key);
+}
+
+void PIRAirConditionerForm::on_timerButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_modeButton_pressed()
+{
+  mainWindow->startRepeating(Mode_Key);
+}
+
+void PIRAirConditionerForm::on_modeButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_fanFasterButton_pressed()
+{
+  mainWindow->startRepeating(FanFaster_Key);
+}
+
+void PIRAirConditionerForm::on_fanFasterButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_heatButton_pressed()
+{
+  mainWindow->startRepeating(Heat_Key);
+}
+
+void PIRAirConditionerForm::on_heatButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_fanButton_pressed()
+{
+  mainWindow->startRepeating(Fan_Key);
+}
+
+void PIRAirConditionerForm::on_fanButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_tempUpButton_pressed()
+{
+  mainWindow->startRepeating(TempUp_Key);
+}
+
+void PIRAirConditionerForm::on_tempUpButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_fanSlowerButton_pressed()
+{
+  mainWindow->startRepeating(FanSlower_Key);
+}
+
+void PIRAirConditionerForm::on_fanSlowerButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_energySaveButton_pressed()
+{
+  mainWindow->startRepeating(EnergySave_Key);
+}
+
+void PIRAirConditionerForm::on_energySaveButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_coolButton_pressed()
+{
+  mainWindow->startRepeating(Cool_Key);
+}
+
+void PIRAirConditionerForm::on_coolButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRAirConditionerForm::on_tempDownButton_pressed()
+{
+  mainWindow->startRepeating(TempDown_Key);
+}
+
+void PIRAirConditionerForm::on_tempDownButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/pirairconditionerform.h b/forms/pirairconditionerform.h
new file mode 100644 (file)
index 0000000..698e973
--- /dev/null
@@ -0,0 +1,71 @@
+#ifndef PIRAIRCONDITIONERFORM_H
+#define PIRAIRCONDITIONERFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRAirConditionerForm;
+}
+
+class PIRAirConditionerForm : public QWidget
+{
+  Q_OBJECT
+  
+public:
+  PIRAirConditionerForm(MainWindow *mw);
+  ~PIRAirConditionerForm();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void oscillateEnabled(bool);
+  void powerEnabled(bool);
+  void timerEnabled(bool);
+  void modeEnabled(bool);
+  void fanFasterEnabled(bool);
+  void heatEnabled(bool);
+  void fanEnabled(bool);
+  void tempUpEnabled(bool);
+  void fanSlowerEnabled(bool);
+  void energySaveEnabled(bool);
+  void coolEnabled(bool);
+  void tempDownEnabled(bool);
+  
+private slots:
+  void on_oscillateButton_pressed();
+  void on_oscillateButton_released();
+  void on_powerButton_pressed();
+  void on_powerButton_released();
+  void on_timerButton_pressed();
+  void on_timerButton_released();
+  void on_modeButton_pressed();
+  void on_modeButton_released();
+  void on_fanFasterButton_pressed();
+  void on_fanFasterButton_released();
+  void on_heatButton_pressed();
+  void on_heatButton_released();
+  void on_fanButton_pressed();
+  void on_fanButton_released();
+  void on_tempUpButton_pressed();
+  void on_tempUpButton_released();
+  void on_fanSlowerButton_pressed();
+  void on_fanSlowerButton_released();
+  void on_energySaveButton_pressed();
+  void on_energySaveButton_released();
+  void on_coolButton_pressed();
+  void on_coolButton_released();
+  void on_tempDownButton_pressed();
+  void on_tempDownButton_released();
+
+private:
+  Ui::PIRAirConditionerForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRAIRCONDITIONERFORM_H
diff --git a/forms/pirairconditionerform.ui b/forms/pirairconditionerform.ui
new file mode 100644 (file)
index 0000000..2627502
--- /dev/null
@@ -0,0 +1,438 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRAirConditionerForm</class>
+ <widget class="QWidget" name="PIRAirConditionerForm">
+  <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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="oscillateButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Oscillate</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="powerButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Power</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/on-off_icon&amp;48.png</normaloff>:/icons/on-off_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="timerButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Timer</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/clock_icon&amp;48.png</normaloff>:/icons/clock_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="3">
+    <widget class="QPushButton" name="modeButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Mode</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0">
+    <widget class="QPushButton" name="fanSlowerButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Fan Slower</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="1">
+    <widget class="QPushButton" name="energySaveButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>EnergySave</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="2">
+    <widget class="QPushButton" name="coolButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Cool</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="3">
+    <widget class="QPushButton" name="tempDownButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Ignored">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Temp Down</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="2">
+    <widget class="QPushButton" name="fanButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Fan</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QPushButton" name="fanFasterButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Fan Faster</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="3">
+    <widget class="QPushButton" name="tempUpButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Temp Up</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1">
+    <widget class="QPushButton" name="heatButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Heat</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../PierogiResources.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>oscillateEnabled(bool)</signal>
+   <receiver>oscillateButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>100</x>
+     <y>79</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>powerEnabled(bool)</signal>
+   <receiver>powerButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>79</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>timerEnabled(bool)</signal>
+   <receiver>timerButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>79</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>modeEnabled(bool)</signal>
+   <receiver>modeButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>699</x>
+     <y>79</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>fanFasterEnabled(bool)</signal>
+   <receiver>fanFasterButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>100</x>
+     <y>239</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>heatEnabled(bool)</signal>
+   <receiver>heatButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>239</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>fanEnabled(bool)</signal>
+   <receiver>fanButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>239</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>tempUpEnabled(bool)</signal>
+   <receiver>tempUpButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>699</x>
+     <y>239</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>fanSlowerEnabled(bool)</signal>
+   <receiver>fanSlowerButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>100</x>
+     <y>400</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>energySaveEnabled(bool)</signal>
+   <receiver>energySaveButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>400</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>coolEnabled(bool)</signal>
+   <receiver>coolButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>400</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRAirConditionerForm</sender>
+   <signal>tempDownEnabled(bool)</signal>
+   <receiver>tempDownButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>699</x>
+     <y>400</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>oscillateEnabled(bool)</signal>
+  <signal>powerEnabled(bool)</signal>
+  <signal>timerEnabled(bool)</signal>
+  <signal>modeEnabled(bool)</signal>
+  <signal>fanFasterEnabled(bool)</signal>
+  <signal>heatEnabled(bool)</signal>
+  <signal>fanEnabled(bool)</signal>
+  <signal>tempUpEnabled(bool)</signal>
+  <signal>fanSlowerEnabled(bool)</signal>
+  <signal>energySaveEnabled(bool)</signal>
+  <signal>coolEnabled(bool)</signal>
+  <signal>tempDownEnabled(bool)</signal>
+ </slots>
+</ui>
diff --git a/forms/pirfavoritesform.cpp b/forms/pirfavoritesform.cpp
new file mode 100644 (file)
index 0000000..adaa656
--- /dev/null
@@ -0,0 +1,111 @@
+#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
new file mode 100644 (file)
index 0000000..5e86b54
--- /dev/null
@@ -0,0 +1,44 @@
+#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
new file mode 100644 (file)
index 0000000..8aaded9
--- /dev/null
@@ -0,0 +1,50 @@
+<?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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="addKeysetButton">
+     <property name="text">
+      <string>Add Current Keyset</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="removeKeysetButton">
+     <property name="text">
+      <string>Remove Selected Keyset</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="2">
+    <widget class="QListWidget" name="favoriteKeysetsWidget"/>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/forms/pirinputform.cpp b/forms/pirinputform.cpp
new file mode 100644 (file)
index 0000000..acaf555
--- /dev/null
@@ -0,0 +1,158 @@
+#include "pirinputform.h"
+#include "ui_pirinputform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRInputForm::PIRInputForm(MainWindow *mw)
+  : QWidget(0),
+    ui(new Ui::PIRInputForm),
+    mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRInputForm::~PIRInputForm()
+{
+  delete ui;
+}
+
+
+void PIRInputForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
+  emit cdInputEnabled(keyset->hasKey(id, CDInput_Key));
+  emit tapeInputEnabled(keyset->hasKey(id, TapeInput_Key));
+  emit phonoInputEnabled(keyset->hasKey(id, PhonoInput_Key));
+  emit tunerInputEnabled(keyset->hasKey(id, TunerInput_Key));
+  emit pcInputEnabled(keyset->hasKey(id, PCInput_Key));
+  emit hdmiInputEnabled(keyset->hasKey(id, HDMIInput_Key));
+  emit dvdInputEnabled(keyset->hasKey(id, DVDInput_Key));
+  emit vcrInputEnabled(keyset->hasKey(id, VCRInput_Key));
+  emit antennaInputEnabled(keyset->hasKey(id, AntennaInput_Key));
+  emit cableInputEnabled(keyset->hasKey(id, CableInput_Key));
+  emit satelliteInputEnabled(keyset->hasKey(id, SatInput_Key));
+  emit auxInputEnabled(keyset->hasKey(id, AuxInput_Key));
+}
+
+
+void PIRInputForm::on_cdInputButton_pressed()
+{
+  mainWindow->startRepeating(CDInput_Key);
+}
+
+void PIRInputForm::on_cdInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_tapeInputButton_pressed()
+{
+  mainWindow->startRepeating(TapeInput_Key);
+}
+
+void PIRInputForm::on_tapeInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_phonoInputButton_pressed()
+{
+  mainWindow->startRepeating(PhonoInput_Key);
+}
+
+void PIRInputForm::on_phonoInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_tunerInputButton_pressed()
+{
+  mainWindow->startRepeating(TunerInput_Key);
+}
+
+void PIRInputForm::on_tunerInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_pcInputButton_pressed()
+{
+  mainWindow->startRepeating(PCInput_Key);
+}
+
+void PIRInputForm::on_pcInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_hdmiInputButton_pressed()
+{
+  mainWindow->startRepeating(HDMIInput_Key);
+}
+
+void PIRInputForm::on_hdmiInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_dvdInputButton_pressed()
+{
+  mainWindow->startRepeating(DVDInput_Key);
+}
+
+void PIRInputForm::on_dvdInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_vcrInputButton_pressed()
+{
+  mainWindow->startRepeating(VCRInput_Key);
+}
+
+void PIRInputForm::on_vcrInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_antennaInputButton_pressed()
+{
+  mainWindow->startRepeating(AntennaInput_Key);
+}
+
+void PIRInputForm::on_antennaInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_cableInputButton_pressed()
+{
+  mainWindow->startRepeating(CableInput_Key);
+}
+
+void PIRInputForm::on_cableInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_satelliteInputButton_pressed()
+{
+  mainWindow->startRepeating(SatInput_Key);
+}
+
+void PIRInputForm::on_satelliteInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRInputForm::on_auxInputButton_pressed()
+{
+  mainWindow->startRepeating(AuxInput_Key);
+}
+
+void PIRInputForm::on_auxInputButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/pirinputform.h b/forms/pirinputform.h
new file mode 100644 (file)
index 0000000..e87e95d
--- /dev/null
@@ -0,0 +1,71 @@
+#ifndef PIRINPUTFORM_H
+#define PIRINPUTFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRInputForm;
+}
+
+class PIRInputForm : public QWidget
+{
+  Q_OBJECT
+  
+public:
+  PIRInputForm(MainWindow *mw);
+  ~PIRInputForm();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void cdInputEnabled(bool);
+  void tapeInputEnabled(bool);
+  void phonoInputEnabled(bool);
+  void tunerInputEnabled(bool);
+  void pcInputEnabled(bool);
+  void hdmiInputEnabled(bool);
+  void dvdInputEnabled(bool);
+  void vcrInputEnabled(bool);
+  void antennaInputEnabled(bool);
+  void cableInputEnabled(bool);
+  void satelliteInputEnabled(bool);
+  void auxInputEnabled(bool);
+
+private slots:
+  void on_cdInputButton_pressed();
+  void on_cdInputButton_released();
+  void on_tapeInputButton_pressed();
+  void on_tapeInputButton_released();
+  void on_phonoInputButton_pressed();
+  void on_phonoInputButton_released();
+  void on_tunerInputButton_pressed();
+  void on_tunerInputButton_released();
+  void on_pcInputButton_pressed();
+  void on_pcInputButton_released();
+  void on_hdmiInputButton_pressed();
+  void on_hdmiInputButton_released();
+  void on_dvdInputButton_pressed();
+  void on_dvdInputButton_released();
+  void on_vcrInputButton_pressed();
+  void on_vcrInputButton_released();
+  void on_antennaInputButton_pressed();
+  void on_antennaInputButton_released();
+  void on_cableInputButton_pressed();
+  void on_cableInputButton_released();
+  void on_satelliteInputButton_pressed();
+  void on_satelliteInputButton_released();
+  void on_auxInputButton_pressed();
+  void on_auxInputButton_released();
+
+private:
+  Ui::PIRInputForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRINPUTFORM_H
diff --git a/forms/pirinputform.ui b/forms/pirinputform.ui
new file mode 100644 (file)
index 0000000..00fac49
--- /dev/null
@@ -0,0 +1,396 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRInputForm</class>
+ <widget class="QWidget" name="PIRInputForm">
+  <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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="cdInputButton">
+     <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="tapeInputButton">
+     <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="phonoInputButton">
+     <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="tunerInputButton">
+     <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="0">
+    <widget class="QPushButton" name="pcInputButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>PC</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="hdmiInputButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>HDMI</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="dvdInputButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>DVD</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <widget class="QPushButton" name="vcrInputButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>VCR</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QPushButton" name="antennaInputButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Antenna</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QPushButton" name="cableInputButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Cable</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="2">
+    <widget class="QPushButton" name="satelliteInputButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Satellite</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="3">
+    <widget class="QPushButton" name="auxInputButton">
+     <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>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>cdInputEnabled(bool)</signal>
+   <receiver>cdInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>tapeInputEnabled(bool)</signal>
+   <receiver>tapeInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>phonoInputEnabled(bool)</signal>
+   <receiver>phonoInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>tunerInputEnabled(bool)</signal>
+   <receiver>tunerInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>pcInputEnabled(bool)</signal>
+   <receiver>pcInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>hdmiInputEnabled(bool)</signal>
+   <receiver>hdmiInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>dvdInputEnabled(bool)</signal>
+   <receiver>dvdInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>vcrInputEnabled(bool)</signal>
+   <receiver>vcrInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>antennaInputEnabled(bool)</signal>
+   <receiver>antennaInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>cableInputEnabled(bool)</signal>
+   <receiver>cableInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>satelliteInputEnabled(bool)</signal>
+   <receiver>satelliteInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRInputForm</sender>
+   <signal>auxInputEnabled(bool)</signal>
+   <receiver>auxInputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>cdInputEnabled(bool)</signal>
+  <signal>tapeInputEnabled(bool)</signal>
+  <signal>phonoInputEnabled(bool)</signal>
+  <signal>tunerInputEnabled(bool)</signal>
+  <signal>pcInputEnabled(bool)</signal>
+  <signal>hdmiInputEnabled(bool)</signal>
+  <signal>dvdInputEnabled(bool)</signal>
+  <signal>vcrInputEnabled(bool)</signal>
+  <signal>antennaInputEnabled(bool)</signal>
+  <signal>cableInputEnabled(bool)</signal>
+  <signal>satelliteInputEnabled(bool)</signal>
+  <signal>auxInputEnabled(bool)</signal>
+ </slots>
+</ui>
diff --git a/forms/pirkeypadform.cpp b/forms/pirkeypadform.cpp
new file mode 100644 (file)
index 0000000..db03cd0
--- /dev/null
@@ -0,0 +1,202 @@
+#include "pirkeypadform.h"
+#include "ui_pirkeypadform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRKeypadForm::PIRKeypadForm(MainWindow *mw) :
+  QWidget(0),
+  ui(new Ui::PIRKeypadForm),
+  mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRKeypadForm::~PIRKeypadForm()
+{
+  delete ui;
+}
+
+
+void PIRKeypadForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
+  emit zeroEnabled(keyset->hasKey(id, Zero_Key));
+  emit oneEnabled(keyset->hasKey(id, One_Key));
+  emit twoEnabled(keyset->hasKey(id, Two_Key));
+  emit threeEnabled(keyset->hasKey(id, Three_Key));
+  emit fourEnabled(keyset->hasKey(id, Four_Key));
+  emit fiveEnabled(keyset->hasKey(id, Five_Key));
+  emit sixEnabled(keyset->hasKey(id, Six_Key));
+  emit sevenEnabled(keyset->hasKey(id, Seven_Key));
+  emit eightEnabled(keyset->hasKey(id, Eight_Key));
+  emit nineEnabled(keyset->hasKey(id, Nine_Key));
+  emit enterEnabled(keyset->hasKey(id, Enter_Key));
+  emit clearEnabled(keyset->hasKey(id, Clear_Key));
+  emit dashEnabled(keyset->hasKey(id, Dash_Key));
+  emit plusOneHundredEnabled(keyset->hasKey(id, PlusOneHundred_Key));
+  emit doubleDigitEnabled(keyset->hasKey(id, DoubleDigit_Key));
+  emit prevChannelEnabled(keyset->hasKey(id, PrevChannel_Key));
+}
+
+
+void PIRKeypadForm::on_oneButton_pressed()
+{
+  mainWindow->startRepeating(One_Key);
+}
+
+void PIRKeypadForm::on_oneButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_twoButton_pressed()
+{
+  mainWindow->startRepeating(Two_Key);
+}
+
+void PIRKeypadForm::on_twoButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_threeButton_pressed()
+{
+  mainWindow->startRepeating(Three_Key);
+}
+
+void PIRKeypadForm::on_threeButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_fourButton_pressed()
+{
+  mainWindow->startRepeating(Four_Key);
+}
+
+void PIRKeypadForm::on_fourButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_fiveButton_pressed()
+{
+  mainWindow->startRepeating(Five_Key);
+}
+
+void PIRKeypadForm::on_fiveButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_sixButton_pressed()
+{
+  mainWindow->startRepeating(Six_Key);
+}
+
+void PIRKeypadForm::on_sixButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_sevenButton_pressed()
+{
+  mainWindow->startRepeating(Seven_Key);
+}
+
+void PIRKeypadForm::on_sevenButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_eightButton_pressed()
+{
+  mainWindow->startRepeating(Eight_Key);
+}
+
+void PIRKeypadForm::on_eightButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_nineButton_pressed()
+{
+  mainWindow->startRepeating(Nine_Key);
+}
+
+void PIRKeypadForm::on_nineButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_zeroButton_pressed()
+{
+  mainWindow->startRepeating(Zero_Key);
+}
+
+void PIRKeypadForm::on_zeroButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_enterButton_pressed()
+{
+  mainWindow->startRepeating(Enter_Key);
+}
+
+void PIRKeypadForm::on_enterButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_clearButton_pressed()
+{
+  mainWindow->startRepeating(Clear_Key);
+}
+
+void PIRKeypadForm::on_clearButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_prevChannelButton_pressed()
+{
+  mainWindow->startRepeating(PrevChannel_Key);
+}
+
+void PIRKeypadForm::on_prevChannelButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_plusOneHundredButton_pressed()
+{
+  mainWindow->startRepeating(PlusOneHundred_Key);
+}
+
+void PIRKeypadForm::on_plusOneHundredButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_dashButton_pressed()
+{
+  mainWindow->startRepeating(Dash_Key);
+}
+
+void PIRKeypadForm::on_dashButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRKeypadForm::on_doubleDigitButton_pressed()
+{
+  mainWindow->startRepeating(DoubleDigit_Key);
+}
+
+void PIRKeypadForm::on_doubleDigitButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/pirkeypadform.h b/forms/pirkeypadform.h
new file mode 100644 (file)
index 0000000..7fec8b2
--- /dev/null
@@ -0,0 +1,84 @@
+#ifndef PIRKEYPADFORM_H
+#define PIRKEYPADFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRKeypadForm;
+}
+
+class PIRKeypadForm : public QWidget
+{
+  Q_OBJECT
+
+public:
+//  explicit PIRKeypadForm(QWidget *parent = 0);
+  PIRKeypadForm(MainWindow *mw);
+  ~PIRKeypadForm();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void zeroEnabled(bool);
+  void oneEnabled(bool);
+  void twoEnabled(bool);
+  void threeEnabled(bool);
+  void fourEnabled(bool);
+  void fiveEnabled(bool);
+  void sixEnabled(bool);
+  void sevenEnabled(bool);
+  void eightEnabled(bool);
+  void nineEnabled(bool);
+  void enterEnabled(bool);
+  void clearEnabled(bool);
+  void dashEnabled(bool);
+  void plusOneHundredEnabled(bool);
+  void doubleDigitEnabled(bool);
+  void prevChannelEnabled(bool);
+
+private slots:
+  void on_oneButton_pressed();
+  void on_oneButton_released();
+  void on_twoButton_pressed();
+  void on_twoButton_released();
+  void on_threeButton_pressed();
+  void on_threeButton_released();
+  void on_fourButton_pressed();
+  void on_fourButton_released();
+  void on_fiveButton_pressed();
+  void on_fiveButton_released();
+  void on_sixButton_pressed();
+  void on_sixButton_released();
+  void on_sevenButton_pressed();
+  void on_sevenButton_released();
+  void on_eightButton_pressed();
+  void on_eightButton_released();
+  void on_nineButton_pressed();
+  void on_nineButton_released();
+  void on_zeroButton_pressed();
+  void on_zeroButton_released();
+  void on_enterButton_pressed();
+  void on_enterButton_released();
+  void on_clearButton_pressed();
+  void on_clearButton_released();
+  void on_prevChannelButton_pressed();
+  void on_prevChannelButton_released();
+  void on_plusOneHundredButton_pressed();
+  void on_plusOneHundredButton_released();
+  void on_dashButton_pressed();
+  void on_dashButton_released();
+  void on_doubleDigitButton_pressed();
+  void on_doubleDigitButton_released();
+
+private:
+  Ui::PIRKeypadForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRKEYPADFORM_H
diff --git a/forms/pirkeypadform.ui b/forms/pirkeypadform.ui
new file mode 100644 (file)
index 0000000..825519a
--- /dev/null
@@ -0,0 +1,534 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRKeypadForm</class>
+ <widget class="QWidget" name="PIRKeypadForm">
+  <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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="oneButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>1</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="twoButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>2</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="threeButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>3</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="3">
+    <widget class="QPushButton" name="dashButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Dash</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/dash.png</normaloff>:/icons/dash.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="fourButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>4</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="fiveButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>5</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="sixButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>6</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <widget class="QPushButton" name="plusOneHundredButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>+100</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QPushButton" name="sevenButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>7</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QPushButton" name="eightButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>8</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="2">
+    <widget class="QPushButton" name="nineButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>9</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="3">
+    <widget class="QPushButton" name="doubleDigitButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>-/-- Double Digit</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QPushButton" name="clearButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Clear</string>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1">
+    <widget class="QPushButton" name="zeroButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>0</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="2">
+    <widget class="QPushButton" name="enterButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Enter</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="3">
+    <widget class="QPushButton" name="prevChannelButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Prev Channel</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../PierogiResources.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>oneEnabled(bool)</signal>
+   <receiver>oneButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>twoEnabled(bool)</signal>
+   <receiver>twoButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>threeEnabled(bool)</signal>
+   <receiver>threeButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>fourEnabled(bool)</signal>
+   <receiver>fourButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>fiveEnabled(bool)</signal>
+   <receiver>fiveButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>sixEnabled(bool)</signal>
+   <receiver>sixButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>sevenEnabled(bool)</signal>
+   <receiver>sevenButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>eightEnabled(bool)</signal>
+   <receiver>eightButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>nineEnabled(bool)</signal>
+   <receiver>nineButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>zeroEnabled(bool)</signal>
+   <receiver>zeroButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>clearEnabled(bool)</signal>
+   <receiver>clearButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>enterEnabled(bool)</signal>
+   <receiver>enterButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>dashEnabled(bool)</signal>
+   <receiver>dashButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>plusOneHundredEnabled(bool)</signal>
+   <receiver>plusOneHundredButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>doubleDigitEnabled(bool)</signal>
+   <receiver>doubleDigitButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRKeypadForm</sender>
+   <signal>prevChannelEnabled(bool)</signal>
+   <receiver>prevChannelButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>oneEnabled(bool)</signal>
+  <signal>twoEnabled(bool)</signal>
+  <signal>threeEnabled(bool)</signal>
+  <signal>fourEnabled(bool)</signal>
+  <signal>fiveEnabled(bool)</signal>
+  <signal>sixEnabled(bool)</signal>
+  <signal>sevenEnabled(bool)</signal>
+  <signal>eightEnabled(bool)</signal>
+  <signal>nineEnabled(bool)</signal>
+  <signal>zeroEnabled(bool)</signal>
+  <signal>clearEnabled(bool)</signal>
+  <signal>enterEnabled(bool)</signal>
+  <signal>dashEnabled(bool)</signal>
+  <signal>plusOneHundredEnabled(bool)</signal>
+  <signal>doubleDigitEnabled(bool)</signal>
+  <signal>prevChannelEnabled(bool)</signal>
+ </slots>
+</ui>
diff --git a/forms/pirmainform.cpp b/forms/pirmainform.cpp
new file mode 100644 (file)
index 0000000..6fcc2ea
--- /dev/null
@@ -0,0 +1,100 @@
+#include "pirmainform.h"
+#include "ui_pirmainform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+// Ugly global:
+extern PIRMakeMgr makeManager;
+
+
+PIRMainForm::PIRMainForm(
+  MainWindow *mw)
+  : QWidget(0),
+    ui(new Ui::PIRMainForm),
+    mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRMainForm::~PIRMainForm()
+{
+  delete ui;
+}
+
+
+void PIRMainForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
+  emit powerEnabled(keyset->hasKey(id, Power_Key));
+  emit volumeUpEnabled(keyset->hasKey(id, VolumeUp_Key));
+  emit volumeDownEnabled(keyset->hasKey(id, VolumeDown_Key));
+  emit channelUpEnabled(keyset->hasKey(id, ChannelUp_Key));
+  emit channelDownEnabled(keyset->hasKey(id, ChannelDown_Key));
+  emit muteEnabled(keyset->hasKey(id, Mute_Key));
+
+  emit keysetMakeChanged(makeManager.getMakeString(keyset->getMake(id)));
+  emit keysetNameChanged(keyset->getDisplayName(id));
+}
+
+
+void PIRMainForm::on_powerButton_pressed()
+{
+  mainWindow->startRepeating(Power_Key);
+}
+
+void PIRMainForm::on_powerButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMainForm::on_mainChannelUpButton_pressed()
+{
+  mainWindow->startRepeating(ChannelUp_Key);
+}
+
+void PIRMainForm::on_mainChannelUpButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMainForm::on_mainChannelDownButton_pressed()
+{
+  mainWindow->startRepeating(ChannelDown_Key);
+}
+
+void PIRMainForm::on_mainChannelDownButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMainForm::on_mainVolumeUp_pressed()
+{
+  mainWindow->startRepeating(VolumeUp_Key);
+}
+
+void PIRMainForm::on_mainVolumeUp_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMainForm::on_mainVolumeDownButton_pressed()
+{
+  mainWindow->startRepeating(VolumeDown_Key);
+}
+
+void PIRMainForm::on_mainVolumeDownButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMainForm::on_muteButton_pressed()
+{
+  mainWindow->startRepeating(Mute_Key);
+}
+
+void PIRMainForm::on_muteButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/pirmainform.h b/forms/pirmainform.h
new file mode 100644 (file)
index 0000000..125ed17
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef PIRMAINFORM_H
+#define PIRMAINFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRMainForm;
+}
+
+class PIRMainForm : public QWidget
+{
+  Q_OBJECT
+
+public:
+//  explicit PIRMainForm(QWidget *parent = 0);
+  PIRMainForm(MainWindow *mw);
+  ~PIRMainForm();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void powerEnabled(bool);
+  void volumeUpEnabled(bool);
+  void volumeDownEnabled(bool);
+  void channelUpEnabled(bool);
+  void channelDownEnabled(bool);
+  void muteEnabled(bool);
+
+  void keysetMakeChanged(QString);
+  void keysetNameChanged(QString);
+
+private slots:
+  void on_powerButton_pressed();
+  void on_powerButton_released();
+  void on_mainChannelUpButton_pressed();
+  void on_mainChannelUpButton_released();
+  void on_mainChannelDownButton_pressed();
+  void on_mainChannelDownButton_released();
+  void on_mainVolumeUp_pressed();
+  void on_mainVolumeUp_released();
+  void on_mainVolumeDownButton_pressed();
+  void on_mainVolumeDownButton_released();
+  void on_muteButton_pressed();
+  void on_muteButton_released();
+
+private:
+  Ui::PIRMainForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRMAINFORM_H
diff --git a/forms/pirmainform.ui b/forms/pirmainform.ui
new file mode 100644 (file)
index 0000000..d27c99b
--- /dev/null
@@ -0,0 +1,392 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRMainForm</class>
+ <widget class="QWidget" name="PIRMainForm">
+  <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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="mainChannelUpButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Channel Up</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/br_up_icon&amp;48.png</normaloff>:/icons/br_up_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" rowspan="2">
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <property name="spacing">
+      <number>-1</number>
+     </property>
+     <property name="leftMargin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QPushButton" name="powerButton">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="layoutDirection">
+        <enum>Qt::LeftToRight</enum>
+       </property>
+       <property name="text">
+        <string>Power</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../PierogiResources.qrc">
+         <normaloff>:/icons/on-off_icon&amp;48.png</normaloff>:/icons/on-off_icon&amp;48.png</iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>48</width>
+         <height>48</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="verticalSpacer">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeType">
+        <enum>QSizePolicy::Minimum</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="makeLabel">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Keyset Make</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="nameLabel">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Keyset Name</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="verticalSpacer_2">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeType">
+        <enum>QSizePolicy::Minimum</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="muteButton">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Mute</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../PierogiResources.qrc">
+         <normaloff>:/icons/sound_mute_icon&amp;48.png</normaloff>:/icons/sound_mute_icon&amp;48.png</iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>48</width>
+         <height>48</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="mainVolumeUp">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="layoutDirection">
+      <enum>Qt::LeftToRight</enum>
+     </property>
+     <property name="text">
+      <string>Volume Up</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/sound_high_icon&amp;48.png</normaloff>:/icons/sound_high_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="mainChannelDownButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Channel Down</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/br_down_icon&amp;48.png</normaloff>:/icons/br_down_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="mainVolumeDownButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Volume Down</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/sound_low_icon&amp;48.png</normaloff>:/icons/sound_low_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../PierogiResources.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>PIRMainForm</sender>
+   <signal>channelUpEnabled(bool)</signal>
+   <receiver>mainChannelUpButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>135</x>
+     <y>123</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMainForm</sender>
+   <signal>channelDownEnabled(bool)</signal>
+   <receiver>mainChannelDownButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>135</x>
+     <y>360</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMainForm</sender>
+   <signal>muteEnabled(bool)</signal>
+   <receiver>muteButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>383</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMainForm</sender>
+   <signal>powerEnabled(bool)</signal>
+   <receiver>powerButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>96</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMainForm</sender>
+   <signal>volumeUpEnabled(bool)</signal>
+   <receiver>mainVolumeUp</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>664</x>
+     <y>123</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMainForm</sender>
+   <signal>volumeDownEnabled(bool)</signal>
+   <receiver>mainVolumeDownButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>664</x>
+     <y>360</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMainForm</sender>
+   <signal>keysetMakeChanged(QString)</signal>
+   <receiver>makeLabel</receiver>
+   <slot>setText(QString)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>224</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMainForm</sender>
+   <signal>keysetNameChanged(QString)</signal>
+   <receiver>nameLabel</receiver>
+   <slot>setText(QString)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>250</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>channelUpEnabled(bool)</signal>
+  <signal>channelDownEnabled(bool)</signal>
+  <signal>powerEnabled(bool)</signal>
+  <signal>muteEnabled(bool)</signal>
+  <signal>volumeUpEnabled(bool)</signal>
+  <signal>volumeDownEnabled(bool)</signal>
+  <signal>keysetMakeChanged(QString)</signal>
+  <signal>keysetNameChanged(QString)</signal>
+ </slots>
+</ui>
diff --git a/forms/pirmedia2form.cpp b/forms/pirmedia2form.cpp
new file mode 100644 (file)
index 0000000..0020cd5
--- /dev/null
@@ -0,0 +1,202 @@
+#include "pirmedia2form.h"
+#include "ui_pirmedia2form.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRMedia2Form::PIRMedia2Form(MainWindow *mw)
+  : QWidget(0),
+    ui(new Ui::PIRMedia2Form),
+    mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRMedia2Form::~PIRMedia2Form()
+{
+  delete ui;
+}
+
+
+void PIRMedia2Form::enableButtons(
+  const PIRKeysetManager *km,
+  unsigned int id)
+{
+  emit tunerBandEnabled(km->hasKey(id, TunerBand_Key));
+  emit programEnabled(km->hasKey(id, Program_Key));
+  emit memoryEnabled(km->hasKey(id, Memory_Key));
+  emit callEnabled(km->hasKey(id, Call_Key));
+  emit autoTrackingEnabled(km->hasKey(id, AutoTracking_Key));
+  emit trackingMinusEnabled(km->hasKey(id, TrackingMinus_Key));
+  emit trackingPlusEnabled(km->hasKey(id, TrackingPlus_Key));
+  emit vhsSpeedEnabled(km->hasKey(id, VHSSpeed_Key));
+  emit slowEnabled(km->hasKey(id, Slow_Key));
+  emit slowMinusEnabled(km->hasKey(id, SlowMinus_Key));
+  emit slowPlusEnabled(km->hasKey(id, SlowPlus_Key));
+  emit nextDiscEnabled(km->hasKey(id, NextDisc_Key));
+  emit repeatEnabled(km->hasKey(id, Repeat_Key));
+  emit repeatABEnabled(km->hasKey(id, RepeatAB_Key));
+  emit randomEnabled(km->hasKey(id, Random_Key));
+  emit discTitleEnabled(km->hasKey(id, DiscTitle_Key));
+}
+
+
+void PIRMedia2Form::on_tunerBandButton_pressed()
+{
+  mainWindow->startRepeating(TunerBand_Key);
+}
+
+void PIRMedia2Form::on_tunerBandButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_programButton_pressed()
+{
+  mainWindow->startRepeating(Program_Key);
+}
+
+void PIRMedia2Form::on_programButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_memoryButton_pressed()
+{
+  mainWindow->startRepeating(Memory_Key);
+}
+
+void PIRMedia2Form::on_memoryButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_callButton_pressed()
+{
+  mainWindow->startRepeating(Call_Key);
+}
+
+void PIRMedia2Form::on_callButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_autoTrackingButton_pressed()
+{
+  mainWindow->startRepeating(AutoTracking_Key);
+}
+
+void PIRMedia2Form::on_autoTrackingButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_trackingMinusButton_pressed()
+{
+  mainWindow->startRepeating(TrackingMinus_Key);
+}
+
+void PIRMedia2Form::on_trackingMinusButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_trackingPlusButton_pressed()
+{
+  mainWindow->startRepeating(TrackingPlus_Key);
+}
+
+void PIRMedia2Form::on_trackingPlusButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_vhsSpeedButton_pressed()
+{
+  mainWindow->startRepeating(VHSSpeed_Key);
+}
+
+void PIRMedia2Form::on_vhsSpeedButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_slowButton_pressed()
+{
+  mainWindow->startRepeating(Slow_Key);
+}
+
+void PIRMedia2Form::on_slowButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_slowMinusButton_pressed()
+{
+  mainWindow->startRepeating(SlowMinus_Key);
+}
+
+void PIRMedia2Form::on_slowMinusButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_slowPlusButton_pressed()
+{
+  mainWindow->startRepeating(SlowPlus_Key);
+}
+
+void PIRMedia2Form::on_slowPlusButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_discSelectButton_pressed()
+{
+  mainWindow->startRepeating(NextDisc_Key);
+}
+
+void PIRMedia2Form::on_discSelectButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_repeatButton_pressed()
+{
+  mainWindow->startRepeating(Repeat_Key);
+}
+
+void PIRMedia2Form::on_repeatButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_repeatABButton_pressed()
+{
+  mainWindow->startRepeating(RepeatAB_Key);
+}
+
+void PIRMedia2Form::on_repeatABButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_randomButton_pressed()
+{
+  mainWindow->startRepeating(Random_Key);
+}
+
+void PIRMedia2Form::on_randomButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMedia2Form::on_discTitleButton_pressed()
+{
+  mainWindow->startRepeating(DiscTitle_Key);
+}
+
+void PIRMedia2Form::on_discTitleButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/pirmedia2form.h b/forms/pirmedia2form.h
new file mode 100644 (file)
index 0000000..f233b5e
--- /dev/null
@@ -0,0 +1,83 @@
+#ifndef PIRMEDIA2FORM_H
+#define PIRMEDIA2FORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRMedia2Form;
+}
+
+class PIRMedia2Form : public QWidget
+{
+  Q_OBJECT
+  
+public:
+  PIRMedia2Form(MainWindow *mw);
+  ~PIRMedia2Form();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void tunerBandEnabled(bool);
+  void programEnabled(bool);
+  void memoryEnabled(bool);
+  void callEnabled(bool);
+  void autoTrackingEnabled(bool);
+  void trackingMinusEnabled(bool);
+  void trackingPlusEnabled(bool);
+  void vhsSpeedEnabled(bool);
+  void slowEnabled(bool);
+  void slowMinusEnabled(bool);
+  void slowPlusEnabled(bool);
+  void nextDiscEnabled(bool);
+  void repeatEnabled(bool);
+  void repeatABEnabled(bool);
+  void randomEnabled(bool);
+  void discTitleEnabled(bool);
+
+private slots:
+  void on_tunerBandButton_pressed();
+  void on_tunerBandButton_released();
+  void on_programButton_pressed();
+  void on_programButton_released();
+  void on_memoryButton_pressed();
+  void on_memoryButton_released();
+  void on_callButton_pressed();
+  void on_callButton_released();
+  void on_autoTrackingButton_pressed();
+  void on_autoTrackingButton_released();
+  void on_trackingMinusButton_pressed();
+  void on_trackingMinusButton_released();
+  void on_trackingPlusButton_pressed();
+  void on_trackingPlusButton_released();
+  void on_vhsSpeedButton_pressed();
+  void on_vhsSpeedButton_released();
+  void on_slowButton_pressed();
+  void on_slowButton_released();
+  void on_slowMinusButton_pressed();
+  void on_slowMinusButton_released();
+  void on_slowPlusButton_pressed();
+  void on_slowPlusButton_released();
+  void on_discSelectButton_pressed();
+  void on_discSelectButton_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_discTitleButton_pressed();
+  void on_discTitleButton_released();
+  
+private:
+  Ui::PIRMedia2Form *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRMEDIA2FORM_H
diff --git a/forms/pirmedia2form.ui b/forms/pirmedia2form.ui
new file mode 100644 (file)
index 0000000..f4a43ef
--- /dev/null
@@ -0,0 +1,516 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRMedia2Form</class>
+ <widget class="QWidget" name="PIRMedia2Form">
+  <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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="tunerBandButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Tuner Band</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="autoTrackingButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Auto Tracking</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="programButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Program</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="trackingMinusButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Tracking -</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="memoryButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Memory</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="trackingPlusButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Tracking +</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="3">
+    <widget class="QPushButton" name="callButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Call</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <widget class="QPushButton" name="vhsSpeedButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>SP/LP/EP</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="3">
+    <widget class="QPushButton" name="discSelectButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Disc Select</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QPushButton" name="slowButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Slow</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <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="1">
+    <widget class="QPushButton" name="slowMinusButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Slow -</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1">
+    <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 AB</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="2">
+    <widget class="QPushButton" name="slowPlusButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Slow +</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="2">
+    <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="3">
+    <widget class="QPushButton" name="discTitleButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Disc Title</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>tunerBandEnabled(bool)</signal>
+   <receiver>tunerBandButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>programEnabled(bool)</signal>
+   <receiver>programButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>memoryEnabled(bool)</signal>
+   <receiver>memoryButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>callEnabled(bool)</signal>
+   <receiver>callButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>autoTrackingEnabled(bool)</signal>
+   <receiver>autoTrackingButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>trackingMinusEnabled(bool)</signal>
+   <receiver>trackingMinusButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>trackingPlusEnabled(bool)</signal>
+   <receiver>trackingPlusButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>vhsSpeedEnabled(bool)</signal>
+   <receiver>vhsSpeedButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>slowEnabled(bool)</signal>
+   <receiver>slowButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>slowMinusEnabled(bool)</signal>
+   <receiver>slowMinusButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>slowPlusEnabled(bool)</signal>
+   <receiver>slowPlusButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>nextDiscEnabled(bool)</signal>
+   <receiver>discSelectButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</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>102</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</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>300</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</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>499</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMedia2Form</sender>
+   <signal>discTitleEnabled(bool)</signal>
+   <receiver>discTitleButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>tunerBandEnabled(bool)</signal>
+  <signal>programEnabled(bool)</signal>
+  <signal>memoryEnabled(bool)</signal>
+  <signal>callEnabled(bool)</signal>
+  <signal>autoTrackingEnabled(bool)</signal>
+  <signal>trackingMinusEnabled(bool)</signal>
+  <signal>trackingPlusEnabled(bool)</signal>
+  <signal>vhsSpeedEnabled(bool)</signal>
+  <signal>slowEnabled(bool)</signal>
+  <signal>slowMinusEnabled(bool)</signal>
+  <signal>slowPlusEnabled(bool)</signal>
+  <signal>nextDiscEnabled(bool)</signal>
+  <signal>repeatEnabled(bool)</signal>
+  <signal>repeatABEnabled(bool)</signal>
+  <signal>randomEnabled(bool)</signal>
+  <signal>discTitleEnabled(bool)</signal>
+ </slots>
+</ui>
diff --git a/forms/pirmediaform.cpp b/forms/pirmediaform.cpp
new file mode 100644 (file)
index 0000000..cd490e7
--- /dev/null
@@ -0,0 +1,159 @@
+#include "pirmediaform.h"
+#include "ui_pirmediaform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRMediaForm::PIRMediaForm(
+  MainWindow *mw)
+  : QWidget(0),
+    ui(new Ui::PIRMediaForm),
+    mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRMediaForm::~PIRMediaForm()
+{
+  delete ui;
+}
+
+
+void PIRMediaForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
+  emit nextEnabled(keyset->hasKey(id, Next_Key));
+  emit previousEnabled(keyset->hasKey(id, Previous_Key));
+  emit advanceEnabled(keyset->hasKey(id, Advance_Key));
+  emit replayEnabled(keyset->hasKey(id, Replay_Key));
+  emit stepForwardEnabled(keyset->hasKey(id, StepForward_Key));
+  emit stepBackEnabled(keyset->hasKey(id, StepBack_Key));
+  emit fastForwardEnabled(keyset->hasKey(id, FastForward_Key));
+  emit reverseEnabled(keyset->hasKey(id, Rewind_Key));
+  emit playEnabled(keyset->hasKey(id, Play_Key));
+  emit pauseEnabled(keyset->hasKey(id, Pause_Key));
+  emit stopEnabled(keyset->hasKey(id, Stop_Key));
+  emit ejectEnabled(keyset->hasKey(id, Eject_Key));
+}
+
+
+void PIRMediaForm::on_mediaPreviousButton_pressed()
+{
+  mainWindow->startRepeating(Previous_Key);
+}
+
+void PIRMediaForm::on_mediaPreviousButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_mediaNextButton_pressed()
+{
+  mainWindow->startRepeating(Next_Key);
+}
+
+void PIRMediaForm::on_mediaNextButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_replayButton_pressed()
+{
+  mainWindow->startRepeating(Replay_Key);
+}
+
+void PIRMediaForm::on_replayButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_advanceButton_pressed()
+{
+  mainWindow->startRepeating(Advance_Key);
+}
+
+void PIRMediaForm::on_advanceButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_stepBackButton_pressed()
+{
+  mainWindow->startRepeating(StepBack_Key);
+}
+
+void PIRMediaForm::on_stepBackButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_stepForwardButton_pressed()
+{
+  mainWindow->startRepeating(StepForward_Key);
+}
+
+void PIRMediaForm::on_stepForwardButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_reverseButton_pressed()
+{
+  mainWindow->startRepeating(Rewind_Key);
+}
+
+void PIRMediaForm::on_reverseButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_fastForwardButton_pressed()
+{
+  mainWindow->startRepeating(FastForward_Key);
+}
+
+void PIRMediaForm::on_fastForwardButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_playButton_pressed()
+{
+  mainWindow->startRepeating(Play_Key);
+}
+
+void PIRMediaForm::on_playButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_pauseButton_pressed()
+{
+  mainWindow->startRepeating(Pause_Key);
+}
+
+void PIRMediaForm::on_pauseButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_stopButton_pressed()
+{
+  mainWindow->startRepeating(Stop_Key);
+}
+
+void PIRMediaForm::on_stopButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMediaForm::on_ejectButton_pressed()
+{
+  mainWindow->startRepeating(Eject_Key);
+}
+
+void PIRMediaForm::on_ejectButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/pirmediaform.h b/forms/pirmediaform.h
new file mode 100644 (file)
index 0000000..586e8fb
--- /dev/null
@@ -0,0 +1,72 @@
+#ifndef PIRMEDIAFORM_H
+#define PIRMEDIAFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRMediaForm;
+}
+
+class PIRMediaForm : public QWidget
+{
+  Q_OBJECT
+
+public:
+//  explicit PIRMediaForm(QWidget *parent = 0);
+  PIRMediaForm(MainWindow *mw);
+  ~PIRMediaForm();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void playEnabled(bool);
+  void pauseEnabled(bool);
+  void stopEnabled(bool);
+  void fastForwardEnabled(bool);
+  void reverseEnabled(bool);
+  void nextEnabled(bool);
+  void previousEnabled(bool);
+  void stepForwardEnabled(bool);
+  void stepBackEnabled(bool);
+  void advanceEnabled(bool);
+  void replayEnabled(bool);
+  void ejectEnabled(bool);
+
+private slots:
+  void on_mediaPreviousButton_pressed();
+  void on_mediaPreviousButton_released();
+  void on_mediaNextButton_pressed();
+  void on_mediaNextButton_released();
+  void on_replayButton_pressed();
+  void on_replayButton_released();
+  void on_advanceButton_pressed();
+  void on_advanceButton_released();
+  void on_stepBackButton_pressed();
+  void on_stepBackButton_released();
+  void on_stepForwardButton_pressed();
+  void on_stepForwardButton_released();
+  void on_reverseButton_pressed();
+  void on_reverseButton_released();
+  void on_fastForwardButton_pressed();
+  void on_fastForwardButton_released();
+  void on_playButton_pressed();
+  void on_playButton_released();
+  void on_pauseButton_pressed();
+  void on_pauseButton_released();
+  void on_stopButton_pressed();
+  void on_stopButton_released();
+  void on_ejectButton_pressed();
+  void on_ejectButton_released();
+
+private:
+  Ui::PIRMediaForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRMEDIAFORM_H
diff --git a/forms/pirmediaform.ui b/forms/pirmediaform.ui
new file mode 100644 (file)
index 0000000..bbbcb85
--- /dev/null
@@ -0,0 +1,518 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRMediaForm</class>
+ <widget class="QWidget" name="PIRMediaForm">
+  <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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="mediaPreviousButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Previous</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/rewind_previous_icon&amp;48.png</normaloff>:/icons/rewind_previous_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="mediaNextButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Next</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/fastforward_next_icon&amp;48.png</normaloff>:/icons/fastforward_next_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="replayButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Replay</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/undo_icon&amp;48.png</normaloff>:/icons/undo_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="3">
+    <widget class="QPushButton" name="advanceButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Advance</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/redo_icon&amp;48.png</normaloff>:/icons/redo_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="stepBackButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Step Back</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/playback_prev_icon&amp;48.png</normaloff>:/icons/playback_prev_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="stepForwardButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Step Fwd</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/playback_next_icon&amp;48.png</normaloff>:/icons/playback_next_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="reverseButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Reverse</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/playback_rew_icon&amp;48.png</normaloff>:/icons/playback_rew_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <widget class="QPushButton" name="fastForwardButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Fast Fwd</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/playback_ff_icon&amp;48.png</normaloff>:/icons/playback_ff_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QPushButton" name="playButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Play</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/playback_play_icon&amp;48.png</normaloff>:/icons/playback_play_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QPushButton" name="pauseButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Pause</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/playback_pause_icon&amp;48.png</normaloff>:/icons/playback_pause_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="2">
+    <widget class="QPushButton" name="stopButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Stop</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/playback_stop_icon&amp;48.png</normaloff>:/icons/playback_stop_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="3">
+    <widget class="QPushButton" name="ejectButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Eject</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/eject_icon&amp;48.png</normaloff>:/icons/eject_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../PierogiResources.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>previousEnabled(bool)</signal>
+   <receiver>mediaPreviousButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>nextEnabled(bool)</signal>
+   <receiver>mediaNextButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>replayEnabled(bool)</signal>
+   <receiver>replayButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>advanceEnabled(bool)</signal>
+   <receiver>advanceButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>stepBackEnabled(bool)</signal>
+   <receiver>stepBackButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>stepForwardEnabled(bool)</signal>
+   <receiver>stepForwardButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>reverseEnabled(bool)</signal>
+   <receiver>reverseButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>playEnabled(bool)</signal>
+   <receiver>playButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>pauseEnabled(bool)</signal>
+   <receiver>pauseButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>fastForwardEnabled(bool)</signal>
+   <receiver>fastForwardButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>stopEnabled(bool)</signal>
+   <receiver>stopButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMediaForm</sender>
+   <signal>ejectEnabled(bool)</signal>
+   <receiver>ejectButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>previousEnabled(bool)</signal>
+  <signal>nextEnabled(bool)</signal>
+  <signal>replayEnabled(bool)</signal>
+  <signal>advanceEnabled(bool)</signal>
+  <signal>stepBackEnabled(bool)</signal>
+  <signal>stepForwardEnabled(bool)</signal>
+  <signal>reverseEnabled(bool)</signal>
+  <signal>fastForwardEnabled(bool)</signal>
+  <signal>playEnabled(bool)</signal>
+  <signal>pauseEnabled(bool)</signal>
+  <signal>stopEnabled(bool)</signal>
+  <signal>ejectEnabled(bool)</signal>
+ </slots>
+</ui>
diff --git a/forms/pirmenuform.cpp b/forms/pirmenuform.cpp
new file mode 100644 (file)
index 0000000..9a8561c
--- /dev/null
@@ -0,0 +1,126 @@
+#include "pirmenuform.h"
+#include "ui_pirmenuform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRMenuForm::PIRMenuForm(
+  MainWindow *mw)
+  : QWidget(0),
+    ui(new Ui::PIRMenuForm),
+    mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRMenuForm::~PIRMenuForm()
+{
+  delete ui;
+}
+
+
+void PIRMenuForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
+  emit upEnabled(keyset->hasKey(id, Up_Key));
+  emit downEnabled(keyset->hasKey(id, Down_Key));
+  emit leftEnabled(keyset->hasKey(id, Left_Key));
+  emit rightEnabled(keyset->hasKey(id, Right_Key));
+  emit selectEnabled(keyset->hasKey(id, Select_Key));
+  emit menuEnabled(keyset->hasKey(id, Menu_Key));
+  emit exitEnabled(keyset->hasKey(id, Exit_Key));
+  emit guideEnabled(keyset->hasKey(id, Guide_Key));
+  emit discMenuEnabled(keyset->hasKey(id, DiscMenu_Key));
+}
+
+
+void PIRMenuForm::on_upButton_pressed()
+{
+  mainWindow->startRepeating(Up_Key);
+}
+
+void PIRMenuForm::on_upButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMenuForm::on_leftButton_pressed()
+{
+  mainWindow->startRepeating(Left_Key);
+}
+
+void PIRMenuForm::on_leftButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMenuForm::on_rightButton_pressed()
+{
+  mainWindow->startRepeating(Right_Key);
+}
+
+void PIRMenuForm::on_rightButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMenuForm::on_downButton_pressed()
+{
+  mainWindow->startRepeating(Down_Key);
+}
+
+void PIRMenuForm::on_downButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMenuForm::on_selectButton_pressed()
+{
+  mainWindow->startRepeating(Select_Key);
+}
+
+void PIRMenuForm::on_selectButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMenuForm::on_menuButton_pressed()
+{
+  mainWindow->startRepeating(Menu_Key);
+}
+
+void PIRMenuForm::on_menuButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMenuForm::on_exitButton_pressed()
+{
+  mainWindow->startRepeating(Exit_Key);
+}
+
+void PIRMenuForm::on_exitButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMenuForm::on_guideButton_pressed()
+{
+  mainWindow->startRepeating(Guide_Key);
+}
+
+void PIRMenuForm::on_guideButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRMenuForm::on_discMenuButton_pressed()
+{
+  mainWindow->startRepeating(DiscMenu_Key);
+}
+
+void PIRMenuForm::on_discMenuButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/pirmenuform.h b/forms/pirmenuform.h
new file mode 100644 (file)
index 0000000..070a9c1
--- /dev/null
@@ -0,0 +1,63 @@
+#ifndef PIRMENUFORM_H
+#define PIRMENUFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRMenuForm;
+}
+
+class PIRMenuForm : public QWidget
+{
+  Q_OBJECT
+
+public:
+//  explicit PIRMenuForm(QWidget *parent = 0);
+  PIRMenuForm(MainWindow *mw);
+  ~PIRMenuForm();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void menuEnabled(bool);
+  void upEnabled(bool);
+  void downEnabled(bool);
+  void leftEnabled(bool);
+  void rightEnabled(bool);
+  void selectEnabled(bool);
+  void exitEnabled(bool);
+  void guideEnabled(bool);
+  void discMenuEnabled(bool);
+
+private slots:
+  void on_upButton_pressed();
+  void on_upButton_released();
+  void on_leftButton_pressed();
+  void on_leftButton_released();
+  void on_rightButton_pressed();
+  void on_rightButton_released();
+  void on_downButton_pressed();
+  void on_downButton_released();
+  void on_selectButton_pressed();
+  void on_selectButton_released();
+  void on_menuButton_pressed();
+  void on_menuButton_released();
+  void on_exitButton_pressed();
+  void on_exitButton_released();
+  void on_guideButton_pressed();
+  void on_guideButton_released();
+  void on_discMenuButton_pressed();
+  void on_discMenuButton_released();
+
+private:
+  Ui::PIRMenuForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRMENUFORM_H
diff --git a/forms/pirmenuform.ui b/forms/pirmenuform.ui
new file mode 100644 (file)
index 0000000..7b2327f
--- /dev/null
@@ -0,0 +1,348 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRMenuForm</class>
+ <widget class="QWidget" name="PIRMenuForm">
+  <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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="guideButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Guide</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="upButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Up</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="menuButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Menu</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="leftButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Left</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_left_icon&amp;48.png</normaloff>:/icons/arrow_left_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="selectButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Select</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="rightButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Right</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_right_icon&amp;48.png</normaloff>:/icons/arrow_right_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QPushButton" name="discMenuButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Disc Menu</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QPushButton" name="downButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Down</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="2">
+    <widget class="QPushButton" name="exitButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Exit</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../PierogiResources.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>PIRMenuForm</sender>
+   <signal>guideEnabled(bool)</signal>
+   <receiver>guideButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>135</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMenuForm</sender>
+   <signal>upEnabled(bool)</signal>
+   <receiver>upButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMenuForm</sender>
+   <signal>menuEnabled(bool)</signal>
+   <receiver>menuButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>664</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMenuForm</sender>
+   <signal>leftEnabled(bool)</signal>
+   <receiver>leftButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>135</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMenuForm</sender>
+   <signal>selectEnabled(bool)</signal>
+   <receiver>selectButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMenuForm</sender>
+   <signal>rightEnabled(bool)</signal>
+   <receiver>rightButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>664</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMenuForm</sender>
+   <signal>discMenuEnabled(bool)</signal>
+   <receiver>discMenuButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>135</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMenuForm</sender>
+   <signal>downEnabled(bool)</signal>
+   <receiver>downButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRMenuForm</sender>
+   <signal>exitEnabled(bool)</signal>
+   <receiver>exitButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>664</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>guideEnabled(bool)</signal>
+  <signal>upEnabled(bool)</signal>
+  <signal>menuEnabled(bool)</signal>
+  <signal>leftEnabled(bool)</signal>
+  <signal>selectEnabled(bool)</signal>
+  <signal>rightEnabled(bool)</signal>
+  <signal>discMenuEnabled(bool)</signal>
+  <signal>downEnabled(bool)</signal>
+  <signal>exitEnabled(bool)</signal>
+ </slots>
+</ui>
diff --git a/forms/pirtvform.cpp b/forms/pirtvform.cpp
new file mode 100644 (file)
index 0000000..9753dfe
--- /dev/null
@@ -0,0 +1,202 @@
+#include "pirtvform.h"
+#include "ui_pirtvform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRTVForm::PIRTVForm(MainWindow *mw) :
+  QWidget(0),
+  ui(new Ui::PIRTVForm),
+  mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRTVForm::~PIRTVForm()
+{
+  delete ui;
+}
+
+
+void PIRTVForm::enableButtons(
+  const PIRKeysetManager *km,
+  unsigned int id)
+{
+  emit teletextEnabled(km->hasKey(id, Teletext_Key));
+  emit teletextSizeEnabled(km->hasKey(id, TeletextSize_Key));
+  emit favoritesEnabled(km->hasKey(id, Favorites_Key));
+  emit pageUpEnabled(km->hasKey(id, PageUp_Key));
+  emit teletextHoldEnabled(km->hasKey(id, TeletextHold_Key));
+  emit teletextRevealEnabled(km->hasKey(id, TeletextReveal_Key));
+  emit liveTVEnabled(km->hasKey(id, LiveTV_Key));
+  emit pageDownEnabled(km->hasKey(id, PageDown_Key));
+  emit pipEnabled(km->hasKey(id, PIP_Key));
+  emit pipSwapEnabled(km->hasKey(id, PIPSwap_Key));
+  emit pipMoveEnabled(km->hasKey(id, PIPMove_Key));
+  emit pipSourceEnabled(km->hasKey(id, PIPSource_Key));
+  emit pipChannelUpEnabled(km->hasKey(id, PIPChannelUp_Key));
+  emit pipChannelDownEnabled(km->hasKey(id, PIPChannelDown_Key));
+  emit pipPauseEnabled(km->hasKey(id, PIPPause_Key));
+  emit pipSizeEnabled(km->hasKey(id, PIPSize_Key));
+}
+
+
+void PIRTVForm::on_teletextButton_pressed()
+{
+  mainWindow->startRepeating(Teletext_Key);
+}
+
+void PIRTVForm::on_teletextButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_teletextSizeButton_pressed()
+{
+  mainWindow->startRepeating(TeletextSize_Key);
+}
+
+void PIRTVForm::on_teletextSizeButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_favoritesButton_pressed()
+{
+  mainWindow->startRepeating(Favorites_Key);
+}
+
+void PIRTVForm::on_favoritesButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_pageUpButton_pressed()
+{
+  mainWindow->startRepeating(PageUp_Key);
+}
+
+void PIRTVForm::on_pageUpButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_teletextHoldButton_pressed()
+{
+  mainWindow->startRepeating(TeletextHold_Key);
+}
+
+void PIRTVForm::on_teletextHoldButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_teletextRevealButton_pressed()
+{
+  mainWindow->startRepeating(TeletextReveal_Key);
+}
+
+void PIRTVForm::on_teletextRevealButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_liveTVButton_pressed()
+{
+  mainWindow->startRepeating(LiveTV_Key);
+}
+
+void PIRTVForm::on_liveTVButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_pageDownButton_pressed()
+{
+  mainWindow->startRepeating(PageDown_Key);
+}
+
+void PIRTVForm::on_pageDownButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_pipButton_pressed()
+{
+  mainWindow->startRepeating(PIP_Key);
+}
+
+void PIRTVForm::on_pipButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_pipSwapButton_pressed()
+{
+  mainWindow->startRepeating(PIPSwap_Key);
+}
+
+void PIRTVForm::on_pipSwapButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_pipMoveButton_pressed()
+{
+  mainWindow->startRepeating(PIPMove_Key);
+}
+
+void PIRTVForm::on_pipMoveButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_pipSourceButton_pressed()
+{
+  mainWindow->startRepeating(PIPSource_Key);
+}
+
+void PIRTVForm::on_pipSourceButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_pipChannelUpButton_pressed()
+{
+  mainWindow->startRepeating(PIPChannelUp_Key);
+}
+
+void PIRTVForm::on_pipChannelUpButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_pipChannelDownButton_pressed()
+{
+  mainWindow->startRepeating(PIPChannelDown_Key);
+}
+
+void PIRTVForm::on_pipChannelDownButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_pipPauseButton_pressed()
+{
+  mainWindow->startRepeating(PIPPause_Key);
+}
+
+void PIRTVForm::on_pipPauseButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRTVForm::on_pipSizeButton_pressed()
+{
+  mainWindow->startRepeating(PIPSize_Key);
+}
+
+void PIRTVForm::on_pipSizeButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/pirtvform.h b/forms/pirtvform.h
new file mode 100644 (file)
index 0000000..3aae5bf
--- /dev/null
@@ -0,0 +1,83 @@
+#ifndef PIRTVFORM_H
+#define PIRTVFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRTVForm;
+}
+
+class PIRTVForm : public QWidget
+{
+  Q_OBJECT
+  
+public:
+  PIRTVForm(MainWindow *mw);
+  ~PIRTVForm();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void teletextEnabled(bool);
+  void teletextSizeEnabled(bool);
+  void favoritesEnabled(bool);
+  void pageUpEnabled(bool);
+  void teletextHoldEnabled(bool);
+  void teletextRevealEnabled(bool);
+  void liveTVEnabled(bool);
+  void pageDownEnabled(bool);
+  void pipEnabled(bool);
+  void pipSwapEnabled(bool);
+  void pipMoveEnabled(bool);
+  void pipSourceEnabled(bool);
+  void pipChannelUpEnabled(bool);
+  void pipChannelDownEnabled(bool);
+  void pipPauseEnabled(bool);
+  void pipSizeEnabled(bool);
+
+private slots:
+  void on_teletextButton_pressed();
+  void on_teletextButton_released();
+  void on_teletextSizeButton_pressed();
+  void on_teletextSizeButton_released();
+  void on_favoritesButton_pressed();
+  void on_favoritesButton_released();
+  void on_pageUpButton_pressed();
+  void on_pageUpButton_released();
+  void on_teletextHoldButton_pressed();
+  void on_teletextHoldButton_released();
+  void on_teletextRevealButton_pressed();
+  void on_teletextRevealButton_released();
+  void on_liveTVButton_pressed();
+  void on_liveTVButton_released();
+  void on_pageDownButton_pressed();
+  void on_pageDownButton_released();
+  void on_pipButton_pressed();
+  void on_pipButton_released();
+  void on_pipSwapButton_pressed();
+  void on_pipSwapButton_released();
+  void on_pipMoveButton_pressed();
+  void on_pipMoveButton_released();
+  void on_pipSourceButton_pressed();
+  void on_pipSourceButton_released();
+  void on_pipChannelUpButton_pressed();
+  void on_pipChannelUpButton_released();
+  void on_pipChannelDownButton_pressed();
+  void on_pipChannelDownButton_released();
+  void on_pipPauseButton_pressed();
+  void on_pipPauseButton_released();
+  void on_pipSizeButton_pressed();
+  void on_pipSizeButton_released();
+
+private:
+  Ui::PIRTVForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRTVFORM_H
diff --git a/forms/pirtvform.ui b/forms/pirtvform.ui
new file mode 100644 (file)
index 0000000..51ae510
--- /dev/null
@@ -0,0 +1,558 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRTVForm</class>
+ <widget class="QWidget" name="PIRTVForm">
+  <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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="teletextButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Teletext</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="teletextSizeButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Txt Size</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="favoritesButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Favorites</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="3">
+    <widget class="QPushButton" name="pageUpButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Page Up</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="teletextHoldButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Txt Hold</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="teletextRevealButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Txt Reveal</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="liveTVButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Live TV</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <widget class="QPushButton" name="pageDownButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Page Down</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QPushButton" name="pipButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Picture in Picture</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QPushButton" name="pipSwapButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>PIP Swap</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="2">
+    <widget class="QPushButton" name="pipMoveButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>PIP Move</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="3">
+    <widget class="QPushButton" name="pipChannelUpButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>PIP Ch Up</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/br_up_icon&amp;48.png</normaloff>:/icons/br_up_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QPushButton" name="pipSourceButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>PIP Source</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1">
+    <widget class="QPushButton" name="pipSizeButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>PIP Size</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="2">
+    <widget class="QPushButton" name="pipPauseButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>PIP Pause</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="3">
+    <widget class="QPushButton" name="pipChannelDownButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>PIP Ch Down</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/br_down_icon&amp;48.png</normaloff>:/icons/br_down_icon&amp;48.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../PierogiResources.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>teletextEnabled(bool)</signal>
+   <receiver>teletextButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>teletextSizeEnabled(bool)</signal>
+   <receiver>teletextSizeButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>favoritesEnabled(bool)</signal>
+   <receiver>favoritesButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>pageUpEnabled(bool)</signal>
+   <receiver>pageUpButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>64</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>teletextHoldEnabled(bool)</signal>
+   <receiver>teletextHoldButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>teletextRevealEnabled(bool)</signal>
+   <receiver>teletextRevealButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>liveTVEnabled(bool)</signal>
+   <receiver>liveTVButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>pageDownEnabled(bool)</signal>
+   <receiver>pageDownButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>182</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>pipEnabled(bool)</signal>
+   <receiver>pipButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>pipSwapEnabled(bool)</signal>
+   <receiver>pipSwapButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>pipMoveEnabled(bool)</signal>
+   <receiver>pipMoveButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>pipChannelUpEnabled(bool)</signal>
+   <receiver>pipChannelUpButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>301</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>pipSourceEnabled(bool)</signal>
+   <receiver>pipSourceButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>pipSizeEnabled(bool)</signal>
+   <receiver>pipSizeButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>pipPauseEnabled(bool)</signal>
+   <receiver>pipPauseButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRTVForm</sender>
+   <signal>pipChannelDownEnabled(bool)</signal>
+   <receiver>pipChannelDownButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>419</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>teletextEnabled(bool)</signal>
+  <signal>teletextSizeEnabled(bool)</signal>
+  <signal>favoritesEnabled(bool)</signal>
+  <signal>pageUpEnabled(bool)</signal>
+  <signal>teletextHoldEnabled(bool)</signal>
+  <signal>teletextRevealEnabled(bool)</signal>
+  <signal>liveTVEnabled(bool)</signal>
+  <signal>pageDownEnabled(bool)</signal>
+  <signal>pipEnabled(bool)</signal>
+  <signal>pipSwapEnabled(bool)</signal>
+  <signal>pipMoveEnabled(bool)</signal>
+  <signal>pipChannelUpEnabled(bool)</signal>
+  <signal>pipSourceEnabled(bool)</signal>
+  <signal>pipSizeEnabled(bool)</signal>
+  <signal>pipPauseEnabled(bool)</signal>
+  <signal>pipChannelDownEnabled(bool)</signal>
+ </slots>
+</ui>
diff --git a/forms/pirutilityform.cpp b/forms/pirutilityform.cpp
new file mode 100644 (file)
index 0000000..7032db5
--- /dev/null
@@ -0,0 +1,171 @@
+#include "pirutilityform.h"
+#include "ui_pirutilityform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRUtilityForm::PIRUtilityForm(
+  MainWindow *mw)
+  : QWidget(0),
+    ui(new Ui::PIRUtilityForm),
+    mainWindow(mw)
+{
+  ui->setupUi(this);
+}
+
+PIRUtilityForm::~PIRUtilityForm()
+{
+  delete ui;
+}
+
+
+void PIRUtilityForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
+  emit redEnabled(keyset->hasKey(id, Red_Key));
+  emit greenEnabled(keyset->hasKey(id, Green_Key));
+  emit yellowEnabled(keyset->hasKey(id, Yellow_Key));
+  emit blueEnabled(keyset->hasKey(id, Blue_Key));
+  emit pictureModeEnabled(keyset->hasKey(id, PictureMode_Key));
+  emit soundModeEnabled(keyset->hasKey(id, SoundMode_Key));
+  emit aspectRatioEnabled(keyset->hasKey(id, AspectRatio_Key));
+  emit audioEnabled(keyset->hasKey(id, Audio_Key));
+  emit infoEnabled(keyset->hasKey(id, Info_Key));
+  emit captionsEnabled(keyset->hasKey(id, Captions_Key));
+  emit sleepEnabled(keyset->hasKey(id, Sleep_Key));
+  emit inputEnabled(keyset->hasKey(id, Input_Key));
+}
+
+
+void PIRUtilityForm::on_redButton_pressed()
+{
+  mainWindow->startRepeating(Red_Key);
+}
+
+void PIRUtilityForm::on_redButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRUtilityForm::on_greenButton_pressed()
+{
+  mainWindow->startRepeating(Green_Key);
+}
+
+void PIRUtilityForm::on_greenButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRUtilityForm::on_yellowButton_pressed()
+{
+  mainWindow->startRepeating(Yellow_Key);
+}
+
+void PIRUtilityForm::on_yellowButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRUtilityForm::on_blueButton_pressed()
+{
+  mainWindow->startRepeating(Blue_Key);
+}
+
+void PIRUtilityForm::on_blueButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRUtilityForm::on_pictureModeButton_pressed()
+{
+  mainWindow->startRepeating(PictureMode_Key);
+}
+
+void PIRUtilityForm::on_pictureModeButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRUtilityForm::on_soundModeButton_pressed()
+{
+  mainWindow->startRepeating(SoundMode_Key);
+}
+
+void PIRUtilityForm::on_soundModeButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRUtilityForm::on_aspectRatioButton_pressed()
+{
+  mainWindow->startRepeating(AspectRatio_Key);
+}
+
+void PIRUtilityForm::on_aspectRatioButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+/*
+void PIRUtilityForm::on_surroundButton_pressed()
+{
+  mainWindow->startRepeating(Surround_Key);
+}
+
+void PIRUtilityForm::on_surroundButton_released()
+{
+  mainWindow->stopRepeating();
+}
+*/
+
+void PIRUtilityForm::on_audioButton_pressed()
+{
+  mainWindow->startRepeating(Audio_Key);
+}
+
+void PIRUtilityForm::on_audioButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRUtilityForm::on_infoButton_pressed()
+{
+  mainWindow->startRepeating(Info_Key);
+}
+
+void PIRUtilityForm::on_infoButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRUtilityForm::on_captionButton_pressed()
+{
+  mainWindow->startRepeating(Captions_Key);
+}
+
+void PIRUtilityForm::on_captionButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRUtilityForm::on_inputButton_pressed()
+{
+  mainWindow->startRepeating(Input_Key);
+}
+
+void PIRUtilityForm::on_inputButton_released()
+{
+  mainWindow->stopRepeating();
+}
+
+void PIRUtilityForm::on_sleepButton_pressed()
+{
+  mainWindow->startRepeating(Sleep_Key);
+}
+
+void PIRUtilityForm::on_sleepButton_released()
+{
+  mainWindow->stopRepeating();
+}
diff --git a/forms/pirutilityform.h b/forms/pirutilityform.h
new file mode 100644 (file)
index 0000000..fb56cb1
--- /dev/null
@@ -0,0 +1,72 @@
+#ifndef PIRUTILITYFORM_H
+#define PIRUTILITYFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRUtilityForm;
+}
+
+class PIRUtilityForm : public QWidget
+{
+  Q_OBJECT
+
+public:
+//  explicit PIRUtilityForm(QWidget *parent = 0);
+  PIRUtilityForm(MainWindow *mw);
+  ~PIRUtilityForm();
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+signals:
+  void redEnabled(bool);
+  void greenEnabled(bool);
+  void yellowEnabled(bool);
+  void blueEnabled(bool);
+  void pictureModeEnabled(bool);
+  void soundModeEnabled(bool);
+  void aspectRatioEnabled(bool);
+  void audioEnabled(bool);
+  void infoEnabled(bool);
+  void captionsEnabled(bool);
+  void inputEnabled(bool);
+  void sleepEnabled(bool);
+
+private slots:
+  void on_redButton_pressed();
+  void on_redButton_released();
+  void on_greenButton_pressed();
+  void on_greenButton_released();
+  void on_yellowButton_pressed();
+  void on_yellowButton_released();
+  void on_blueButton_pressed();
+  void on_blueButton_released();
+  void on_pictureModeButton_pressed();
+  void on_pictureModeButton_released();
+  void on_soundModeButton_pressed();
+  void on_soundModeButton_released();
+  void on_aspectRatioButton_pressed();
+  void on_aspectRatioButton_released();
+  void on_audioButton_pressed();
+  void on_audioButton_released();
+  void on_infoButton_pressed();
+  void on_infoButton_released();
+  void on_captionButton_pressed();
+  void on_captionButton_released();
+  void on_inputButton_pressed();
+  void on_inputButton_released();
+  void on_sleepButton_pressed();
+  void on_sleepButton_released();
+
+private:
+  Ui::PIRUtilityForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRUTILITYFORM_H
diff --git a/forms/pirutilityform.ui b/forms/pirutilityform.ui
new file mode 100644 (file)
index 0000000..ad53ba1
--- /dev/null
@@ -0,0 +1,438 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRUtilityForm</class>
+ <widget class="QWidget" name="PIRUtilityForm">
+  <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="leftMargin">
+    <number>8</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>8</number>
+   </property>
+   <property name="bottomMargin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="redButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Red</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/red_square.png</normaloff>:/icons/red_square.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="greenButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Green</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/green_square.png</normaloff>:/icons/green_square.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="yellowButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Yellow</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/yellow_square.png</normaloff>:/icons/yellow_square.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="3">
+    <widget class="QPushButton" name="blueButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Blue</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../PierogiResources.qrc">
+       <normaloff>:/icons/blue_square.png</normaloff>:/icons/blue_square.png</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>48</width>
+       <height>48</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="soundModeButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Sound Mode</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="aspectRatioButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Aspect Ratio</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="audioButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>I/II Audio</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <widget class="QPushButton" name="infoButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Info</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QPushButton" name="pictureModeButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Picture Mode</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QPushButton" name="inputButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Input</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" 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="2" column="3">
+    <widget class="QPushButton" name="captionButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>CC / Subtitle</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../PierogiResources.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>PIRUtilityForm</sender>
+   <signal>redEnabled(bool)</signal>
+   <receiver>redButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</sender>
+   <signal>greenEnabled(bool)</signal>
+   <receiver>greenButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</sender>
+   <signal>yellowEnabled(bool)</signal>
+   <receiver>yellowButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</sender>
+   <signal>blueEnabled(bool)</signal>
+   <receiver>blueButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>83</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</sender>
+   <signal>soundModeEnabled(bool)</signal>
+   <receiver>soundModeButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</sender>
+   <signal>aspectRatioEnabled(bool)</signal>
+   <receiver>aspectRatioButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</sender>
+   <signal>audioEnabled(bool)</signal>
+   <receiver>audioButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>499</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</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>697</x>
+     <y>241</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</sender>
+   <signal>pictureModeEnabled(bool)</signal>
+   <receiver>pictureModeButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>102</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</sender>
+   <signal>inputEnabled(bool)</signal>
+   <receiver>inputButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>300</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</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>499</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>PIRUtilityForm</sender>
+   <signal>captionsEnabled(bool)</signal>
+   <receiver>captionButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>697</x>
+     <y>399</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>redEnabled(bool)</signal>
+  <signal>greenEnabled(bool)</signal>
+  <signal>yellowEnabled(bool)</signal>
+  <signal>blueEnabled(bool)</signal>
+  <signal>soundModeEnabled(bool)</signal>
+  <signal>aspectRatioEnabled(bool)</signal>
+  <signal>audioEnabled(bool)</signal>
+  <signal>infoEnabled(bool)</signal>
+  <signal>pictureModeEnabled(bool)</signal>
+  <signal>inputEnabled(bool)</signal>
+  <signal>sleepEnabled(bool)</signal>
+  <signal>captionsEnabled(bool)</signal>
+ </slots>
+</ui>
diff --git a/keysets/aoc.cpp b/keysets/aoc.cpp
new file mode 100644 (file)
index 0000000..d318784
--- /dev/null
@@ -0,0 +1,55 @@
+#include "aoc.h"
+#include "protocols/necprotocol.h"
+
+
+AOCTV1::AOCTV1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 1",
+      AOC_Make,
+      index)
+{
+}
+
+
+void AOCTV1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0xBD00, 16);
+
+  addKey("POWER", Power_Key, 0x01, 8);
+  addKey("MUTE", Mute_Key, 0x04, 8);
+  addKey("TVVIDEO", Input_Key, 0x05, 8);
+  addKey("MENU", Menu_Key, 0x0A, 8);
+  addKey("RIGHT", Right_Key, 0x0C, 8);
+
+  addKey("LEFT", Left_Key, 0x10, 8);
+  addKey("PIP", PIP_Key, 0x12, 8);
+  addKey("SLEEP", Sleep_Key, 0x13, 8);
+  addKey("WIDE", AspectRatio_Key, 0x14, 8);
+  addKey("1", One_Key, 0x15, 8);
+  addKey("2", Two_Key, 0x16, 8);
+  addKey("3", Three_Key, 0x17, 8);
+  addKey("UP", Up_Key, 0x18, 8);
+  addKey("4", Four_Key, 0x19, 8);
+  addKey("5", Five_Key, 0x1A, 8);
+  addKey("6", Six_Key, 0x1B, 8);
+  addKey("DOWN", Down_Key, 0x1C, 8);
+  addKey("7", Seven_Key,0x1D, 8);
+  addKey("8", Eight_Key, 0x1E, 8);
+  addKey("9", Nine_Key, 0x1F, 8);
+
+  addKey("INFO", Info_Key, 0x40, 8);
+  addKey("0", Zero_Key, 0x41, 8);
+  addKey("PRECH", PrevChannel_Key, 0x44, 8);
+  addKey("PLUSMINUS", Unmapped_Key, 0x4B, 8);
+  addKey("PC", PCInput_Key, 0x45, 8);
+}
diff --git a/keysets/aoc.h b/keysets/aoc.h
new file mode 100644 (file)
index 0000000..34af85b
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef AOC_H
+#define AOC_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class AOCTV1: public PIRKeysetMetaData
+{
+public:
+  AOCTV1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // AOC_H
diff --git a/keysets/arcam.cpp b/keysets/arcam.cpp
new file mode 100644 (file)
index 0000000..ac220de
--- /dev/null
@@ -0,0 +1,56 @@
+#include "arcam.h"
+#include "protocols/rc5protocol.h"
+
+
+ArcamReceiver1::ArcamReceiver1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Receiver Keyset 1",
+      Arcam_Make,
+      index)
+{
+}
+
+
+void ArcamReceiver1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new RC5Protocol(guiObject, index);
+
+  addKey("right", Right_Key, 0x0410, 13);
+  addKey("left", Left_Key, 0x0411, 13);
+  addKey("down", Down_Key, 0x0415, 13);
+  addKey("up", Up_Key, 0x0416, 13);
+  addKey("ok", Select_Key, 0x0417, 13);
+  addKey("test", Unmapped_Key, 0x0418, 13);
+
+  addKey("sat", SatInput_Key, 0x1400, 13);
+  addKey("5-1", Surround_Key, 0x1402, 13); // ?
+  addKey("dvd", DVDInput_Key, 0x1404, 13);
+  addKey("tape", TapeInput_Key, 0x1405, 13);
+  addKey("vcr", VCRInput_Key, 0x1406, 13);
+  addKey("cd", CDInput_Key, 0x1407, 13);
+  addKey("aux", AuxInput_Key, 0x1408, 13);
+  addKey("power", Power_Key, 0x140C, 13);
+  addKey("mute", Mute_Key, 0x140D, 13); // "silent"
+
+  addKey("volup", VolumeUp_Key, 0x1410, 13);
+  addKey("voldown", VolumeDown_Key, 0x1411, 13);
+  addKey("mode", Mode_Key, 0x1420, 13);
+  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("tmode", FMMode_Key, 0x1436, 13); // ?
+  addKey("info", Info_Key, 0x1437, 13);
+  addKey("p+", ChannelUp_Key, 0x1438, 13);
+  addKey("p-", ChannelDown_Key, 0x1439, 13);
+  addKey("dyn", Unmapped_Key, 0x143E, 13);
+}
diff --git a/keysets/arcam.h b/keysets/arcam.h
new file mode 100644 (file)
index 0000000..5bdac7e
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef ARCAM_H
+#define ARCAM_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class ArcamReceiver1: public PIRKeysetMetaData
+{
+public:
+  ArcamReceiver1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // ARCAM_H
diff --git a/keysets/dell.cpp b/keysets/dell.cpp
new file mode 100644 (file)
index 0000000..064bedd
--- /dev/null
@@ -0,0 +1,51 @@
+#include "dell.h"
+#include "protocols/mceprotocol.h"
+
+
+DellRemote1::DellRemote1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Remote Keyset 1",
+      Dell_Make,
+      index)
+{
+}
+
+
+void DellRemote1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new MCEProtocol(guiObject, index, 0x801C);
+
+  setPreData(0x2B, 7);
+
+  addKey("vol_off", Mute_Key, 0x0D, 8);
+
+  addKey("vol+", VolumeUp_Key, 0x10, 8);
+  addKey("vol-", VolumeDown_Key, 0x11, 8);
+
+  addKey("next", Next_Key, 0x20, 8);
+  addKey("prev", Previous_Key, 0x21, 8);
+  addKey("play_pause", Play_Key, 0x2C, 8);
+  addKey("play_pause", Pause_Key, 0x2C, 8);
+  addKey("forward", FastForward_Key, 0x2E, 8);
+  addKey("rewind", Rewind_Key, 0x2F, 8);
+  addKey("stop", Stop_Key, 0x31, 8);
+
+  addKey("cross_up", Up_Key, 0x58, 8);
+  addKey("cross_down", Down_Key, 0x59, 8);
+  addKey("cross_left", Left_Key, 0x5A, 8);
+  addKey("cross_right", Right_Key, 0x5B, 8);
+  addKey("cross_enter", Select_Key, 0x5C, 8);
+
+  addKey("up", PageUp_Key, 0xCE, 8);
+  addKey("down", PageDown_Key, 0xCF, 8);
+
+  addKey("back", Exit_Key, 0xA4, 8);
+}
diff --git a/keysets/dell.h b/keysets/dell.h
new file mode 100644 (file)
index 0000000..4dea012
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef DELL_H
+#define DELL_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class DellRemote1: public PIRKeysetMetaData
+{
+public:
+  DellRemote1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // DELL_H
diff --git a/keysets/dse.cpp b/keysets/dse.cpp
new file mode 100644 (file)
index 0000000..9a6a253
--- /dev/null
@@ -0,0 +1,142 @@
+#include "dse.h"
+#include "protocols/necprotocol.h"
+
+
+DSEDVD1::DSEDVD1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "DVD Keyset 1",
+      DSE_Make,
+      index)
+{
+}
+
+
+void DSEDVD1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
+
+  setPreData(0x00, 8);
+
+  addKey("Power", Power_Key, 0x0C, 8);
+  addKey("Open/Close", Eject_Key, 0x0D, 8);
+  addKey("Subtitle", Captions_Key, 0x1E, 8);
+  addKey("Angle", Angle_Key, 0x1F, 8);
+  addKey("Language", Audio_Key, 0x1C, 8);
+  addKey("Resume", Unmapped_Key, 0x1D, 8);
+  addKey("Setup", Menu_Key, 0x14, 8);
+  addKey("Time", Unmapped_Key, 0x09, 8);
+  addKey("Title", DiscTitle_Key, 0x15, 8);
+  addKey("Menu", DiscMenu_Key, 0x16, 8);
+  addKey("A-B", RepeatAB_Key, 0x17, 8);
+  addKey("1", One_Key, 0x00, 8);
+  addKey("2", Two_Key, 0x01, 8);
+  addKey("3", Three_Key, 0x02, 8);
+  addKey("4", Four_Key, 0x03, 8);
+  addKey("5", Five_Key, 0x04, 8);
+  addKey("6", Six_Key, 0x05, 8);
+  addKey("7", Seven_Key, 0x06, 8);
+  addKey("8", Eight_Key, 0x07, 8);
+  addKey("9", Nine_Key, 0x08, 8);
+  addKey("0", Zero_Key, 0x0A, 8);
+  addKey("10+", DoubleDigit_Key, 0x0B, 8);
+  addKey("<<", Rewind_Key, 0x40, 8);
+  addKey(">>", FastForward_Key, 0x41, 8);
+  addKey(">||", Play_Key, 0x44, 8);
+  addKey(">||", Pause_Key, 0x44, 8);
+  addKey("|<<", Previous_Key, 0x42, 8);
+  addKey("Stop", Stop_Key, 0x45, 8);
+  addKey(">>|", Next_Key, 0x43, 8);
+  addKey("Return", Exit_Key, 0x19, 8);
+  addKey("PBC", Unmapped_Key, 0x1A, 8);
+  addKey("Zoom", Zoom_Key, 0x1B, 8);
+  addKey("Repeat", Repeat_Key, 0x18, 8);
+  addKey("LeftArrow", Left_Key, 0x12, 8);
+  addKey("RightArrow", Right_Key, 0x13, 8);
+  addKey("UpArrow", Up_Key, 0x10, 8);
+  addKey("DownArrow", Down_Key, 0x11, 8);
+  addKey("Enter", Select_Key, 0x0E, 8);
+  addKey("OSD", Info_Key, 0x48, 8);
+  addKey("Step", StepForward_Key, 0x49, 8);
+  addKey("3D(*)", Unmapped_Key, 0x4A, 8);
+  addKey("Vol+", VolumeUp_Key, 0x4B, 8);
+  addKey("Vol-", VolumeDown_Key, 0x4F, 8);
+  addKey("View", Unmapped_Key, 0x4C, 8);
+  addKey("Slow", Slow_Key, 0x4D, 8);
+  addKey("Mute", Mute_Key, 0x4E, 8);
+  addKey("N/P", Unmapped_Key, 0x50, 8);
+  addKey("RAN", Unmapped_Key, 0x51, 8);
+  addKey("R/L", Unmapped_Key, 0x52, 8);
+  addKey("Prog", Program_Key, 0x53, 8);
+}
+
+
+DSESat1::DSESat1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Sat Keyset 1",
+      DSE_Make,
+      index)
+{
+}
+
+
+void DSESat1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
+
+  setPreData(0x00, 8);
+
+  addKey("Ch_Up", ChannelUp_Key, 0x00, 8);
+  addKey("Ch_Up", Up_Key, 0x00, 8);
+  addKey("Ch_Down", ChannelDown_Key, 0x01, 8);
+  addKey("Ch_Down", Down_Key, 0x01, 8);
+  addKey("Vol+", VolumeUp_Key, 0x02, 8);
+  addKey("Vol+", Right_Key, 0x02, 8);
+  addKey("Vol-", VolumeDown_Key, 0x03, 8);
+  addKey("Vol-", Left_Key, 0x03, 8);
+  addKey("Audio", Audio_Key, 0x04, 8);
+  addKey("Menu", Menu_Key, 0x05, 8);
+  addKey("UHF", Unmapped_Key, 0x06, 8);
+  addKey("Page Up", PageUp_Key, 0x07, 8);
+  addKey("Mute", Mute_Key, 0x08, 8);
+  addKey("Fav", Favorites_Key, 0x09, 8);
+  addKey("Power", Power_Key, 0x0A, 8);
+  addKey("Blue/System", Blue_Key, 0x0B, 8); 
+  addKey("TV/R", Input_Key, 0x0C, 8);
+  addKey("Yellow/F2", Yellow_Key, 0x0E, 8);
+  addKey("Pause", Pause_Key, 0x0F, 8);
+
+  addKey("0", Zero_Key, 0x10, 8);
+  addKey("1", One_Key, 0x11, 8);
+  addKey("2", Two_Key, 0x12, 8);
+  addKey("3", Three_Key, 0x13, 8);
+  addKey("4", Four_Key, 0x14, 8);
+  addKey("5", Five_Key, 0x15, 8);
+  addKey("6", Six_Key, 0x16, 8);
+  addKey("7", Seven_Key, 0x17, 8);
+  addKey("8", Eight_Key, 0x18, 8);
+  addKey("9", Nine_Key, 0x19, 8);
+  addKey("Info", Info_Key, 0x1A, 8);
+  addKey("EPG", Guide_Key, 0x1B, 8);
+  addKey("Exit", Exit_Key, 0x1C, 8);
+  addKey("Page Down", PageDown_Key, 0x1D, 8);
+  addKey("Green/F3", Green_Key, 0x1E, 8);
+  addKey("OK", Select_Key, 0x1F, 8);
+
+  addKey("Red/F1", Red_Key, 0x40, 8);
+}
diff --git a/keysets/dse.h b/keysets/dse.h
new file mode 100644 (file)
index 0000000..3fbf4e6
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef DSE_H
+#define DSE_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class DSEDVD1: public PIRKeysetMetaData
+{
+public:
+  DSEDVD1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class DSESat1: public PIRKeysetMetaData
+{
+public:
+  DSESat1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // DSE_H
diff --git a/keysets/dynex.cpp b/keysets/dynex.cpp
new file mode 100644 (file)
index 0000000..02d6e57
--- /dev/null
@@ -0,0 +1,72 @@
+#include "dynex.h"
+#include "protocols/necprotocol.h"
+
+
+DynexTV1::DynexTV1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 1",
+      Dynex_Make,
+      index)
+{
+}
+
+
+void DynexTV1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, false);
+
+  setPreData(0x0586, 16);
+
+  addKey("1", One_Key, 0x00, 8);
+  addKey("2", Two_Key, 0x01, 8);
+  addKey("3", Three_Key, 0x02, 8);
+  addKey("4", Four_Key, 0x03, 8);
+  addKey("5", Five_Key, 0x04, 8);
+  addKey("6", Six_Key, 0x05, 8);
+  addKey("7", Seven_Key, 0x06, 8);
+  addKey("8", Eight_Key, 0x07, 8);
+  addKey("9", Nine_Key, 0x08, 8);
+  addKey("0", Zero_Key, 0x09, 8);
+  addKey("CHUp", ChannelUp_Key, 0x0A, 8);
+  addKey("CHDown", ChannelDown_Key, 0x0B, 8);
+  addKey("VolUp", VolumeUp_Key, 0x0C, 8);
+  addKey("VolDown", VolumeDown_Key, 0x0D, 8);
+  addKey("Mute", Mute_Key, 0x0E, 8);
+  addKey("Power", Power_Key, 0x0F, 8);
+
+  addKey("recall", PrevChannel_Key, 0x10, 8);
+  addKey("mts/sap", Audio_Key, 0x11, 8);
+  addKey("Sleep", Sleep_Key, 0x13, 8);
+  addKey("Menu", Menu_Key, 0x14, 8);
+  addKey("right arrow", Right_Key, 0x15, 8);
+  addKey("left arrow", Left_Key, 0x16, 8);
+  addKey("info/display", Info_Key, 0x17, 8);
+  addKey("Enter", Select_Key, 0x18, 8);
+  addKey("Reset", Reset_Key, 0x19, 8);
+  addKey("exit", Exit_Key, 0x1B, 8);
+  addKey("ccd", Captions_Key, 0x1C, 8);
+  addKey("input", Input_Key, 0x1D, 8);
+
+  addKey("dot(.)", Dash_Key, 0x41, 8);
+  addKey("up arrow", Up_Key, 0x42, 8);
+  addKey("down arrow", Down_Key, 0x43, 8);
+  addKey("zoom", Zoom_Key, 0x44, 8);
+  addKey("guide", Guide_Key, 0x45, 8);
+  addKey("audio", SoundMode_Key, 0x48, 8);
+  addKey("picture", PictureMode_Key, 0x49, 8);
+  addKey("favorite", Favorites_Key, 0x4B, 8);
+  addKey("comp", PCInput_Key, 0x4D, 8);
+  addKey("hdmi", HDMIInput_Key, 0x50, 8);
+  addKey("video", AuxInput_Key, 0x4C, 8);
+  addKey("tv", AntennaInput_Key, 0x4F, 8);
+
+  addKey("ch-list", Unmapped_Key, 0x86, 8);
+}
diff --git a/keysets/dynex.h b/keysets/dynex.h
new file mode 100644 (file)
index 0000000..bb79760
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef DYNEX_H
+#define DYNEX_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class DynexTV1: public PIRKeysetMetaData
+{
+public:
+  DynexTV1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // DYNEX_H
index be14584..5be9212 100644 (file)
@@ -1,5 +1,6 @@
 #include "foxtel.h"
 #include "protocols/necprotocol.h"
+#include "protocols/nokia32protocol.h"
 
 
 FoxtelSTB1::FoxtelSTB1(
@@ -59,3 +60,76 @@ void FoxtelSTB1::populateProtocol(
   addKey("Unknown4", Unmapped_Key, 0x1E, 8);
   addKey("Prog-", ChannelDown_Key, 0x1F, 8);
 }
+
+
+FoxtelSTB2::FoxtelSTB2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "STB Keyset 2",
+      Foxtel_Make,
+      index)
+{
+}
+
+
+void FoxtelSTB2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new Nokia32Protocol(guiObject, index);
+
+  setPreData(0x21A0, 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("display/info", Info_Key, 0x0F, 8);
+  addKey("exit", Info_Key, 0x0F, 8);
+
+  addKey("vol up", VolumeUp_Key, 0x10, 8);
+  addKey("vol down", VolumeDown_Key, 0x11, 8);
+  addKey("channel up", ChannelUp_Key, 0x20, 8);
+  addKey("channel down", ChannelDown_Key, 0x21, 8);
+  addKey("fast fwd", FastForward_Key, 0x28, 8);
+  addKey("rewind", Rewind_Key, 0x29, 8);
+  addKey("play", Play_Key, 0x2C, 8);
+
+  addKey("pause", Pause_Key, 0x30, 8);
+  addKey("stop", Stop_Key, 0x31, 8);
+  addKey("record", Record_Key, 0x37, 8);
+  addKey("tv/vcr", Input_Key, 0x38, 8);
+
+  addKey("Setup", Unmapped_Key, 0x54, 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("red", Red_Key, 0x6D, 8);
+  addKey("green", Green_Key, 0x6E, 8);
+  addKey("yellow", Yellow_Key, 0x6F, 8);
+  addKey("blue", Blue_Key, 0x70, 8);
+  addKey("help", Unmapped_Key, 0x81, 8);
+  addKey("last/prev ch", PrevChannel_Key, 0x83, 8);
+  addKey("Foxtel", Unmapped_Key, 0x8E, 8);
+  addKey("program/guide", Guide_Key, 0xCC, 8);
+  addKey("BoxOffice", Unmapped_Key, 0xD5, 8);
+  addKey("Planner", Unmapped_Key, 0xF4, 8);
+  addKey("Active", Menu_Key, 0xFD, 8);
+}
index 24c2d59..ea9a4d9 100644 (file)
@@ -15,4 +15,14 @@ public:
     QObject *guiObject);
 };
 
+class FoxtelSTB2: public PIRKeysetMetaData
+{
+public:
+  FoxtelSTB2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
 #endif // FOXTEL_H
diff --git a/keysets/harmankardon.cpp b/keysets/harmankardon.cpp
new file mode 100644 (file)
index 0000000..8ba3adb
--- /dev/null
@@ -0,0 +1,472 @@
+#include "harmankardon.h"
+#include "protocols/necprotocol.h"
+
+
+HarmanKardonAmp1::HarmanKardonAmp1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Amp/Receiver Component 1",
+      HarmanKardon_Make,
+      index)
+{
+}
+
+
+void HarmanKardonAmp1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x7080, 16);
+
+  addKey("CD_STOP", Stop_Key, 0x01, 8);
+  addKey("CD_PLAY", Play_Key, 0x02, 8);
+  addKey("CD_PAUSE", Pause_Key, 0x03, 8);
+  addKey("CD_NEXT", Next_Key, 0x04, 8);
+  addKey("CD_PREV", Previous_Key, 0x05, 8);
+  addKey("CD_FWD", FastForward_Key, 0x06, 8);
+  addKey("CD_BKW", Rewind_Key, 0x07, 8);
+  addKey("CD_AB", RepeatAB_Key, 0x0B, 8);
+  addKey("CD_INTRO", Unmapped_Key, 0x0D, 8);
+
+  addKey("CD_DISC", NextDisc_Key, 0x50, 8);
+
+  addKey("FM", TunerBand_Key, 0x81, 8); // "am/fm"
+  addKey("AM", Unmapped_Key, 0x82, 8);
+  addKey("TUNEUP", ChannelUp_Key, 0x84, 8);
+  addKey("TUNEDN", ChannelDown_Key, 0x85, 8);
+  addKey("mem", Memory_Key, 0x86, 8);
+  addKey("1", One_Key, 0x87, 8);
+  addKey("2", Two_Key, 0x88, 8);
+  addKey("3", Three_Key, 0x89, 8);
+  addKey("4", Four_Key, 0x8A, 8);
+  addKey("5", Five_Key, 0x8B, 8);
+  addKey("6", Six_Key, 0x8C, 8);
+  addKey("7", Seven_Key, 0x8D, 8);
+  addKey("8", Eight_Key, 0x8E, 8);
+  addKey("shift", Unmapped_Key, 0x8F, 8);
+
+  addKey("seek-st", Unmapped_Key, 0x91, 8);
+  addKey("tun-m", Unmapped_Key, 0x93, 8);
+  addKey("PSCAN", Scan_Key, 0x96, 8);
+  addKey("direct", Unmapped_Key, 0x9B, 8);
+  addKey("9", Nine_Key, 0x9D, 8);
+  addKey("0", Zero_Key, 0x9E, 8);
+  addKey("pow_off", PowerOff_Key, 0x9F, 8);
+
+  addKey("STANDBY", Power_Key, 0xC0, 8); // "pow_on"
+  addKey("MUTE", Mute_Key, 0xC1, 8);
+  addKey("Phono", PhonoInput_Key, 0xC2, 8);
+  addKey("TUNER", TunerInput_Key, 0xC3, 8);
+  addKey("CD", CDInput_Key, 0xC4, 8);
+  addKey("video", Unmapped_Key, 0xC6, 8);
+  addKey("VOLUP", VolumeUp_Key, 0xC7, 8);
+  addKey("VOLDN", VolumeDown_Key, 0xC8, 8);
+  addKey("VCR1", VCRInput_Key, 0xCA, 8);
+  addKey("VCR2", Unmapped_Key, 0xCB, 8);
+  addKey("source_tape", TapeInput_Key, 0xCC, 8);
+  addKey("TAPEMON", Unmapped_Key, 0xCD, 8); // "Tape2"
+  addKey("TVAUX", AuxInput_Key, 0xCE, 8);
+
+  addKey("source_dvd", DVDInput_Key, 0xD0, 8);
+  addKey("source_vid4", Unmapped_Key, 0xD1, 8);
+  addKey("aux2", Unmapped_Key, 0xD5, 8);
+  addKey("S_REARUP", RearVolumeUp_Key, 0xD7, 8);
+  addKey("S_REARDN", RearVolumeDown_Key, 0xD8, 8);
+  addKey("S_CNTUP", CenterVolumeUp_Key, 0xD9, 8);
+  addKey("S_CNTDN", CenterVolumeDown_Key, 0xDA, 8);
+  addKey("SLEEP", Sleep_Key, 0xDB, 8);
+  addKey("DISPLAY", Info_Key, 0xDC, 8);
+}
+
+
+HarmanKardonAmp2::HarmanKardonAmp2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Amp Component 2",
+      HarmanKardon_Make,
+      index)
+{
+}
+
+
+void HarmanKardonAmp2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x7686, 16);
+
+  addKey("on", PowerOn_Key, 0x40, 8);
+  addKey("off", PowerOff_Key, 0x41, 8);
+  addKey("speaker1", Unmapped_Key, 0x42, 8);
+  addKey("speaker2", Unmapped_Key, 0x43, 8);
+  addKey("phono", PhonoInput_Key, 0x44, 8);
+  addKey("cd", CDInput_Key, 0x48, 8);
+  addKey("vid1", Unmapped_Key, 0x4B, 8);
+  addKey("vid2", Unmapped_Key, 0x4C, 8);
+  addKey("vid3", Unmapped_Key, 0x4D, 8);
+  addKey("fm", Unmapped_Key, 0x46, 8);
+  addKey("am", Unmapped_Key, 0x45, 8);
+  addKey("tapemon", Unmapped_Key, 0x4A, 8);
+  addKey("vol+", VolumeUp_Key, 0x54, 8);
+  addKey("vol-", VolumeDown_Key, 0x53, 8);
+  addKey("mute", Mute_Key, 0x5A, 8);
+  addKey("dimmer", Unmapped_Key, 0x5C, 8);
+  addKey("sleep", Sleep_Key, 0x5B, 8);
+}
+
+
+HarmanKardonReceiver2::HarmanKardonReceiver2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Receiver Component 2",
+      HarmanKardon_Make,
+      index)
+{
+}
+
+
+void HarmanKardonReceiver2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x7080, 16);
+
+  addKey("fm_mode", FMMode_Key, 0x3C, 8);
+  addKey("auto_preset", Unmapped_Key, 0x61, 8);
+  addKey("1", One_Key, 0x31, 8);
+  addKey("2", Two_Key, 0x32, 8);
+  addKey("3", Three_Key, 0x33, 8);
+  addKey("4", Four_Key, 0x34, 8);
+  addKey("5", Five_Key, 0x35, 8);
+  addKey("6", Six_Key, 0x36, 8);
+  addKey("7", Seven_Key, 0x37, 8);
+  addKey("8", Eight_Key, 0x38, 8);
+  addKey("9", Nine_Key, 0x39, 8);
+  addKey("direct", Unmapped_Key, 0x6A, 8);
+  addKey("0", Zero_Key, 0x30, 8);
+  addKey("clear", Clear_Key, 0x2F, 8);
+  addKey("memory", Memory_Key, 0x2E, 8);
+  addKey("up", Up_Key, 0x28, 8);
+  addKey("left", Left_Key, 0x3F, 8);
+  addKey("ok", Select_Key, 0x6D, 8);
+  addKey("right", Right_Key, 0x3E, 8);
+  addKey("down", Down_Key, 0x29, 8);
+  addKey("preset_scan", Scan_Key, 0x2D, 8);
+  addKey("tune_up", ChannelUp_Key, 0x76, 8);
+  addKey("tune_down", ChannelDown_Key, 0x77, 8);
+  addKey("prev", Previous_Key, 0x25, 8);
+  addKey("pause", Pause_Key, 0x23, 8);
+  addKey("next", Next_Key, 0x24, 8);
+  addKey("rev", Rewind_Key, 0x27, 8);
+  addKey("play", Play_Key, 0x22, 8);
+  addKey("ffw", FastForward_Key, 0x26, 8);
+  addKey("rec", Record_Key, 0x60, 8);
+  addKey("stop", Stop_Key, 0x21, 8);
+}
+
+
+HarmanKardonTape1::HarmanKardonTape1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Tape Component 1",
+      HarmanKardon_Make,
+      index)
+{
+}
+
+
+void HarmanKardonTape1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated:
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x7282, 16);
+
+  addKey("C_NEXT", Next_Key, 0x01, 8);
+  addKey("C_PREV", Previous_Key, 0x02, 8);
+  addKey("C_STOP", Stop_Key, 0x03, 8);
+  addKey("C_FWD", FastForward_Key, 0x04, 8);
+  addKey("C_BKW", Rewind_Key, 0x05, 8);
+//  addKey("C_REC", Record_Key, 0x06, 8);
+  addKey("CassDeckPause", Pause_Key, 0x06, 8);
+
+  addKey("C_SELECT", Select_Key, 0x1D, 8);
+
+  addKey("dolby", NoiseReduction_Key, 0x50, 8);
+  addKey("delay", Unmapped_Key, 0x52, 8);
+  addKey("spkr", Unmapped_Key, 0x53, 8);
+  addKey("digital", Unmapped_Key, 0x54, 8);
+  addKey("surr", Surround_Key, 0x58, 8);
+  addKey("osd", Info_Key, 0x5C, 8);
+  addKey("ch", Unmapped_Key, 0x5D, 8);
+
+  addKey("set", Select_Key, 0x84, 8);
+  addKey("S_OFF", Unmapped_Key, 0x89, 8);
+//  addKey("S_DELAY", Unmapped_Key, 0x8A, 8);
+  addKey("^", Up_Key, 0x8A, 8);
+  addKey("v", Down_Key, 0x8B, 8);
+  addKey("S_TEST", Unmapped_Key, 0x8C, 8);
+  addKey("S_CNTMODE", Unmapped_Key, 0x8D, 8);
+  addKey("Theater", Unmapped_Key, 0x92, 8);
+  addKey("Stadium", Unmapped_Key, 0x94, 8);
+  addKey("night", Unmapped_Key, 0x96, 8);
+  addKey("stereo", Unmapped_Key, 0x9B, 8);
+  addKey("S_3STEREO", Unmapped_Key, 0x9D, 8);
+  addKey("S_PROLOGIC", Unmapped_Key, 0x9F, 8);
+
+  addKey("dts_surr", Unmapped_Key, 0xA0, 8);
+  addKey("dts_neo:6", Unmapped_Key, 0xA1, 8);
+  addKey("<", Left_Key, 0xC1, 8);
+  addKey(">", Right_Key, 0xC2, 8);
+  addKey("preset+", ChannelUp_Key, 0xD0, 8);
+  addKey("preset-", ChannelDown_Key, 0xD1, 8);
+  addKey("clear", Clear_Key, 0xD9, 8);
+  addKey("logic_7", Unmapped_Key, 0xDA, 8);
+  addKey("source_6/8ch", Unmapped_Key, 0xDB, 8);
+  addKey("d.skip", NextDisc_Key, 0xDD, 8);
+  addKey("mroom", Unmapped_Key, 0xDF, 8);
+}
+
+
+HarmanKardonDVD1::HarmanKardonDVD1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "DVD Keyset 1",
+      HarmanKardon_Make,
+      index)
+{
+}
+
+
+void HarmanKardonDVD1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x7282, 16);
+
+  addKey("Open/Close", Eject_Key, 0x20, 8);
+  addKey("ON", PowerOn_Key, 0x21, 8);
+  addKey("OFF", PowerOff_Key, 0x22, 8);
+  addKey("Title", DiscTitle_Key, 0x23, 8);
+  addKey("Menu", DiscMenu_Key, 0x24, 8);
+  addKey("Return", Exit_Key, 0x25, 8);
+  addKey("Up", Up_Key, 0x26, 8);
+  addKey("Down", Down_Key, 0x27, 8);
+  addKey("Left", Left_Key, 0x28, 8);
+  addKey("Right", Right_Key, 0x29, 8);
+  addKey("Enter", Select_Key, 0x2A, 8);
+  addKey("Play", Play_Key, 0x2B, 8);
+  addKey("Pause", Pause_Key, 0x2C, 8);
+  addKey("Stop", Stop_Key, 0x2D, 8);
+  addKey("SearchBack", Rewind_Key, 0x2E, 8);
+  addKey("SearchForward", FastForward_Key, 0x2F, 8);
+
+  addKey("Prev.", Previous_Key, 0x30, 8);
+  addKey("Next", Next_Key, 0x31, 8);
+  addKey("Subtitle", Unmapped_Key, 0x33, 8);
+  addKey("SubtitleON/OFF", Captions_Key, 0x34, 8);
+  addKey("Audio", Audio_Key, 0x35, 8);
+  addKey("Angle", Angle_Key, 0x36, 8);
+  addKey("Status", Info_Key, 0x39, 8);
+  addKey("SlowBack", SlowMinus_Key, 0x3A, 8);
+  addKey("SlowForward", SlowPlus_Key, 0x3B, 8);
+  addKey("StepBack", StepBack_Key, 0x3C, 8);
+  addKey("StepForward", StepForward_Key, 0x3D, 8);
+  addKey("Zoom", Zoom_Key, 0x3E, 8);
+
+  addKey("0", Zero_Key, 0x60, 8);
+  addKey("1", One_Key, 0x61, 8);
+  addKey("2", Two_Key, 0x62, 8);
+  addKey("3", Three_Key, 0x63, 8);
+  addKey("4", Four_Key, 0x64, 8);
+  addKey("5", Five_Key, 0x65, 8);
+  addKey("6", Six_Key, 0x66, 8);
+  addKey("7", Seven_Key, 0x67, 8);
+  addKey("8", Eight_Key, 0x68, 8);
+  addKey("9", Nine_Key, 0x69, 8);
+  addKey("Prog.", Program_Key, 0x6A, 8);
+  addKey("Check", Unmapped_Key, 0x6B, 8);
+  addKey("Clear", Clear_Key, 0x6C, 8);
+  addKey("Random", Random_Key, 0x6D, 8);
+  addKey("Repeat", Repeat_Key, 0x6E, 8);
+  addKey("A-B", RepeatAB_Key, 0x6F, 8);
+
+  addKey("Playlist", Unmapped_Key, 0xB0, 8);
+}
+
+
+HarmanKardonDVD1a::HarmanKardonDVD1a(
+  unsigned int index)
+  : HarmanKardonDVD1(index)
+{
+  setKeysetName("DVD Keyset 1a");
+}
+
+
+void HarmanKardonDVD1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  HarmanKardonDVD1::populateProtocol(guiObject);
+
+  addKey("OSD", Unmapped_Key, 0x24, 8);
+  addKey("Subtitle", Captions_Key, 0x33, 8);
+  addKey("Disc/Menu", DiscMenu_Key, 0x4C, 8);
+  addKey("Info", Info_Key, 0x4D, 8);
+  addKey("V.Off", Unmapped_Key, 0x4E, 8);
+  addKey("Display", Unmapped_Key, 0xB3, 8);
+  addKey("Pic+", Unmapped_Key, 0xB4, 8);
+  addKey("Pic-", Unmapped_Key, 0xB5, 8);
+}
+
+
+HarmanKardonCD1::HarmanKardonCD1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "CD Keyset 1",
+      HarmanKardon_Make,
+      index)
+{
+}
+
+
+void HarmanKardonCD1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x4A83, 16);
+
+  addKey("1", One_Key, 0x1C, 8);
+  addKey("2", Two_Key, 0x1D, 8);
+  addKey("3", Three_Key, 0x1E, 8);
+  addKey("4", Four_Key, 0x1F, 8);
+  addKey("5", Five_Key, 0x18, 8);
+  addKey("6", Six_Key, 0x19, 8);
+  addKey("7", Seven_Key, 0x1A, 8);
+  addKey("8", Eight_Key, 0x1B, 8);
+  addKey("9", Nine_Key, 0x14, 8);
+  addKey("0", Zero_Key, 0x15, 8);
+  addKey("intro", Unmapped_Key, 0x10, 8);
+  addKey("prog/rev", Program_Key, 0x16, 8);
+  addKey("tape_size", Unmapped_Key, 0x17, 8);
+  addKey("edit", Unmapped_Key, 0x0E, 8);
+  addKey("repeat_1/all", Repeat_Key, 0x0C, 8);
+  addKey("repeat_a/b", RepeatAB_Key, 0x0D, 8);
+  addKey("random", Random_Key, 0x11, 8);
+  addKey("delete", Unmapped_Key, 0x0A, 8);
+  addKey("display", Info_Key, 0x12, 8);
+  addKey("time", Unmapped_Key, 0x0F, 8);
+  addKey("skip_backward", Previous_Key, 0x04, 8);
+  addKey("skip_forward", Next_Key, 0x05, 8);
+  addKey("pause", Pause_Key, 0x07, 8);
+  addKey("stop", Stop_Key, 0x0B, 8);
+  addKey("fast_backward", Rewind_Key, 0x00, 8);
+  addKey("fast_forward", FastForward_Key, 0x01, 8);
+  addKey("play", Play_Key, 0x03, 8);
+}
+
+
+HarmanKardonCD2::HarmanKardonCD2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "CD Keyset 2",
+      HarmanKardon_Make,
+      index)
+{
+}
+
+
+void HarmanKardonCD2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x7080, 16);
+
+  addKey("stop", Stop_Key, 0x01, 8);
+  addKey("play", Play_Key, 0x02, 8);
+  addKey("pause", Pause_Key, 0x03, 8);
+  addKey("skipnext", Next_Key, 0x04, 8);
+  addKey("skipprev", Previous_Key, 0x05, 8);
+  addKey("searchnext", FastForward_Key, 0x06, 8);
+  addKey("searchprev", Rewind_Key, 0x07, 8);
+  addKey("repeat", Repeat_Key, 0x0A, 8);
+  addKey("ab", RepeatAB_Key, 0x0B, 8);
+  addKey("intro", Unmapped_Key, 0x0D, 8);
+  addKey("program", Program_Key, 0x0E, 8);
+  addKey("clear", Clear_Key, 0x0F, 8);
+
+  addKey("1", One_Key, 0x11, 8);
+  addKey("2", Two_Key, 0x12, 8);
+  addKey("3", Three_Key, 0x13, 8);
+  addKey("4", Four_Key, 0x14, 8);
+  addKey("5", Five_Key, 0x15, 8);
+  addKey("6", Six_Key, 0x16, 8);
+  addKey("7", Seven_Key, 0x17, 8);
+  addKey("8", Eight_Key, 0x18, 8);
+  addKey("9", Nine_Key, 0x19, 8);
+  addKey("check", Unmapped_Key, 0x1B, 8);
+  addKey("time", Unmapped_Key, 0x1C, 8);
+  addKey("display", Info_Key, 0x1D, 8);
+
+  addKey("0", Zero_Key, 0x40, 8);
+  addKey("edit", Unmapped_Key, 0x4C, 8);
+  addKey("random", Random_Key, 0x4D, 8);
+
+  addKey("CD_DISC", NextDisc_Key, 0x50, 8);
+  addKey("on", PowerOn_Key, 0x56, 8);
+  addKey("off", PowerOff_Key, 0x57, 8);
+  addKey("tapesize", Unmapped_Key, 0x5C, 8);
+}
diff --git a/keysets/harmankardon.h b/keysets/harmankardon.h
new file mode 100644 (file)
index 0000000..032a5f3
--- /dev/null
@@ -0,0 +1,88 @@
+#ifndef HARMANKARDON_H
+#define HARMANKARDON_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class HarmanKardonAmp1: public PIRKeysetMetaData
+{
+public:
+  HarmanKardonAmp1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class HarmanKardonAmp2: public PIRKeysetMetaData
+{
+public:
+  HarmanKardonAmp2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class HarmanKardonReceiver2: public PIRKeysetMetaData
+{
+public:
+  HarmanKardonReceiver2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class HarmanKardonTape1: public PIRKeysetMetaData
+{
+public:
+  HarmanKardonTape1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class HarmanKardonDVD1: public PIRKeysetMetaData
+{
+public:
+  HarmanKardonDVD1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class HarmanKardonDVD1a: public HarmanKardonDVD1
+{
+public:
+  HarmanKardonDVD1a(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class HarmanKardonCD1: public PIRKeysetMetaData
+{
+public:
+  HarmanKardonCD1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class HarmanKardonCD2: public PIRKeysetMetaData
+{
+public:
+  HarmanKardonCD2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // HARMANKARDON_H
diff --git a/keysets/kathrein.cpp b/keysets/kathrein.cpp
new file mode 100644 (file)
index 0000000..5806178
--- /dev/null
@@ -0,0 +1,195 @@
+#include "kathrein.h"
+#include "protocols/kathreinprotocol.h"
+#include "protocols/nokia32protocol.h"
+#include "protocols/mceprotocol.h"
+
+
+KathreinSat1::KathreinSat1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Sat Keyset 1",
+      Kathrein_Make,
+      index)
+{
+}
+
+
+void KathreinSat1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new KathreinProtocol(guiObject, index);
+
+  setPreData(0x0, 4);
+
+  addKey("ab", Unmapped_Key, 0x23, 8);
+  addKey("f", Unmapped_Key, 0x9B, 8);
+  addKey("off", PowerOff_Key, 0x25, 8);
+  addKey("l", Unmapped_Key, 0x57, 8);
+  addKey("mid", Unmapped_Key, 0x59, 8);
+  addKey("i", Unmapped_Key, 0x19, 8);
+  addKey("clock", Unmapped_Key, 0x21, 8);
+  addKey("tv", Input_Key, 0x1F, 8);
+  addKey("up", Up_Key, 0x2F, 8);
+  addKey("dwn", Down_Key, 0x31, 8);
+  addKey("ok", Select_Key, 0x1D, 8);
+  addKey("vol-", VolumeDown_Key, 0x2D, 8);
+  addKey("vol+", VolumeUp_Key, 0x2B, 8);
+  addKey("mute", Mute_Key, 0x27, 8);
+  addKey("stero", Audio_Key, 0x85, 8);
+  addKey("r", Unmapped_Key, 0x1B, 8);
+  addKey("0", Zero_Key, 0x01, 8);
+  addKey("1", One_Key, 0x03, 8);
+  addKey("2", Two_Key, 0x05, 8);
+  addKey("3", Three_Key, 0x07, 8);
+  addKey("4", Four_Key, 0x09, 8);
+  addKey("5", Five_Key, 0x0B, 8);
+  addKey("6", Six_Key, 0x0D, 8);
+  addKey("7", Seven_Key, 0x0F, 8);
+  addKey("8", Eight_Key, 0x11, 8);
+  addKey("9", Nine_Key, 0x13, 8);
+}
+
+
+KathreinSat2::KathreinSat2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Sat Keyset 2",
+      Kathrein_Make,
+      index)
+{
+}
+
+
+void KathreinSat2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated
+    return;
+  }
+
+  threadableProtocol = new Nokia32Protocol(guiObject, index);
+
+  setPreData(0x2290, 16);
+  setPostData(0x00, 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("+10{-/--}", DoubleDigit_Key, 0x0F, 8);
+
+  addKey("vol+", VolumeUp_Key, 0x10, 8);
+  addKey("vol-", VolumeDown_Key, 0x11, 8);
+  addKey("ch+", ChannelUp_Key, 0x1E, 8);
+  addKey("ch-", ChannelDown_Key, 0x1F, 8);
+
+  addKey("FFWD", FastForward_Key, 0x20, 8);
+  addKey("REW", Rewind_Key, 0x21, 8);
+  addKey("pause", Pause_Key, 0x31, 8);
+  addKey("B/STOP", Stop_Key, 0x31, 8);
+  addKey("A", Record_Key, 0x37, 8); // "Record"
+  addKey("PLAY", Play_Key, 0x38, 8);
+  addKey("PAUSE", Pause_Key, 0x39, 8);
+  addKey("rewind", Teletext_Key, 0x3C, 8); // "Teletext"
+
+  addKey("C", Menu_Key, 0x54, 8); // "Menu"
+  addKey("exit", Exit_Key, 0x55, 8);
+  addKey("up", Up_Key, 0x58, 8);
+  addKey("down", Down_Key, 0x59, 8);
+  addKey("left", Left_Key, 0x5A, 8);
+  addKey("right", Right_Key, 0x5B, 8);
+  addKey("select", Select_Key, 0x5C, 8);
+
+  addKey("ffwd", Red_Key, 0x6D, 8); // "Red"
+  addKey("stop", Green_Key, 0x6E, 8); // "Green"
+  addKey("record", Yellow_Key, 0x6F, 8); // "Yellow"
+  addKey("auto", Blue_Key, 0x70, 8); // "Blue"
+
+  addKey("menu", Guide_Key, 0xCC, 8); // "Guide"
+}
+
+
+KathreinSat3::KathreinSat3(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Sat Keyset 3",
+      Kathrein_Make,
+      index)
+{
+}
+
+
+void KathreinSat3::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new MCEProtocol(guiObject, index, 0x8046);
+
+  setPreData(0x00, 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("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, 0x1E, 8);
+  addKey("CH-", ChannelDown_Key, 0x1F, 8);
+
+  addKey("ffwd", FastForward_Key, 0x20, 8);
+  addKey("rewind", Rewind_Key, 0x21, 8);
+  addKey("Stop", Stop_Key, 0x31, 8);
+  addKey("Record", Record_Key, 0x37, 8);
+  addKey("Play", Play_Key, 0x38, 8);
+  addKey("Pause", Pause_Key, 0x39, 8);
+  addKey("Teletext", Teletext_Key, 0x3C, 8);
+  addKey("Archive", Unmapped_Key, 0x46, 8);
+
+  addKey("Menu", Menu_Key, 0x54, 8);
+  addKey("Last_ch", PrevChannel_Key, 0x55, 8);
+  addKey("Exit", Exit_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("Red", Red_Key, 0x6D, 8);
+  addKey("Green", Green_Key, 0x6E, 8);
+  addKey("Yellow", Yellow_Key, 0x6F, 8);
+  addKey("Blue", Blue_Key, 0x70, 8);
+  addKey("Help", Unmapped_Key, 0x81, 8);
+  addKey("Guide", Guide_Key, 0xCC, 8);
+  addKey("Media", Unmapped_Key, 0xD5, 8);
+}
diff --git a/keysets/kathrein.h b/keysets/kathrein.h
new file mode 100644 (file)
index 0000000..8f14979
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef KATHREIN_H
+#define KATHREIN_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class KathreinSat1: public PIRKeysetMetaData
+{
+public:
+  KathreinSat1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class KathreinSat2: public PIRKeysetMetaData
+{
+public:
+  KathreinSat2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class KathreinSat3: public PIRKeysetMetaData
+{
+public:
+  KathreinSat3(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // KATHREIN_H
index ea36139..60df8d3 100644 (file)
@@ -692,9 +692,9 @@ void LGAC1::populateProtocol(
   setPreData(0x6681, 16);
 
   addKey("power", Power_Key, 0x81, 8);
-  addKey("temp up", Red_Key, 0x85, 8);
-  addKey("temp down", Blue_Key, 0x8A, 8);
-  addKey("timer", Sleep_Key, 0x90, 8);
-  addKey("fan speed", SoundMode_Key, 0x99, 8);
-  addKey("mode", PictureMode_Key, 0x9B, 8);
+  addKey("temp up", TempUp_Key, 0x85, 8);
+  addKey("temp down", TempDown_Key, 0x8A, 8);
+  addKey("timer", Timer_Key, 0x90, 8);
+  addKey("fan speed", FanFaster_Key, 0x99, 8);
+  addKey("mode", Mode_Key, 0x9B, 8);
 }
index e03f25b..5c7792a 100644 (file)
@@ -44,3 +44,79 @@ void LogitechSpeakers::populateProtocol(
   addKey("settings", Blue_Key, 0x1F, 8);
   addKey("vol+", VolumeUp_Key, 0x1A, 8);
 }
+
+
+LogitechSqueezebox::LogitechSqueezebox(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Squeezebox Keyset",
+      Logitech_Make,
+      index)
+{
+}
+
+
+void LogitechSqueezebox::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
+
+  setPreData(0x6E, 8);
+
+  addKey("Add", Unmapped_Key, 0x06, 8);
+  addKey("Brightness", Unmapped_Key, 0x20, 8);
+  addKey("Browse", Unmapped_Key, 0x0E, 8);
+  addKey("BrowseAlbum", Unmapped_Key, 0x3E, 8);
+  addKey("BrowseArtist", Unmapped_Key, 0x2E, 8);
+  addKey("BrowseMusic", Unmapped_Key, 0x4E, 8);
+  addKey("BrowsePlayList", Unmapped_Key, 0x5E, 8);
+  addKey("DirectionDown", Down_Key, 0x0D, 8);
+  addKey("DirectionLeft", Left_Key, 0x09, 8);
+  addKey("DirectionRight", Right_Key, 0x0B, 8);
+  addKey("DirectionUp", Up_Key, 0x07, 8);
+  addKey("FastForward", FastForward_Key, 0x05, 8);
+  addKey("Favorite", Favorites_Key, 0x18, 8);
+  addKey("Home", Menu_Key, 0x44, 8);
+  addKey("Mute", Mute_Key, 0x23, 8);
+  addKey("NextTrack", Next_Key, 0x05, 8);
+  addKey("NowPlaying", Info_Key, 0x1E, 8);
+  addKey("Pause", Pause_Key, 0x04, 8);
+  addKey("Play", Play_Key, 0x08, 8);
+  addKey("PowerOff", PowerOff_Key, 0xE1, 8);
+  addKey("PowerOn", PowerOn_Key, 0xF1, 8);
+  addKey("PowerToggle", Power_Key, 0x02, 8);
+  addKey("Preset1", Unmapped_Key, 0x51, 8);
+  addKey("Preset2", Unmapped_Key, 0x52, 8);
+  addKey("Preset3", Unmapped_Key, 0x53, 8);
+  addKey("Preset4", Unmapped_Key, 0x54, 8);
+  addKey("Preset5", Unmapped_Key, 0x55, 8);
+  addKey("Preset6", Unmapped_Key, 0x56, 8);
+  addKey("PreviousTrack", Previous_Key, 0x03, 8);
+  addKey("Rewind", Rewind_Key, 0x03, 8);
+  addKey("Search", Unmapped_Key, 0x1A, 8);
+  addKey("SearchAlbum", Unmapped_Key, 0x3A, 8);
+  addKey("SearchArtist", Unmapped_Key, 0x2A, 8);
+  addKey("SearchSong", Unmapped_Key, 0x4A, 8);
+  addKey("Select/Ok", Select_Key, 0x08, 8);
+  addKey("Shuffle", Random_Key, 0x1B, 8);
+  addKey("Size", Unmapped_Key, 0x1F, 8);
+  addKey("Sleep", Sleep_Key, 0x1D, 8);
+  addKey("VolumeDown", VolumeDown_Key, 0x00, 8);
+  addKey("VolumeUp", VolumeUp_Key, 0x01, 8);
+  addKey("0", Zero_Key, 0x19, 8);
+  addKey("1", One_Key, 0x0F, 8);
+  addKey("2", Two_Key, 0x10, 8);
+  addKey("3", Three_Key, 0x11, 8);
+  addKey("4", Four_Key, 0x12, 8);
+  addKey("5", Five_Key, 0x13, 8);
+  addKey("6", Six_Key, 0x14, 8);
+  addKey("7", Seven_Key, 0x15, 8);
+  addKey("8", Eight_Key, 0x16, 8);
+  addKey("9", Nine_Key, 0x17, 8);
+}
index f5e010f..ac044dd 100644 (file)
@@ -15,4 +15,14 @@ public:
     QObject *guiObject);
 };
 
+class LogitechSqueezebox: public PIRKeysetMetaData
+{
+public:
+  LogitechSqueezebox(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
 #endif // LOGITECH_H
index b366087..47f9de6 100644 (file)
@@ -847,11 +847,11 @@ void PanasonicAC1::populateProtocol(
   setPreData(0x6681, 16);
 
   addKey("Operation", Power_Key, 0x81, 8);
-  addKey("Air Swing", Yellow_Key, 0x83, 8);
-  addKey("Temp Up", Red_Key, 0x85, 8);
-  addKey("Temp Down", Blue_Key, 0x8A, 8);
-  addKey("Economy", Green_Key, 0x8D, 8);
-  addKey("Timer", Sleep_Key, 0x90, 8);
-  addKey("Fan Speed", SoundMode_Key, 0x99, 8);
-  addKey("Mode", PictureMode_Key, 0x9B, 8);
+  addKey("Air Swing", Oscillate_Key, 0x83, 8);
+  addKey("Temp Up", TempUp_Key, 0x85, 8);
+  addKey("Temp Down", TempDown_Key, 0x8A, 8);
+  addKey("Economy", EnergySave_Key, 0x8D, 8);
+  addKey("Timer", Timer_Key, 0x90, 8);
+  addKey("Fan Speed", FanFaster_Key, 0x99, 8);
+  addKey("Mode", Mode_Key, 0x9B, 8);
 }
index f1ddbb8..50a1621 100644 (file)
@@ -844,7 +844,7 @@ void SamsungDVD2::populateProtocol(
 SamsungAC1::SamsungAC1(
   unsigned int index)
   : PIRKeysetMetaData(
-      "Air Conditioner Keyset 1",
+      "Air Conditioner 1",
       Samsung_Make,
       index)
 {
@@ -878,15 +878,15 @@ void SamsungAC1::populateProtocol(
 
   addKey("TIMER", Timer_Key, 0xA4, 8);
   addKey("SLEEP", Sleep_Key, 0xE4, 8);
-  addKey("TEMP+", VolumeUp_Key, 0x4C, 8);
-  addKey("TEMP-", VolumeDown_Key, 0x8C, 8);
-  addKey("FAN", One_Key, 0x9C, 8);
-  addKey("COOL", Two_Key, 0x3C, 8);
-  addKey("HEAT", Three_Key, 0x5C, 8);
-  addKey("FAN_HIGH", Four_Key, 0xEC, 8);
-  addKey("FAN_MED", Five_Key, 0x6C, 8);
-  addKey("FAN_LOW", Six_Key, 0xAC, 8);
-  addKey("SWING", Seven_Key, 0x94, 8);
+  addKey("TEMP+", TempUp_Key, 0x4C, 8);
+  addKey("TEMP-", TempDown_Key, 0x8C, 8);
+  addKey("FAN", Fan_Key, 0x9C, 8);
+  addKey("COOL", Cool_Key, 0x3C, 8);
+  addKey("HEAT", Heat_Key, 0x5C, 8);
+  addKey("FAN_HIGH", FanFaster_Key, 0xEC, 8);
+  addKey("FAN_MED", Unmapped_Key, 0x6C, 8);
+  addKey("FAN_LOW", FanSlower_Key, 0xAC, 8);
+  addKey("SWING", Oscillate_Key, 0x94, 8);
   addKey("POWER", Power_Key, 0xFC, 8);
 }
 
index cdcd61b..1214b07 100644 (file)
@@ -449,14 +449,14 @@ void SharpAC1::populateProtocol(
 
   setPreData(0xF508, 16);
 
-  addKey("Fan Faster", VolumeUp_Key, 0x01, 8);
-  addKey("Energy Save", Green_Key, 0x02, 8);
-  addKey("Fan Slower", VolumeDown_Key, 0x04, 8);
-  addKey("Timer", Sleep_Key, 0x06, 8);
-  addKey("Fan", Yellow_Key, 0x07, 8);
-  addKey("Cool", Blue_Key, 0x09, 8);
-  addKey("Temp/Timer-", ChannelDown_Key, 0x0D, 8);
-  addKey("Temp/Timer+", ChannelUp_Key, 0x0E, 8);
-  addKey("Auto/Cool", Info_Key, 0x0F, 8);
+  addKey("Fan Faster", FanFaster_Key, 0x01, 8);
+  addKey("Energy Save", EnergySave_Key, 0x02, 8);
+  addKey("Fan Slower", FanSlower_Key, 0x04, 8);
+  addKey("Timer", Timer_Key, 0x06, 8);
+  addKey("Fan", Fan_Key, 0x07, 8);
+  addKey("Cool", Cool_Key, 0x09, 8);
+  addKey("Temp/Timer-", TempDown_Key, 0x0D, 8);
+  addKey("Temp/Timer+", TempUp_Key, 0x0E, 8);
+  addKey("Auto/Cool", Mode_Key, 0x0F, 8);
   addKey("power", Power_Key, 0x11, 8);
 }
index feef80c..132db18 100644 (file)
@@ -933,3 +933,133 @@ void SonyReceiver1::populateProtocol(
   addSIRC15Key("LEFT", Left_Key, 0xB0, 0x7A);
   addSIRC15Key("RIGHT", Right_Key, 0xB0, 0x7B);
 }
+
+
+SonyCD1::SonyCD1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "CD Keyset 1",
+      Sony_Make,
+      index)
+{
+}
+
+
+void SonyCD1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new SIRCProtocol(guiObject, index);
+
+  addSIRC12Key("1", One_Key, 0x11, 0x00);
+  addSIRC12Key("2", Two_Key, 0x11, 0x01);
+  addSIRC12Key("3", Three_Key, 0x11, 0x02);
+  addSIRC12Key("4", Four_Key, 0x11, 0x03);
+  addSIRC12Key("5", Five_Key, 0x11, 0x04);
+  addSIRC12Key("6", Six_Key, 0x11, 0x05);
+  addSIRC12Key("7", Seven_Key, 0x11, 0x06);
+  addSIRC12Key("8", Eight_Key, 0x11, 0x07);
+  addSIRC12Key("9", Nine_Key, 0x11, 0x08);
+  addSIRC12Key("ENTER", Enter_Key, 0x11, 0x0B);
+  addSIRC12Key("check", Unmapped_Key, 0x11, 0x0D);
+  addSIRC12Key("clear", Clear_Key, 0x11, 0x0F);
+
+  addSIRC12Key("vol+", VolumeUp_Key, 0x11, 0x12);
+  addSIRC12Key("vol-", VolumeDown_Key, 0x11, 0x13);
+  addSIRC12Key("mute", Mute_Key, 0x11, 0x14);
+  addSIRC12Key("power", Power_Key, 0x11, 0x15);
+  addSIRC12Key("eject", Eject_Key, 0x11, 0x16);
+  addSIRC12Key("C.INDEX", Unmapped_Key, 0x11, 0x18);
+  addSIRC12Key("FILE", Memory_Key, 0x11, 0x19);
+  addSIRC12Key("BANK", Call_Key, 0x11, 0x1A); // "file recall"
+  addSIRC12Key("continue", Unmapped_Key, 0x11, 0x1D);
+  addSIRC12Key("single", Unmapped_Key, 0x11, 0x1E);
+  addSIRC12Key("pgm", Program_Key, 0x11, 0x1F);
+
+  addSIRC12Key("10", Zero_Key, 0x11, 0x20); // "0"
+  addSIRC12Key(">10", DoubleDigit_Key, 0x11, 0x27);
+  addSIRC12Key("DISPLAY", Info_Key, 0x11, 0x28); // "time"
+  addSIRC12Key("a-b", RepeatAB_Key, 0x11, 0x2A);
+  addSIRC12Key("repeat", Repeat_Key, 0x11, 0x2C);
+  addSIRC12Key("POWER_ON", PowerOn_Key, 0x11, 0x2E);
+  addSIRC12Key("POWER_OFF", PowerOff_Key, 0x11, 0x2F);
+
+  addSIRC12Key("|<<", Previous_Key, 0x11, 0x30);
+  addSIRC12Key(">>|", Next_Key, 0x11, 0x31);
+  addSIRC12Key("play", Play_Key, 0x11, 0x32);
+  addSIRC12Key("<<", Rewind_Key, 0x11, 0x33);
+  addSIRC12Key(">>", FastForward_Key, 0x11, 0x34);
+  addSIRC12Key("shuffle", Random_Key, 0x11, 0x35);
+  addSIRC12Key("cd_ind_dec", Unmapped_Key, 0x11, 0x36);
+  addSIRC12Key("cd_ind_inc", Unmapped_Key, 0x11, 0x37);
+  addSIRC12Key("stop", Stop_Key, 0x11, 0x38);
+  addSIRC12Key("PAUSE", Pause_Key, 0x11, 0x39);
+  addSIRC12Key("SLOW--", SlowMinus_Key, 0x11, 0x3A);
+  addSIRC12Key("SLOW++", SlowPlus_Key, 0x11, 0x3B);
+  addSIRC12Key("musicscan", Unmapped_Key, 0x11, 0x3C); // "intro"
+  addSIRC12Key("prevDisc", PrevDisc_Key, 0x11, 0x3D);
+  addSIRC12Key("disc_skip", NextDisc_Key, 0x11, 0x3E);
+
+  addSIRC12Key("disc_1", Unmapped_Key, 0x11, 0x40);
+  addSIRC12Key("disc_2", Unmapped_Key, 0x11, 0x41);
+  addSIRC12Key("disc_3", Unmapped_Key, 0x11, 0x42);
+  addSIRC12Key("disc_4", Unmapped_Key, 0x11, 0x43);
+  addSIRC12Key("disc_5", Unmapped_Key, 0x11, 0x44);
+  addSIRC12Key("DISC", Unmapped_Key, 0x11, 0x4A);
+  addSIRC12Key("AUTO_SPACE", Unmapped_Key, 0x11, 0x4E);
+
+  addSIRC12Key("fader", Unmapped_Key, 0x11, 0x5F); // "mute"
+
+  addSIRC12Key("LEVEL_FILE", Unmapped_Key, 0x11, 0x68);
+}
+
+
+SonyCD1a::SonyCD1a(
+  unsigned int index)
+  : SonyCD1(index)
+{
+  setKeysetName("CD Keyset 1a");
+}
+
+
+void SonyCD1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  SonyCD1::populateProtocol(guiObject);
+
+  addSIRC12Key("a-b", RepeatAB_Key, 0x11, 0x2D);
+}
+
+
+SonyCD1b::SonyCD1b(
+  unsigned int index)
+  : SonyCD1(index)
+{
+  setKeysetName("CD Keyset 1b");
+}
+
+
+void SonyCD1b::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  SonyCD1::populateProtocol(guiObject);
+
+  addSIRC12Key("display", Info_Key, 0x11, 0x56);
+}
index 2afd53b..3ceb575 100644 (file)
@@ -191,4 +191,35 @@ public:
     QObject *guiObject);
 };
 
+
+class SonyCD1: public PIRKeysetMetaData
+{
+public:
+  SonyCD1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class SonyCD1a: public SonyCD1
+{
+public:
+  SonyCD1a(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class SonyCD1b: public SonyCD1
+{
+public:
+  SonyCD1b(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
 #endif // SONY_H
diff --git a/keysets/starsat.cpp b/keysets/starsat.cpp
new file mode 100644 (file)
index 0000000..8ef4b84
--- /dev/null
@@ -0,0 +1,71 @@
+#include "starsat.h"
+#include "protocols/necprotocol.h"
+
+
+StarsatSat1::StarsatSat1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Sat Keyset 1",
+      Starsat_Make,
+      index)
+{
+}
+
+
+void StarsatSat1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x4040, 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("Power", Power_Key, 0x0A, 8);
+  addKey("UP", Up_Key, 0x0B, 8);
+  addKey("Mute", Mute_Key, 0x0C, 8);
+  addKey("OK", Select_Key, 0x0D, 8);
+  addKey("Down", Down_Key, 0x0E, 8);
+  addKey("TV/SAT", Input_Key, 0x0F, 8);
+
+  addKey("Left", Left_Key, 0x10, 8);
+  addKey("Right", Right_Key, 0x11, 8);
+  addKey("Time", Unmapped_Key, 0x12, 8);
+  addKey("Audio", Audio_Key, 0x13, 8);
+  addKey("Text", Teletext_Key, 0x14, 8);
+  addKey("VOL+", VolumeUp_Key, 0x15, 8);
+  addKey("Read", Red_Key, 0x16, 8);
+  addKey("Sabz", Green_Key, 0x17, 8);
+  addKey("Yellowe", Yellow_Key, 0x18, 8);
+  addKey("Bule", Blue_Key, 0x19, 8);
+  addKey("EPG", Guide_Key, 0x1A, 8);
+  addKey("LAN", Unmapped_Key, 0x1B, 8);
+  addKey("VOL-", VolumeDown_Key, 0x1C, 8);
+  addKey("Media", Unmapped_Key, 0x1D, 8);
+  addKey("CH-", ChannelDown_Key, 0x1E, 8);
+  addKey("CH+", ChannelUp_Key, 0x1F, 8);
+
+  addKey("MENU", Menu_Key, 0x40, 8);
+  addKey("Exit", Exit_Key, 0x41, 8);
+  addKey("i", Info_Key, 0x42, 8);
+  addKey("RCL", PrevChannel_Key, 0x43, 8);
+  addKey("A-Z", Unmapped_Key, 0x44, 8);
+  addKey("Sat", Unmapped_Key, 0x45, 8);
+  addKey("FUNC", Unmapped_Key, 0x46, 8);
+  addKey("FAV", Favorites_Key, 0x47, 8);
+//  addKey(">^", Unmapped_Key, 0x0B, 8);
+}
diff --git a/keysets/starsat.h b/keysets/starsat.h
new file mode 100644 (file)
index 0000000..3f62fc4
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef STARSAT
+#define STARSAT
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class StarsatSat1: public PIRKeysetMetaData
+{
+public:
+  StarsatSat1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // STARSAT
diff --git a/keysets/viewsat.cpp b/keysets/viewsat.cpp
new file mode 100644 (file)
index 0000000..85aeb45
--- /dev/null
@@ -0,0 +1,92 @@
+#include "viewsat.h"
+#include "protocols/necprotocol.h"
+
+
+ViewsatSat1::ViewsatSat1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Satellite Keyset 1",
+      Viewsat_Make,
+      index)
+{
+}
+
+
+void ViewsatSat1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0xFF20, 16);
+
+  addKey("1", One_Key, 0x00, 8);
+  addKey("2", Two_Key, 0x01, 8);
+  addKey("3", Three_Key, 0x02, 8);
+  addKey("4", Four_Key, 0x03, 8);
+  addKey("5", Five_Key, 0x04, 8);
+  addKey("6", Six_Key, 0x05, 8);
+  addKey("7", Seven_Key, 0x06, 8);
+  addKey("8", Eight_Key, 0x07, 8);
+  addKey("9", Nine_Key, 0x08, 8);
+  addKey("0", Zero_Key, 0x09, 8);
+  addKey("CH-Up", ChannelUp_Key, 0x0A, 8);
+  addKey("Up", Up_Key, 0x0A, 8);
+  addKey("CH-Down", ChannelDown_Key, 0x0B, 8);
+  addKey("Down", Down_Key, 0x0B, 8);
+  addKey("Vol-Up", VolumeUp_Key, 0x0C, 8);
+  addKey("Right", Right_Key, 0x0C, 8);
+  addKey("Vol-Down", VolumeDown_Key, 0x0D, 8);
+  addKey("Left", Left_Key, 0x0D, 8);
+  addKey("Mute", Mute_Key, 0x0E, 8);
+  addKey("Power", Power_Key, 0x0F, 8);
+
+  addKey("Page-Up", PageUp_Key, 0x10, 8);
+  addKey("Exit", Exit_Key, 0x11, 8);
+  addKey("Sat", SatInput_Key, 0x12, 8);
+  addKey("Menu", Menu_Key, 0x13, 8);
+  addKey("Fav", Favorites_Key, 0x14, 8);
+  addKey("input", Input_Key, 0x15, 8);
+  addKey("Guide", Guide_Key, 0x16, 8);
+  addKey("Pause", Pause_Key, 0x17, 8);
+  addKey("F1", Unmapped_Key, 0x18, 8);
+  addKey("OK", Select_Key, 0x19, 8);
+  addKey("CH-Return", PrevChannel_Key, 0x1A, 8); // "last"
+  addKey("Music/TV", TunerInput_Key, 0x1B, 8); // "radio"
+  addKey("F4", Unmapped_Key, 0x1C, 8);
+  addKey("Page-Down", PageDown_Key, 0x1D, 8);
+  addKey("Info", Info_Key, 0x1E, 8);
+  addKey("Audio", Audio_Key, 0x1F, 8);
+
+  addKey("F2", Unmapped_Key, 0x40, 8);
+  addKey("F3", Unmapped_Key, 0x41, 8);
+  addKey("Help", Unmapped_Key, 0x42, 8); // "color"
+}
+
+
+ViewsatSat1a::ViewsatSat1a(
+  unsigned int index)
+  : ViewsatSat1(index)
+{
+  setKeysetName("Satellite Keyset 1a");
+}
+
+
+void ViewsatSat1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  ViewsatSat1::populateProtocol(guiObject);
+
+  addKey("NTSC/PAL", Unmapped_Key, 0x15, 8);
+}
diff --git a/keysets/viewsat.h b/keysets/viewsat.h
new file mode 100644 (file)
index 0000000..312e286
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef VIEWSAT_H
+#define VIEWSAT_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class ViewsatSat1: public PIRKeysetMetaData
+{
+public:
+  ViewsatSat1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class ViewsatSat1a: public ViewsatSat1
+{
+public:
+  ViewsatSat1a(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // VIEWSAT_H
index 9097b75..abc0a87 100644 (file)
@@ -89,3 +89,30 @@ void WDMediaPlayer1a::populateProtocol(
   addKey("5", Five_Key, 0xED, 8);
   addKey("0", Zero_Key, 0xEE, 8);
 }
+
+
+WDMediaPlayer1b::WDMediaPlayer1b(
+  unsigned int index)
+  : WDMediaPlayer1a(index)
+{
+  setKeysetName("Media Player Keyset 1b");
+}
+
+
+void WDMediaPlayer1b::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  WDMediaPlayer1a::populateProtocol(guiObject);
+
+  addKey("0", Zero_Key, 0x11, 8);
+  addKey("1", One_Key, 0x18, 8);
+  addKey("2", Two_Key, 0x19, 8);
+  addKey("4", Four_Key, 0x1C, 8);
+  addKey("5", Five_Key, 0x1D, 8);
+}
index 47c24c2..787893b 100644 (file)
@@ -25,4 +25,14 @@ public:
     QObject *guiObject);
 };
 
+class WDMediaPlayer1b: public WDMediaPlayer1a
+{
+public:
+  WDMediaPlayer1b(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
 #endif // WD_H
index c2ad2b1..8833525 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -15,7 +15,6 @@ int main(int argc, char *argv[])
   app.setupRockerSwitch(&mainWindow);
 
   mainWindow.showExpanded();
-  app.setupRockerSwitch(mainWindow.getSecondaryWindow());
 
   app.connect(
     &app,
index 1b5ee5e..692b64c 100644 (file)
@@ -4,15 +4,17 @@
 #include <QtCore/QCoreApplication>
 #include <QMutex>
 #include <QtGui/QMessageBox>
+//#include <QtGui>
 #include <QSettings>
-#include <QMaemo5InformationBox>
 
 #include "pirkeysetwidgetitem.h"
 #include "pirselectkeysetform.h"
-#include "pirsecondaryform.h"
+#include "pirselectdeviceform.h"
+#include "pirpanelselectionform.h"
 #include "pirdocumentationform.h"
 #include "piraboutform.h"
 #include "pirkeysetmanager.h"
+#include "pirpanelmanager.h"
 
 //#define DEBUGGING
 
@@ -35,7 +37,8 @@ MainWindow::MainWindow(QWidget *parent)
   : QMainWindow(parent),
     ui(new Ui::MainWindow),
     selectKeysetForm(0),
-    secondaryForm(0),
+    selectDeviceForm(0),
+    panelSelectionForm(0),
     documentationForm(0),
     aboutForm(0),
     currentKeyset(0)
@@ -45,20 +48,26 @@ MainWindow::MainWindow(QWidget *parent)
   // Make this a Maemo 5 stacked widget:
   setAttribute(Qt::WA_Maemo5StackedWindow);
 
-  // Collect the keysets:
+  // Create the managers:
   myKeysets = new PIRKeysetManager();
+  myPanels = new PIRPanelManager(this);
 
   // Set up the keyset selection window:
   selectKeysetForm = new PIRSelectKeysetForm(this);
 
-  // Set up the secondary buttons window:
-  secondaryForm = new PIRSecondaryForm(this);
+  // Set up the device selection window:
+  selectDeviceForm = new PIRSelectDeviceForm(this);
 
-  myKeysets->populateGuiWidget(selectKeysetForm);
+  // Set up the panel selection window:
+  panelSelectionForm = new PIRPanelSelectionForm(this);
+
+  myKeysets->populateSelectionWidgets(selectKeysetForm, selectDeviceForm);
+//  myPanels->setupPanels(panelSelectionForm);
 
   // Remember any favorites the user has already set:
   populateFavorites();
 
+  // Retrieve the user's most recent keyset (if any):
   QSettings settings("pietrzak.org", "Pierogi");
   if (settings.contains("currentKeysetName"))
   {
@@ -71,26 +80,64 @@ MainWindow::MainWindow(QWidget *parent)
 
   enableButtons();
 
+  QListWidget *fkw = myPanels->getFavoritesListWidget();
+
   connect(
-    ui->favoriteKeysetsWidget,
+    fkw,
     SIGNAL(itemActivated(QListWidgetItem *)),
     this,
     SLOT(keysetSelectionChanged(QListWidgetItem *)),
     Qt::QueuedConnection);
 
-  // Make sure the two selection lists don't show different selections:
+  // Make sure the three selection lists don't show different selections:
   QListWidget *klw = selectKeysetForm->getKeysetListWidget();
+  QListWidget *dlw = selectDeviceForm->getDeviceListWidget();
+
+  // favorites -> keyset name
   connect(
-    ui->favoriteKeysetsWidget,
+    fkw,
     SIGNAL(itemActivated(QListWidgetItem *)),
     klw,
     SLOT(clearSelection()),
     Qt::QueuedConnection);
 
+  // favorites -> device name
+  connect(
+    fkw,
+    SIGNAL(itemActivated(QListWidgetItem *)),
+    dlw,
+    SLOT(clearSelection()),
+    Qt::QueuedConnection);
+
+  // keyset name -> favorites
   connect(
     klw,
     SIGNAL(itemActivated(QListWidgetItem *)),
-    ui->favoriteKeysetsWidget,
+    fkw,
+    SLOT(clearSelection()),
+    Qt::QueuedConnection);
+
+  // device name -> favorites
+  connect(
+    dlw,
+    SIGNAL(itemActivated(QListWidgetItem *)),
+    fkw,
+    SLOT(clearSelection()),
+    Qt::QueuedConnection);
+
+  // keyset name -> device name
+  connect(
+    klw,
+    SIGNAL(itemActivated(QListWidgetItem *)),
+    dlw,
+    SLOT(clearSelection()),
+    Qt::QueuedConnection);
+
+  // device name -> keyset name
+  connect(
+    dlw,
+    SIGNAL(itemActivated(QListWidgetItem *)),
+    klw,
     SLOT(clearSelection()),
     Qt::QueuedConnection);
 
@@ -115,6 +162,8 @@ MainWindow::~MainWindow()
 {
   delete myKeysets;
   if (selectKeysetForm) delete selectKeysetForm;
+  if (selectDeviceForm) delete selectDeviceForm;
+  if (panelSelectionForm) delete panelSelectionForm;
   if (documentationForm) delete documentationForm;
   if (aboutForm) delete aboutForm;
   delete ui;
@@ -181,80 +230,7 @@ void MainWindow::enableButtons()
   // Just to be sure, check to see if the keyset has been populated:
   myKeysets->populateKeyset(this, currentKeyset);
 
-  // This is going to be a little painful...
-  // Main keys
-  emit powerEnabled(myKeysets->hasKey(currentKeyset, Power_Key));
-  emit volumeUpEnabled(myKeysets->hasKey(currentKeyset, VolumeUp_Key));
-  emit volumeDownEnabled(myKeysets->hasKey(currentKeyset, VolumeDown_Key));
-  emit channelUpEnabled(myKeysets->hasKey(currentKeyset, ChannelUp_Key));
-  emit channelDownEnabled(myKeysets->hasKey(currentKeyset, ChannelDown_Key));
-  emit muteEnabled(myKeysets->hasKey(currentKeyset, Mute_Key));
-
-  // Main tab labels:
-  emit keysetMakeChanged(
-    makeManager.getMakeString(myKeysets->getMake(currentKeyset)));
-  emit keysetNameChanged(myKeysets->getDisplayName(currentKeyset));
-
-  // Utility keys:
-  emit redEnabled(myKeysets->hasKey(currentKeyset, Red_Key));
-  emit greenEnabled(myKeysets->hasKey(currentKeyset, Green_Key));
-  emit yellowEnabled(myKeysets->hasKey(currentKeyset, Yellow_Key));
-  emit blueEnabled(myKeysets->hasKey(currentKeyset, Blue_Key));
-  emit pictureModeEnabled(myKeysets->hasKey(currentKeyset, PictureMode_Key));
-  emit soundModeEnabled(myKeysets->hasKey(currentKeyset, SoundMode_Key));
-  emit aspectRatioEnabled(myKeysets->hasKey(currentKeyset, AspectRatio_Key));
-//  emit surroundEnabled(myKeysets->hasKey(currentKeyset, Surround_Key));
-  emit audioEnabled(myKeysets->hasKey(currentKeyset, Audio_Key));
-  emit infoEnabled(myKeysets->hasKey(currentKeyset, Info_Key));
-  emit captionsEnabled(myKeysets->hasKey(currentKeyset, Captions_Key));
-  emit sleepEnabled(myKeysets->hasKey(currentKeyset, Sleep_Key));
-  emit inputEnabled(myKeysets->hasKey(currentKeyset, Input_Key));
-
-  // Keypad keys
-  emit zeroEnabled(myKeysets->hasKey(currentKeyset, Zero_Key));
-  emit oneEnabled(myKeysets->hasKey(currentKeyset, One_Key));
-  emit twoEnabled(myKeysets->hasKey(currentKeyset, Two_Key));
-  emit threeEnabled(myKeysets->hasKey(currentKeyset, Three_Key));
-  emit fourEnabled(myKeysets->hasKey(currentKeyset, Four_Key));
-  emit fiveEnabled(myKeysets->hasKey(currentKeyset, Five_Key));
-  emit sixEnabled(myKeysets->hasKey(currentKeyset, Six_Key));
-  emit sevenEnabled(myKeysets->hasKey(currentKeyset, Seven_Key));
-  emit eightEnabled(myKeysets->hasKey(currentKeyset, Eight_Key));
-  emit nineEnabled(myKeysets->hasKey(currentKeyset, Nine_Key));
-  emit enterEnabled(myKeysets->hasKey(currentKeyset, Enter_Key));
-  emit clearEnabled(myKeysets->hasKey(currentKeyset, Clear_Key));
-  emit dashEnabled(myKeysets->hasKey(currentKeyset, Dash_Key));
-  emit plusOneHundredEnabled(myKeysets->hasKey(currentKeyset, PlusOneHundred_Key));
-  emit doubleDigitEnabled(myKeysets->hasKey(currentKeyset, DoubleDigit_Key));
-  emit prevChannelEnabled(myKeysets->hasKey(currentKeyset, PrevChannel_Key));
-
-  // Menu keys:
-  emit upEnabled(myKeysets->hasKey(currentKeyset, Up_Key));
-  emit downEnabled(myKeysets->hasKey(currentKeyset, Down_Key));
-  emit leftEnabled(myKeysets->hasKey(currentKeyset, Left_Key));
-  emit rightEnabled(myKeysets->hasKey(currentKeyset, Right_Key));
-  emit selectEnabled(myKeysets->hasKey(currentKeyset, Select_Key));
-  emit menuEnabled(myKeysets->hasKey(currentKeyset, Menu_Key));
-  emit exitEnabled(myKeysets->hasKey(currentKeyset, Exit_Key));
-  emit guideEnabled(myKeysets->hasKey(currentKeyset, Guide_Key));
-  emit discMenuEnabled(myKeysets->hasKey(currentKeyset, DiscMenu_Key));
-
-  // Media keys:
-  emit nextEnabled(myKeysets->hasKey(currentKeyset, Next_Key));
-  emit previousEnabled(myKeysets->hasKey(currentKeyset, Previous_Key));
-  emit advanceEnabled(myKeysets->hasKey(currentKeyset, Advance_Key));
-  emit replayEnabled(myKeysets->hasKey(currentKeyset, Replay_Key));
-  emit stepForwardEnabled(myKeysets->hasKey(currentKeyset, StepForward_Key));
-  emit stepBackEnabled(myKeysets->hasKey(currentKeyset, StepBack_Key));
-  emit fastForwardEnabled(myKeysets->hasKey(currentKeyset, FastForward_Key));
-  emit reverseEnabled(myKeysets->hasKey(currentKeyset, Rewind_Key));
-  emit playEnabled(myKeysets->hasKey(currentKeyset, Play_Key));
-  emit pauseEnabled(myKeysets->hasKey(currentKeyset, Pause_Key));
-  emit stopEnabled(myKeysets->hasKey(currentKeyset, Stop_Key));
-  emit ejectEnabled(myKeysets->hasKey(currentKeyset, Eject_Key));
-
-  // Also enable the buttons on the secondary form:
-  secondaryForm->enableButtons(myKeysets, currentKeyset);
+  myPanels->enableButtons(myKeysets, currentKeyset);
 }
 
 
@@ -268,583 +244,6 @@ void MainWindow::receivedExternalWarning(
 }
 
 
-// Main tab buttons:
-
-void MainWindow::on_powerButton_pressed()
-{
-  startRepeating(Power_Key);
-}
-
-void MainWindow::on_powerButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_mainChannelUpButton_pressed()
-{
-  startRepeating(ChannelUp_Key);
-}
-
-void MainWindow::on_mainChannelUpButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_mainChannelDownButton_pressed()
-{
-  startRepeating(ChannelDown_Key);
-}
-
-void MainWindow::on_mainChannelDownButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_mainVolumeUp_pressed()
-{
-  startRepeating(VolumeUp_Key);
-}
-
-void MainWindow::on_mainVolumeUp_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_mainVolumeDownButton_pressed()
-{
-  startRepeating(VolumeDown_Key);
-}
-
-void MainWindow::on_mainVolumeDownButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_muteButton_pressed()
-{
-  startRepeating(Mute_Key);
-}
-
-void MainWindow::on_muteButton_released()
-{
-  stopRepeating();
-}
-
-
-// Utility tab buttons:
-
-void MainWindow::on_redButton_pressed()
-{
-  startRepeating(Red_Key);
-}
-
-void MainWindow::on_redButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_greenButton_pressed()
-{
-  startRepeating(Green_Key);
-}
-
-void MainWindow::on_greenButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_yellowButton_pressed()
-{
-  startRepeating(Yellow_Key);
-}
-
-void MainWindow::on_yellowButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_blueButton_pressed()
-{
-  startRepeating(Blue_Key);
-}
-
-void MainWindow::on_blueButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pictureModeButton_pressed()
-{
-  startRepeating(PictureMode_Key);
-}
-
-void MainWindow::on_pictureModeButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_soundModeButton_pressed()
-{
-  startRepeating(SoundMode_Key);
-}
-
-void MainWindow::on_soundModeButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_aspectRatioButton_pressed()
-{
-  startRepeating(AspectRatio_Key);
-}
-
-void MainWindow::on_aspectRatioButton_released()
-{
-  stopRepeating();
-}
-
-/*
-void MainWindow::on_surroundButton_pressed()
-{
-  startRepeating(Surround_Key);
-}
-
-void MainWindow::on_surroundButton_released()
-{
-  stopRepeating();
-}
-*/
-
-void MainWindow::on_audioButton_pressed()
-{
-  startRepeating(Audio_Key);
-}
-
-void MainWindow::on_audioButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_infoButton_pressed()
-{
-  startRepeating(Info_Key);
-}
-
-void MainWindow::on_infoButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_captionButton_pressed()
-{
-  startRepeating(Captions_Key);
-}
-
-void MainWindow::on_captionButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_inputButton_pressed()
-{
-  startRepeating(Input_Key);
-}
-
-void MainWindow::on_inputButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_sleepButton_pressed()
-{
-  startRepeating(Sleep_Key);
-}
-
-void MainWindow::on_sleepButton_released()
-{
-  stopRepeating();
-}
-
-
-// Keypad tab buttons:
-
-void MainWindow::on_oneButton_pressed()
-{
-  startRepeating(One_Key);
-}
-
-void MainWindow::on_oneButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_twoButton_pressed()
-{
-  startRepeating(Two_Key);
-}
-
-void MainWindow::on_twoButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_threeButton_pressed()
-{
-  startRepeating(Three_Key);
-}
-
-void MainWindow::on_threeButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_fourButton_pressed()
-{
-  startRepeating(Four_Key);
-}
-
-void MainWindow::on_fourButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_fiveButton_pressed()
-{
-  startRepeating(Five_Key);
-}
-
-void MainWindow::on_fiveButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_sixButton_pressed()
-{
-  startRepeating(Six_Key);
-}
-
-void MainWindow::on_sixButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_sevenButton_pressed()
-{
-  startRepeating(Seven_Key);
-}
-
-void MainWindow::on_sevenButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_eightButton_pressed()
-{
-  startRepeating(Eight_Key);
-}
-
-void MainWindow::on_eightButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_nineButton_pressed()
-{
-  startRepeating(Nine_Key);
-}
-
-void MainWindow::on_nineButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_zeroButton_pressed()
-{
-  startRepeating(Zero_Key);
-}
-
-void MainWindow::on_zeroButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_enterButton_pressed()
-{
-  startRepeating(Enter_Key);
-}
-
-void MainWindow::on_enterButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_clearButton_pressed()
-{
-  startRepeating(Clear_Key);
-}
-
-void MainWindow::on_clearButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_prevChannelButton_pressed()
-{
-  startRepeating(PrevChannel_Key);
-}
-
-void MainWindow::on_prevChannelButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_plusOneHundredButton_pressed()
-{
-  startRepeating(PlusOneHundred_Key);
-}
-
-void MainWindow::on_plusOneHundredButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_dashButton_pressed()
-{
-  startRepeating(Dash_Key);
-}
-
-void MainWindow::on_dashButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_doubleDigitButton_pressed()
-{
-  startRepeating(DoubleDigit_Key);
-}
-
-void MainWindow::on_doubleDigitButton_released()
-{
-  stopRepeating();
-}
-
-
-// Menu tab buttons:
-
-void MainWindow::on_upButton_pressed()
-{
-  startRepeating(Up_Key);
-}
-
-void MainWindow::on_upButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_leftButton_pressed()
-{
-  startRepeating(Left_Key);
-}
-
-void MainWindow::on_leftButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_rightButton_pressed()
-{
-  startRepeating(Right_Key);
-}
-
-void MainWindow::on_rightButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_downButton_pressed()
-{
-  startRepeating(Down_Key);
-}
-
-void MainWindow::on_downButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_selectButton_pressed()
-{
-  startRepeating(Select_Key);
-}
-
-void MainWindow::on_selectButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_menuButton_pressed()
-{
-  startRepeating(Menu_Key);
-}
-
-void MainWindow::on_menuButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_exitButton_pressed()
-{
-  startRepeating(Exit_Key);
-}
-
-void MainWindow::on_exitButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_guideButton_pressed()
-{
-  startRepeating(Guide_Key);
-}
-
-void MainWindow::on_guideButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_discMenuButton_pressed()
-{
-  startRepeating(DiscMenu_Key);
-}
-
-void MainWindow::on_discMenuButton_released()
-{
-  stopRepeating();
-}
-
-
-// Media tab buttons:
-
-void MainWindow::on_mediaPreviousButton_pressed()
-{
-  startRepeating(Previous_Key);
-}
-
-void MainWindow::on_mediaPreviousButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_mediaNextButton_pressed()
-{
-  startRepeating(Next_Key);
-}
-
-void MainWindow::on_mediaNextButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_replayButton_pressed()
-{
-  startRepeating(Replay_Key);
-}
-
-void MainWindow::on_replayButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_advanceButton_pressed()
-{
-  startRepeating(Advance_Key);
-}
-
-void MainWindow::on_advanceButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_stepBackButton_pressed()
-{
-  startRepeating(StepBack_Key);
-}
-
-void MainWindow::on_stepBackButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_stepForwardButton_pressed()
-{
-  startRepeating(StepForward_Key);
-}
-
-void MainWindow::on_stepForwardButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_reverseButton_pressed()
-{
-  startRepeating(Rewind_Key);
-}
-
-void MainWindow::on_reverseButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_fastForwardButton_pressed()
-{
-  startRepeating(FastForward_Key);
-}
-
-void MainWindow::on_fastForwardButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_playButton_pressed()
-{
-  startRepeating(Play_Key);
-}
-
-void MainWindow::on_playButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pauseButton_pressed()
-{
-  startRepeating(Pause_Key);
-}
-
-void MainWindow::on_pauseButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_stopButton_pressed()
-{
-  startRepeating(Stop_Key);
-}
-
-void MainWindow::on_stopButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_ejectButton_pressed()
-{
-  startRepeating(Eject_Key);
-}
-
-void MainWindow::on_ejectButton_released()
-{
-  stopRepeating();
-}
-
-
 // Menu actions:
 
 void MainWindow::on_actionSelectKeyset_triggered()
@@ -852,14 +251,14 @@ void MainWindow::on_actionSelectKeyset_triggered()
   selectKeysetForm->show();
 }
 
-void MainWindow::on_actionSecondary_Buttons_triggered()
+void MainWindow::on_actionSelect_Device_By_Name_triggered()
 {
-  if (!secondaryForm)
-  {
-    secondaryForm = new PIRSecondaryForm(this);
-  }
+  selectDeviceForm->show();
+}
 
-  secondaryForm->show();
+void MainWindow::on_actionArrange_Button_Panels_triggered()
+{
+  panelSelectionForm->show();
 }
 
 void MainWindow::on_actionAbout_triggered()
@@ -926,16 +325,17 @@ void MainWindow::finalCleanup()
 }
 
 
-void MainWindow::on_addKeysetButton_clicked()
+void MainWindow::addCurrentKeyset(
+  QListWidget *qlw)
 {
   // Is the current keyset already a favorite?
-  int count = ui->favoriteKeysetsWidget->count();
+  int count = qlw->count();
   int index = 0;
   PIRKeysetWidgetItem *kwi = NULL;
   while (index < count)
   {
     kwi = dynamic_cast<PIRKeysetWidgetItem *>(
-      ui->favoriteKeysetsWidget->item(index));
+      qlw->item(index));
 
     if (kwi && (kwi->getID() == currentKeyset))
     {
@@ -952,8 +352,7 @@ void MainWindow::on_addKeysetButton_clicked()
   name.append(" ");
   name.append(myKeysets->getDisplayName(currentKeyset));
 
-  ui->favoriteKeysetsWidget->addItem(
-    new PIRKeysetWidgetItem(name, currentKeyset, make));
+  qlw->addItem(new PIRKeysetWidgetItem(name, currentKeyset, make));
 
   // And, add the keyset id to the persistent list:
   QSettings settings("pietrzak.org", "Pierogi");
@@ -975,11 +374,12 @@ void MainWindow::on_addKeysetButton_clicked()
 }
 
 
-void MainWindow::on_removeKeysetButton_clicked()
+void MainWindow::removeFavoriteKeyset(
+  QListWidget *qlw)
 {
   // Deleting an item removes it from the list, so just grab the currently
   // selected item and delete it:
-  QListWidgetItem *item = ui->favoriteKeysetsWidget->currentItem();
+  QListWidgetItem *item = qlw->currentItem();
 
   if (item) delete item;
 
@@ -991,7 +391,7 @@ void MainWindow::on_removeKeysetButton_clicked()
 
   settings.remove("favorites");
 
-  int count = ui->favoriteKeysetsWidget->count();
+  int count = qlw->count();
 
   // If the count is empty, we can stop right here:
   if (count == 0) return;
@@ -1002,8 +402,7 @@ void MainWindow::on_removeKeysetButton_clicked()
   settings.beginWriteArray("favorites");
   while (index < count)
   {
-    kwi = dynamic_cast<PIRKeysetWidgetItem *>(
-      ui->favoriteKeysetsWidget->item(index));
+    kwi = dynamic_cast<PIRKeysetWidgetItem *>(qlw->item(index));
 
     settings.setArrayIndex(index);
 //    settings.setValue("keysetID", kwi->getID());
@@ -1020,6 +419,7 @@ void MainWindow::on_removeKeysetButton_clicked()
   settings.endArray();
 }
 
+
 void MainWindow::populateFavorites()
 {
   QSettings settings("pietrzak.org", "Pierogi");
@@ -1042,7 +442,7 @@ void MainWindow::populateFavorites()
     if (kwi)
     {
       // Keyset does exist, so continue:
-      ui->favoriteKeysetsWidget->addItem(kwi);
+      myPanels->addFavoritesItem(kwi);
     }
 
     ++index;
@@ -1071,69 +471,88 @@ void MainWindow::stopRepeating()
 }
 
 
-QWidget *MainWindow::getSecondaryWindow()
+void MainWindow::selectPrevFavKeyset()
 {
-  return secondaryForm;
+  myPanels->selectPrevFavKeyset();
 }
 
 
-void MainWindow::selectPrevFavKeyset()
+void MainWindow::selectNextFavKeyset()
 {
-  int size = ui->favoriteKeysetsWidget->count();
+  myPanels->selectNextFavKeyset();
+}
 
-  if (size == 0)
-  {
-    // No favorites, so nothing to do!
-    return;
-  }
 
-  int position = ui->favoriteKeysetsWidget->currentRow();
+void MainWindow::managePanel(
+  PIRPanelName name,
+  int state)
+{
+  myPanels->managePanel(name, state);
+}
 
-  --position;
-  if (position < 0)
-  {
-    position = size - 1;
-  }
 
-  ui->favoriteKeysetsWidget->setCurrentRow(
-    position,
-    QItemSelectionModel::ClearAndSelect);
+void MainWindow::insertPanel(
+  int index,
+  QWidget *panel,
+  const QString &displayName)
+{
+  ui->stackedButtonsWidget->insertWidget(index, panel);
+  ui->selectPanelComboBox->insertItem(index, displayName);
+}
 
-  keysetSelectionChanged(ui->favoriteKeysetsWidget->currentItem());
 
-  // Tell the user about the change:
-  QMaemo5InformationBox::information(
-    0,
-    ui->favoriteKeysetsWidget->item(position)->text());
+void MainWindow::removePanel(
+  int index,
+  QWidget *panel)
+{
+  ui->stackedButtonsWidget->removeWidget(panel);
+  ui->selectPanelComboBox->removeItem(index);
 }
 
 
-void MainWindow::selectNextFavKeyset()
+void MainWindow::on_prevPanelButton_clicked()
 {
-  int size = ui->favoriteKeysetsWidget->count();
+  int count = ui->selectPanelComboBox->count();
 
-  if (size == 0)
+  // No need to do anything if there are less than two panels available:
+  if (count < 2) return;
+
+  int index = ui->selectPanelComboBox->currentIndex();
+  if (index == 0)
   {
-    // No favorites, so just return:
-    return;
+    index = count - 1;
+  }
+  else
+  {
+    --index;
   }
 
-  int position = ui->favoriteKeysetsWidget->currentRow();
+  ui->selectPanelComboBox->setCurrentIndex(index);
+}
+
+
+void MainWindow::on_nextPanelButton_clicked()
+{
+  int count = ui->selectPanelComboBox->count();
+
+  // No need to do anything if there are less than two panels available:
+  if (count < 2) return;
 
-  ++position;
-  if (position == size)
+  int index = ui->selectPanelComboBox->currentIndex();
+  if (index == count - 1)
   {
-    position = 0;
+    index = 0;
+  }
+  else
+  {
+    ++index;
   }
 
-  ui->favoriteKeysetsWidget->setCurrentRow(
-    position,
-    QItemSelectionModel::ClearAndSelect);
+  ui->selectPanelComboBox->setCurrentIndex(index);
+}
 
-  keysetSelectionChanged(ui->favoriteKeysetsWidget->currentItem());
 
-  // Tell the user about the change:
-  QMaemo5InformationBox::information(
-    0,
-    ui->favoriteKeysetsWidget->item(position)->text());
+void MainWindow::on_selectPanelComboBox_currentIndexChanged(int index)
+{
+  ui->stackedButtonsWidget->setCurrentIndex(index);
 }
index 514b3db..9385686 100644 (file)
@@ -4,14 +4,18 @@
 #include <QtGui/QMainWindow>
 
 #include "pirkeynames.h"
+#include "pirpanelnames.h"
 #include "pirmodprobe.h"
 
+class QListWidget;
 class QListWidgetItem;
 class PIRSelectKeysetForm;
-class PIRSecondaryForm;
+class PIRSelectDeviceForm;
+class PIRPanelSelectionForm;
 class PIRDocumentationForm;
 class PIRAboutForm;
 class PIRKeysetManager;
+class PIRPanelManager;
 
 namespace Ui {
     class MainWindow;
@@ -41,117 +45,29 @@ public:
 
   void stopRepeating();
 
-  // This is a bit of a hack:
-  QWidget *getSecondaryWindow();
+  void managePanel(
+    PIRPanelName name,
+    int state);
 
-signals:
-  // Main keys
-  void powerEnabled(bool);
-  void volumeUpEnabled(bool);
-  void volumeDownEnabled(bool);
-  void channelUpEnabled(bool);
-  void channelDownEnabled(bool);
-  void muteEnabled(bool);
-
-  // Utility keys:
-  void redEnabled(bool);
-  void greenEnabled(bool);
-  void yellowEnabled(bool);
-  void blueEnabled(bool);
-  void pictureModeEnabled(bool);
-  void soundModeEnabled(bool);
-  void aspectRatioEnabled(bool);
-//  void surroundEnabled(bool);
-  void audioEnabled(bool);
-  void infoEnabled(bool);
-  void captionsEnabled(bool);
-  void inputEnabled(bool);
-  void sleepEnabled(bool);
-
-  // Keypad
-  void zeroEnabled(bool);
-  void oneEnabled(bool);
-  void twoEnabled(bool);
-  void threeEnabled(bool);
-  void fourEnabled(bool);
-  void fiveEnabled(bool);
-  void sixEnabled(bool);
-  void sevenEnabled(bool);
-  void eightEnabled(bool);
-  void nineEnabled(bool);
-  void enterEnabled(bool);
-  void clearEnabled(bool);
-  void dashEnabled(bool);
-  void plusOneHundredEnabled(bool);
-  void doubleDigitEnabled(bool);
-  void prevChannelEnabled(bool);
-
-  // Menu Keys
-  void menuEnabled(bool);
-  void upEnabled(bool);
-  void downEnabled(bool);
-  void leftEnabled(bool);
-  void rightEnabled(bool);
-  void selectEnabled(bool);
-  void exitEnabled(bool);
-  void guideEnabled(bool);
-  void discMenuEnabled(bool);
-
-  // Media keys
-  void playEnabled(bool);
-  void pauseEnabled(bool);
-  void stopEnabled(bool);
-  void fastForwardEnabled(bool);
-  void reverseEnabled(bool);
-  void nextEnabled(bool);
-  void previousEnabled(bool);
-  void stepForwardEnabled(bool);
-  void stepBackEnabled(bool);
-  void advanceEnabled(bool);
-  void replayEnabled(bool);
-  void ejectEnabled(bool);
-
-/*
-  // Media2 Keys
-  void discTitleEnabled(bool);
-  void discSelectEnabled(bool);
-  void vhsSpeedEnabled(bool);
-  void trackingMinusEnabled(bool);
-  void trackingPlusEnabled(bool);
-  void autoTrackingEnabled(bool);
-  void pageUpEnabled(bool);
-  void pageDownEnabled(bool);
-  void slowEnabled(bool);
-  void slowPlusEnabled(bool);
-  void slowMinusEnabled(bool);
-  void programEnabled(bool);
-  void tunerBandEnabled(bool);
-  void repeatEnabled(bool);
-  void repeatABEnabled(bool);
-  void randomEnabled(bool);
-
-  // TV Keys
-  void pictureModeEnabled(bool);
-  void soundModeEnabled(bool);
-  void liveTVEnabled(bool);
-  void favoritesEnabled(bool);
-  void teletextEnabled(bool);
-  void teletextHoldEnabled(bool);
-  void teletextRevealEnabled(bool);
-  void teletextSizeEnabled(bool);
-  void pipEnabled(bool);
-  void pipSwapEnabled(bool);
-  void pipMoveEnabled(bool);
-  void pipSourceEnabled(bool);
-  void pipChannelUpEnabled(bool);
-  void pipChannelDownEnabled(bool);
-  void pipPauseEnabled(bool);
-  void pipSizeEnabled(bool);
-*/
-
-  void keysetMakeChanged(QString);
-  void keysetNameChanged(QString);
+  void insertPanel(
+    int index,
+    QWidget *panel,
+    const QString &displayName);
+
+  void removePanel(
+    int index,
+    QWidget *panel);
+
+  // Favorites panel actions:
+  void addCurrentKeyset(
+    QListWidget *qlw);
+
+  void removeFavoriteKeyset(
+    QListWidget *qlw);
 
+  void enableButtons();
+
+signals:
   void buttonPressed(
     unsigned int keysetID,
     PIRKeyName name);
@@ -165,228 +81,37 @@ public slots:
   void selectPrevFavKeyset();
   void selectNextFavKeyset();
 
+  void keysetSelectionChanged(
+    QListWidgetItem *item);
+
 private slots:
-  // Main tab slots:
-  void on_powerButton_pressed();
-  void on_powerButton_released();
-  void on_mainChannelUpButton_pressed();
-  void on_mainChannelUpButton_released();
-  void on_mainChannelDownButton_pressed();
-  void on_mainChannelDownButton_released();
-  void on_mainVolumeUp_pressed();
-  void on_mainVolumeUp_released();
-  void on_mainVolumeDownButton_pressed();
-  void on_mainVolumeDownButton_released();
-  void on_muteButton_pressed();
-  void on_muteButton_released();
-
-  // Utility tab slots:
-  void on_redButton_pressed();
-  void on_redButton_released();
-  void on_greenButton_pressed();
-  void on_greenButton_released();
-  void on_yellowButton_pressed();
-  void on_yellowButton_released();
-  void on_blueButton_pressed();
-  void on_blueButton_released();
-  void on_pictureModeButton_pressed();
-  void on_pictureModeButton_released();
-  void on_soundModeButton_pressed();
-  void on_soundModeButton_released();
-  void on_aspectRatioButton_pressed();
-  void on_aspectRatioButton_released();
-//  void on_surroundButton_pressed();
-//  void on_surroundButton_released();
-  void on_audioButton_pressed();
-  void on_audioButton_released();
-  void on_infoButton_pressed();
-  void on_infoButton_released();
-  void on_captionButton_pressed();
-  void on_captionButton_released();
-  void on_inputButton_pressed();
-  void on_inputButton_released();
-  void on_sleepButton_pressed();
-  void on_sleepButton_released();
-
-  // Keypad tab slots:
-  void on_oneButton_pressed();
-  void on_oneButton_released();
-  void on_twoButton_pressed();
-  void on_twoButton_released();
-  void on_threeButton_pressed();
-  void on_threeButton_released();
-  void on_fourButton_pressed();
-  void on_fourButton_released();
-  void on_fiveButton_pressed();
-  void on_fiveButton_released();
-  void on_sixButton_pressed();
-  void on_sixButton_released();
-  void on_sevenButton_pressed();
-  void on_sevenButton_released();
-  void on_eightButton_pressed();
-  void on_eightButton_released();
-  void on_nineButton_pressed();
-  void on_nineButton_released();
-  void on_zeroButton_pressed();
-  void on_zeroButton_released();
-  void on_enterButton_pressed();
-  void on_enterButton_released();
-  void on_clearButton_pressed();
-  void on_clearButton_released();
-  void on_prevChannelButton_pressed();
-  void on_prevChannelButton_released();
-  void on_plusOneHundredButton_pressed();
-  void on_plusOneHundredButton_released();
-  void on_dashButton_pressed();
-  void on_dashButton_released();
-  void on_doubleDigitButton_pressed();
-  void on_doubleDigitButton_released();
-
-  // Menu tab slots:
-  void on_upButton_pressed();
-  void on_upButton_released();
-  void on_leftButton_pressed();
-  void on_leftButton_released();
-  void on_rightButton_pressed();
-  void on_rightButton_released();
-  void on_downButton_pressed();
-  void on_downButton_released();
-  void on_selectButton_pressed();
-  void on_selectButton_released();
-  void on_menuButton_pressed();
-  void on_menuButton_released();
-  void on_exitButton_pressed();
-  void on_exitButton_released();
-  void on_guideButton_pressed();
-  void on_guideButton_released();
-  void on_discMenuButton_pressed();
-  void on_discMenuButton_released();
-
-  // Media tab slots:
-  void on_mediaPreviousButton_pressed();
-  void on_mediaPreviousButton_released();
-  void on_mediaNextButton_pressed();
-  void on_mediaNextButton_released();
-  void on_replayButton_pressed();
-  void on_replayButton_released();
-  void on_advanceButton_pressed();
-  void on_advanceButton_released();
-  void on_stepBackButton_pressed();
-  void on_stepBackButton_released();
-  void on_stepForwardButton_pressed();
-  void on_stepForwardButton_released();
-  void on_reverseButton_pressed();
-  void on_reverseButton_released();
-  void on_fastForwardButton_pressed();
-  void on_fastForwardButton_released();
-  void on_playButton_pressed();
-  void on_playButton_released();
-  void on_pauseButton_pressed();
-  void on_pauseButton_released();
-  void on_stopButton_pressed();
-  void on_stopButton_released();
-  void on_ejectButton_pressed();
-  void on_ejectButton_released();
-
-/*
-  // Media2 tab slots:
-  void on_discTitleButton_pressed();
-  void on_discTitleButton_released();
-  void on_discSelectButton_pressed();
-  void on_discSelectButton_released();
-  void on_vhsSpeedButton_pressed();
-  void on_vhsSpeedButton_released();
-  void on_trackingPlusButton_pressed();
-  void on_trackingPlusButton_released();
-  void on_trackingMinusButton_pressed();
-  void on_trackingMinusButton_released();
-  void on_autoTrackingButton_pressed();
-  void on_autoTrackingButton_released();
-  void on_pageUpButton_pressed();
-  void on_pageUpButton_released();
-  void on_pageDownButton_pressed();
-  void on_pageDownButton_released();
-  void on_slowButton_pressed();
-  void on_slowButton_released();
-  void on_slowMinusButton_pressed();
-  void on_slowMinusButton_released();
-  void on_slowPlusButton_pressed();
-  void on_slowPlusButton_released();
-  void on_programButton_pressed();
-  void on_programButton_released();
-  void on_tunerBandButton_pressed();
-  void on_tunerBandButton_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();
-
-  // TV Tab slots:
-  void on_pictureModeButton_pressed();
-  void on_pictureModeButton_released();
-  void on_soundModeButton_pressed();
-  void on_soundModeButton_released();
-  void on_liveTVButton_pressed();
-  void on_liveTVButton_released();
-  void on_favoritesButton_pressed();
-  void on_favoritesButton_released();
-  void on_teletextButton_pressed();
-  void on_teletextButton_released();
-  void on_teletextHoldButton_pressed();
-  void on_teletextHoldButton_released();
-  void on_teletextRevealButton_pressed();
-  void on_teletextRevealButton_released();
-  void on_teletextSizeButton_pressed();
-  void on_teletextSizeButton_released();
-  void on_pipOnOffButton_pressed();
-  void on_pipOnOffButton_released();
-  void on_pipSwapButton_pressed();
-  void on_pipSwapButton_released();
-  void on_pipPositionButton_pressed();
-  void on_pipPositionButton_released();
-  void on_pipSourceButton_pressed();
-  void on_pipSourceButton_released();
-  void on_pipChannelUpButton_pressed();
-  void on_pipChannelUpButton_released();
-  void on_pipChannelDownButton_pressed();
-  void on_pipChannelDownButton_released();
-  void on_pipPauseButton_pressed();
-  void on_pipPauseButton_released();
-  void on_pipSizeButton_pressed();
-  void on_pipSizeButton_released();
-*/
-
-  // Favorites tab actions:
-  void on_addKeysetButton_clicked();
-  void on_removeKeysetButton_clicked();
-
-  // Menu actions:
   void on_actionSelectKeyset_triggered();
-  void on_actionSecondary_Buttons_triggered();
+  void on_actionSelect_Device_By_Name_triggered();
+  void on_actionArrange_Button_Panels_triggered();
   void on_actionAbout_triggered();
   void on_actionDocumentation_triggered();
 
-  // Internal actions:
-  void keysetSelectionChanged(
-    QListWidgetItem *item);
+  void on_prevPanelButton_clicked();
+  void on_nextPanelButton_clicked();
+  void on_selectPanelComboBox_currentIndexChanged(int index);
 
+  // Internal actions:
   void finalCleanup();
 
 private:
-  void enableButtons();
-
   void populateFavorites();
+//  void setupTabs();
 
   Ui::MainWindow *ui;
 
   PIRSelectKeysetForm *selectKeysetForm;
-  PIRSecondaryForm *secondaryForm;
+  PIRSelectDeviceForm *selectDeviceForm;
+  PIRPanelSelectionForm *panelSelectionForm;
   PIRDocumentationForm *documentationForm;
   PIRAboutForm *aboutForm;
 
   PIRKeysetManager *myKeysets;
+  PIRPanelManager *myPanels;
 
   unsigned int currentKeyset;
 
index 8fc81c2..4e30f06 100644 (file)
      <verstretch>0</verstretch>
     </sizepolicy>
    </property>
-   <layout class="QGridLayout" name="gridLayout_2">
-    <property name="margin">
+   <layout class="QGridLayout" name="gridLayout">
+    <property name="leftMargin">
+     <number>0</number>
+    </property>
+    <property name="topMargin">
+     <number>8</number>
+    </property>
+    <property name="rightMargin">
+     <number>0</number>
+    </property>
+    <property name="bottomMargin">
      <number>0</number>
     </property>
     <item row="0" column="0">
-     <widget class="QTabWidget" name="buttonsWidget">
+     <widget class="QPushButton" name="prevPanelButton">
+      <property name="icon">
+       <iconset resource="PierogiResources.qrc">
+        <normaloff>:/icons/arrow_left_icon&amp;48.png</normaloff>:/icons/arrow_left_icon&amp;48.png</iconset>
+      </property>
+      <property name="iconSize">
+       <size>
+        <width>36</width>
+        <height>36</height>
+       </size>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="1">
+     <widget class="QComboBox" name="selectPanelComboBox">
       <property name="sizePolicy">
-       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
-      <property name="tabPosition">
-       <enum>QTabWidget::North</enum>
+     </widget>
+    </item>
+    <item row="0" column="2">
+     <widget class="QPushButton" name="nextPanelButton">
+      <property name="text">
+       <string/>
       </property>
-      <property name="tabShape">
-       <enum>QTabWidget::Rounded</enum>
+      <property name="icon">
+       <iconset resource="PierogiResources.qrc">
+        <normaloff>:/icons/arrow_right_icon&amp;48.png</normaloff>:/icons/arrow_right_icon&amp;48.png</iconset>
       </property>
-      <property name="currentIndex">
-       <number>0</number>
+      <property name="iconSize">
+       <size>
+        <width>36</width>
+        <height>36</height>
+       </size>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="0" colspan="3">
+     <widget class="QStackedWidget" name="stackedButtonsWidget">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
       </property>
-      <widget class="QWidget" name="mainTab">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <attribute name="title">
-        <string>Main</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_4">
-        <property name="margin">
-         <number>8</number>
-        </property>
-        <item row="0" column="0">
-         <widget class="QPushButton" name="mainChannelUpButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Channel Up</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/br_up_icon&amp;48.png</normaloff>:/icons/br_up_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1" rowspan="2">
-         <layout class="QVBoxLayout" name="verticalLayout_2">
-          <property name="spacing">
-           <number>-1</number>
-          </property>
-          <property name="leftMargin">
-           <number>0</number>
-          </property>
-          <item>
-           <widget class="QPushButton" name="powerButton">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="layoutDirection">
-             <enum>Qt::LeftToRight</enum>
-            </property>
-            <property name="text">
-             <string>Power</string>
-            </property>
-            <property name="icon">
-             <iconset resource="PierogiResources.qrc">
-              <normaloff>:/icons/on-off_icon&amp;48.png</normaloff>:/icons/on-off_icon&amp;48.png</iconset>
-            </property>
-            <property name="iconSize">
-             <size>
-              <width>48</width>
-              <height>48</height>
-             </size>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <spacer name="verticalSpacer">
-            <property name="orientation">
-             <enum>Qt::Vertical</enum>
-            </property>
-            <property name="sizeType">
-             <enum>QSizePolicy::Minimum</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>20</width>
-              <height>20</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-          <item>
-           <widget class="QLabel" name="makeLabel">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text">
-             <string>Keyset Make</string>
-            </property>
-            <property name="alignment">
-             <set>Qt::AlignCenter</set>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QLabel" name="nameLabel">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text">
-             <string>Keyset Name</string>
-            </property>
-            <property name="alignment">
-             <set>Qt::AlignCenter</set>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <spacer name="verticalSpacer_2">
-            <property name="orientation">
-             <enum>Qt::Vertical</enum>
-            </property>
-            <property name="sizeType">
-             <enum>QSizePolicy::Minimum</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>20</width>
-              <height>20</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-          <item>
-           <widget class="QPushButton" name="muteButton">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text">
-             <string>Mute</string>
-            </property>
-            <property name="icon">
-             <iconset resource="PierogiResources.qrc">
-              <normaloff>:/icons/sound_mute_icon&amp;48.png</normaloff>:/icons/sound_mute_icon&amp;48.png</iconset>
-            </property>
-            <property name="iconSize">
-             <size>
-              <width>48</width>
-              <height>48</height>
-             </size>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-        <item row="0" column="2">
-         <widget class="QPushButton" name="mainVolumeUp">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="layoutDirection">
-           <enum>Qt::LeftToRight</enum>
-          </property>
-          <property name="text">
-           <string>Volume Up</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/sound_high_icon&amp;48.png</normaloff>:/icons/sound_high_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0">
-         <widget class="QPushButton" name="mainChannelDownButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Channel Down</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/br_down_icon&amp;48.png</normaloff>:/icons/br_down_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="2">
-         <widget class="QPushButton" name="mainVolumeDownButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Volume Down</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/sound_low_icon&amp;48.png</normaloff>:/icons/sound_low_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="utilityTab">
-       <attribute name="title">
-        <string>Utility</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_9">
-        <property name="margin">
-         <number>8</number>
-        </property>
-        <item row="0" column="0">
-         <widget class="QPushButton" name="redButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Red</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/red_square.png</normaloff>:/icons/red_square.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QPushButton" name="greenButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Green</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/green_square.png</normaloff>:/icons/green_square.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QPushButton" name="yellowButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Yellow</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/yellow_square.png</normaloff>:/icons/yellow_square.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="3">
-         <widget class="QPushButton" name="blueButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Blue</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/blue_square.png</normaloff>:/icons/blue_square.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="2">
-         <widget class="QPushButton" name="audioButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>I/II Audio</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="3">
-         <widget class="QPushButton" name="infoButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Info</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="1">
-         <widget class="QPushButton" name="inputButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Input</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="1" column="1">
-         <widget class="QPushButton" name="aspectRatioButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Aspect Ratio</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="3">
-         <widget class="QPushButton" name="captionButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>CC / Subtitle</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0">
-         <widget class="QPushButton" name="soundModeButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Sound Mode</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="0">
-         <widget class="QPushButton" name="pictureModeButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Picture Mode</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="keypadTab">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <attribute name="title">
-        <string>Keypad</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_3">
-        <property name="margin">
-         <number>8</number>
-        </property>
-        <item row="1" column="0">
-         <widget class="QPushButton" name="oneButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>1</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1">
-         <widget class="QPushButton" name="twoButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>2</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="2">
-         <widget class="QPushButton" name="threeButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>3</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0">
-         <widget class="QPushButton" name="fourButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>4</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="1">
-         <widget class="QPushButton" name="fiveButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>5</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="2">
-         <widget class="QPushButton" name="sixButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>6</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="0">
-         <widget class="QPushButton" name="sevenButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>7</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="1">
-         <widget class="QPushButton" name="eightButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>8</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="2">
-         <widget class="QPushButton" name="nineButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>9</string>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="1">
-         <widget class="QPushButton" name="zeroButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>0</string>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="2">
-         <widget class="QPushButton" name="enterButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Enter</string>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="0">
-         <widget class="QPushButton" name="clearButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Clear</string>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="3">
-         <widget class="QPushButton" name="dashButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Dash</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/dash.png</normaloff>:/icons/dash.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="3">
-         <widget class="QPushButton" name="plusOneHundredButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>+100</string>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="3">
-         <widget class="QPushButton" name="prevChannelButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Prev Channel</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="3">
-         <widget class="QPushButton" name="doubleDigitButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>-/-- Double Digit</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="menuTab">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <attribute name="title">
-        <string>Menu</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout">
-        <property name="margin">
-         <number>8</number>
-        </property>
-        <item row="0" column="0">
-         <widget class="QPushButton" name="guideButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Guide</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QPushButton" name="upButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Up</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="3">
-         <widget class="QPushButton" name="menuButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Menu</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0">
-         <widget class="QPushButton" name="leftButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Left</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/arrow_left_icon&amp;48.png</normaloff>:/icons/arrow_left_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="3">
-         <widget class="QPushButton" name="rightButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Right</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/arrow_right_icon&amp;48.png</normaloff>:/icons/arrow_right_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="0">
-         <widget class="QPushButton" name="discMenuButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Disc Menu</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="3">
-         <widget class="QPushButton" name="exitButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Exit</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="1">
-         <widget class="QPushButton" name="selectButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Select</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="1">
-         <widget class="QPushButton" name="downButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Down</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="mediaTab">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <attribute name="title">
-        <string>Media</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_7">
-        <property name="margin">
-         <number>8</number>
-        </property>
-        <item row="0" column="0">
-         <widget class="QPushButton" name="mediaPreviousButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Previous</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/rewind_previous_icon&amp;48.png</normaloff>:/icons/rewind_previous_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QPushButton" name="mediaNextButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Next</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/fastforward_next_icon&amp;48.png</normaloff>:/icons/fastforward_next_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QPushButton" name="replayButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Replay</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/undo_icon&amp;48.png</normaloff>:/icons/undo_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="3">
-         <widget class="QPushButton" name="advanceButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Advance</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/redo_icon&amp;48.png</normaloff>:/icons/redo_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0">
-         <widget class="QPushButton" name="stepBackButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Step Back</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/playback_prev_icon&amp;48.png</normaloff>:/icons/playback_prev_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="2">
-         <widget class="QPushButton" name="reverseButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Reverse</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/playback_rew_icon&amp;48.png</normaloff>:/icons/playback_rew_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="3">
-         <widget class="QPushButton" name="fastForwardButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Fast Fwd</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/playback_ff_icon&amp;48.png</normaloff>:/icons/playback_ff_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0">
-         <widget class="QPushButton" name="playButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Play</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/playback_play_icon&amp;48.png</normaloff>:/icons/playback_play_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="1">
-         <widget class="QPushButton" name="pauseButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Pause</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/playback_pause_icon&amp;48.png</normaloff>:/icons/playback_pause_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="2">
-         <widget class="QPushButton" name="stopButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Stop</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/playback_stop_icon&amp;48.png</normaloff>:/icons/playback_stop_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="3">
-         <widget class="QPushButton" name="ejectButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Eject</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/eject_icon&amp;48.png</normaloff>:/icons/eject_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1">
-         <widget class="QPushButton" name="stepForwardButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Step Fwd</string>
-          </property>
-          <property name="icon">
-           <iconset resource="PierogiResources.qrc">
-            <normaloff>:/icons/playback_next_icon&amp;48.png</normaloff>:/icons/playback_next_icon&amp;48.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>48</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="favoritesTab">
-       <attribute name="title">
-        <string>Favorite</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_8">
-        <property name="margin">
-         <number>8</number>
-        </property>
-        <item row="0" column="0">
-         <widget class="QPushButton" name="addKeysetButton">
-          <property name="text">
-           <string>Add Current Keyset</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QPushButton" name="removeKeysetButton">
-          <property name="text">
-           <string>Remove Selected Keyset</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0" colspan="2">
-         <widget class="QListWidget" name="favoriteKeysetsWidget"/>
-        </item>
-       </layout>
-      </widget>
      </widget>
     </item>
    </layout>
      <string>Pierogi</string>
     </property>
     <addaction name="actionSelectKeyset"/>
-    <addaction name="actionSecondary_Buttons"/>
+    <addaction name="actionSelect_Device_By_Name"/>
+    <addaction name="actionArrange_Button_Panels"/>
     <addaction name="actionDocumentation"/>
     <addaction name="actionAbout"/>
    </widget>
   </widget>
   <action name="actionSelectKeyset">
    <property name="text">
-    <string>Select Keyset</string>
+    <string>Select Keyset by Name</string>
    </property>
   </action>
   <action name="actionAbout">
     <string>Documentation</string>
    </property>
   </action>
-  <action name="actionSecondary_Buttons">
+  <action name="actionSelect_Device_By_Name">
+   <property name="text">
+    <string>Select Keyset by Device</string>
+   </property>
+  </action>
+  <action name="actionArrange_Button_Panels">
    <property name="text">
-    <string>Secondary Buttons</string>
+    <string>Manage Panels</string>
    </property>
   </action>
  </widget>
  <resources>
   <include location="PierogiResources.qrc"/>
  </resources>
- <connections>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>fourEnabled(bool)</signal>
-   <receiver>fourButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>86</x>
-     <y>442</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>45</x>
-     <y>187</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>fiveEnabled(bool)</signal>
-   <receiver>fiveButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>269</x>
-     <y>442</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>230</x>
-     <y>187</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>volumeDownEnabled(bool)</signal>
-   <receiver>mainVolumeDownButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>796</x>
-     <y>232</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>546</x>
-     <y>294</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>enterEnabled(bool)</signal>
-   <receiver>enterButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>547</x>
-     <y>441</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>417</x>
-     <y>344</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>redEnabled(bool)</signal>
-   <receiver>redButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>116</x>
-     <y>153</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>yellowEnabled(bool)</signal>
-   <receiver>yellowButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>494</x>
-     <y>153</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>oneEnabled(bool)</signal>
-   <receiver>oneButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>792</x>
-     <y>33</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>45</x>
-     <y>110</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>captionsEnabled(bool)</signal>
-   <receiver>captionButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>116</x>
-     <y>334</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>inputEnabled(bool)</signal>
-   <receiver>inputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>305</x>
-     <y>334</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>sleepEnabled(bool)</signal>
-   <receiver>sleepButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>494</x>
-     <y>334</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>audioEnabled(bool)</signal>
-   <receiver>audioButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>497</x>
-     <y>246</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>muteEnabled(bool)</signal>
-   <receiver>muteButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>399</x>
-     <y>393</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>aspectRatioEnabled(bool)</signal>
-   <receiver>aspectRatioButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>107</x>
-     <y>246</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>ejectEnabled(bool)</signal>
-   <receiver>ejectButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>692</x>
-     <y>373</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>sixEnabled(bool)</signal>
-   <receiver>sixButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>438</x>
-     <y>441</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>417</x>
-     <y>187</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>eightEnabled(bool)</signal>
-   <receiver>eightButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>254</x>
-     <y>443</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>230</x>
-     <y>266</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>pauseEnabled(bool)</signal>
-   <receiver>pauseButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>306</x>
-     <y>337</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>fastForwardEnabled(bool)</signal>
-   <receiver>fastForwardButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>678</x>
-     <y>239</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>playEnabled(bool)</signal>
-   <receiver>playButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>120</x>
-     <y>337</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>stopEnabled(bool)</signal>
-   <receiver>stopButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>492</x>
-     <y>337</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>replayEnabled(bool)</signal>
-   <receiver>replayButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>492</x>
-     <y>141</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>doubleDigitEnabled(bool)</signal>
-   <receiver>doubleDigitButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>683</x>
-     <y>289</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>reverseEnabled(bool)</signal>
-   <receiver>reverseButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>492</x>
-     <y>239</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>nineEnabled(bool)</signal>
-   <receiver>nineButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>550</x>
-     <y>442</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>417</x>
-     <y>266</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>zeroEnabled(bool)</signal>
-   <receiver>zeroButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>325</x>
-     <y>440</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>230</x>
-     <y>344</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>leftEnabled(bool)</signal>
-   <receiver>leftButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>104</x>
-     <y>442</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>119</x>
-     <y>246</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>sevenEnabled(bool)</signal>
-   <receiver>sevenButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>90</x>
-     <y>442</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>45</x>
-     <y>266</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>prevChannelEnabled(bool)</signal>
-   <receiver>prevChannelButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>595</x>
-     <y>443</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>602</x>
-     <y>110</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>guideEnabled(bool)</signal>
-   <receiver>guideButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>151</x>
-     <y>337</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>clearEnabled(bool)</signal>
-   <receiver>clearButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>43</x>
-     <y>443</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>45</x>
-     <y>344</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>nextEnabled(bool)</signal>
-   <receiver>mediaNextButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>306</x>
-     <y>141</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>stepForwardEnabled(bool)</signal>
-   <receiver>stepForwardButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>306</x>
-     <y>239</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>previousEnabled(bool)</signal>
-   <receiver>mediaPreviousButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>120</x>
-     <y>141</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>discMenuEnabled(bool)</signal>
-   <receiver>discMenuButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>137</x>
-     <y>405</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</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>695</x>
-     <y>264</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>upEnabled(bool)</signal>
-   <receiver>upButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>350</x>
-     <y>25</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>355</x>
-     <y>139</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>stepBackEnabled(bool)</signal>
-   <receiver>stepBackButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>120</x>
-     <y>239</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>selectEnabled(bool)</signal>
-   <receiver>selectButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>310</x>
-     <y>440</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>309</x>
-     <y>245</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>menuEnabled(bool)</signal>
-   <receiver>menuButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>577</x>
-     <y>85</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>570</x>
-     <y>138</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>rightEnabled(bool)</signal>
-   <receiver>rightButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>702</x>
-     <y>48</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>699</x>
-     <y>232</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>downEnabled(bool)</signal>
-   <receiver>downButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>363</x>
-     <y>443</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>372</x>
-     <y>346</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>twoEnabled(bool)</signal>
-   <receiver>twoButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>177</x>
-     <y>443</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>230</x>
-     <y>110</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>threeEnabled(bool)</signal>
-   <receiver>threeButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>479</x>
-     <y>439</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>417</x>
-     <y>110</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>blueEnabled(bool)</signal>
-   <receiver>blueButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>683</x>
-     <y>153</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>advanceEnabled(bool)</signal>
-   <receiver>advanceButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>678</x>
-     <y>141</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>plusOneHundredEnabled(bool)</signal>
-   <receiver>plusOneHundredButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>677</x>
-     <y>106</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>dashEnabled(bool)</signal>
-   <receiver>dashButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>683</x>
-     <y>107</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>greenEnabled(bool)</signal>
-   <receiver>greenButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>305</x>
-     <y>153</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>exitEnabled(bool)</signal>
-   <receiver>exitButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>578</x>
-     <y>441</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>583</x>
-     <y>343</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>channelUpEnabled(bool)</signal>
-   <receiver>mainChannelUpButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>102</x>
-     <y>26</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>51</x>
-     <y>164</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>channelDownEnabled(bool)</signal>
-   <receiver>mainChannelDownButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>222</x>
-     <y>27</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>51</x>
-     <y>294</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>volumeUpEnabled(bool)</signal>
-   <receiver>mainVolumeUp</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>621</x>
-     <y>24</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>546</x>
-     <y>164</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>keysetMakeChanged(QString)</signal>
-   <receiver>makeLabel</receiver>
-   <slot>setText(QString)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>399</x>
-     <y>283</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>powerEnabled(bool)</signal>
-   <receiver>powerButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>375</x>
-     <y>443</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>299</x>
-     <y>164</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>keysetNameChanged(QString)</signal>
-   <receiver>nameLabel</receiver>
-   <slot>setText(QString)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>222</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>399</x>
-     <y>301</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>pictureModeEnabled(bool)</signal>
-   <receiver>pictureModeButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>103</x>
-     <y>406</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>MainWindow</sender>
-   <signal>soundModeEnabled(bool)</signal>
-   <receiver>soundModeButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>103</x>
-     <y>264</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
+ <connections/>
  <slots>
   <signal>zeroEnabled(bool)</signal>
   <signal>oneEnabled(bool)</signal>
index 742ccdc..f2f5c2a 100644 (file)
@@ -78,7 +78,6 @@ SOURCES += main.cpp mainwindow.cpp \
     protocols/samsungprotocol.cpp \
     keysets/pioneer.cpp \
     protocols/spaceprotocol.cpp \
-    pirsecondaryform.cpp \
     protocols/rcaprotocol.cpp \
     keysets/acer.cpp \
     keysets/aiwa.cpp \
@@ -133,7 +132,32 @@ SOURCES += main.cpp mainwindow.cpp \
     keysets/foxtel.cpp \
     keysets/nad.cpp \
     keysets/universum.cpp \
-    keysets/hyundai.cpp
+    keysets/hyundai.cpp \
+    pirselectdeviceform.cpp \
+    keysets/harmankardon.cpp \
+    forms/piradjustform.cpp \
+    forms/pirairconditionerform.cpp \
+    forms/pirinputform.cpp \
+    forms/pirmedia2form.cpp \
+    forms/pirtvform.cpp \
+    forms/pirmainform.cpp \
+    forms/pirutilityform.cpp \
+    forms/pirkeypadform.cpp \
+    forms/pirmenuform.cpp \
+    forms/pirmediaform.cpp \
+    forms/pirfavoritesform.cpp \
+    pirpanelselectionform.cpp \
+    pirpanelmanager.cpp \
+    protocols/nokia32protocol.cpp \
+    protocols/kathreinprotocol.cpp \
+    keysets/aoc.cpp \
+    keysets/arcam.cpp \
+    keysets/dell.cpp \
+    keysets/dse.cpp \
+    keysets/dynex.cpp \
+    keysets/kathrein.cpp \
+    keysets/starsat.cpp \
+    keysets/viewsat.cpp
 HEADERS += mainwindow.h \
     pirkeynames.h \
     pirmakenames.h \
@@ -185,7 +209,6 @@ HEADERS += mainwindow.h \
     protocols/samsungprotocol.h \
     keysets/pioneer.h \
     protocols/spaceprotocol.h \
-    pirsecondaryform.h \
     keysets/yamaha.h \
     protocols/rcaprotocol.h \
     keysets/acer.h \
@@ -241,13 +264,51 @@ HEADERS += mainwindow.h \
     keysets/foxtel.h \
     keysets/nad.h \
     keysets/universum.h \
-    keysets/hyundai.h
+    keysets/hyundai.h \
+    pirselectdeviceform.h \
+    keysets/harmankardon.h \
+    forms/piradjustform.h \
+    forms/pirairconditionerform.h \
+    forms/pirinputform.h \
+    forms/pirmedia2form.h \
+    forms/pirtvform.h \
+    forms/pirmainform.h \
+    forms/pirutilityform.h \
+    forms/pirkeypadform.h \
+    forms/pirmenuform.h \
+    forms/pirmediaform.h \
+    forms/pirfavoritesform.h \
+    pirpanelnames.h \
+    pirpanelmanager.h \
+    pirpanelselectionform.h \
+    protocols/nokia32protocol.h \
+    protocols/kathreinprotocol.h \
+    keysets/aoc.h \
+    keysets/arcam.h \
+    keysets/dell.h \
+    keysets/dse.h \
+    keysets/dynex.h \
+    keysets/kathrein.h \
+    keysets/starsat.h \
+    keysets/viewsat.h
 FORMS += mainwindow.ui \
     pirdocumentationform.ui \
     piraboutform.ui \
     pirselectkeysetform.ui \
-    pirsecondaryform.ui \
-    sideshotleftform.ui
+    sideshotleftform.ui \
+    pirselectdeviceform.ui \
+    forms/piradjustform.ui \
+    forms/pirairconditionerform.ui \
+    forms/pirinputform.ui \
+    forms/pirmedia2form.ui \
+    forms/pirtvform.ui \
+    forms/pirmainform.ui \
+    forms/pirutilityform.ui \
+    forms/pirkeypadform.ui \
+    forms/pirmenuform.ui \
+    forms/pirmediaform.ui \
+    forms/pirfavoritesform.ui \
+    pirpanelselectionform.ui
 
 # Please do not modify the following two lines. Required for deployment.
 include(deployment.pri)
index 41589e6..71e8824 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.1, 2012-02-24T11:27:58. -->
+<!-- Written by Qt Creator 2.4.1, 2012-02-29T19:50:16. -->
 <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-0.6.11</value>
+      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-1.0.0</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_6_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_1_1_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_7_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_0_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_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">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-24T09:51:59</value>
+       <value type="QDateTime">2012-02-29T10:48:05</value>
        <value type="QDateTime">2012-02-06T17:22:16</value>
        <value type="QDateTime">2012-02-12T23:10:44</value>
        <value type="QDateTime">2012-02-09T18:12:21</value>
        <value type="QDateTime">2012-02-16T21:50:07</value>
        <value type="QDateTime">2012-01-17T00:15:23</value>
        <value type="QDateTime">2012-01-30T20:23:06</value>
+       <value type="QDateTime">2012-02-29T19:26:06</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>
index 0f5c6c6..a58404d 100644 (file)
@@ -189,6 +189,17 @@ enum PIRKeyName{
   NextPreset_Key,
   PrevPreset_Key,
 
+  // Air Conditioner controls:
+  TempUp_Key,
+  TempDown_Key,
+  Fan_Key,
+  Cool_Key,
+  Heat_Key,
+  Oscillate_Key,
+  FanFaster_Key,
+  FanSlower_Key,
+  EnergySave_Key,
+
   // Other keys:
   Captions_Key,
   Info_Key,
index a9d6267..e0f6f15 100644 (file)
@@ -7,17 +7,22 @@
 #include "keysets/acer.h"
 #include "keysets/admiral.h"
 #include "keysets/aiwa.h"
+#include "keysets/aoc.h"
 #include "keysets/apple.h"
+#include "keysets/arcam.h"
 #include "keysets/beko.h"
 #include "keysets/bose.h"
 #include "keysets/bush.h"
 #include "keysets/cambridge.h"
 #include "keysets/canon.h"
 #include "keysets/daewoo.h"
+#include "keysets/dell.h"
 #include "keysets/denon.h"
 #include "keysets/digitalstream.h"
 #include "keysets/directv.h"
 #include "keysets/dish.h"
+#include "keysets/dse.h"
+#include "keysets/dynex.h"
 #include "keysets/ei.h"
 #include "keysets/elgato.h"
 #include "keysets/emerson.h"
@@ -27,6 +32,7 @@
 #include "keysets/goldstar.h"
 #include "keysets/grundig.h"
 #include "keysets/haier.h"
+#include "keysets/harmankardon.h"
 #include "keysets/hauppauge.h"
 #include "keysets/hitachi.h"
 #include "keysets/homecast.h"
@@ -35,6 +41,7 @@
 #include "keysets/humax.h"
 #include "keysets/hyundai.h"
 #include "keysets/jvc.h"
+#include "keysets/kathrein.h"
 #include "keysets/kenwood.h"
 #include "keysets/lg.h"
 #include "keysets/logitech.h"
@@ -60,6 +67,7 @@
 #include "keysets/sharp.h"
 #include "keysets/sky.h"
 #include "keysets/sony.h"
+#include "keysets/starsat.h"
 #include "keysets/technics.h"
 #include "keysets/tivo.h"
 #include "keysets/topfield.h"
@@ -67,6 +75,7 @@
 #include "keysets/united.h"
 #include "keysets/universum.h"
 #include "keysets/vestel.h"
+#include "keysets/viewsat.h"
 #include "keysets/virgin.h"
 #include "keysets/vizio.h"
 #include "keysets/wd.h"
@@ -116,8 +125,12 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new AiwaCarStereo1(counter++));
   setupKeyset(new AiwaDVD1(counter++));
 
+  setupKeyset(new AOCTV1(counter++));
+
   setupKeyset(new AppleWhiteRemote(counter++));
 
+  setupKeyset(new ArcamReceiver1(counter++));
+
   setupKeyset(new BekoTV1(counter++));
 
   setupKeyset(new BoseRadio1(counter++));
@@ -169,6 +182,8 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new DenonAudio3(counter++));
   setupKeyset(new DenonAudio4(counter++));
 
+  setupKeyset(new DellRemote1(counter++));
+
   setupKeyset(new DigitalStreamReceiver(counter++));
 
   setupKeyset(new DirectvReceiver1(counter++));
@@ -190,6 +205,11 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new DishReceiver1n(counter++));
   setupKeyset(new DishReceiver1o(counter++));
 
+  setupKeyset(new DSEDVD1(counter++));
+  setupKeyset(new DSESat1(counter++));
+
+  setupKeyset(new DynexTV1(counter++));
+
   setupKeyset(new EiTV1(counter++));
 
   setupKeyset(new ElgatoEyeTV1(counter++));
@@ -204,6 +224,7 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new FortecReceiver2(counter++));
 
   setupKeyset(new FoxtelSTB1(counter++));
+  setupKeyset(new FoxtelSTB2(counter++));
 
   setupKeyset(new GoldStarTV1(counter++));
   setupKeyset(new GoldStarTV2(counter++));
@@ -227,6 +248,15 @@ PIRKeysetManager::PIRKeysetManager()
 
   setupKeyset(new HaierTV1(counter++));
 
+  setupKeyset(new HarmanKardonAmp1(counter++));
+  setupKeyset(new HarmanKardonAmp2(counter++));
+  setupKeyset(new HarmanKardonReceiver2(counter++));
+  setupKeyset(new HarmanKardonTape1(counter++));
+  setupKeyset(new HarmanKardonDVD1(counter++));
+  setupKeyset(new HarmanKardonDVD1a(counter++));
+  setupKeyset(new HarmanKardonCD1(counter++));
+  setupKeyset(new HarmanKardonCD2(counter++));
+
   setupKeyset(new HauppaugePCTV1(counter++));
   setupKeyset(new HauppaugePCTV1a(counter++));
   setupKeyset(new HauppaugePCTV1b(counter++));
@@ -279,6 +309,10 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new JVCAudio2(counter++));
   setupKeyset(new JVCDVD1(counter++));
 
+  setupKeyset(new KathreinSat1(counter++));
+  setupKeyset(new KathreinSat2(counter++));
+  setupKeyset(new KathreinSat3(counter++));
+
   setupKeyset(new KenwoodAudio1(counter++));
   setupKeyset(new KenwoodComponent1(counter++));
   setupKeyset(new KenwoodComponent2(counter++));
@@ -303,6 +337,7 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new LGAC1(counter++));
 
   setupKeyset(new LogitechSpeakers(counter++));
+  setupKeyset(new LogitechSqueezebox(counter++));
 
   setupKeyset(new MagnavoxDVD1(counter++));
   setupKeyset(new MagnavoxVCR1(counter++));
@@ -497,6 +532,11 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new SonyVCR1a(counter++));
   setupKeyset(new SonyVCR1b(counter++));
   setupKeyset(new SonyReceiver1(counter++));
+  setupKeyset(new SonyCD1(counter++));
+  setupKeyset(new SonyCD1a(counter++));
+  setupKeyset(new SonyCD1b(counter++));
+
+  setupKeyset(new StarsatSat1(counter++));
 
   setupKeyset(new TechnicsAudio1(counter++));
   setupKeyset(new TechnicsAudio1a(counter++));
@@ -545,12 +585,16 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new VestelTV1(counter++));
   setupKeyset(new VestelTV2(counter++));
 
+  setupKeyset(new ViewsatSat1(counter++));
+  setupKeyset(new ViewsatSat1a(counter++));
+
   setupKeyset(new VirginSTB1(counter++));
 
   setupKeyset(new VizioTV1(counter++));
 
   setupKeyset(new WDMediaPlayer1(counter++));
   setupKeyset(new WDMediaPlayer1a(counter++));
+  setupKeyset(new WDMediaPlayer1b(counter++));
 
   setupKeyset(new WestinghouseTV1(counter++));
   setupKeyset(new WestinghouseTV2(counter++));
@@ -719,8 +763,9 @@ void PIRKeysetManager::setupKeyset(
 }
 
 
-void PIRKeysetManager::populateGuiWidget(
-  PIRSelectKeysetForm *skf) const
+void PIRKeysetManager::populateSelectionWidgets(
+  PIRSelectKeysetForm *skf,
+  PIRSelectDeviceForm *sdf) const
 {
   PIRMakeName make;
   PIRKeysetWidgetItem *kwi;
@@ -729,18 +774,23 @@ void PIRKeysetManager::populateGuiWidget(
 
   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);
-    i->second->populateDeviceTypes(kwi);
     skf->addWidgetItem(kwi);
+
+    // Create widgets for the devices:
+    i->second->populateDevices(i->first, sdf);
+
     ++i;
   }
 }
 
 
+/*
 void PIRKeysetManager::populateDeviceTypes(
   PIRKeysetWidgetItem *kwi,
   unsigned int keysetID) const
@@ -751,3 +801,4 @@ void PIRKeysetManager::populateDeviceTypes(
     i->second->populateDeviceTypes(kwi);
   }
 }
+*/
index aed42ce..4cc5f42 100644 (file)
@@ -9,6 +9,7 @@
 
 class QObject;
 class PIRSelectKeysetForm;
+class PIRSelectDeviceForm;
 class PIRKeysetWidgetItem;
 
 #include <map>
@@ -27,8 +28,9 @@ public:
 
   ~PIRKeysetManager();
 
-  void populateGuiWidget(
-    PIRSelectKeysetForm *widget) const;
+  void populateSelectionWidgets(
+    PIRSelectKeysetForm *skf,
+    PIRSelectDeviceForm *sdf) const;
 
   bool keysetExists(
     unsigned int keysetID) const;
@@ -52,9 +54,11 @@ public:
   QString getDisplayName(
     unsigned int keysetID) const;
 
+/*
   void populateDeviceTypes(
     PIRKeysetWidgetItem *kwi,
     unsigned int keysetID) const;
+*/
 
   void populateKeyset(
     QObject *guiObject,
index 82987ce..f7076a6 100644 (file)
@@ -1,9 +1,13 @@
 #include "pirkeysetmetadata.h"
+#include "pirselectdeviceform.h"
 #include "pirkeysetwidgetitem.h"
 #include "protocols/pirprotocol.h"
 
 #include <iostream>
 
+// Global helper objects:
+extern PIRMakeMgr makeManager;
+//extern PIRDeviceTypeMgr deviceManager;
 
 PIRKeysetMetaData::PIRKeysetMetaData(
   const char *r,
@@ -34,13 +38,23 @@ void PIRKeysetMetaData::moveToThread(
 }
 
 
-void PIRKeysetMetaData::populateDeviceTypes(
-  PIRKeysetWidgetItem *kwi) const
+void PIRKeysetMetaData::populateDevices(
+  unsigned int id,
+  PIRSelectDeviceForm *sdf) const
 {
-  PIRDeviceTypeCollection::const_iterator i = deviceTypes.begin();
-  while (i != deviceTypes.end())
+  PIRKeysetWidgetItem *kwi;
+
+  PIRDeviceCollection::const_iterator i = controlledDevices.begin();
+
+  while (i != controlledDevices.end())
   {
-    kwi->addDeviceType(*i);
+    // Create a widget for the keyset:
+    QString tempString = makeManager.getMakeString(i->make);
+    tempString.append(" ");
+    tempString.append(i->model);
+    kwi = new PIRKeysetWidgetItem(tempString, id, i->make, i->type);
+    sdf->addWidgetItem(kwi);
+
     ++i;
   }
 }
index c961b00..c70b040 100644 (file)
@@ -11,7 +11,7 @@
 class QThread;
 class QObject;
 
-class PIRKeysetWidgetItem;
+class PIRSelectDeviceForm;
 class PIRProtocol;
 
 typedef std::map<PIRKeyName, const char *> KeyCollection;
@@ -33,7 +33,7 @@ public:
   PIRDeviceTypeName type;
 };
 
-typedef std::list<DeviceInfo> DeviceCollection;
+typedef std::list<DeviceInfo> PIRDeviceCollection;
 
 class PIRKeysetMetaData
 {
@@ -58,8 +58,9 @@ public:
   void moveToThread(
     QThread *thread);
 
-  void populateDeviceTypes(
-    PIRKeysetWidgetItem *kwi) const;
+  void populateDevices(
+    unsigned int id,
+    PIRSelectDeviceForm *sdf) const;
 
 protected:
   void addControlledDevice(
@@ -150,7 +151,7 @@ protected:
 
   KeyCollection keys;
 
-  DeviceCollection controlledDevices;
+  PIRDeviceCollection controlledDevices;
 
   PIRProtocol *threadableProtocol;
   unsigned int index;
index 97d47b4..1fe4ba7 100644 (file)
@@ -11,10 +11,16 @@ PIRKeysetWidgetItem::PIRKeysetWidgetItem(
 }
 
 
-void PIRKeysetWidgetItem::addDeviceType(
-  PIRDeviceTypeName dt)
+PIRKeysetWidgetItem::PIRKeysetWidgetItem(
+  QString name,
+  unsigned int i,
+  PIRMakeName m,
+  PIRDeviceTypeName t)
+  : QListWidgetItem(name),
+    id(i),
+    make(m),
+    deviceType(t)
 {
-  devices.insert(dt);
 }
 
 
@@ -30,8 +36,7 @@ PIRMakeName PIRKeysetWidgetItem::getMake()
 }
 
 
-bool PIRKeysetWidgetItem::supportsDeviceType(
-  PIRDeviceTypeName dt)
+PIRDeviceTypeName PIRKeysetWidgetItem::getDeviceType()
 {
-  return (devices.find(dt) != devices.end());
+  return deviceType;
 }
index eb1d3de..c03d173 100644 (file)
@@ -14,20 +14,22 @@ public:
     unsigned int id,
     PIRMakeName make);
 
-  void addDeviceType(
+  PIRKeysetWidgetItem(
+    QString name,
+    unsigned int id,
+    PIRMakeName make,
     PIRDeviceTypeName dt);
 
   unsigned int getID();
 
   PIRMakeName getMake();
 
-  bool supportsDeviceType(
-    PIRDeviceTypeName dt);
+  PIRDeviceTypeName getDeviceType();
 
 private:
   unsigned int id;
   PIRMakeName make;
-  PIRDeviceTypeCollection devices;
+  PIRDeviceTypeName deviceType;
 };
 
 #endif // PIRKEYSETWIDGETITEM_H
index ce311cb..716e155 100644 (file)
@@ -8,17 +8,22 @@ PIRMakeMgr::PIRMakeMgr()
   makes[Acer_Make] = "Acer";
   makes[Admiral_Make] = "Admiral";
   makes[Aiwa_Make] = "Aiwa";
+  makes[AOC_Make] = "AOC";
   makes[Apple_Make] = "Apple";
+  makes[Arcam_Make] = "Arcam";
   makes[Beko_Make] = "Beko";
   makes[Bose_Make] = "Bose";
   makes[Bush_Make] = "Bush";
   makes[Cambridge_Make] = "Cambridge Audio";
   makes[Canon_Make] = "Canon";
   makes[Daewoo_Make] = "Daewoo";
+  makes[Dell_Make] = "Dell";
   makes[Denon_Make] = "Denon";
   makes[DigitalStream_Make] = "Digital Stream";
   makes[Directv_Make] = "DirecTV";
   makes[Dish_Make] = "Dish";
+  makes[DSE_Make] = "DSE (Dick Smith)";
+  makes[Dynex_Make] = "Dynex";
   makes[Ei_Make] = "Ei";
   makes[Elgato_Make] = "Elgato";
   makes[Emerson_Make] = "Emerson";
@@ -28,6 +33,7 @@ PIRMakeMgr::PIRMakeMgr()
   makes[GoldStar_Make] = "GoldStar";
   makes[Grundig_Make] = "Grundig";
   makes[Haier_Make] = "Haier";
+  makes[HarmanKardon_Make] = "Harman/Kardon";
   makes[Hauppauge_Make] = "Hauppauge";
   makes[Hitachi_Make] = "Hitachi";
   makes[Homecast_Make] = "Homecast";
@@ -36,6 +42,7 @@ PIRMakeMgr::PIRMakeMgr()
   makes[Humax_Make] = "Humax";
   makes[Hyundai_Make] = "Hyundai";
   makes[JVC_Make] = "JVC";
+  makes[Kathrein_Make] = "Kathrein";
   makes[Kenwood_Make] = "Kenwood";
   makes[LG_Make] = "LG";
   makes[Logitech_Make] = "Logitech";
@@ -61,6 +68,7 @@ PIRMakeMgr::PIRMakeMgr()
   makes[Sharp_Make] = "Sharp";
   makes[Sky_Make] = "Sky";
   makes[Sony_Make] = "Sony";
+  makes[Starsat_Make] = "Starsat";
   makes[Technics_Make] = "Technics";
   makes[Tivo_Make] = "TiVo";
   makes[Topfield_Make] = "Topfield";
@@ -68,6 +76,7 @@ PIRMakeMgr::PIRMakeMgr()
   makes[United_Make] = "United";
   makes[Universum_Make] = "Universum";
   makes[Vestel_Make] = "Vestel";
+  makes[Viewsat_Make] = "Viewsat";
   makes[Virgin_Make] = "Virgin Media";
   makes[Vizio_Make] = "Vizio";
   makes[WD_Make] = "Western Digital";
index 59bb0da..13430a9 100644 (file)
@@ -9,17 +9,22 @@ enum PIRMakeName{
   Acer_Make,
   Admiral_Make,
   Aiwa_Make,
+  AOC_Make,
   Apple_Make,
+  Arcam_Make,
   Beko_Make,
   Bose_Make,
   Bush_Make,
   Cambridge_Make,
   Canon_Make,
   Daewoo_Make,
+  Dell_Make,
   Denon_Make,
   DigitalStream_Make,
   Directv_Make,
   Dish_Make,
+  DSE_Make,
+  Dynex_Make,
   Ei_Make,
   Elgato_Make,
   Emerson_Make,
@@ -29,6 +34,7 @@ enum PIRMakeName{
   GoldStar_Make,
   Grundig_Make,
   Haier_Make,
+  HarmanKardon_Make,
   Hauppauge_Make,
   Hitachi_Make,
   Homecast_Make,
@@ -37,6 +43,7 @@ enum PIRMakeName{
   Humax_Make,
   Hyundai_Make,
   JVC_Make,
+  Kathrein_Make,
   Kenwood_Make,
   LG_Make,
   Logitech_Make,
@@ -62,6 +69,7 @@ enum PIRMakeName{
   Sharp_Make,
   Sky_Make,
   Sony_Make,
+  Starsat_Make,
   Technics_Make,
   Tivo_Make,
   Topfield_Make,
@@ -69,6 +77,7 @@ enum PIRMakeName{
   United_Make,
   Universum_Make,
   Vestel_Make,
+  Viewsat_Make,
   Virgin_Make,
   Vizio_Make,
   WD_Make,
diff --git a/pirpanelmanager.cpp b/pirpanelmanager.cpp
new file mode 100644 (file)
index 0000000..66dc178
--- /dev/null
@@ -0,0 +1,381 @@
+#include "pirpanelmanager.h"
+
+#include "forms/pirmainform.h"
+#include "forms/pirutilityform.h"
+#include "forms/pirkeypadform.h"
+#include "forms/pirmenuform.h"
+#include "forms/pirmediaform.h"
+#include "forms/pirfavoritesform.h"
+#include "forms/pirtvform.h"
+#include "forms/pirmedia2form.h"
+#include "forms/pirinputform.h"
+#include "forms/piradjustform.h"
+#include "forms/pirairconditionerform.h"
+
+#include "mainwindow.h"
+
+PIRPanelManager::PIRPanelManager(MainWindow *mw)
+  : mainForm(0),
+    utilityForm(0),
+    keypadForm(0),
+    menuForm(0),
+    mediaForm(0),
+    media2Form(0),
+    tvForm(0),
+    inputForm(0),
+    adjustForm(0),
+    acForm(0),
+    favoritesForm(0),
+    mainWindow(mw)
+{
+  panelList.push_back(PIRPanelPair(Main_Panel, false));
+  panelList.push_back(PIRPanelPair(Utility_Panel, false));
+  panelList.push_back(PIRPanelPair(Keypad_Panel, false));
+  panelList.push_back(PIRPanelPair(Menu_Panel, false));
+  panelList.push_back(PIRPanelPair(Media_Panel, false));
+  panelList.push_back(PIRPanelPair(Media2_Panel, false));
+  panelList.push_back(PIRPanelPair(TV_Panel, false));
+  panelList.push_back(PIRPanelPair(Input_Panel, false));
+  panelList.push_back(PIRPanelPair(Adjust_Panel, false));
+  panelList.push_back(PIRPanelPair(AC_Panel, false));
+  panelList.push_back(PIRPanelPair(Favorites_Panel, false));
+}
+
+
+PIRPanelManager::~PIRPanelManager()
+{
+  // Note!  We are _not_ deleting the panel forms here, because the Qt GUI
+  // has ownership over some of them.  Moreover, the Panel Manager is not
+  // currently designed to be destroyed until the program ends.  Should the
+  // manager need to be destroyed earlier, this destructor will need to be
+  // changed!
+}
+
+
+/*
+void PIRPanelManager::setupPanels(
+  PIRPanelSelectionForm *psf)
+{
+}
+*/
+
+
+void PIRPanelManager::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
+  if (mainForm) mainForm->enableButtons(keyset, id);
+  if (utilityForm) utilityForm->enableButtons(keyset, id);
+  if (keypadForm) keypadForm->enableButtons(keyset, id);
+  if (menuForm) menuForm->enableButtons(keyset, id);
+  if (mediaForm) mediaForm->enableButtons(keyset, id);
+  if (media2Form) media2Form->enableButtons(keyset, id);
+  if (tvForm) tvForm->enableButtons(keyset, id);
+  if (inputForm) inputForm->enableButtons(keyset, id);
+  if (adjustForm) adjustForm->enableButtons(keyset, id);
+  if (acForm) acForm->enableButtons(keyset, id);
+}
+
+
+void PIRPanelManager::managePanel(
+  PIRPanelName name,
+  int state)
+{
+  int index = 0;
+
+  PIRPanelList::iterator i = panelList.begin();
+  while (i != panelList.end())
+  {
+    if (i->name == name)
+    {
+      break;
+    }
+    else if (i->displayed)
+    {
+      ++index;
+    }
+    ++i;
+  }
+
+  if (i == panelList.end())
+  {
+    // should throw an error message here!!!
+    return;
+  }
+
+  if (state == Qt::Unchecked && i->displayed)
+  {
+    hidePanel(name, index);
+    i->displayed = false;
+  }
+  else if (state == Qt::Checked && !i->displayed)
+  {
+    showPanel(name, index);
+    i->displayed = true;
+  }
+}
+
+
+void PIRPanelManager::hidePanel(
+  PIRPanelName name,
+  int index)
+{
+  switch (name)
+  {
+    case Main_Panel:
+      if (mainForm) mainWindow->removePanel(index, mainForm);
+      break;
+
+    case Utility_Panel:
+      if (utilityForm) mainWindow->removePanel(index, utilityForm);
+      break;
+
+    case Keypad_Panel:
+      if (keypadForm) mainWindow->removePanel(index, keypadForm);
+      break;
+
+    case Menu_Panel:
+      if (menuForm) mainWindow->removePanel(index, menuForm);
+      break;
+
+    case Media_Panel:
+      if (mediaForm) mainWindow->removePanel(index, mediaForm);
+      break;
+
+    case TV_Panel:
+      if (tvForm) mainWindow->removePanel(index, tvForm);
+      break;
+
+    case Media2_Panel:
+      if (media2Form) mainWindow->removePanel(index, media2Form);
+      break;
+
+    case Input_Panel:
+      if (inputForm) mainWindow->removePanel(index, inputForm);
+      break;
+
+    case Adjust_Panel:
+      if (adjustForm) mainWindow->removePanel(index, adjustForm);
+      break;
+
+    case AC_Panel:
+      if (acForm) mainWindow->removePanel(index, acForm);
+      break;
+
+    case Favorites_Panel:
+      if (favoritesForm) mainWindow->removePanel(index, favoritesForm);
+      break;
+
+    default:
+      return; 
+      break;
+  }
+}
+
+
+void PIRPanelManager::showPanel(
+  PIRPanelName name,
+  int index)
+{
+  switch (name)
+  {
+    case Main_Panel:
+      if (!mainForm)
+      {
+        mainForm = new PIRMainForm(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        mainForm,
+        QString("Main Panel - power, volume, and channel controls"));
+
+      break;
+
+    case Utility_Panel:
+      if (!utilityForm)
+      {
+        utilityForm = new PIRUtilityForm(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        utilityForm,
+        QString("Utility Panel - commonly used controls"));
+
+      break;
+
+    case Keypad_Panel:
+      if (!keypadForm)
+      {
+        keypadForm = new PIRKeypadForm(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        keypadForm,
+        QString("Keypad Panel - numeric value entry"));
+
+      break;
+
+    case Menu_Panel:
+      if (!menuForm)
+      {
+        menuForm = new PIRMenuForm(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        menuForm,
+        QString("Menu Panel - enter, exit, and navigate menus"));
+
+      break;
+
+    case Media_Panel:
+      if (!mediaForm)
+      {
+        mediaForm = new PIRMediaForm(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        mediaForm,
+        QString("Media Panel - control over recorded data"));
+
+      break;
+
+    case Media2_Panel:
+      if (!media2Form)
+      {
+        media2Form = new PIRMedia2Form(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        media2Form,
+        QString("Media2 Panel - additonal media controls"));
+
+      break;
+
+    case TV_Panel:
+      if (!tvForm)
+      {
+        tvForm = new PIRTVForm(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        tvForm,
+        QString("TV Panel - teletext and picture-in-picture"));
+
+      break;
+
+    case Input_Panel:
+      if (!inputForm)
+      {
+        inputForm = new PIRInputForm(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        inputForm,
+        QString("Input Panel - manage data sources"));
+
+      break;
+
+    case Adjust_Panel:
+      if (!adjustForm)
+      {
+        adjustForm = new PIRAdjustForm(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        adjustForm,
+        QString("Adjust Panel - modify audio and video"));
+
+      break;
+
+    case AC_Panel:
+      if (!acForm)
+      {
+        acForm = new PIRAirConditionerForm(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        acForm,
+        QString("A/C Panel - air conditioner controls"));
+
+      break;
+
+    case Favorites_Panel:
+      if (!favoritesForm)
+      {
+        favoritesForm = new PIRFavoritesForm(mainWindow);
+        mainWindow->enableButtons();
+      }
+
+      mainWindow->insertPanel(
+        index,
+        favoritesForm,
+        QString("Favorites Panel - memorized keysets"));
+
+      break;
+
+    default:
+      break;
+  }
+}
+
+
+void PIRPanelManager::selectPrevFavKeyset()
+{
+  // If the favorites form doesn't exist, no need to continue:
+  if (!favoritesForm) return;
+
+  favoritesForm->selectPrevFavKeyset();
+}
+
+
+void PIRPanelManager::selectNextFavKeyset()
+{
+  // If the favorites form doesn't exist, no need to continue:
+  if (!favoritesForm) return;
+
+  favoritesForm->selectNextFavKeyset();
+}
+
+
+void PIRPanelManager::addFavoritesItem(
+  PIRKeysetWidgetItem *item)
+{
+  if (!favoritesForm)
+  {
+    favoritesForm = new PIRFavoritesForm(mainWindow);
+  }
+
+  favoritesForm->addItem(item);
+}
+
+
+QListWidget *PIRPanelManager::getFavoritesListWidget()
+{
+  if (!favoritesForm)
+  {
+    favoritesForm = new PIRFavoritesForm(mainWindow);
+  }
+
+  return favoritesForm->getFavoritesListWidget();
+}
+
diff --git a/pirpanelmanager.h b/pirpanelmanager.h
new file mode 100644 (file)
index 0000000..025a904
--- /dev/null
@@ -0,0 +1,98 @@
+#ifndef PIRPANELMANAGER_H
+#define PIRPANELMANAGER_H
+
+#include "pirpanelnames.h"
+
+class PIRMainForm;
+class PIRUtilityForm;
+class PIRKeypadForm;
+class PIRMenuForm;
+class PIRMediaForm;
+class PIRFavoritesForm;
+class PIRTVForm;
+class PIRMedia2Form;
+class PIRInputForm;
+class PIRAdjustForm;
+class PIRAirConditionerForm;
+
+class PIRKeysetWidgetItem;
+class PIRPanelSelectionForm;
+class PIRKeysetManager;
+class QListWidget;
+class MainWindow;
+
+#include <list>
+
+class PIRPanelPair
+{
+public:
+  PIRPanelPair(
+    PIRPanelName n,
+    bool d)
+    : name(n),
+      displayed(d)
+  {}
+
+  PIRPanelName name;
+  bool displayed;
+};
+
+typedef std::list<PIRPanelPair> PIRPanelList;
+
+class PIRPanelManager
+{
+public:
+  PIRPanelManager(
+    MainWindow *mw);
+
+  ~PIRPanelManager();
+
+/*
+  void setupPanels(
+    PIRPanelSelectionForm *psf);
+*/
+
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
+  void managePanel(
+    PIRPanelName name,
+    int state);
+
+  void selectPrevFavKeyset();
+  void selectNextFavKeyset();
+  void addFavoritesItem(
+    PIRKeysetWidgetItem *item);
+
+  // This is a hack:
+  QListWidget *getFavoritesListWidget();
+
+private:
+  void hidePanel(
+    PIRPanelName name,
+    int index);
+
+  void showPanel(
+    PIRPanelName name,
+    int index);
+  
+  PIRMainForm *mainForm;
+  PIRUtilityForm *utilityForm;
+  PIRKeypadForm *keypadForm;
+  PIRMenuForm *menuForm;
+  PIRMediaForm *mediaForm;
+  PIRMedia2Form *media2Form;
+  PIRTVForm *tvForm;
+  PIRInputForm *inputForm;
+  PIRAdjustForm *adjustForm;
+  PIRAirConditionerForm *acForm;
+  PIRFavoritesForm *favoritesForm;
+
+  PIRPanelList panelList;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRPANELMANAGER_H
diff --git a/pirpanelnames.h b/pirpanelnames.h
new file mode 100644 (file)
index 0000000..27289a4
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef PIRPANELNAMES_H
+#define PIRPANELNAMES_H
+
+enum PIRPanelName
+{
+  Main_Panel,
+  Utility_Panel,
+  Keypad_Panel,
+  Menu_Panel,
+  Media_Panel,
+  TV_Panel,
+  Media2_Panel,
+  Input_Panel,
+  Adjust_Panel,
+  AC_Panel,
+  Favorites_Panel
+};
+
+#endif // PIRPANELNAMES_H
diff --git a/pirpanelselectionform.cpp b/pirpanelselectionform.cpp
new file mode 100644 (file)
index 0000000..67e87f0
--- /dev/null
@@ -0,0 +1,84 @@
+#include "pirpanelselectionform.h"
+#include "ui_pirpanelselectionform.h"
+
+#include "mainwindow.h"
+
+PIRPanelSelectionForm::PIRPanelSelectionForm(QWidget *parent) :
+  QWidget(parent),
+  ui(new Ui::PIRPanelSelectionForm)
+{
+  ui->setupUi(this);
+
+  mainWindow = dynamic_cast<MainWindow *>(parent);
+
+  setAttribute(Qt::WA_Maemo5StackedWindow);
+  setWindowFlags(windowFlags() | Qt::Window);
+
+  // Start by setting up a few initial panels:
+  ui->mainCheckBox->setChecked(true);
+  ui->utilityCheckBox->setChecked(true);
+  ui->keypadCheckBox->setChecked(true);
+  ui->menuCheckBox->setChecked(true);
+  ui->mediaCheckBox->setChecked(true);
+  ui->favoritesCheckBox->setChecked(true);
+}
+
+PIRPanelSelectionForm::~PIRPanelSelectionForm()
+{
+  delete ui;
+}
+
+void PIRPanelSelectionForm::on_mainCheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(Main_Panel, arg1);
+}
+
+void PIRPanelSelectionForm::on_utilityCheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(Utility_Panel, arg1);
+}
+
+void PIRPanelSelectionForm::on_keypadCheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(Keypad_Panel, arg1);
+}
+
+void PIRPanelSelectionForm::on_menuCheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(Menu_Panel, arg1);
+}
+
+void PIRPanelSelectionForm::on_mediaCheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(Media_Panel, arg1);
+}
+
+void PIRPanelSelectionForm::on_tvCheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(TV_Panel, arg1);
+}
+
+void PIRPanelSelectionForm::on_media2CheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(Media2_Panel, arg1);
+}
+
+void PIRPanelSelectionForm::on_inputCheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(Input_Panel, arg1);
+}
+
+void PIRPanelSelectionForm::on_adjustCheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(Adjust_Panel, arg1);
+}
+
+void PIRPanelSelectionForm::on_acCheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(AC_Panel, arg1);
+}
+
+void PIRPanelSelectionForm::on_favoritesCheckBox_stateChanged(int arg1)
+{
+  mainWindow->managePanel(Favorites_Panel, arg1);
+}
diff --git a/pirpanelselectionform.h b/pirpanelselectionform.h
new file mode 100644 (file)
index 0000000..9a81565
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef PIRPANELSELECTIONFORM_H
+#define PIRPANELSELECTIONFORM_H
+
+#include <QWidget>
+#include "pirpanelnames.h"
+
+class MainWindow;
+
+namespace Ui {
+class PIRPanelSelectionForm;
+}
+
+class PIRPanelSelectionForm : public QWidget
+{
+  Q_OBJECT
+  
+public:
+  explicit PIRPanelSelectionForm(QWidget *parent = 0);
+//  PIRPanelSelectionForm(MainWindow *mw);
+  ~PIRPanelSelectionForm();
+  
+private slots:
+  void on_mainCheckBox_stateChanged(int arg1);
+  void on_utilityCheckBox_stateChanged(int arg1);
+  void on_keypadCheckBox_stateChanged(int arg1);
+  void on_menuCheckBox_stateChanged(int arg1);
+  void on_mediaCheckBox_stateChanged(int arg1);
+  void on_tvCheckBox_stateChanged(int arg1);
+  void on_media2CheckBox_stateChanged(int arg1);
+  void on_inputCheckBox_stateChanged(int arg1);
+  void on_adjustCheckBox_stateChanged(int arg1);
+  void on_acCheckBox_stateChanged(int arg1);
+  void on_favoritesCheckBox_stateChanged(int arg1);
+
+private:
+  Ui::PIRPanelSelectionForm *ui;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRPANELSELECTIONFORM_H
diff --git a/pirpanelselectionform.ui b/pirpanelselectionform.ui
new file mode 100644 (file)
index 0000000..aa2d76f
--- /dev/null
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRPanelSelectionForm</class>
+ <widget class="QWidget" name="PIRPanelSelectionForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Select Panels</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <property name="margin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QScrollArea" name="scrollArea">
+     <property name="widgetResizable">
+      <bool>true</bool>
+     </property>
+     <widget class="QWidget" name="scrollAreaWidgetContents">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>782</width>
+        <height>462</height>
+       </rect>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QCheckBox" name="mainCheckBox">
+         <property name="text">
+          <string>Main Panel - power, volume, and channel controls</string>
+         </property>
+         <property name="checked">
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="utilityCheckBox">
+         <property name="text">
+          <string>Utility Panel - commonly used controls</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="keypadCheckBox">
+         <property name="text">
+          <string>Keypad Panel - numeric value entry</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="menuCheckBox">
+         <property name="text">
+          <string>Menu Panel - enter, exit, and navigate menus</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="mediaCheckBox">
+         <property name="text">
+          <string>Media Panel - control over recorded data</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="media2CheckBox">
+         <property name="text">
+          <string>Media2 Panel - additional media controls</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="tvCheckBox">
+         <property name="text">
+          <string>TV Panel - Teletext and Picture-in-Picture</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="inputCheckBox">
+         <property name="text">
+          <string>Input Panel - manage data sources</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="adjustCheckBox">
+         <property name="text">
+          <string>Adjust Panel - modify audio and video</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="acCheckBox">
+         <property name="text">
+          <string>A/C Panel - air conditioner controls</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="favoritesCheckBox">
+         <property name="text">
+          <string>Favorites Panel - memorized keysets</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/pirsecondaryform.cpp b/pirsecondaryform.cpp
deleted file mode 100644 (file)
index ffe9a23..0000000
+++ /dev/null
@@ -1,705 +0,0 @@
-#include "pirsecondaryform.h"
-#include "ui_pirsecondaryform.h"
-#include "mainwindow.h"
-#include "pirkeysetmanager.h"
-
-PIRSecondaryForm::PIRSecondaryForm(QWidget *parent) :
-  QWidget(parent),
-  ui(new Ui::PIRSecondaryForm)
-{
-  ui->setupUi(this);
-
-  mainWindow = dynamic_cast<MainWindow *>(parent);
-
-  setAttribute(Qt::WA_Maemo5StackedWindow);
-  setWindowFlags(windowFlags() | Qt::Window);
-}
-
-PIRSecondaryForm::~PIRSecondaryForm()
-{
-  delete ui;
-}
-
-void PIRSecondaryForm::enableButtons(
-  const PIRKeysetManager *keyset,
-  unsigned int id)
-{
-  // TV Tab
-  emit teletextEnabled(keyset->hasKey(id, Teletext_Key));
-  emit teletextSizeEnabled(keyset->hasKey(id, TeletextSize_Key));
-  emit favoritesEnabled(keyset->hasKey(id, Favorites_Key));
-  emit pageUpEnabled(keyset->hasKey(id, PageUp_Key));
-  emit teletextHoldEnabled(keyset->hasKey(id, TeletextHold_Key));
-  emit teletextRevealEnabled(keyset->hasKey(id, TeletextReveal_Key));
-  emit liveTVEnabled(keyset->hasKey(id, LiveTV_Key));
-  emit pageDownEnabled(keyset->hasKey(id, PageDown_Key));
-  emit pipEnabled(keyset->hasKey(id, PIP_Key));
-  emit pipSwapEnabled(keyset->hasKey(id, PIPSwap_Key));
-  emit pipMoveEnabled(keyset->hasKey(id, PIPMove_Key));
-  emit pipSourceEnabled(keyset->hasKey(id, PIPSource_Key));
-  emit pipChannelUpEnabled(keyset->hasKey(id, PIPChannelUp_Key));
-  emit pipChannelDownEnabled(keyset->hasKey(id, PIPChannelDown_Key));
-  emit pipPauseEnabled(keyset->hasKey(id, PIPPause_Key));
-  emit pipSizeEnabled(keyset->hasKey(id, PIPSize_Key));
-
-  // Media2 Tab
-  emit tunerBandEnabled(keyset->hasKey(id, TunerBand_Key));
-  emit programEnabled(keyset->hasKey(id, Program_Key));
-  emit memoryEnabled(keyset->hasKey(id, Memory_Key));
-  emit callEnabled(keyset->hasKey(id, Call_Key));
-  emit autoTrackingEnabled(keyset->hasKey(id, AutoTracking_Key));
-  emit trackingMinusEnabled(keyset->hasKey(id, TrackingMinus_Key));
-  emit trackingPlusEnabled(keyset->hasKey(id, TrackingPlus_Key));
-  emit vhsSpeedEnabled(keyset->hasKey(id, VHSSpeed_Key));
-  emit slowEnabled(keyset->hasKey(id, Slow_Key));
-  emit slowMinusEnabled(keyset->hasKey(id, SlowMinus_Key));
-  emit slowPlusEnabled(keyset->hasKey(id, SlowPlus_Key));
-  emit nextDiscEnabled(keyset->hasKey(id, NextDisc_Key));
-  emit repeatEnabled(keyset->hasKey(id, Repeat_Key));
-  emit repeatABEnabled(keyset->hasKey(id, RepeatAB_Key));
-  emit randomEnabled(keyset->hasKey(id, Random_Key));
-  emit discTitleEnabled(keyset->hasKey(id, DiscTitle_Key));
-
-  // Input Tab
-  emit cdInputEnabled(keyset->hasKey(id, CDInput_Key));
-  emit tapeInputEnabled(keyset->hasKey(id, TapeInput_Key));
-  emit phonoInputEnabled(keyset->hasKey(id, PhonoInput_Key));
-  emit tunerInputEnabled(keyset->hasKey(id, TunerInput_Key));
-  emit pcInputEnabled(keyset->hasKey(id, PCInput_Key));
-  emit hdmiInputEnabled(keyset->hasKey(id, HDMIInput_Key));
-  emit dvdInputEnabled(keyset->hasKey(id, DVDInput_Key));
-  emit vcrInputEnabled(keyset->hasKey(id, VCRInput_Key));
-  emit antennaInputEnabled(keyset->hasKey(id, AntennaInput_Key));
-  emit cableInputEnabled(keyset->hasKey(id, CableInput_Key));
-  emit satelliteInputEnabled(keyset->hasKey(id, SatInput_Key));
-  emit auxInputEnabled(keyset->hasKey(id, AuxInput_Key));
-
-  // Adjust Tab
-  emit bassUpEnabled(keyset->hasKey(id, BassUp_Key));
-  emit trebleUpEnabled(keyset->hasKey(id, TrebleUp_Key));
-  emit enhancedBassEnabled(keyset->hasKey(id, EnhancedBass_Key));
-  emit noiseReductionEnabled(keyset->hasKey(id, NoiseReduction_Key));
-  emit bassDownEnabled(keyset->hasKey(id, BassDown_Key));
-  emit trebleDownEnabled(keyset->hasKey(id, TrebleDown_Key));
-  emit balanceLeftEnabled(keyset->hasKey(id, BalanceLeft_Key));
-  emit balanceRightEnabled(keyset->hasKey(id, BalanceRight_Key));
-  emit surroundEnabled(keyset->hasKey(id, Surround_Key));
-  emit colorUpEnabled(keyset->hasKey(id, ColorUp_Key));
-  emit brightnessUpEnabled(keyset->hasKey(id, BrightnessUp_Key));
-  emit contrastUpEnabled(keyset->hasKey(id, ContrastUp_Key));
-  emit zoomEnabled(keyset->hasKey(id, Zoom_Key));
-  emit colorDownEnabled(keyset->hasKey(id, ColorDown_Key));
-  emit brightnessDownEnabled(keyset->hasKey(id, BrightnessDown_Key));
-  emit contrastDownEnabled(keyset->hasKey(id, ContrastDown_Key));
-}
-
-// TV Tab
-
-void PIRSecondaryForm::on_teletextButton_pressed()
-{
-  mainWindow->startRepeating(Teletext_Key);
-}
-
-void PIRSecondaryForm::on_teletextButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_teletextSizeButton_pressed()
-{
-  mainWindow->startRepeating(TeletextSize_Key);
-}
-
-void PIRSecondaryForm::on_teletextSizeButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_favoritesButton_pressed()
-{
-  mainWindow->startRepeating(Favorites_Key);
-}
-
-void PIRSecondaryForm::on_favoritesButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pageUpButton_pressed()
-{
-  mainWindow->startRepeating(PageUp_Key);
-}
-
-void PIRSecondaryForm::on_pageUpButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_teletextHoldButton_pressed()
-{
-  mainWindow->startRepeating(TeletextHold_Key);
-}
-
-void PIRSecondaryForm::on_teletextHoldButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_teletextRevealButton_pressed()
-{
-  mainWindow->startRepeating(TeletextReveal_Key);
-}
-
-void PIRSecondaryForm::on_teletextRevealButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_liveTVButton_pressed()
-{
-  mainWindow->startRepeating(LiveTV_Key);
-}
-
-void PIRSecondaryForm::on_liveTVButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pageDownButton_pressed()
-{
-  mainWindow->startRepeating(PageDown_Key);
-}
-
-void PIRSecondaryForm::on_pageDownButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pipButton_pressed()
-{
-  mainWindow->startRepeating(PIP_Key);
-}
-
-void PIRSecondaryForm::on_pipButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pipSwapButton_pressed()
-{
-  mainWindow->startRepeating(PIPSwap_Key);
-}
-
-void PIRSecondaryForm::on_pipSwapButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pipMoveButton_pressed()
-{
-  mainWindow->startRepeating(PIPMove_Key);
-}
-
-void PIRSecondaryForm::on_pipMoveButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pipSourceButton_pressed()
-{
-  mainWindow->startRepeating(PIPSource_Key);
-}
-
-void PIRSecondaryForm::on_pipSourceButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pipChannelUpButton_pressed()
-{
-  mainWindow->startRepeating(PIPChannelUp_Key);
-}
-
-void PIRSecondaryForm::on_pipChannelUpButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pipChannelDownButton_pressed()
-{
-  mainWindow->startRepeating(PIPChannelDown_Key);
-}
-
-void PIRSecondaryForm::on_pipChannelDownButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pipPauseButton_pressed()
-{
-  mainWindow->startRepeating(PIPPause_Key);
-}
-
-void PIRSecondaryForm::on_pipPauseButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pipSizeButton_pressed()
-{
-  mainWindow->startRepeating(PIPSize_Key);
-}
-
-void PIRSecondaryForm::on_pipSizeButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-
-// Media 2 Tab
-
-void PIRSecondaryForm::on_tunerBandButton_pressed()
-{
-  mainWindow->startRepeating(TunerBand_Key);
-}
-
-void PIRSecondaryForm::on_tunerBandButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_programButton_pressed()
-{
-  mainWindow->startRepeating(Program_Key);
-}
-
-void PIRSecondaryForm::on_programButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_memoryButton_pressed()
-{
-  mainWindow->startRepeating(Memory_Key);
-}
-
-void PIRSecondaryForm::on_memoryButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_callButton_pressed()
-{
-  mainWindow->startRepeating(Call_Key);
-}
-
-void PIRSecondaryForm::on_callButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_autoTrackingButton_pressed()
-{
-  mainWindow->startRepeating(AutoTracking_Key);
-}
-
-void PIRSecondaryForm::on_autoTrackingButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_trackingMinusButton_pressed()
-{
-  mainWindow->startRepeating(TrackingMinus_Key);
-}
-
-void PIRSecondaryForm::on_trackingMinusButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_trackingPlusButton_pressed()
-{
-  mainWindow->startRepeating(TrackingPlus_Key);
-}
-
-void PIRSecondaryForm::on_trackingPlusButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_vhsSpeedButton_pressed()
-{
-  mainWindow->startRepeating(VHSSpeed_Key);
-}
-
-void PIRSecondaryForm::on_vhsSpeedButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_slowButton_pressed()
-{
-  mainWindow->startRepeating(Slow_Key);
-}
-
-void PIRSecondaryForm::on_slowButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_slowMinusButton_pressed()
-{
-  mainWindow->startRepeating(SlowMinus_Key);
-}
-
-void PIRSecondaryForm::on_slowMinusButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_slowPlusButton_pressed()
-{
-  mainWindow->startRepeating(SlowPlus_Key);
-}
-
-void PIRSecondaryForm::on_slowPlusButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_discSelectButton_pressed()
-{
-  mainWindow->startRepeating(NextDisc_Key);
-}
-
-void PIRSecondaryForm::on_discSelectButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_repeatButton_pressed()
-{
-  mainWindow->startRepeating(Repeat_Key);
-}
-
-void PIRSecondaryForm::on_repeatButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_repeatABButton_pressed()
-{
-  mainWindow->startRepeating(RepeatAB_Key);
-}
-
-void PIRSecondaryForm::on_repeatABButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_randomButton_pressed()
-{
-  mainWindow->startRepeating(Random_Key);
-}
-
-void PIRSecondaryForm::on_randomButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_discTitleButton_pressed()
-{
-  mainWindow->startRepeating(DiscTitle_Key);
-}
-
-void PIRSecondaryForm::on_discTitleButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-
-// Input Tab
-
-void PIRSecondaryForm::on_cdInputButton_pressed()
-{
-  mainWindow->startRepeating(CDInput_Key);
-}
-
-void PIRSecondaryForm::on_cdInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_tapeInputButton_pressed()
-{
-  mainWindow->startRepeating(TapeInput_Key);
-}
-
-void PIRSecondaryForm::on_tapeInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_phonoInputButton_pressed()
-{
-  mainWindow->startRepeating(PhonoInput_Key);
-}
-
-void PIRSecondaryForm::on_phonoInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_tunerInputButton_pressed()
-{
-  mainWindow->startRepeating(TunerInput_Key);
-}
-
-void PIRSecondaryForm::on_tunerInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_pcInputButton_pressed()
-{
-  mainWindow->startRepeating(PCInput_Key);
-}
-
-void PIRSecondaryForm::on_pcInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_hdmiInputButton_pressed()
-{
-  mainWindow->startRepeating(HDMIInput_Key);
-}
-
-void PIRSecondaryForm::on_hdmiInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_dvdInputButton_pressed()
-{
-  mainWindow->startRepeating(DVDInput_Key);
-}
-
-void PIRSecondaryForm::on_dvdInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_vcrInputButton_pressed()
-{
-  mainWindow->startRepeating(VCRInput_Key);
-}
-
-void PIRSecondaryForm::on_vcrInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_antennaInputButton_pressed()
-{
-  mainWindow->startRepeating(AntennaInput_Key);
-}
-
-void PIRSecondaryForm::on_antennaInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_cableInputButton_pressed()
-{
-  mainWindow->startRepeating(CableInput_Key);
-}
-
-void PIRSecondaryForm::on_cableInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_satelliteInputButton_pressed()
-{
-  mainWindow->startRepeating(SatInput_Key);
-}
-
-void PIRSecondaryForm::on_satelliteInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_auxInputButton_pressed()
-{
-  mainWindow->startRepeating(AuxInput_Key);
-}
-
-void PIRSecondaryForm::on_auxInputButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-
-// Adjust Tab
-
-void PIRSecondaryForm::on_bassUpButton_pressed()
-{
-  mainWindow->startRepeating(BassUp_Key);
-}
-
-void PIRSecondaryForm::on_bassUpButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_trebleUpButton_pressed()
-{
-  mainWindow->startRepeating(TrebleUp_Key);
-}
-
-void PIRSecondaryForm::on_trebleUpButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_enhancedBassButton_pressed()
-{
-  mainWindow->startRepeating(EnhancedBass_Key);
-}
-
-void PIRSecondaryForm::on_enhancedBassButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_noiseReductionButton_pressed()
-{
-  mainWindow->startRepeating(NoiseReduction_Key);
-}
-
-void PIRSecondaryForm::on_noiseReductionButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_bassDownButton_pressed()
-{
-  mainWindow->startRepeating(BassDown_Key);
-}
-
-void PIRSecondaryForm::on_bassDownButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_trebleDownButton_pressed()
-{
-  mainWindow->startRepeating(TrebleDown_Key);
-}
-
-void PIRSecondaryForm::on_trebleDownButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_balanceLeftButton_pressed()
-{
-  mainWindow->startRepeating(BalanceLeft_Key);
-}
-
-void PIRSecondaryForm::on_balanceLeftButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_balanceRightButton_pressed()
-{
-  mainWindow->startRepeating(BalanceRight_Key);
-}
-
-void PIRSecondaryForm::on_balanceRightButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_surroundButton_pressed()
-{
-  mainWindow->startRepeating(Surround_Key);
-}
-
-void PIRSecondaryForm::on_surroundButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_colorUpButton_pressed()
-{
-  mainWindow->startRepeating(ColorUp_Key);
-}
-
-void PIRSecondaryForm::on_colorUpButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_brightnessUpButton_pressed()
-{
-  mainWindow->startRepeating(BrightnessUp_Key);
-}
-
-void PIRSecondaryForm::on_brightnessUpButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_contrastUpButton_pressed()
-{
-  mainWindow->startRepeating(ContrastUp_Key);
-}
-
-void PIRSecondaryForm::on_contrastUpButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_zoomButton_pressed()
-{
-  mainWindow->startRepeating(Zoom_Key);
-}
-
-void PIRSecondaryForm::on_zoomButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_colorDownButton_pressed()
-{
-  mainWindow->startRepeating(ColorDown_Key);
-}
-
-void PIRSecondaryForm::on_colorDownButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_brightnessDownButton_pressed()
-{
-  mainWindow->startRepeating(BrightnessDown_Key);
-}
-
-void PIRSecondaryForm::on_brightnessDownButton_released()
-{
-  mainWindow->stopRepeating();
-}
-
-void PIRSecondaryForm::on_contrastDownButton_pressed()
-{
-  mainWindow->startRepeating(ContrastDown_Key);
-}
-
-void PIRSecondaryForm::on_contrastDownButton_released()
-{
-  mainWindow->stopRepeating();
-}
diff --git a/pirsecondaryform.h b/pirsecondaryform.h
deleted file mode 100644 (file)
index 1489fb5..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-#ifndef PIRSECONDARYFORM_H
-#define PIRSECONDARYFORM_H
-
-#include <QWidget>
-
-namespace Ui {
-class PIRSecondaryForm;
-}
-
-class MainWindow;
-class PIRKeysetManager;
-
-class PIRSecondaryForm : public QWidget
-{
-  Q_OBJECT
-  
-public:
-  explicit PIRSecondaryForm(QWidget *parent = 0);
-
-  ~PIRSecondaryForm();
-
-  void enableButtons(
-    const PIRKeysetManager *keyset,
-    unsigned int id);
-
-signals:
-  // TV Tab:
-  void teletextEnabled(bool);
-  void teletextSizeEnabled(bool);
-  void favoritesEnabled(bool);
-  void pageUpEnabled(bool);
-  void teletextHoldEnabled(bool);
-  void teletextRevealEnabled(bool);
-  void liveTVEnabled(bool);
-  void pageDownEnabled(bool);
-  void pipEnabled(bool);
-  void pipSwapEnabled(bool);
-  void pipMoveEnabled(bool);
-  void pipSourceEnabled(bool);
-  void pipChannelUpEnabled(bool);
-  void pipChannelDownEnabled(bool);
-  void pipPauseEnabled(bool);
-  void pipSizeEnabled(bool);
-
-  // Media2 Tab
-  void tunerBandEnabled(bool);
-  void programEnabled(bool);
-  void memoryEnabled(bool);
-  void callEnabled(bool);
-  void autoTrackingEnabled(bool);
-  void trackingMinusEnabled(bool);
-  void trackingPlusEnabled(bool);
-  void vhsSpeedEnabled(bool);
-  void slowEnabled(bool);
-  void slowMinusEnabled(bool);
-  void slowPlusEnabled(bool);
-  void nextDiscEnabled(bool);
-  void repeatEnabled(bool);
-  void repeatABEnabled(bool);
-  void randomEnabled(bool);
-  void discTitleEnabled(bool);
-
-  // Input Tab
-  void cdInputEnabled(bool);
-  void tapeInputEnabled(bool);
-  void phonoInputEnabled(bool);
-  void tunerInputEnabled(bool);
-  void pcInputEnabled(bool);
-  void hdmiInputEnabled(bool);
-  void dvdInputEnabled(bool);
-  void vcrInputEnabled(bool);
-  void antennaInputEnabled(bool);
-  void cableInputEnabled(bool);
-  void satelliteInputEnabled(bool);
-  void auxInputEnabled(bool);
-
-  // Adjust Tab
-  void bassUpEnabled(bool);
-  void trebleUpEnabled(bool);
-  void enhancedBassEnabled(bool);
-  void noiseReductionEnabled(bool);
-  void bassDownEnabled(bool);
-  void trebleDownEnabled(bool);
-  void balanceLeftEnabled(bool);
-  void balanceRightEnabled(bool);
-  void surroundEnabled(bool);
-  void colorUpEnabled(bool);
-  void brightnessUpEnabled(bool);
-  void contrastUpEnabled(bool);
-  void zoomEnabled(bool);
-  void colorDownEnabled(bool);
-  void brightnessDownEnabled(bool);
-  void contrastDownEnabled(bool);
-  
-private slots:
-  // TV Tab:
-  void on_teletextButton_pressed();
-  void on_teletextButton_released();
-  void on_teletextSizeButton_pressed();
-  void on_teletextSizeButton_released();
-  void on_favoritesButton_pressed();
-  void on_favoritesButton_released();
-  void on_pageUpButton_pressed();
-  void on_pageUpButton_released();
-  void on_teletextHoldButton_pressed();
-  void on_teletextHoldButton_released();
-  void on_teletextRevealButton_pressed();
-  void on_teletextRevealButton_released();
-  void on_liveTVButton_pressed();
-  void on_liveTVButton_released();
-  void on_pageDownButton_pressed();
-  void on_pageDownButton_released();
-  void on_pipButton_pressed();
-  void on_pipButton_released();
-  void on_pipSwapButton_pressed();
-  void on_pipSwapButton_released();
-  void on_pipMoveButton_pressed();
-  void on_pipMoveButton_released();
-  void on_pipSourceButton_pressed();
-  void on_pipSourceButton_released();
-  void on_pipChannelUpButton_pressed();
-  void on_pipChannelUpButton_released();
-  void on_pipChannelDownButton_pressed();
-  void on_pipChannelDownButton_released();
-  void on_pipPauseButton_pressed();
-  void on_pipPauseButton_released();
-  void on_pipSizeButton_pressed();
-  void on_pipSizeButton_released();
-
-  // Media2 Tab
-  void on_tunerBandButton_pressed();
-  void on_tunerBandButton_released();
-  void on_programButton_pressed();
-  void on_programButton_released();
-  void on_memoryButton_pressed();
-  void on_memoryButton_released();
-  void on_callButton_pressed();
-  void on_callButton_released();
-  void on_autoTrackingButton_pressed();
-  void on_autoTrackingButton_released();
-  void on_trackingMinusButton_pressed();
-  void on_trackingMinusButton_released();
-  void on_trackingPlusButton_pressed();
-  void on_trackingPlusButton_released();
-  void on_vhsSpeedButton_pressed();
-  void on_vhsSpeedButton_released();
-  void on_slowButton_pressed();
-  void on_slowButton_released();
-  void on_slowMinusButton_pressed();
-  void on_slowMinusButton_released();
-  void on_slowPlusButton_pressed();
-  void on_slowPlusButton_released();
-  void on_discSelectButton_pressed();
-  void on_discSelectButton_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_discTitleButton_pressed();
-  void on_discTitleButton_released();
-
-  // Input Tab
-  void on_cdInputButton_pressed();
-  void on_cdInputButton_released();
-  void on_tapeInputButton_pressed();
-  void on_tapeInputButton_released();
-  void on_phonoInputButton_pressed();
-  void on_phonoInputButton_released();
-  void on_tunerInputButton_pressed();
-  void on_tunerInputButton_released();
-  void on_pcInputButton_pressed();
-  void on_pcInputButton_released();
-  void on_hdmiInputButton_pressed();
-  void on_hdmiInputButton_released();
-  void on_dvdInputButton_pressed();
-  void on_dvdInputButton_released();
-  void on_vcrInputButton_pressed();
-  void on_vcrInputButton_released();
-  void on_antennaInputButton_pressed();
-  void on_antennaInputButton_released();
-  void on_cableInputButton_pressed();
-  void on_cableInputButton_released();
-  void on_satelliteInputButton_pressed();
-  void on_satelliteInputButton_released();
-  void on_auxInputButton_pressed();
-  void on_auxInputButton_released();
-
-  // Adjust Tab
-  void on_bassUpButton_pressed();
-  void on_bassUpButton_released();
-  void on_trebleUpButton_pressed();
-  void on_trebleUpButton_released();
-  void on_enhancedBassButton_pressed();
-  void on_enhancedBassButton_released();
-  void on_noiseReductionButton_pressed();
-  void on_noiseReductionButton_released();
-  void on_bassDownButton_pressed();
-  void on_bassDownButton_released();
-  void on_trebleDownButton_pressed();
-  void on_trebleDownButton_released();
-  void on_balanceLeftButton_pressed();
-  void on_balanceLeftButton_released();
-  void on_balanceRightButton_pressed();
-  void on_balanceRightButton_released();
-  void on_colorUpButton_pressed();
-  void on_colorUpButton_released();
-  void on_brightnessUpButton_pressed();
-  void on_brightnessUpButton_released();
-  void on_contrastUpButton_pressed();
-  void on_contrastUpButton_released();
-  void on_colorDownButton_pressed();
-  void on_colorDownButton_released();
-  void on_brightnessDownButton_pressed();
-  void on_brightnessDownButton_released();
-  void on_contrastDownButton_pressed();
-  void on_contrastDownButton_released();
-  void on_surroundButton_pressed();
-  void on_surroundButton_released();
-  void on_zoomButton_pressed();
-  void on_zoomButton_released();
-
-private:
-  Ui::PIRSecondaryForm *ui;
-
-  MainWindow *mainWindow;
-};
-
-#endif // PIRSECONDARYFORM_H
diff --git a/pirsecondaryform.ui b/pirsecondaryform.ui
deleted file mode 100644 (file)
index 154c093..0000000
+++ /dev/null
@@ -1,2074 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>PIRSecondaryForm</class>
- <widget class="QWidget" name="PIRSecondaryForm">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>800</width>
-    <height>480</height>
-   </rect>
-  </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="windowTitle">
-   <string>Secondary Buttons</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout_5">
-   <property name="margin">
-    <number>0</number>
-   </property>
-   <item row="0" column="0">
-    <widget class="QTabWidget" name="tabWidget">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="currentIndex">
-      <number>0</number>
-     </property>
-     <widget class="QWidget" name="tvTab">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <attribute name="title">
-       <string>TV</string>
-      </attribute>
-      <layout class="QGridLayout" name="gridLayout">
-       <property name="margin">
-        <number>8</number>
-       </property>
-       <item row="0" column="0">
-        <widget class="QPushButton" name="teletextButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Teletext</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="1">
-        <widget class="QPushButton" name="teletextSizeButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Txt Size</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="2">
-        <widget class="QPushButton" name="favoritesButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Favorites</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="3">
-        <widget class="QPushButton" name="pageUpButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Page Up</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="1">
-        <widget class="QPushButton" name="teletextRevealButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Txt Reveal</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="2">
-        <widget class="QPushButton" name="liveTVButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Live TV</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0">
-        <widget class="QPushButton" name="teletextHoldButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Txt Hold</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="0">
-        <widget class="QPushButton" name="pipButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Picture in Picture</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="1">
-        <widget class="QPushButton" name="pipSwapButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>PIP Swap</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="2">
-        <widget class="QPushButton" name="pipMoveButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>PIP Move</string>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="2">
-        <widget class="QPushButton" name="pipPauseButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>PIP Pause</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="3">
-        <widget class="QPushButton" name="pageDownButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Page Down</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="1">
-        <widget class="QPushButton" name="pipSizeButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>PIP Size</string>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="3">
-        <widget class="QPushButton" name="pipChannelDownButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>PIP Ch Down</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/br_down_icon&amp;48.png</normaloff>:/icons/br_down_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="0">
-        <widget class="QPushButton" name="pipSourceButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>PIP Source</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="3">
-        <widget class="QPushButton" name="pipChannelUpButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>PIP Ch Up</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/br_up_icon&amp;48.png</normaloff>:/icons/br_up_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="media2Tab">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <attribute name="title">
-       <string>Media 2</string>
-      </attribute>
-      <layout class="QGridLayout" name="gridLayout_2">
-       <property name="margin">
-        <number>8</number>
-       </property>
-       <item row="0" column="0">
-        <widget class="QPushButton" name="tunerBandButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Tuner Band</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="1">
-        <widget class="QPushButton" name="programButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Program</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="2">
-        <widget class="QPushButton" name="memoryButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Memory</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="3">
-        <widget class="QPushButton" name="callButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Call</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="0">
-        <widget class="QPushButton" name="autoTrackingButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Auto Tracking</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="QPushButton" name="trackingMinusButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Tracking -</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="2">
-        <widget class="QPushButton" name="trackingPlusButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Tracking +</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="3">
-        <widget class="QPushButton" name="vhsSpeedButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>SP/LP/EP</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0">
-        <widget class="QPushButton" name="slowButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Slow</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="2">
-        <widget class="QPushButton" name="slowPlusButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Slow +</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="3">
-        <widget class="QPushButton" name="discSelectButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Disc Select</string>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="0">
-        <widget class="QPushButton" name="repeatButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Repeat</string>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="1">
-        <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 AB</string>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="2">
-        <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="4" column="3">
-        <widget class="QPushButton" name="discTitleButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Disc Title</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="1">
-        <widget class="QPushButton" name="slowMinusButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Slow -</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="inputTab">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <attribute name="title">
-       <string>Input</string>
-      </attribute>
-      <layout class="QGridLayout" name="gridLayout_3">
-       <property name="margin">
-        <number>8</number>
-       </property>
-       <item row="0" column="0">
-        <widget class="QPushButton" name="cdInputButton">
-         <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="tapeInputButton">
-         <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="phonoInputButton">
-         <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="tunerInputButton">
-         <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="0">
-        <widget class="QPushButton" name="pcInputButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>PC</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="QPushButton" name="hdmiInputButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>HDMI</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="2">
-        <widget class="QPushButton" name="dvdInputButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>DVD</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="3">
-        <widget class="QPushButton" name="vcrInputButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>VCR</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0">
-        <widget class="QPushButton" name="antennaInputButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Antenna</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="1">
-        <widget class="QPushButton" name="cableInputButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Cable</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="2">
-        <widget class="QPushButton" name="satelliteInputButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Satellite</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="3">
-        <widget class="QPushButton" name="auxInputButton">
-         <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>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="adjustmentTab">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <attribute name="title">
-       <string>Adjust</string>
-      </attribute>
-      <layout class="QGridLayout" name="gridLayout_4">
-       <property name="margin">
-        <number>8</number>
-       </property>
-       <item row="0" column="0">
-        <widget class="QPushButton" name="bassUpButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Bass</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="1">
-        <widget class="QPushButton" name="trebleUpButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Treble</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="2">
-        <widget class="QPushButton" name="enhancedBassButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Enhanced Bass</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="3">
-        <widget class="QPushButton" name="noiseReductionButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Noise Reduction</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="QPushButton" name="trebleDownButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Treble</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="2">
-        <widget class="QPushButton" name="balanceLeftButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Balance</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_left_icon&amp;48.png</normaloff>:/icons/arrow_left_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="0">
-        <widget class="QPushButton" name="surroundButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Surround</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="1">
-        <widget class="QPushButton" name="colorUpButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Color</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="2">
-        <widget class="QPushButton" name="brightnessUpButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Brightness</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="3">
-        <widget class="QPushButton" name="contrastUpButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Contrast</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_top_icon&amp;48.png</normaloff>:/icons/arrow_top_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="0">
-        <widget class="QPushButton" name="zoomButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Zoom</string>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="1">
-        <widget class="QPushButton" name="colorDownButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Color</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="0">
-        <widget class="QPushButton" name="bassDownButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Bass</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="3">
-        <widget class="QPushButton" name="balanceRightButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Balance</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_right_icon&amp;48.png</normaloff>:/icons/arrow_right_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="2">
-        <widget class="QPushButton" name="brightnessDownButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Brightness</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="3">
-        <widget class="QPushButton" name="contrastDownButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Contrast</string>
-         </property>
-         <property name="icon">
-          <iconset resource="PierogiResources.qrc">
-           <normaloff>:/icons/arrow_bottom_icon&amp;48.png</normaloff>:/icons/arrow_bottom_icon&amp;48.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>48</width>
-           <height>48</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources>
-  <include location="PierogiResources.qrc"/>
- </resources>
- <connections>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>teletextEnabled(bool)</signal>
-   <receiver>teletextButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>teletextSizeEnabled(bool)</signal>
-   <receiver>teletextSizeButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>favoritesEnabled(bool)</signal>
-   <receiver>favoritesButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pageUpEnabled(bool)</signal>
-   <receiver>pageUpButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>teletextHoldEnabled(bool)</signal>
-   <receiver>teletextHoldButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>teletextRevealEnabled(bool)</signal>
-   <receiver>teletextRevealButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>liveTVEnabled(bool)</signal>
-   <receiver>liveTVButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pageDownEnabled(bool)</signal>
-   <receiver>pageDownButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pipEnabled(bool)</signal>
-   <receiver>pipButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pipSwapEnabled(bool)</signal>
-   <receiver>pipSwapButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pipMoveEnabled(bool)</signal>
-   <receiver>pipMoveButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pipSourceEnabled(bool)</signal>
-   <receiver>pipSourceButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pipChannelUpEnabled(bool)</signal>
-   <receiver>pipChannelUpButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pipSizeEnabled(bool)</signal>
-   <receiver>pipSizeButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pipPauseEnabled(bool)</signal>
-   <receiver>pipPauseButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pipChannelDownEnabled(bool)</signal>
-   <receiver>pipChannelDownButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>tunerBandEnabled(bool)</signal>
-   <receiver>tunerBandButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>programEnabled(bool)</signal>
-   <receiver>programButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>memoryEnabled(bool)</signal>
-   <receiver>memoryButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>callEnabled(bool)</signal>
-   <receiver>callButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>autoTrackingEnabled(bool)</signal>
-   <receiver>autoTrackingButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>trackingMinusEnabled(bool)</signal>
-   <receiver>trackingMinusButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>trackingPlusEnabled(bool)</signal>
-   <receiver>trackingPlusButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>vhsSpeedEnabled(bool)</signal>
-   <receiver>vhsSpeedButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>slowEnabled(bool)</signal>
-   <receiver>slowButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>slowMinusEnabled(bool)</signal>
-   <receiver>slowMinusButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>slowPlusEnabled(bool)</signal>
-   <receiver>slowPlusButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>nextDiscEnabled(bool)</signal>
-   <receiver>discSelectButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</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>104</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</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>301</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</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>498</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>discTitleEnabled(bool)</signal>
-   <receiver>discTitleButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>cdInputEnabled(bool)</signal>
-   <receiver>cdInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>104</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>tapeInputEnabled(bool)</signal>
-   <receiver>tapeInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>104</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>phonoInputEnabled(bool)</signal>
-   <receiver>phonoInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>104</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>tunerInputEnabled(bool)</signal>
-   <receiver>tunerInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>104</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>pcInputEnabled(bool)</signal>
-   <receiver>pcInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>253</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>hdmiInputEnabled(bool)</signal>
-   <receiver>hdmiInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>253</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>dvdInputEnabled(bool)</signal>
-   <receiver>dvdInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>253</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>vcrInputEnabled(bool)</signal>
-   <receiver>vcrInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>253</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>antennaInputEnabled(bool)</signal>
-   <receiver>antennaInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>401</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>cableInputEnabled(bool)</signal>
-   <receiver>cableInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>401</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>satelliteInputEnabled(bool)</signal>
-   <receiver>satelliteInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>401</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>auxInputEnabled(bool)</signal>
-   <receiver>auxInputButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>401</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>bassUpEnabled(bool)</signal>
-   <receiver>bassUpButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>trebleUpEnabled(bool)</signal>
-   <receiver>trebleUpButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>enhancedBassEnabled(bool)</signal>
-   <receiver>enhancedBassButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>noiseReductionEnabled(bool)</signal>
-   <receiver>noiseReductionButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>86</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>bassDownEnabled(bool)</signal>
-   <receiver>bassDownButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>trebleDownEnabled(bool)</signal>
-   <receiver>trebleDownButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>balanceLeftEnabled(bool)</signal>
-   <receiver>balanceLeftButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>balanceRightEnabled(bool)</signal>
-   <receiver>balanceRightButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>197</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>surroundEnabled(bool)</signal>
-   <receiver>surroundButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>colorUpEnabled(bool)</signal>
-   <receiver>colorUpButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>brightnessUpEnabled(bool)</signal>
-   <receiver>brightnessUpButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>contrastUpEnabled(bool)</signal>
-   <receiver>contrastUpButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>309</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>zoomEnabled(bool)</signal>
-   <receiver>zoomButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>104</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>colorDownEnabled(bool)</signal>
-   <receiver>colorDownButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>301</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>brightnessDownEnabled(bool)</signal>
-   <receiver>brightnessDownButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>498</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>PIRSecondaryForm</sender>
-   <signal>contrastDownEnabled(bool)</signal>
-   <receiver>contrastDownButton</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>399</x>
-     <y>239</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>695</x>
-     <y>420</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
- <slots>
-  <signal>teletextEnabled(bool)</signal>
-  <signal>teletextSizeEnabled(bool)</signal>
-  <signal>favoritesEnabled(bool)</signal>
-  <signal>pageUpEnabled(bool)</signal>
-  <signal>teletextHoldEnabled(bool)</signal>
-  <signal>teletextRevealEnabled(bool)</signal>
-  <signal>liveTVEnabled(bool)</signal>
-  <signal>pageDownEnabled(bool)</signal>
-  <signal>pipEnabled(bool)</signal>
-  <signal>pipSwapEnabled(bool)</signal>
-  <signal>pipMoveEnabled(bool)</signal>
-  <signal>pipSourceEnabled(bool)</signal>
-  <signal>pipChannelUpEnabled(bool)</signal>
-  <signal>pipChannelDownEnabled(bool)</signal>
-  <signal>pipPauseEnabled(bool)</signal>
-  <signal>pipSizeEnabled(bool)</signal>
-  <signal>tunerBandEnabled(bool)</signal>
-  <signal>programEnabled(bool)</signal>
-  <signal>memoryEnabled(bool)</signal>
-  <signal>callEnabled(bool)</signal>
-  <signal>autoTrackingEnabled(bool)</signal>
-  <signal>trackingMinusEnabled(bool)</signal>
-  <signal>trackingPlusEnabled(bool)</signal>
-  <signal>vhsSpeedEnabled(bool)</signal>
-  <signal>slowEnabled(bool)</signal>
-  <signal>slowMinusEnabled(bool)</signal>
-  <signal>slowPlusEnabled(bool)</signal>
-  <signal>nextDiscEnabled(bool)</signal>
-  <signal>repeatEnabled(bool)</signal>
-  <signal>repeatABEnabled(bool)</signal>
-  <signal>randomEnabled(bool)</signal>
-  <signal>discTitleEnabled(bool)</signal>
-  <signal>cdInputEnabled(bool)</signal>
-  <signal>tapeInputEnabled(bool)</signal>
-  <signal>phonoInputEnabled(bool)</signal>
-  <signal>pcInputEnabled(bool)</signal>
-  <signal>hdmiInputEnabled(bool)</signal>
-  <signal>dvdInputEnabled(bool)</signal>
-  <signal>vcrInputEnabled(bool)</signal>
-  <signal>antennaInputEnabled(bool)</signal>
-  <signal>cableInputEnabled(bool)</signal>
-  <signal>satelliteInputEnabled(bool)</signal>
-  <signal>auxInputEnabled(bool)</signal>
-  <signal>bassUpEnabled(bool)</signal>
-  <signal>trebleUpEnabled(bool)</signal>
-  <signal>enhancedBassEnabled(bool)</signal>
-  <signal>noiseReductionEnabled(bool)</signal>
-  <signal>bassDownEnabled(bool)</signal>
-  <signal>trebleDownEnabled(bool)</signal>
-  <signal>balanceLeftEnabled(bool)</signal>
-  <signal>balanceRightEnabled(bool)</signal>
-  <signal>soundModeEnabled(bool)</signal>
-  <signal>colorUpEnabled(bool)</signal>
-  <signal>brightnessUpEnabled(bool)</signal>
-  <signal>contrastUpEnabled(bool)</signal>
-  <signal>pictureModeEnabled(bool)</signal>
-  <signal>colorDownEnabled(bool)</signal>
-  <signal>brightnessDownEnabled(bool)</signal>
-  <signal>contrastDownEnabled(bool)</signal>
-  <signal>tunerInputEnabled(bool)</signal>
-  <signal>surroundEnabled(bool)</signal>
-  <signal>zoomEnabled(bool)</signal>
- </slots>
-</ui>
diff --git a/pirselectdeviceform.cpp b/pirselectdeviceform.cpp
new file mode 100644 (file)
index 0000000..5ea463e
--- /dev/null
@@ -0,0 +1,118 @@
+#include "pirselectdeviceform.h"
+#include "ui_pirselectdeviceform.h"
+#include "pirkeysetwidgetitem.h"
+
+extern PIRMakeMgr makeManager;
+extern PIRDeviceTypeMgr deviceManager;
+
+PIRSelectDeviceForm::PIRSelectDeviceForm(
+  QWidget *parent)
+  : QWidget(parent),
+    ui(new Ui::PIRSelectDeviceForm),
+    currentMake(Any_Make),
+    currentDevice(Any_Device)
+{
+  ui->setupUi(this);
+
+  setAttribute(Qt::WA_Maemo5StackedWindow);
+  setWindowFlags(windowFlags() | Qt::Window);
+
+  // push the list of makers into the make combo box:
+  makeManager.populateComboBox(ui->makeComboBox);
+  deviceManager.populateComboBox(ui->deviceComboBox);
+
+  // Connection telling main window that keyset has been selected:
+  connect(
+    ui->deviceListWidget,
+    SIGNAL(itemActivated(QListWidgetItem *)),
+    parent,
+    SLOT(keysetSelectionChanged(QListWidgetItem *)),
+    Qt::QueuedConnection);
+
+  // Connection used to filter keyset list:
+  connect(
+    ui->makeComboBox,
+    SIGNAL(currentIndexChanged(int)),
+    this,
+    SLOT(filterListByMake(int)),
+    Qt::QueuedConnection);
+
+  connect(
+    ui->deviceComboBox,
+    SIGNAL(currentIndexChanged(int)),
+    this,
+    SLOT(filterListByDeviceType(int)),
+    Qt::QueuedConnection);
+}
+
+PIRSelectDeviceForm::~PIRSelectDeviceForm()
+{
+  delete ui;
+}
+
+void PIRSelectDeviceForm::addNameToList(
+  QString name,
+  unsigned int index,
+  PIRMakeName make)
+{
+  ui->deviceListWidget->addItem(new PIRKeysetWidgetItem(name, index, make));
+}
+
+void PIRSelectDeviceForm::addWidgetItem(
+  PIRKeysetWidgetItem *kwi)
+{
+  ui->deviceListWidget->addItem(kwi);
+}
+
+QListWidget *PIRSelectDeviceForm::getDeviceListWidget()
+{
+  return ui->deviceListWidget;
+}
+
+void PIRSelectDeviceForm::filterListByMake(
+  int make)
+{
+  currentMake = (PIRMakeName) make;
+  refilterList();
+}
+
+void PIRSelectDeviceForm::filterListByDeviceType(
+  int deviceType)
+{
+  currentDevice = (PIRDeviceTypeName) deviceType;
+  refilterList();
+}
+
+void PIRSelectDeviceForm::refilterList()
+{
+  int index = 0;
+  int count = ui->deviceListWidget->count();
+  PIRKeysetWidgetItem *item;
+  while (index < count)
+  {
+    item = dynamic_cast<PIRKeysetWidgetItem *>(
+      ui->deviceListWidget->item(index));
+
+    // Does the keylist have the required make?
+    if ((currentMake == Any_Make) || (item->getMake() == currentMake))
+    {
+      // And does it have the required type?
+      if ( (currentDevice == Any_Device)
+        || (item->getDeviceType() == currentDevice))
+     {
+        // Yes, we can show this keylist:
+        item->setHidden(false);
+      }
+      else
+      {
+        item->setHidden(true);
+      }
+    }
+    else
+    {
+      item->setHidden(true);
+    }
+
+    ++index;
+  }
+}
diff --git a/pirselectdeviceform.h b/pirselectdeviceform.h
new file mode 100644 (file)
index 0000000..ed30206
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef PIRSELECTDEVICEFORM_H
+#define PIRSELECTDEVICEFORM_H
+
+#include <QWidget>
+
+#include "pirmakenames.h"
+#include "pirdevicetypenames.h"
+
+class PIRKeysetWidgetItem;
+class QListWidget;
+
+namespace Ui {
+class PIRSelectDeviceForm;
+}
+
+class PIRSelectDeviceForm : public QWidget
+{
+  Q_OBJECT
+  
+public:
+  explicit PIRSelectDeviceForm(QWidget *parent = 0);
+  ~PIRSelectDeviceForm();
+
+  void addNameToList(
+    QString name,
+    unsigned int index,
+    PIRMakeName make);
+
+  void addWidgetItem(
+    PIRKeysetWidgetItem *kwi);
+
+  // This is a bit of a hack, but not sure how to create a connection otherwise.
+  QListWidget *getDeviceListWidget();
+
+private slots:
+  void filterListByMake(
+    int make);
+
+  void filterListByDeviceType(
+    int deviceType);
+private:
+  void refilterList();
+
+  Ui::PIRSelectDeviceForm *ui;
+
+  PIRMakeName currentMake;
+  PIRDeviceTypeName currentDevice;
+};
+
+#endif // PIRSELECTDEVICEFORM_H
diff --git a/pirselectdeviceform.ui b/pirselectdeviceform.ui
new file mode 100644 (file)
index 0000000..ede45f0
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRSelectDeviceForm</class>
+ <widget class="QWidget" name="PIRSelectDeviceForm">
+  <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>8</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QLabel" name="makeLabel">
+     <property name="text">
+      <string>Make:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QComboBox" name="makeComboBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QLabel" name="deviceTypeLabel">
+     <property name="text">
+      <string>Device Type:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="3">
+    <widget class="QComboBox" name="deviceComboBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="4">
+    <widget class="QListWidget" name="deviceListWidget"/>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index eab0504..072f361 100644 (file)
@@ -4,14 +4,12 @@
 #include <QListWidget>
 
 extern PIRMakeMgr makeManager;
-extern PIRDeviceTypeMgr deviceManager;
 
 PIRSelectKeysetForm::PIRSelectKeysetForm(
   QWidget *parent)
   : QWidget(parent),
     ui(new Ui::PIRSelectKeysetForm),
-    currentMake(Any_Make),
-    currentDevice(Any_Device)
+    currentMake(Any_Make)
 {
   ui->setupUi(this);
 
@@ -20,7 +18,6 @@ PIRSelectKeysetForm::PIRSelectKeysetForm(
 
   // push the list of makers into the make combo box:
   makeManager.populateComboBox(ui->makeComboBox);
-  deviceManager.populateComboBox(ui->deviceComboBox);
 
   // Connection telling main window that keyset has been selected:
   connect(
@@ -37,13 +34,6 @@ PIRSelectKeysetForm::PIRSelectKeysetForm(
     this,
     SLOT(filterListByMake(int)),
     Qt::QueuedConnection);
-
-  connect(
-    ui->deviceComboBox,
-    SIGNAL(currentIndexChanged(int)),
-    this,
-    SLOT(filterListByDeviceType(int)),
-    Qt::QueuedConnection);
 }
 
 PIRSelectKeysetForm::~PIRSelectKeysetForm()
@@ -77,13 +67,6 @@ void PIRSelectKeysetForm::filterListByMake(
   refilterList();
 }
 
-void PIRSelectKeysetForm::filterListByDeviceType(
-  int deviceType)
-{
-  currentDevice = (PIRDeviceTypeName) deviceType;
-  refilterList();
-}
-
 void PIRSelectKeysetForm::refilterList()
 {
   int index = 0;
@@ -97,17 +80,8 @@ void PIRSelectKeysetForm::refilterList()
     // Does the keylist have the required make?
     if ((currentMake == Any_Make) || (item->getMake() == currentMake))
     {
-      // And, does the keylist have the required device type?
-      if ((currentDevice == Any_Device)
-          || (item->supportsDeviceType(currentDevice)))
-      {
-        // Yes, we can show this keylist:
-        item->setHidden(false);
-      }
-      else
-      {
-        item->setHidden(true);
-      }
+      // Yes, we can show this keylist:
+      item->setHidden(false);
     }
     else
     {
index 789b438..2d88ac8 100644 (file)
@@ -5,7 +5,6 @@
 #include <QString>
 
 #include "pirmakenames.h"
-#include "pirdevicetypenames.h"
 
 class QListWidget;
 class PIRKeysetWidgetItem;
@@ -37,8 +36,10 @@ private slots:
   void filterListByMake(
     int make);
 
+/*
   void filterListByDeviceType(
     int deviceType);
+*/
   
 private:
   void refilterList();
@@ -46,7 +47,6 @@ private:
   Ui::PIRSelectKeysetForm *ui;
 
   PIRMakeName currentMake;
-  PIRDeviceTypeName currentDevice;
 };
 
 #endif // PIRSELECTKEYSETFORM_H
index 1b78469..c075ddc 100644 (file)
      </item>
     </layout>
    </item>
-   <item row="0" column="1">
-    <layout class="QHBoxLayout" name="deviceHorizontalLayout">
-     <item>
-      <widget class="QLabel" name="deviceLabel">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="text">
-        <string>Device:</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QComboBox" name="deviceComboBox">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
    <item row="1" column="0" colspan="2">
     <widget class="QListWidget" name="keysetListWidget"/>
    </item>
index d8c9e8d..c4dcf6d 100644 (file)
@@ -33,7 +33,7 @@ AiwaProtocol::AiwaProtocol(
     repeatSpace(2250)
 {
   setCarrierFrequency(38000);
-  setDutyCycle(50);
+//  setDutyCycle(50);
 }
 
 
index 6f74e07..d192031 100644 (file)
@@ -34,7 +34,7 @@ DishProtocol::DishProtocol(
       6000, false)
 {
   setCarrierFrequency(57600);
-  setDutyCycle(33);
+//  setDutyCycle(33);
 }
 
 
index d903d1a..d94de00 100644 (file)
@@ -30,7 +30,7 @@ JVCProtocol::JVCProtocol(
       60000, true)
 {
   setCarrierFrequency(38000);
-  setDutyCycle(33);
+//  setDutyCycle(33);
 }
 
 
diff --git a/protocols/kathreinprotocol.cpp b/protocols/kathreinprotocol.cpp
new file mode 100644 (file)
index 0000000..1d29779
--- /dev/null
@@ -0,0 +1,151 @@
+#include "kathreinprotocol.h"
+
+#include "pirrx51hardware.h"
+
+#include "pirexception.h"
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// The Kathrein protocol is similar to the NEC protocol:
+// A "zero" is encoded with a 560 usec pulse, 560 usec space.
+// A "one" is encoded with a 560 usec pulse, and 3*560 (1680) usec space.
+// The header is a 9000 usec pulse, 4500 usec space.
+// Commands end with a trailing 560 usec pulse.
+// The repeat block is unique -- it has the normal header and trailer, and
+// includes the command code, but no address, and no complement.
+// Each command runs for 110000 usec before another can be executed.
+// The normal carrier frequency is 38 kHz.
+
+KathreinProtocol::KathreinProtocol(
+  QObject *guiObject,
+  unsigned int index)
+  : SpaceProtocol(
+      guiObject, index,
+      560, 560,
+      560, 1680,
+      9000, 4500,
+      560,
+      110000, true)
+{
+}
+
+
+void KathreinProtocol::startSendingCommand(
+  unsigned int threadableID,
+  PIRKeyName command)
+{
+  // Exceptions here are problematic; I'll try to weed them out by putting the
+  // whole thing in a try/catch block:
+  try
+  {
+    // First, check if we are meant to be the recipient of this command:
+    if (threadableID != id) return;
+
+    clearRepeatFlag();
+
+    KeycodeCollection::const_iterator i = keycodes.find(command);
+
+    // Do we even have this key defined?
+    if (i == keycodes.end())
+    {
+      std::string s = "Tried to send a non-existent command.\n";
+      throw PIRException(s);
+    }
+
+    // construct the device:
+    PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
+
+    int repeatCount = 0;
+    int commandDuration = 0;
+    while (repeatCount < MAX_REPEAT_COUNT)
+    {
+      if (repeatCount)
+      {
+        commandDuration = generateRepeatCommand((*i).second, rx51device);
+      }
+      else
+      {
+        commandDuration = generateStandardCommand((*i).second, rx51device);
+      }
+
+      // Now, tell the device to send the whole command:
+      rx51device.sendCommandToDevice();
+
+      // sleep until the next repetition of command:
+      sleepUntilRepeat(commandDuration);
+
+      // Check whether we've reached the minimum required number of repetitons:
+      if (repeatCount >= minimumRepetitions)
+      {
+        // Check whether we've been asked to stop:
+        if (checkRepeatFlag())
+        {
+          QMutexLocker cifLocker(&commandIFMutex);
+          commandInFlight = false;
+          return;
+        }
+      }
+
+      ++repeatCount;
+    }
+  }
+  catch (PIRException e)
+  {
+    // inform the gui:
+    emit commandFailed(e.getError().c_str());
+  }
+
+  QMutexLocker cifLocker(&commandIFMutex);
+  commandInFlight = false;
+}
+
+
+int KathreinProtocol::generateStandardCommand(
+  const PIRKeyBits &pkb,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+
+  // First, the "header" pulse:
+  rx51device.addPair(headerPulse, headerSpace);
+  duration += (headerPulse + headerSpace);
+
+  // Kathrein protocol has four bits of address and eight bits of command.
+  // As in NEC protocol, the address and command are complemented.
+  // - "preData" should contain the 4-bit address
+  // - "firstCode" should contain the 8-bit command
+  duration += pushReverseBits(preData, rx51device);
+  duration += pushInvertedReverseBits(preData, rx51device);
+  duration += pushReverseBits(pkb.firstCode, rx51device);
+  duration += pushInvertedReverseBits(pkb.firstCode, rx51device);
+
+  // Finally add the "trail":
+  rx51device.addSingle(trailerPulse);
+  duration += trailerPulse;
+
+  return duration;
+}
+
+
+int KathreinProtocol::generateRepeatCommand(
+  const PIRKeyBits &pkb,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+
+  // First, the "header" pulse:
+  rx51device.addPair(headerPulse, headerSpace);
+  duration += (headerPulse + headerSpace);
+
+  // The Kathrein repeat block contains the 8-bit command and nothing else:
+  duration += pushReverseBits(pkb.firstCode, rx51device);
+
+  // Finally add the "trail":
+  rx51device.addSingle(trailerPulse);
+  duration += trailerPulse;
+
+  return duration;
+}
diff --git a/protocols/kathreinprotocol.h b/protocols/kathreinprotocol.h
new file mode 100644 (file)
index 0000000..a511fc8
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef KATHREINPROTOCOL_H
+#define KATHREINPROTOCOL_H
+
+#include "spaceprotocol.h"
+
+class PIRRX51Hardware;
+
+//
+// The Kathrein 24-bit protocol shares some features with the NEC protocol
+// (space encoded, LSB order, sends complement of device and command codes),
+// but has only a 4-bit address code, and uses a unique repeat mechanism.
+//
+
+class KathreinProtocol: public SpaceProtocol
+{
+public:
+  KathreinProtocol(
+    QObject *guiObject,
+    unsigned int index);
+
+public slots:
+  void startSendingCommand(
+    unsigned int threadableID,
+    PIRKeyName command);
+
+private:
+  int generateStandardCommand(
+    const PIRKeyBits &bits,
+    PIRRX51Hardware &device);
+
+  int generateRepeatCommand(
+    const PIRKeyBits &bits,
+    PIRRX51Hardware &device);
+};
+
+#endif // KATHREINPROTOCOL_H
diff --git a/protocols/nokia32protocol.cpp b/protocols/nokia32protocol.cpp
new file mode 100644 (file)
index 0000000..63c36ad
--- /dev/null
@@ -0,0 +1,251 @@
+#include "nokia32protocol.h"
+
+#include "pirrx51hardware.h"
+
+#include "pirexception.h"
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// The Nokia 32 protocol has a 2-bit space encoding system, and appears to
+// work like this:
+// A "zero" is encoded with a 164 usec pulse, 276 usec space.
+// A "one" is encoded with a 164 usec pulse, 445 usec space.
+// A "two" is encoded with a 164 usec pulse, 614 usec space.
+// A "three" is encoded with a 164 usec pulse, 783 usec space.
+// The header is a 412 usec pulse, 276 usec space.
+// Commands end with a trailing 164 usec pulse.
+// The entire pulse train is re-sent when repeating.
+// There is a 100000 usec gap between commands. (? not sure here)
+// The carrier frequency is presumably 36 kHz.
+// The duty cycle is presumably 1/3.
+
+Nokia32Protocol::Nokia32Protocol(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRProtocol(guiObject, index, 100000, false),
+    zeroPulse(164),
+    zeroSpace(276),
+    onePulse(164),
+    oneSpace(445),
+    twoPulse(164),
+    twoSpace(614),
+    threePulse(164),
+    threeSpace(783),
+    headerPulse(412),
+    headerSpace(276),
+    trailerPulse(164),
+    keypressCount(0)
+{
+}
+
+
+void Nokia32Protocol::startSendingCommand(
+  unsigned int threadableID,
+  PIRKeyName command)
+{
+  // Exceptions here are problematic; I'll try to weed them out by putting the
+  // whole thing in a try/catch block:
+  try
+  {
+    // First, check if we are meant to be the recipient of this command:
+    if (threadableID != id) return;
+
+    clearRepeatFlag();
+
+    KeycodeCollection::const_iterator i = keycodes.find(command);
+
+    // Do we even have this key defined?
+    if (i == keycodes.end())
+    {
+      std::string s = "Tried to send a non-existent command.\n";
+      throw PIRException(s);
+    }
+
+    // construct the device:
+    PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
+
+    int repeatCount = 0;
+    int commandDuration = 0;
+    while (repeatCount < MAX_REPEAT_COUNT)
+    {
+      commandDuration = generateStandardCommand((*i).second, rx51device);
+
+      // Now, tell the device to send the whole command:
+      rx51device.sendCommandToDevice();
+
+      // sleep until the next repetition of command:
+      sleepUntilRepeat(commandDuration);
+
+      // Check whether we've reached the minimum required number of repetitons:
+      if (repeatCount >= minimumRepetitions)
+      {
+        // Check whether we've been asked to stop:
+        if (checkRepeatFlag())
+        {
+          QMutexLocker cifLocker(&commandIFMutex);
+          commandInFlight = false;
+          ++keypressCount;
+          return;
+        }
+      }
+
+      ++repeatCount;
+    }
+  }
+  catch (PIRException e)
+  {
+    // inform the gui:
+    emit commandFailed(e.getError().c_str());
+  }
+
+  QMutexLocker cifLocker(&commandIFMutex);
+  commandInFlight = false;
+  ++keypressCount;
+}
+
+
+int Nokia32Protocol::generateStandardCommand(
+  const PIRKeyBits &pkb,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+
+  // First, the "header" pulse:
+  rx51device.addPair(headerPulse, headerSpace);
+  duration += (headerPulse + headerSpace);
+
+  // The layout of the Nokia 32 protocol is as follows:
+  // 1) an 8-bit "device code"
+  // 2) an 8-bit "sub-device code"
+  // 3) one toggle bit
+  // 4) seven more bits somehow associated with the device
+  // 5) an 8-bit command code.
+  // All are sent in MSB order.
+
+  // It's a bit of a hack, but I'll store the first 16 bits of address in the
+  // preData, the next 7 bits of address in the postData, and the 8 bits
+  // of command in the firstCode:
+
+  duration += pushBits(preData, rx51device);
+  duration += pushToggleAndBits(postData, rx51device);
+  duration += pushBits(pkb.firstCode, rx51device);
+
+  // Finally add the "trail":
+  rx51device.addSingle(trailerPulse);
+  duration += trailerPulse;
+
+  return duration;
+}
+
+
+int Nokia32Protocol::pushBits(
+  const CommandSequence &bits,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+  bool firstBit;
+  bool secondBit;
+
+  CommandSequence::const_iterator i = bits.begin();
+  while (i != bits.end())
+  {
+    firstBit = *i;
+    ++i;
+    if (i == bits.end()) break;
+    secondBit = *i;
+
+    duration += pushDoubleBit(firstBit, secondBit, rx51device);
+
+    ++i;
+  }
+
+  return duration;
+}
+
+
+int Nokia32Protocol::pushToggleAndBits(
+  const CommandSequence &bits,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+  bool firstBit;
+  bool secondBit;
+
+  // The first bit is the toggle bit:
+  if (keypressCount % 2)
+  {
+    firstBit = 1;
+  }
+  else
+  {
+    firstBit = 0;
+  }
+
+  CommandSequence::const_iterator i = bits.begin();
+  if (i == bits.end()) return 0;
+
+  secondBit = *i;
+
+  duration += pushDoubleBit(firstBit, secondBit, rx51device);
+
+  ++i;
+
+  while (i != bits.end())
+  {
+    firstBit = *i;
+    ++i;
+    if (i == bits.end()) break;
+    secondBit = *i;
+
+    duration += pushDoubleBit(firstBit, secondBit, rx51device);
+
+    ++i;
+  }
+
+  return duration;
+}
+
+
+int Nokia32Protocol::pushDoubleBit(
+  bool firstBit,
+  bool secondBit,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+
+  if (firstBit == 0)
+  {
+    if (secondBit == 0)
+    {
+      // Send the pulse for "Zero":
+      rx51device.addPair(zeroPulse, zeroSpace);
+      duration += (zeroPulse + zeroSpace);
+    }
+    else
+    {
+      // Send the pulse for "One":
+      rx51device.addPair(onePulse, oneSpace);
+      duration += (onePulse + oneSpace);
+    }
+  }
+  else
+  {
+    if (secondBit == 0)
+    {
+      // Send the pulse for "Two":
+      rx51device.addPair(twoPulse, twoSpace);
+      duration += (twoPulse + twoSpace);
+    }
+    else
+    {
+      // Send the pulse for "Three":
+      rx51device.addPair(threePulse, threeSpace);
+      duration += (threePulse + threeSpace);
+    }
+  }
+
+  return duration;
+}
diff --git a/protocols/nokia32protocol.h b/protocols/nokia32protocol.h
new file mode 100644 (file)
index 0000000..c53a609
--- /dev/null
@@ -0,0 +1,60 @@
+#ifndef NOKIA32PROTOCOL_H
+#define NOKIA32PROTOCOL_H
+
+#include "spaceprotocol.h"
+
+class PIRRX51Hardware;
+
+//
+// The Nokia32 protocol is a somewhat unusual 32-bit protocol.  It encodes
+// pairs of bits rather than individual bits.
+//
+
+class Nokia32Protocol: public PIRProtocol
+{
+public:
+  Nokia32Protocol(
+    QObject *guiObject,
+    unsigned int index);
+
+public slots:
+  void startSendingCommand(
+    unsigned int threadableID,
+    PIRKeyName command);
+
+private:
+  int generateStandardCommand(
+    const PIRKeyBits &bits,
+    PIRRX51Hardware &device);
+
+  int pushBits(
+    const CommandSequence &bits,
+    PIRRX51Hardware &rx51device);
+
+  int pushToggleAndBits(
+    const CommandSequence &bits,
+    PIRRX51Hardware &rx51device);
+
+  int pushDoubleBit(
+    bool firstBit,
+    bool secondBit,
+    PIRRX51Hardware &rx51device);
+
+  unsigned int zeroPulse;
+  unsigned int zeroSpace;
+  unsigned int onePulse;
+  unsigned int oneSpace;
+  unsigned int twoPulse;
+  unsigned int twoSpace;
+  unsigned int threePulse;
+  unsigned int threeSpace;
+
+  unsigned int headerPulse;
+  unsigned int headerSpace;
+
+  unsigned int trailerPulse;
+
+  unsigned int keypressCount;
+};
+
+#endif // NOKIA32PROTOCOL_H
index cecc731..20eddf3 100644 (file)
@@ -36,7 +36,7 @@ SharpProtocol::SharpProtocol(
     expansionBit(expBit)
 {
   setCarrierFrequency(38000);
-  setDutyCycle(33);
+//  setDutyCycle(33);
 }
 
 
index 9fd1f5c..e16fdd7 100644 (file)
@@ -30,7 +30,7 @@ SIRCProtocol::SIRCProtocol(
       45000, true)
 {
   setCarrierFrequency(40000);
-  setDutyCycle(33);
+//  setDutyCycle(33);
 }
 
 
index df784ff..311bbd9 100644 (file)
@@ -1,3 +1,14 @@
+pierogi (1.1.0) unstable; urgency=low
+  * GUI changed - "panels" instead of "tabs", new navigation controls.
+  * New window added for selecting keysets by device. "Device" filter removed from select keyset by name window.
+  * New Air Conditioner control panel added.
+  * New keysets added to Foxtel, Logitech, Sony, Western Digital.
+  * First pass at keysets for AOC, Arcam, Dell, Dick Smith Electronics, Dynex, Harman Kardon, Kathrein, Starsat, Viewsat.
+  * With the hope of extending the N900's range a bit, I'm setting all protocols to use a duty cycle of 50%, regardless of what the documentation says they should use.  I hope this won't cause any problems.
+  * New versioning scheme -- new version name comes at the start of new work, rather than at the end. :)  Pierogi 1.1 is labeled "For a Few Pierogis More".
+
+ -- John Pietrzak <jpietrzak8@gmail.com>  Wed, 29 Feb 2012 10:52:05 -0500
+
 pierogi (1.0.0) unstable; urgency=low
   * Pierogi appears fairly stable and useful at this point.  So, I will declare it to have now reached version "1.0", before starting any radical changes to the gui.  (I'm labeling the 1.0 version "A Fistful of Pierogis". :) )
   * First pass at a keyset for Hyundai.
index f5975bc..7b554f5 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: Version 1.0
- At this point, Pierogi is fairly stable and usable.  So, I'm going to declare this as version 1.0.  Look for significant changes to both the GUI and the underlying code in the future!
+XB-Maemo-Upgrade-Description: New GUI
+ In order to provide more flexibility to Pierogi, I've revamped the GUI.  Mostly, I've replaced the tab-bar with a construct of my own.  We'll have to see how well this works.  Also, many new keysets in this update, as well as better A/C support.
 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