Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Pierogi
Summary Forums Tracker Lists Tasks Docs News SCM Files
authorJohn Pietrzak <john@pietrzak.org>
Tue, 11 Sep 2012 03:45:45 +0000 (23:45 -0400)
committerJohn Pietrzak <john@pietrzak.org>
Tue, 11 Sep 2012 03:45:45 +0000 (23:45 -0400)
This update provides a handful of bugfixes and improvements (mostly
for the power key search form), but also is being used to checkpoint
my progress on the macro support system.  Still lots of work to be
done on that front.  Also, first pass at keysets for Creative and Crown.

48 files changed:
dialogs/pircreatecommanddialog.cpp [new file with mode: 0644]
dialogs/pircreatecommanddialog.h [new file with mode: 0644]
dialogs/pircreatecommanddialog.ui [new file with mode: 0644]
dialogs/pirfavoritesdialog.cpp
dialogs/pirfavoritesdialog.h
dialogs/pirselectmacrodialog.cpp [new file with mode: 0644]
dialogs/pirselectmacrodialog.h [new file with mode: 0644]
dialogs/pirselectmacrodialog.ui [new file with mode: 0644]
dialogs/pirtabschoicedialog.cpp
forms/pirmacroform.cpp
forms/pirmacroform.h
forms/pirmacroform.ui
forms/pirpowersearchform.cpp
forms/pirpowersearchform.h
forms/pirpowersearchform.ui
keysets/creative.cpp [new file with mode: 0644]
keysets/creative.h [new file with mode: 0644]
keysets/crown.cpp [new file with mode: 0644]
keysets/crown.h [new file with mode: 0644]
keysets/triax.cpp
keysets/triax.h
macros/pirmacro.cpp [new file with mode: 0644]
macros/pirmacro.h [new file with mode: 0644]
macros/pirmacrocommanditem.cpp [new file with mode: 0644]
macros/pirmacrocommanditem.h [new file with mode: 0644]
macros/pirmacropack.cpp [new file with mode: 0644]
macros/pirmacropack.h [new file with mode: 0644]
macros/pirreversemultitap.cpp [new file with mode: 0644]
macros/pirreversemultitap.h [new file with mode: 0644]
mainwindow.cpp
mainwindow.h
mainwindow.ui
pierogi.pro
pierogi.pro.user
pirkeynames.cpp [new file with mode: 0644]
pirkeynames.h
pirkeysetmanager.cpp
pirmakenames.cpp
pirmakenames.h
pirpanelmanager.cpp
pirpanelmanager.h
pirpanelnames.h
pirselectdeviceform.ui
pirselectkeysetform.cpp
pirselectkeysetform.h
protocols/pioneerprotocol.cpp
qtc_packaging/debian_fremantle/changelog
qtc_packaging/debian_fremantle/control

diff --git a/dialogs/pircreatecommanddialog.cpp b/dialogs/pircreatecommanddialog.cpp
new file mode 100644 (file)
index 0000000..7f1cb19
--- /dev/null
@@ -0,0 +1,27 @@
+#include "pircreatecommanddialog.h"
+#include "ui_pircreatecommanddialog.h"
+
+#include "mainwindow.h"
+
+/*
+PIRCreateCommandDialog::PIRCreateCommandDialog(QWidget *parent) :
+  QDialog(parent),
+  ui(new Ui::PIRCreateCommandDialog)
+{
+  ui->setupUi(this);
+}
+*/
+
+
+PIRCreateCommandDialog::PIRCreateCommandDialog(
+  MainWindow *mw)
+  : QDialog(mw),
+    ui(new Ui::PIRCreateCommandDialog)
+{
+  ui->setupUi(this);
+}
+
+PIRCreateCommandDialog::~PIRCreateCommandDialog()
+{
+  delete ui;
+}
diff --git a/dialogs/pircreatecommanddialog.h b/dialogs/pircreatecommanddialog.h
new file mode 100644 (file)
index 0000000..2c7d699
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef PIRCREATECOMMANDDIALOG_H
+#define PIRCREATECOMMANDDIALOG_H
+
+#include <QDialog>
+
+class MainWindow;
+
+namespace Ui {
+class PIRCreateCommandDialog;
+}
+
+class PIRCreateCommandDialog : public QDialog
+{
+  Q_OBJECT
+  
+public:
+//  explicit PIRCreateCommandDialog(QWidget *parent = 0);
+
+  PIRCreateCommandDialog(
+    MainWindow *mw);
+
+  ~PIRCreateCommandDialog();
+  
+private:
+  Ui::PIRCreateCommandDialog *ui;
+};
+
+#endif // PIRCREATECOMMANDDIALOG_H
diff --git a/dialogs/pircreatecommanddialog.ui b/dialogs/pircreatecommanddialog.ui
new file mode 100644 (file)
index 0000000..abffb4b
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRCreateCommandDialog</class>
+ <widget class="QDialog" name="PIRCreateCommandDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Choose a Command</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <widget class="QRadioButton" name="selectKeysetRadioButton">
+     <property name="text">
+      <string>Select Keyset</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QComboBox" name="keysetComboBox"/>
+   </item>
+   <item row="1" column="0">
+    <widget class="QRadioButton" name="pressKeyRadioButton">
+     <property name="text">
+      <string>Press a Key</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QComboBox" name="keyComboBox"/>
+   </item>
+   <item row="2" column="0">
+    <widget class="QRadioButton" name="pauseRadioButton">
+     <property name="text">
+      <string>Pause (in Seconds)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QSpinBox" name="pauseTimeSpinBox">
+     <property name="maximum">
+      <number>9999</number>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="2">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>PIRCreateCommandDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>PIRCreateCommandDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index 3b522ef..9f4c69a 100644 (file)
@@ -55,13 +55,13 @@ void PIRFavoritesDialog::selectPrevFavKeyset()
     position,
     QItemSelectionModel::ClearAndSelect);
 
-  mainWindow->keysetSelectionChanged(
-    ui->favoritesListWidget->currentItem());
+  PIRKeysetWidgetItem *kwi = dynamic_cast<PIRKeysetWidgetItem *> (
+      ui->favoritesListWidget->currentItem());
+
+  mainWindow->updateKeysetSelection(kwi->getID());
 
   // Tell the user about the change:
-  QMaemo5InformationBox::information(
-    0,
-    ui->favoritesListWidget->item(position)->text());
+  QMaemo5InformationBox::information(0, kwi->text());
 }
 
 
@@ -87,13 +87,13 @@ void PIRFavoritesDialog::selectNextFavKeyset()
     position,
     QItemSelectionModel::ClearAndSelect);
 
-  mainWindow->keysetSelectionChanged(
-    ui->favoritesListWidget->currentItem());
+  PIRKeysetWidgetItem *kwi = dynamic_cast<PIRKeysetWidgetItem *> (
+      ui->favoritesListWidget->currentItem());
+
+  mainWindow->updateKeysetSelection(kwi->getID());
 
   // Tell the user about the change:
-  QMaemo5InformationBox::information(
-    0,
-    ui->favoritesListWidget->item(position)->text());
+  QMaemo5InformationBox::information(0, kwi->text());
 }
 
 
@@ -151,8 +151,16 @@ QListWidget *PIRFavoritesDialog::getFavoritesListWidget()
 }
 
 
-void PIRFavoritesDialog::on_favoritesListWidget_itemClicked()
+void PIRFavoritesDialog::on_favoritesListWidget_itemClicked(
+  QListWidgetItem *item)
 {
+  if (item)
+  {
+    PIRKeysetWidgetItem *kwi = dynamic_cast<PIRKeysetWidgetItem *> (item);
+
+    mainWindow->updateKeysetSelection(kwi->getID());
+  }
+
   // Exit from the dialog:
   accept();
 }
index 4b233f0..a12ceb9 100644 (file)
@@ -41,7 +41,8 @@ public:
   void selectNextFavKeyset();
 
 private slots:
-  void on_favoritesListWidget_itemClicked();
+  void on_favoritesListWidget_itemClicked(
+    QListWidgetItem *item);
   
 private:
   Ui::PIRFavoritesDialog *ui;
diff --git a/dialogs/pirselectmacrodialog.cpp b/dialogs/pirselectmacrodialog.cpp
new file mode 100644 (file)
index 0000000..6d58a3a
--- /dev/null
@@ -0,0 +1,67 @@
+#include "pirselectmacrodialog.h"
+#include "ui_pirselectmacrodialog.h"
+
+#include "macros/pirmacropack.h"
+#include "macros/pirreversemultitap.h"
+#include "mainwindow.h"
+
+/*
+PIRSelectMacroDialog::PIRSelectMacroDialog(QWidget *parent) :
+  QDialog(parent),
+  ui(new Ui::PIRSelectMacroDialog)
+{
+  ui->setupUi(this);
+}
+*/
+
+
+PIRSelectMacroDialog::PIRSelectMacroDialog(
+  MainWindow *mw)
+  : QDialog(mw),
+    ui(new Ui::PIRSelectMacroDialog)
+//    mainWindow(mw)
+{
+  ui->setupUi(this);
+
+  userPack = new PIRMacroPack(ui->macroTreeWidget, "User Defined Macros");
+  multitapPack = new PIRReverseMultitap(ui->macroTreeWidget, mw);
+}
+
+
+PIRSelectMacroDialog::~PIRSelectMacroDialog()
+{
+  delete ui;
+
+  delete userPack;
+  delete multitapPack;
+}
+
+
+void PIRSelectMacroDialog::on_buttonBox_accepted()
+{
+  // Try to find a usable macro in the list of selected items.  (There should
+  // only be one item in the list anyway.)
+  QList<QTreeWidgetItem *> items = ui->macroTreeWidget->selectedItems();
+
+  int index = 0;
+  int size = items.size();
+
+  while (index < size)
+  {
+    if (items[index]->parent() != 0)
+    {
+      emit macroChosen(items[index]);
+      return;
+    }
+
+    ++index;
+  }
+}
+
+
+/*
+void PIRSelectMacroDialog::on_buttonBox_rejected()
+{
+
+}
+*/
diff --git a/dialogs/pirselectmacrodialog.h b/dialogs/pirselectmacrodialog.h
new file mode 100644 (file)
index 0000000..af3c901
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef PIRSELECTMACRODIALOG_H
+#define PIRSELECTMACRODIALOG_H
+
+#include <QDialog>
+
+class MainWindow;
+class PIRMacroPack;
+class PIRReverseMultitap;
+class QTreeWidgetItem;
+
+namespace Ui {
+class PIRSelectMacroDialog;
+}
+
+class PIRSelectMacroDialog : public QDialog
+{
+  Q_OBJECT
+  
+public:
+//  explicit PIRSelectMacroDialog(QWidget *parent = 0);
+
+  PIRSelectMacroDialog(
+    MainWindow *mw);
+
+  ~PIRSelectMacroDialog();
+
+signals:
+  void macroChosen(
+    QTreeWidgetItem *item);
+  
+private slots:
+  void on_buttonBox_accepted();
+//  void on_buttonBox_rejected();
+
+private:
+  Ui::PIRSelectMacroDialog *ui;
+
+  PIRMacroPack *userPack;
+  PIRReverseMultitap *multitapPack;
+
+//  MainWindow *mainWindow;
+};
+
+#endif // PIRSELECTMACRODIALOG_H
diff --git a/dialogs/pirselectmacrodialog.ui b/dialogs/pirselectmacrodialog.ui
new file mode 100644 (file)
index 0000000..9579059
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRSelectMacroDialog</class>
+ <widget class="QDialog" name="PIRSelectMacroDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Select Macro</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <property name="margin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0" colspan="4">
+    <widget class="QTreeWidget" name="macroTreeWidget">
+     <property name="headerHidden">
+      <bool>true</bool>
+     </property>
+     <column>
+      <property name="text">
+       <string notr="true">1</string>
+      </property>
+     </column>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="newButton">
+     <property name="text">
+      <string>New</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="editButton">
+     <property name="text">
+      <string>Edit</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QPushButton" name="deleteButton">
+     <property name="text">
+      <string>Delete</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>PIRSelectMacroDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>PIRSelectMacroDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index d184dc3..6cfeb60 100644 (file)
@@ -36,6 +36,11 @@ PIRTabsChoiceDialog::PIRTabsChoiceDialog(
   ui->tabsChoiceListWidget->addItem(
     new PIRTabsWidgetItem("Roomba Panels", Roomba_Tabs));
 
+/*
+  ui->tabsChoiceListWidget->addItem(
+    new PIRTabsWidgetItem("Macro Panels", Macro_Tabs));
+*/
+
   ui->tabsChoiceListWidget->addItem(
     new PIRTabsWidgetItem("Keyset Search Panels", PowerSearch_Tabs));
 }
index b62f0b4..e0f5426 100644 (file)
@@ -1,39 +1,72 @@
 #include "pirmacroform.h"
 #include "ui_pirmacroform.h"
 
+//#include "mainwindow.h"
+#include "macros/pirmacro.h"
+
+class QTreeWidgetItem;
+class MainWindow;
+
+/*
 PIRMacroForm::PIRMacroForm(QWidget *parent) :
   QWidget(parent),
   ui(new Ui::PIRMacroForm)
 {
   ui->setupUi(this);
 }
+*/
+
+PIRMacroForm::PIRMacroForm(
+  MainWindow *mw)
+  : QWidget(0),
+    ui(new Ui::PIRMacroForm),
+    smd(mw),
+    ccd(mw),
+    currentMacro(0)
+{
+  ui->setupUi(this);
+
+  connect(
+    &smd,
+    SIGNAL(macroChosen(QTreeWidgetItem *)),
+    this,
+    SLOT(displayMacro(QTreeWidgetItem *)));
+}
 
 PIRMacroForm::~PIRMacroForm()
 {
   delete ui;
 }
 
-void PIRMacroForm::on_cycleCheckBox_stateChanged(int arg1)
-{
 
+void PIRMacroForm::on_chooseMacroButton_clicked()
+{
+  smd.exec();
 }
 
-void PIRMacroForm::on_spinBox_valueChanged(int arg1)
-{
 
+void PIRMacroForm::on_runButton_clicked()
+{
+  currentMacro->executeMacro();
 }
 
-void PIRMacroForm::on_prevMacroButton_clicked()
+
+void PIRMacroForm::displayMacro(
+  QTreeWidgetItem *item)
 {
+  if (!item) return;
 
-}
+  PIRMacro *m = dynamic_cast<PIRMacro *> (item);
 
-void PIRMacroForm::on_nextMacroButton_clicked()
-{
+  if (!m) return;
+
+  currentMacro = m;
 
+  currentMacro->populateList(ui->macroListWidget);
 }
 
-void PIRMacroForm::on_newMacroButton_clicked()
-{
 
+void PIRMacroForm::on_addButton_clicked()
+{
+  ccd.exec();
 }
index af76338..c02114f 100644 (file)
@@ -2,6 +2,10 @@
 #define PIRMACROFORM_H
 
 #include <QWidget>
+#include "dialogs/pirselectmacrodialog.h"
+#include "dialogs/pircreatecommanddialog.h"
+
+class PIRMacro;
 
 namespace Ui {
 class PIRMacroForm;
@@ -12,22 +16,28 @@ class PIRMacroForm : public QWidget
   Q_OBJECT
   
 public:
-  explicit PIRMacroForm(QWidget *parent = 0);
+//  explicit PIRMacroForm(QWidget *parent = 0);
+
+  PIRMacroForm(
+    MainWindow *mw);
+
   ~PIRMacroForm();
   
 private slots:
-  void on_cycleCheckBox_stateChanged(int arg1);
-
-  void on_spinBox_valueChanged(int arg1);
+  void on_chooseMacroButton_clicked();
+  void on_addButton_clicked();
+  void on_runButton_clicked();
 
-  void on_prevMacroButton_clicked();
-
-  void on_nextMacroButton_clicked();
-
-  void on_newMacroButton_clicked();
+  void displayMacro(
+    QTreeWidgetItem *item);
 
 private:
   Ui::PIRMacroForm *ui;
+
+  PIRSelectMacroDialog smd;
+  PIRCreateCommandDialog ccd;
+
+  PIRMacro *currentMacro;
 };
 
 #endif // PIRMACROFORM_H
index 1644c0c..72e8cac 100644 (file)
   <property name="windowTitle">
    <string>Macro Processor</string>
   </property>
-  <layout class="QHBoxLayout" name="horizontalLayout_2">
+  <layout class="QGridLayout" name="gridLayout">
    <property name="margin">
     <number>8</number>
    </property>
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout">
-     <item>
-      <layout class="QHBoxLayout" name="horizontalLayout_3">
-       <item>
-        <widget class="QLabel" name="macroPackLabel">
-         <property name="text">
-          <string>Macro Pack:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QComboBox" name="macroPackComboBox"/>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <widget class="QPushButton" name="newMacroPackButton">
-       <property name="text">
-        <string>New Macro Pack</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="editMacroPackButton">
-       <property name="text">
-        <string>Edit / Delete Macro Pack</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QGroupBox" name="macroEditGroupBox">
-       <property name="title">
-        <string>Macro Editing Commands</string>
-       </property>
-       <layout class="QVBoxLayout" name="verticalLayout_2">
-        <property name="margin">
-         <number>8</number>
-        </property>
-        <item>
-         <layout class="QHBoxLayout" name="horizontalLayout">
-          <item>
-           <widget class="QLabel" name="nameLabel">
-            <property name="text">
-             <string>Macro:</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QComboBox" name="macroComboBox"/>
-          </item>
-         </layout>
-        </item>
-        <item>
-         <widget class="QPushButton" name="prevMacroButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Prev Macro</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>
-         <widget class="QPushButton" name="nextMacroButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string>Next Macro</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>
-         <widget class="QPushButton" name="newMacroButton">
-          <property name="text">
-           <string>New Macro</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QPushButton" name="editMacroButton">
-          <property name="text">
-           <string>Edit / Delete Macro</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </item>
-    </layout>
+   <item row="0" column="0">
+    <widget class="QPushButton" name="chooseMacroButton">
+     <property name="text">
+      <string>Select Macro</string>
+     </property>
+    </widget>
    </item>
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout_3">
-     <item>
-      <widget class="QLabel" name="commandListLabel">
-       <property name="text">
-        <string>Command List</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QListWidget" name="macroListWidget"/>
-     </item>
-     <item>
-      <widget class="QPushButton" name="newCommandButton">
-       <property name="text">
-        <string>New Command</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="editCommandButton">
-       <property name="text">
-        <string>Edit / Delete Command</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
+   <item row="1" column="0" colspan="3">
+    <widget class="QListWidget" name="macroListWidget"/>
+   </item>
+   <item row="0" column="2">
+    <widget class="QPushButton" name="runButton">
+     <property name="text">
+      <string>Run Macro</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QPushButton" name="addButton">
+     <property name="text">
+      <string>Add Command</string>
+     </property>
+    </widget>
    </item>
   </layout>
  </widget>
- <resources>
-  <include location="../PierogiResources.qrc"/>
- </resources>
+ <resources/>
  <connections/>
 </ui>
index 25cc444..7d3bf46 100644 (file)
@@ -49,7 +49,13 @@ void PIRPowerSearchForm::setKeysetName(
 
 void PIRPowerSearchForm::on_stepBackwardButton_pressed()
 {
-  if (mainWindow->selectPrevKeyset())
+  if (advanceTimer)
+  {
+    delete advanceTimer;
+    advanceTimer = 0;
+    mainWindow->stopRepeating();
+  }
+  else if (mainWindow->selectPrevKeyset())
   {
     mainWindow->startRepeating(Power_Key);
   }
@@ -62,7 +68,13 @@ void PIRPowerSearchForm::on_stepBackwardButton_released()
 
 void PIRPowerSearchForm::on_stepForwardKey_pressed()
 {
-  if (mainWindow->selectNextKeyset())
+  if (advanceTimer)
+  {
+    delete advanceTimer;
+    advanceTimer = 0;
+    mainWindow->stopRepeating();
+  }
+  else if (mainWindow->selectNextKeyset())
   {
     mainWindow->startRepeating(Power_Key);
   }
@@ -75,6 +87,14 @@ void PIRPowerSearchForm::on_stepForwardKey_released()
 
 void PIRPowerSearchForm::on_fastBackwardButton_pressed()
 {
+  if (advanceTimer)
+  {
+    delete advanceTimer;
+    advanceTimer = 0;
+    mainWindow->stopRepeating();
+    return;
+  }
+
   if (!mainWindow->selectPrevKeyset())
   {
     return;
@@ -84,7 +104,7 @@ void PIRPowerSearchForm::on_fastBackwardButton_pressed()
 
   advanceTimer = new QTimer();
   connect(advanceTimer, SIGNAL(timeout()), this, SLOT(gotoPrevKeyset()));
-  advanceTimer->start(100);
+  advanceTimer->start(50);
 }
 
 void PIRPowerSearchForm::on_fastBackwardButton_released()
@@ -96,6 +116,14 @@ void PIRPowerSearchForm::on_fastBackwardButton_released()
 
 void PIRPowerSearchForm::on_fastForwardButton_pressed()
 {
+  if (advanceTimer)
+  {
+    delete advanceTimer;
+    advanceTimer = 0;
+    mainWindow->stopRepeating();
+    return;
+  }
+
   if (!mainWindow->selectNextKeyset())
   {
     return;
@@ -122,18 +150,17 @@ void PIRPowerSearchForm::gotoPrevKeyset()
   if (checkMutex())
   {
     mainWindow->stopRepeating();
+    return;
+  }
+
+  if (mainWindow->selectPrevKeyset())
+  {
+    mainWindow->startRepeating(Power_Key);
   }
   else
   {
-    if (mainWindow->selectPrevKeyset())
-    {
-      mainWindow->startRepeating(Power_Key);
-    }
-    else
-    {
-      delete advanceTimer;
-      advanceTimer = 0;
-    }
+    if (advanceTimer) delete advanceTimer;
+    advanceTimer = 0;
   }
 }
 
@@ -143,18 +170,17 @@ void PIRPowerSearchForm::gotoNextKeyset()
   if (checkMutex())
   {
     mainWindow->stopRepeating();
+    return;
+  }
+
+  if (mainWindow->selectNextKeyset())
+  {
+    mainWindow->startRepeating(Power_Key);
   }
   else
   {
-    if (mainWindow->selectNextKeyset())
-    {
-      mainWindow->startRepeating(Power_Key);
-    }
-    else
-    {
-      delete advanceTimer;
-      advanceTimer = 0;
-    }
+    if (advanceTimer) delete advanceTimer;
+    advanceTimer = 0;
   }
 }
 
@@ -164,3 +190,51 @@ bool PIRPowerSearchForm::checkMutex()
   QMutexLocker locker(&commandIFMutex);
   return commandInFlight;
 }
+
+
+void PIRPowerSearchForm::on_autoSearchButton_pressed()
+{
+  if (advanceTimer)
+  {
+    delete advanceTimer;
+    advanceTimer = 0;
+    mainWindow->stopRepeating();
+    return;
+  }
+
+  if (mainWindow->selectFirstKeyset())
+  {
+    advanceTimer = new QTimer();
+    connect(advanceTimer, SIGNAL(timeout()), this, SLOT(gotoNextKeyset()));
+    advanceTimer->start(50);
+  }
+}
+
+
+void PIRPowerSearchForm::on_pauseSearchButton_pressed()
+{
+  if (advanceTimer)
+  {
+    delete advanceTimer;
+    advanceTimer = 0;
+    mainWindow->stopRepeating();
+    return;
+  }
+
+  advanceTimer = new QTimer();
+  connect(advanceTimer, SIGNAL(timeout()), this, SLOT(gotoNextKeyset()));
+  advanceTimer->start(50);
+}
+
+
+void PIRPowerSearchForm::on_editKeysetButton_clicked()
+{
+  if (advanceTimer)
+  {
+    delete advanceTimer;
+    advanceTimer = 0;
+    mainWindow->stopRepeating();
+  }
+
+  mainWindow->openCurrentKeysetDialog();
+}
index 91554e2..8ca8830 100644 (file)
@@ -36,6 +36,9 @@ private slots:
   void on_fastBackwardButton_released();
   void on_fastForwardButton_pressed();
   void on_fastForwardButton_released();
+  void on_autoSearchButton_pressed();
+  void on_pauseSearchButton_pressed();
+  void on_editKeysetButton_clicked();
 
   void gotoPrevKeyset();
   void gotoNextKeyset();
index c722ccd..f224ccf 100644 (file)
    <string>Form</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="0" colspan="2">
+   <property name="margin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0" colspan="4">
     <layout class="QHBoxLayout" name="horizontalLayout_2">
      <item>
       <widget class="QLabel" name="powerIcon1Label">
@@ -54,7 +57,7 @@
      </item>
     </layout>
    </item>
-   <item row="2" column="0" colspan="2">
+   <item row="1" column="0" colspan="4">
     <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
       <widget class="QLabel" name="keysetLabelLabel">
        </property>
       </widget>
      </item>
+     <item>
+      <widget class="QPushButton" name="editKeysetButton">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Edit Keyset</string>
+       </property>
+      </widget>
+     </item>
     </layout>
    </item>
-   <item row="4" column="0">
-    <widget class="QPushButton" name="stepBackwardButton">
+   <item row="2" column="0">
+    <widget class="QPushButton" name="fastBackwardButton">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
        <horstretch>0</horstretch>
       </sizepolicy>
      </property>
      <property name="text">
-      <string>Previous Keyset</string>
+      <string>Reverse</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>
+       <normaloff>:/icons/playback_rew_icon&amp;48.png</normaloff>:/icons/playback_rew_icon&amp;48.png</iconset>
      </property>
      <property name="iconSize">
       <size>
      </property>
     </widget>
    </item>
-   <item row="4" column="1">
-    <widget class="QPushButton" name="stepForwardKey">
+   <item row="2" column="1">
+    <widget class="QPushButton" name="stepBackwardButton">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
        <horstretch>0</horstretch>
       </sizepolicy>
      </property>
      <property name="text">
-      <string>Next Keyset</string>
+      <string>Prev Set</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>
+       <normaloff>:/icons/playback_prev_icon&amp;48.png</normaloff>:/icons/playback_prev_icon&amp;48.png</iconset>
      </property>
      <property name="iconSize">
       <size>
      </property>
     </widget>
    </item>
-   <item row="5" column="0">
-    <widget class="QPushButton" name="fastBackwardButton">
+   <item row="2" column="2">
+    <widget class="QPushButton" name="stepForwardKey">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
        <horstretch>0</horstretch>
       </sizepolicy>
      </property>
      <property name="text">
-      <string>Fast Backward</string>
+      <string>Next Set</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>
+       <normaloff>:/icons/playback_next_icon&amp;48.png</normaloff>:/icons/playback_next_icon&amp;48.png</iconset>
      </property>
      <property name="iconSize">
       <size>
      </property>
     </widget>
    </item>
-   <item row="5" column="1">
+   <item row="2" column="3">
     <widget class="QPushButton" name="fastForwardButton">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
       </sizepolicy>
      </property>
      <property name="text">
-      <string>Fast Forward</string>
+      <string>Fast Fwd</string>
      </property>
      <property name="icon">
       <iconset resource="../PierogiResources.qrc">
     </widget>
    </item>
    <item row="3" column="0" colspan="2">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Preferred</enum>
+    <widget class="QPushButton" name="autoSearchButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
      </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>20</height>
-      </size>
+     <property name="text">
+      <string>Start Automatic Search</string>
      </property>
-    </spacer>
+    </widget>
    </item>
-   <item row="1" column="0" colspan="2">
-    <spacer name="verticalSpacer_2">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
+   <item row="3" column="2" colspan="2">
+    <widget class="QPushButton" name="pauseSearchButton">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
      </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Preferred</enum>
+     <property name="text">
+      <string>Pause / Continue Search</string>
      </property>
-     <property name="sizeHint" stdset="0">
+     <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>20</width>
-       <height>20</height>
+       <width>48</width>
+       <height>48</height>
       </size>
      </property>
-    </spacer>
+    </widget>
    </item>
   </layout>
  </widget>
diff --git a/keysets/creative.cpp b/keysets/creative.cpp
new file mode 100644 (file)
index 0000000..a3e2fae
--- /dev/null
@@ -0,0 +1,136 @@
+#include "creative.h"
+#include "protocols/necprotocol.h"
+
+
+CreativeAudio1::CreativeAudio1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Speakers Keyset 1",
+      Creative_Make,
+      index)
+{
+  addControlledDevice(Creative_Make, "Inspire 5700", Other_Device);
+}
+
+
+void CreativeAudio1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x44C1, 16);
+
+  addKey("Input Select", Input_Key, 0x37, 8);
+  addKey("vol up", VolumeUp_Key, 0x47, 8);
+  addKey("Dynamic Mode Toggle", Red_Key, 0x4F, 8); // hack
+  addKey("mute", Mute_Key, 0x77, 8);
+  addKey("power", Power_Key, 0x87, 8);
+  addKey("Dolby", NoiseReduction_Key, 0xA7, 8);
+  addKey("Dolby", Blue_Key, 0xA7, 8); // hack
+  addKey("vol down", VolumeDown_Key, 0xC7, 8);
+  addKey("Analog on/off", Green_Key, 0xD7, 8); // hack
+  addKey("Effect Select", Yellow_Key, 0xF2, 8); // hack
+
+  addKey("rear_center", Unmapped_Key, 0x17, 8);
+  addKey("center", Unmapped_Key, 0x97, 8);
+  addKey("test", Unmapped_Key, 0xF7, 8);
+  addKey("rear", Unmapped_Key, 0xE7, 8);
+  addKey("subwoofer", Unmapped_Key, 0x67, 8);
+  addKey("coaxial", Unmapped_Key, 0x27, 8);
+  addKey("optical", Unmapped_Key, 0x0F, 8);
+  addKey("stereo", Unmapped_Key, 0x2F, 8);
+  addKey("dolby_digital_ex", Unmapped_Key, 0xCF, 8);
+  addKey("ned_6", Unmapped_Key, 0xB7, 8);
+}
+
+
+CreativeAudio2::CreativeAudio2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "MP3 Player Keyset 1",
+      Creative_Make,
+      index)
+{
+}
+
+void CreativeAudio2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  // This is almost possible to integrate with CreativeMisc1, if needed
+  setPreData(0xAC21, 16);
+
+  addKey("POWER", Power_Key, 0x20, 8);
+  addKey("PLAY_PAUSE", Play_Key, 0x40, 8);
+  addKey("PLAY_PAUSE", Pause_Key, 0x40, 8);
+  addKey("FAST_REVERSE", Rewind_Key, 0xA0, 8);
+  addKey("FAST_FORWARD", FastForward_Key, 0xE0, 8);
+  addKey("STOP", Stop_Key, 0x50, 8);
+  addKey("EAX", Red_Key, 0xB0, 8);
+  addKey("VOLUME_UP", VolumeUp_Key, 0xF0, 8);
+  addKey("VOLUME_DOWN", VolumeDown_Key, 0x70, 8);
+}
+
+
+CreativeMisc1::CreativeMisc1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Infra Keyset",
+      Creative_Make,
+      index)
+{
+}
+
+
+void CreativeMisc1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0xAC21, 16);
+
+  addKey("PAUSE", Pause_Key, 0x80, 8);
+  addKey("PLAY", Play_Key, 0x40, 8);
+  addKey("STOP", Stop_Key, 0xC0, 8);
+  addKey("REW", Rewind_Key, 0xA0, 8);
+  addKey("PREV", Previous_Key, 0x60, 8);
+  addKey("FF", FastForward_Key, 0xE0, 8);
+  addKey("MENU", Menu_Key, 0x20, 8);
+  addKey("MOUSE", Unmapped_Key, 0x10, 8);
+  addKey("1", One_Key, 0x90, 8);
+  addKey("2", Two_Key, 0x50, 8);
+  addKey("3", Three_Key, 0xD0, 8);
+  addKey("4", Four_Key, 0xB0, 8);
+  addKey("5", Five_Key, 0x70, 8);
+  addKey("6", Six_Key, 0xF0, 8);
+  addKey("7", Seven_Key, 0x88, 8);
+  addKey("8", Eight_Key, 0x48, 8);
+  addKey("9", Nine_Key, 0xC8, 8);
+  addKey("0", Zero_Key, 0x68, 8);
+  addKey("MUTE", Mute_Key, 0x30, 8);
+  addKey("VOL_UP", VolumeUp_Key, 0x08, 8);
+  addKey("VOL_DOWN", VolumeDown_Key, 0x28, 8);
+  addKey("SHIFT", Unmapped_Key, 0xA8, 8);
+  addKey("ENTER", Enter_Key, 0xE8, 8);
+  addKey("ZOOM", Zoom_Key, 0x18, 8);
+}
+
diff --git a/keysets/creative.h b/keysets/creative.h
new file mode 100644 (file)
index 0000000..a1b1700
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef CREATIVE_H
+#define CREATIVE_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class CreativeAudio1: public PIRKeysetMetaData
+{
+public:
+  CreativeAudio1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class CreativeAudio2: public PIRKeysetMetaData
+{
+public:
+  CreativeAudio2(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class CreativeMisc1: public PIRKeysetMetaData
+{
+public:
+  CreativeMisc1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // CREATIVE_H
diff --git a/keysets/crown.cpp b/keysets/crown.cpp
new file mode 100644 (file)
index 0000000..3c0da56
--- /dev/null
@@ -0,0 +1,109 @@
+#include "crown.h"
+#include "protocols/necprotocol.h"
+#include "protocols/rc5protocol.h"
+
+CrownTV1::CrownTV1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 1",
+      Crown_Make,
+      index)
+{
+}
+
+
+void CrownTV1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new RC5Protocol(guiObject, index);
+
+  addKey("POWER", Power_Key, 0x100C, 13);
+  addKey("mute", Mute_Key, 0x100D, 13);
+  addKey("1", One_Key, 0x1001, 13);
+  addKey("2", Two_Key, 0x1002, 13);
+  addKey("3", Three_Key, 0x1003, 13);
+  addKey("4", Four_Key, 0x1004, 13);
+  addKey("5", Five_Key, 0x1005, 13);
+  addKey("6", Six_Key, 0x1006, 13);
+  addKey("7", Seven_Key, 0x1007, 13);
+  addKey("8", Eight_Key, 0x1008, 13);
+  addKey("9", Nine_Key, 0x1009, 13);
+  addKey("0", Zero_Key, 0x1000, 13);
+  addKey("AV", AuxInput_Key, 0x1038, 13);
+  addKey("-/--", DoubleDigit_Key, 0x100A, 13);
+  addKey("TX", Unmapped_Key, 0x103C, 13); // teletext?
+  addKey("TV", Input_Key, 0x103F, 13); // ?
+  addKey("ProgUp", ChannelUp_Key, 0x1020, 13);
+  addKey("ProgDown", ChannelDown_Key, 0x1021, 13);
+  addKey("VolUp", VolumeUp_Key, 0x1010, 13);
+  addKey("VolDown", VolumeDown_Key, 0x1011, 13);
+  addKey("Sel", Unmapped_Key, 0x103B, 13);
+  addKey(">|<", PrevChannel_Key, 0x100E, 13); // Dunno about this one
+  addKey("INFO", Info_Key, 0x100F, 13);
+  addKey("TIMER", Sleep_Key, 0x1026, 13);
+  addKey("SYST", Unmapped_Key, 0x103D, 13);
+  addKey("STORE", Unmapped_Key, 0x1027, 13);
+  addKey("MENU", Menu_Key, 0x100B, 13);
+  addKey("P100", PlusOneHundred_Key, 0x1035, 13);
+  addKey("red", Red_Key, 0x1037, 13);
+  addKey("green", Green_Key, 0x1036, 13);
+  addKey("yellow", Yellow_Key, 0x1032, 13);
+  addKey("blue", Blue_Key, 0x1034, 13);
+  addKey("CLOCK", Unmapped_Key, 0x102A, 13);
+  addKey("UPDATE", Unmapped_Key, 0x102E, 13);
+  addKey("MIX", Unmapped_Key, 0x102E, 13);
+  addKey("DOUBLE", Unmapped_Key, 0x102B, 13);
+  addKey("REVEAL", Unmapped_Key, 0x102C, 13);
+  addKey("HOLD", Unmapped_Key, 0x1029, 13);
+  addKey("STEREO", Unmapped_Key, 0x102F, 13);
+  addKey("MONO", Unmapped_Key, 0x1023, 13);
+  addKey("PS", Unmapped_Key, 0x1024, 13);
+}
+
+
+CrownAudio1::CrownAudio1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "CD Keyset 1",
+      Crown_Make,
+      index)
+{
+}
+
+
+void CrownAudio1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x14CA, 16);
+
+  addKey("1", One_Key, 0x09, 8);
+  addKey("2", Two_Key, 0x1D, 8);
+  addKey("3", Three_Key, 0x1F, 8);
+  addKey("4", Four_Key, 0x0D, 8);
+  addKey("5", Five_Key, 0x19, 8);
+  addKey("6", Six_Key, 0x1B, 8);
+  addKey("7", Seven_Key, 0x11, 8);
+  addKey("8", Eight_Key, 0x15, 8);
+  addKey("9", Nine_Key, 0x17, 8);
+  addKey("10", Zero_Key, 0x12, 8);
+  addKey("+10", DoubleDigit_Key, 0x16, 8);
+  addKey("STOP", Stop_Key, 0x0F, 8);
+  addKey("REWIND", Rewind_Key, 0x0E, 8);
+  addKey("FFWD", FastForward_Key, 0x1A, 8);
+  addKey("PAUSE", Pause_Key, 0x0B, 8);
+  addKey("PLAY", Play_Key, 0x13, 8);
+}
diff --git a/keysets/crown.h b/keysets/crown.h
new file mode 100644 (file)
index 0000000..94890ad
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef CROWN_H
+#define CROWN_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class CrownTV1: public PIRKeysetMetaData
+{
+public:
+  CrownTV1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+class CrownAudio1: public PIRKeysetMetaData
+{
+public:
+  CrownAudio1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // CROWN_H
index e98aaf7..c139384 100644 (file)
@@ -138,3 +138,28 @@ void TriaxSTB2a::populateProtocol(
 
   setPreData(0x6681, 16);
 }
+
+
+/*
+TriaxSTB2b::TriaxSTB2b(
+  unsigned int index)
+  : TriaxSTB2(index)
+{
+  setKeysetName("Satellite Receiver 2b (experimental)");
+}
+
+
+void TriaxSTB2b::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  TriaxSTB2::populateProtocol(guiObject);
+
+  setPreData(0xFE01, 16);
+}
+*/
index 5fcae4b..a47383a 100644 (file)
@@ -35,4 +35,16 @@ public:
     QObject *guiObject);
 };
 
+/*
+class TriaxSTB2b: public TriaxSTB2
+{
+public:
+  TriaxSTB2b(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+*/
+
 #endif // TRIAX_H
diff --git a/macros/pirmacro.cpp b/macros/pirmacro.cpp
new file mode 100644 (file)
index 0000000..0d39209
--- /dev/null
@@ -0,0 +1,105 @@
+#include "pirmacro.h"
+
+#include "macros/pirmacrocommanditem.h"
+
+bool PIRMacro::macroRunning = false;
+
+PIRMacro::PIRMacro(
+  QTreeWidgetItem *parent,
+  QString n,
+  char k)
+  : QTreeWidgetItem(parent),
+    keyMapping(k)
+{
+  setText(0, n);
+}
+
+
+QString PIRMacro::getName()
+{
+  return text(0);
+}
+
+
+char PIRMacro::getKeyMapping()
+{
+  return keyMapping;
+}
+
+
+void PIRMacro::appendCommand(
+  PIRMacroCommandItem *c)
+{
+  commands.push_back(c);
+}
+
+
+void PIRMacro::populateList(
+  QListWidget *lw)
+{
+  lw->clear();
+
+  CommandSequence::const_iterator i = commands.begin();
+
+  while (i != commands.end())
+  {
+    lw->addItem(*i);
+    ++i;
+  }
+}
+
+
+// executeMacro() returns false if it was unable to start the macro running:
+bool PIRMacro::executeMacro()
+{
+  // Don't start a new macro if one is already running:
+  if (macroRunning) return false;
+
+  currentCommand = commands.begin();
+
+  // If this macro is empty, just return:
+  if (currentCommand == commands.end())
+  {
+    emit macroCompleted();
+    return true;
+  }
+
+  // Start running the list of commands:
+  macroRunning = true;
+
+  connect(
+    *currentCommand,
+    SIGNAL(commandCompleted()),
+    this,
+    SLOT(startNextCommand()));
+
+  (*currentCommand)->executeCommand();
+
+  ++currentCommand;
+
+  return true;
+}
+
+
+void PIRMacro::startNextCommand()
+{
+  // Are we done?
+  if (currentCommand == commands.end())
+  {
+    // We are done.
+    macroRunning = false;
+    emit macroCompleted();
+    return;
+  }
+
+  // We are not done; run the next command.
+  connect(
+    *currentCommand,
+    SIGNAL(commandCompleted()),
+    this,
+    SLOT(startNextCommand()));
+
+  (*currentCommand)->executeCommand();
+
+  ++currentCommand;
+}
diff --git a/macros/pirmacro.h b/macros/pirmacro.h
new file mode 100644 (file)
index 0000000..fe0b583
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef PIRMACRO_H
+#define PIRMACRO_H
+
+#include <QObject>
+#include <QTreeWidgetItem>
+#include <QString>
+
+class PIRMacroCommandItem;
+class QListWidget;
+
+#include <list>
+typedef std::list<PIRMacroCommandItem *> CommandSequence;
+
+class PIRMacro: public QObject, public QTreeWidgetItem
+{
+  Q_OBJECT
+
+public:
+  PIRMacro(
+    QTreeWidgetItem *parent,
+    QString n,
+    char k);
+
+  QString getName();
+
+  char getKeyMapping();
+
+  void appendCommand(
+    PIRMacroCommandItem *c);
+
+  void populateList(
+    QListWidget *lw);
+
+  bool executeMacro();
+
+signals:
+  void macroCompleted();
+
+private slots:
+  void startNextCommand();
+
+private:
+  QString name;
+  char keyMapping;
+  CommandSequence commands;
+  CommandSequence::iterator currentCommand;
+
+  static bool macroRunning; // only one macro can run at a time!
+};
+
+#endif // PIRMACRO_H
diff --git a/macros/pirmacrocommanditem.cpp b/macros/pirmacrocommanditem.cpp
new file mode 100644 (file)
index 0000000..755b5a6
--- /dev/null
@@ -0,0 +1,113 @@
+#include "pirmacrocommanditem.h"
+
+#include "mainwindow.h"
+#include "pirkeynames.h"
+
+#include <QTimer>
+
+PIRKeynameMgr keynameMgr;
+
+
+PIRMacroCommandItem::PIRMacroCommandItem(
+  QString displayName)
+  : QListWidgetItem(displayName)
+{
+}
+
+
+PIRKeyCommandItem::PIRKeyCommandItem(
+  PIRKeyName keyToExecute,
+  MainWindow *mw)
+  : PIRMacroCommandItem(keynameMgr.getKeynameString(keyToExecute)),
+    key(keyToExecute),
+    advanceTimer(0),
+    mainWindow(mw)
+{
+}
+
+
+void PIRKeyCommandItem::executeCommand()
+{
+  // First, make sure no other macro is running:
+  if (advanceTimer) delete advanceTimer;
+
+  // Start a new timer:
+  advanceTimer = new QTimer();
+  connect(advanceTimer, SIGNAL(timeout()), this, SLOT(startRunningCommand()));
+  advanceTimer->start(50);
+}
+
+
+void PIRKeyCommandItem::startRunningCommand()
+{
+  // Try to start running the command:
+  if (mainWindow->startRepeating(key))
+  {
+    // The command has successfully started, now wait for it to stop:
+    if (advanceTimer) delete advanceTimer;
+    advanceTimer = new QTimer();
+    connect(advanceTimer, SIGNAL(timeout()), this, SLOT(stopRunningCommand()));
+    advanceTimer->start(50);
+  }
+}
+
+
+void PIRKeyCommandItem::stopRunningCommand()
+{
+  mainWindow->stopRepeating();
+
+  if (advanceTimer) delete advanceTimer;
+  advanceTimer = 0;
+
+  emit commandCompleted();
+}
+
+
+PIRKeysetCommandItem::PIRKeysetCommandItem(
+  QString displayName,
+  unsigned int keysetToChoose,
+  MainWindow *mw)
+  : PIRMacroCommandItem(displayName),
+    id(keysetToChoose),
+    mainWindow(mw)
+{
+}
+
+
+void PIRKeysetCommandItem::executeCommand()
+{
+  mainWindow->updateKeysetSelection(id);
+  emit commandCompleted();
+}
+
+
+PIRPauseCommandItem::PIRPauseCommandItem(
+  QString displayName,
+  unsigned int timeToWait)
+  : PIRMacroCommandItem(displayName),
+    timeInSeconds(timeToWait),
+    advanceTimer(0)
+{
+}
+
+
+void PIRPauseCommandItem::executeCommand()
+{
+  if (advanceTimer) delete advanceTimer;
+
+  advanceTimer = new QTimer();
+  connect(advanceTimer, SIGNAL(timeout()), this, SLOT(finishedWaiting()));
+  advanceTimer->start(timeInSeconds * 1000);
+}
+
+
+void PIRPauseCommandItem::finishedWaiting()
+{
+  if (advanceTimer)
+  {
+    delete advanceTimer;
+    advanceTimer = 0;
+  }
+
+  emit commandCompleted();
+}
diff --git a/macros/pirmacrocommanditem.h b/macros/pirmacrocommanditem.h
new file mode 100644 (file)
index 0000000..2114902
--- /dev/null
@@ -0,0 +1,89 @@
+#ifndef PIRMACROCOMMANDITEM_H
+#define PIRMACROCOMMANDITEM_H
+
+#include <QListWidgetItem>
+#include <QObject>
+#include <QString>
+
+#include "pirkeynames.h"
+
+class QTimer;
+class MainWindow;
+
+
+class PIRMacroCommandItem: public QObject, public QListWidgetItem
+{
+  Q_OBJECT
+
+public:
+  PIRMacroCommandItem(
+    QString displayName);
+
+  virtual void executeCommand() = 0;
+
+signals:
+  void commandCompleted();
+};
+
+
+class PIRKeyCommandItem: public PIRMacroCommandItem
+{
+  Q_OBJECT
+
+public:
+  PIRKeyCommandItem(
+    PIRKeyName keyToExecute,
+    MainWindow *mw);
+
+  virtual void executeCommand();
+
+private slots:
+  void startRunningCommand();
+  void stopRunningCommand();
+
+private:
+  PIRKeyName key;
+  QTimer *advanceTimer;
+  MainWindow *mainWindow;
+};
+
+
+class PIRKeysetCommandItem: public PIRMacroCommandItem
+{
+  Q_OBJECT
+
+public:
+  PIRKeysetCommandItem(
+    QString displayName,
+    unsigned int keysetToChoose,
+    MainWindow *mw);
+
+  virtual void executeCommand();
+
+private:
+  unsigned int id;
+  MainWindow *mainWindow;
+};
+
+
+class PIRPauseCommandItem: public PIRMacroCommandItem
+{
+  Q_OBJECT
+
+public:
+  PIRPauseCommandItem(
+    QString displayName,
+    unsigned int timeToWait);
+
+  virtual void executeCommand();
+
+private slots:
+  void finishedWaiting();
+
+private:
+  unsigned int timeInSeconds;
+  QTimer *advanceTimer;
+};
+
+
+#endif // PIRMACROCOMMANDITEM_H
diff --git a/macros/pirmacropack.cpp b/macros/pirmacropack.cpp
new file mode 100644 (file)
index 0000000..275e9d0
--- /dev/null
@@ -0,0 +1,10 @@
+#include "pirmacropack.h"
+
+PIRMacroPack::PIRMacroPack(
+  QTreeWidget *parent,
+  QString name)
+  : QTreeWidgetItem(parent)
+{
+  setText(0, name);
+}
+
diff --git a/macros/pirmacropack.h b/macros/pirmacropack.h
new file mode 100644 (file)
index 0000000..5325229
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef PIRMACROPACK_H
+#define PIRMACROPACK_H
+
+#include <QTreeWidgetItem>
+#include <QString>
+
+class QTreeWidget;
+class PIRMacro;
+
+class PIRMacroPack: public QTreeWidgetItem
+{
+public:
+  PIRMacroPack(
+    QTreeWidget *parent,
+    QString n);
+};
+
+#endif // PIRMACROPACK_H
diff --git a/macros/pirreversemultitap.cpp b/macros/pirreversemultitap.cpp
new file mode 100644 (file)
index 0000000..b9fde79
--- /dev/null
@@ -0,0 +1,261 @@
+#include "pirreversemultitap.h"
+
+#include "pirmacro.h"
+#include "pirmacrocommanditem.h"
+
+
+PIRReverseMultitap::PIRReverseMultitap(
+  QTreeWidget *qtw,
+  MainWindow *mw)
+  : PIRMacroPack(
+      qtw,
+      "Reverse Multitap Keyboard Macros"),
+    mainWindow(mw)
+{
+  generateLetterA();
+  generateLetterB();
+  generateLetterC();
+  generateLetterD();
+  generateLetterE();
+  generateLetterF();
+  generateLetterG();
+  generateLetterH();
+  generateLetterI();
+  generateLetterJ();
+  generateLetterK();
+  generateLetterL();
+  generateLetterM();
+  generateLetterN();
+  generateLetterO();
+  generateLetterP();
+  generateLetterQ();
+  generateLetterR();
+  generateLetterS();
+  generateLetterT();
+  generateLetterU();
+  generateLetterV();
+  generateLetterW();
+  generateLetterX();
+  generateLetterY();
+  generateLetterZ();
+  generateSpace();
+}
+
+void PIRReverseMultitap::generateLetterA()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap A", 'A');
+  m->appendCommand(new PIRKeyCommandItem(Two_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterB()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap B", 'B');
+  m->appendCommand(new PIRKeyCommandItem(Two_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Two_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterC()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap C", 'C');
+  m->appendCommand(new PIRKeyCommandItem(Two_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Two_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Two_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterD()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap D", 'D');
+  m->appendCommand(new PIRKeyCommandItem(Three_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterE()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap E", 'E');
+  m->appendCommand(new PIRKeyCommandItem(Three_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Three_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterF()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap F", 'F');
+  m->appendCommand(new PIRKeyCommandItem(Three_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Three_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Three_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterG()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap G", 'G');
+  m->appendCommand(new PIRKeyCommandItem(Four_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterH()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap H", 'H');
+  m->appendCommand(new PIRKeyCommandItem(Four_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Four_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterI()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap I", 'I');
+  m->appendCommand(new PIRKeyCommandItem(Four_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Four_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Four_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterJ()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap J", 'J');
+  m->appendCommand(new PIRKeyCommandItem(Five_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterK()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap K", 'K');
+  m->appendCommand(new PIRKeyCommandItem(Five_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Five_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterL()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap L", 'L');
+  m->appendCommand(new PIRKeyCommandItem(Five_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Five_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Five_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterM()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap M", 'M');
+  m->appendCommand(new PIRKeyCommandItem(Six_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterN()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap N", 'N');
+  m->appendCommand(new PIRKeyCommandItem(Six_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Six_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterO()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap O", 'O');
+  m->appendCommand(new PIRKeyCommandItem(Six_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Six_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Six_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterP()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap P", 'P');
+  m->appendCommand(new PIRKeyCommandItem(Seven_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterQ()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap Q", 'Q');
+  m->appendCommand(new PIRKeyCommandItem(Seven_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Seven_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterR()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap R", 'R');
+  m->appendCommand(new PIRKeyCommandItem(Seven_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Seven_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Seven_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterS()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap S", 'S');
+  m->appendCommand(new PIRKeyCommandItem(Seven_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Seven_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Seven_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Seven_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterT()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap T", 'T');
+  m->appendCommand(new PIRKeyCommandItem(Eight_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterU()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap U", 'U');
+  m->appendCommand(new PIRKeyCommandItem(Eight_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Eight_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterV()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap V", 'V');
+  m->appendCommand(new PIRKeyCommandItem(Eight_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Eight_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Eight_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterW()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap W", 'W');
+  m->appendCommand(new PIRKeyCommandItem(Nine_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterX()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap X", 'X');
+  m->appendCommand(new PIRKeyCommandItem(Nine_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Nine_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterY()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap Y", 'Y');
+  m->appendCommand(new PIRKeyCommandItem(Nine_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Nine_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Nine_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateLetterZ()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap Z", 'Z');
+  m->appendCommand(new PIRKeyCommandItem(Nine_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Nine_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Nine_Key, mainWindow));
+  m->appendCommand(new PIRKeyCommandItem(Nine_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
+
+void PIRReverseMultitap::generateSpace()
+{
+  PIRMacro *m = new PIRMacro(this, "Multitap Space", ' ');
+  m->appendCommand(new PIRKeyCommandItem(Zero_Key, mainWindow));
+//  macros[m->getName()] = m;
+}
diff --git a/macros/pirreversemultitap.h b/macros/pirreversemultitap.h
new file mode 100644 (file)
index 0000000..ab18d36
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef PIRREVERSEMULTITAP_H
+#define PIRREVERSEMULTITAP_H
+
+#include "pirmacropack.h"
+
+class QTreeWidget;
+class MainWindow;
+
+class PIRReverseMultitap: public PIRMacroPack
+{
+public:
+  PIRReverseMultitap(
+    QTreeWidget *qtw,
+    MainWindow *mw);
+
+private:
+  void generateLetterA();
+  void generateLetterB();
+  void generateLetterC();
+  void generateLetterD();
+  void generateLetterE();
+  void generateLetterF();
+  void generateLetterG();
+  void generateLetterH();
+  void generateLetterI();
+  void generateLetterJ();
+  void generateLetterK();
+  void generateLetterL();
+  void generateLetterM();
+  void generateLetterN();
+  void generateLetterO();
+  void generateLetterP();
+  void generateLetterQ();
+  void generateLetterR();
+  void generateLetterS();
+  void generateLetterT();
+  void generateLetterU();
+  void generateLetterV();
+  void generateLetterW();
+  void generateLetterX();
+  void generateLetterY();
+  void generateLetterZ();
+  void generateSpace();
+
+private:
+  MainWindow *mainWindow;
+};
+
+#endif // PIRREVERSEMULTITAP_H
index 32d99aa..82f7a72 100644 (file)
@@ -86,56 +86,17 @@ MainWindow::MainWindow(QWidget *parent)
       currentKeyset);
   }
 
+  selectKeysetForm->selectKeyset(currentKeyset);
+
   // Add the corner buttons:
   insertCornerButtons();
 
   enableButtons();
 
-  QListWidget *fkw = favoritesDialog->getFavoritesListWidget();
-
-  connect(
-    fkw,
-    SIGNAL(itemActivated(QListWidgetItem *)),
-    this,
-    SLOT(keysetSelectionChanged(QListWidgetItem *)),
-    Qt::QueuedConnection);
-
   // Make sure the three selection lists don't show different selections:
   QListWidget *klw = selectKeysetForm->getKeysetListWidget();
   QListWidget *dlw = selectDeviceForm->getDeviceListWidget();
 
-  // favorites -> keyset name
-  connect(
-    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 *)),
-    fkw,
-    SLOT(clearSelection()),
-    Qt::QueuedConnection);
-
-  // device name -> favorites
-  connect(
-    dlw,
-    SIGNAL(itemActivated(QListWidgetItem *)),
-    fkw,
-    SLOT(clearSelection()),
-    Qt::QueuedConnection);
-
   // keyset name -> device name
   connect(
     klw,
@@ -484,7 +445,7 @@ void MainWindow::populateFavorites()
 */
 
 
-void MainWindow::startRepeating(
+bool MainWindow::startRepeating(
   PIRKeyName name)
 {
   QMutexLocker locker(&commandIFMutex);
@@ -492,11 +453,16 @@ void MainWindow::startRepeating(
   {
     commandInFlight = true;
     emit buttonPressed(currentKeyset, name);
+    return true;
+  }
+  else
+  {
+    return false;
   }
 }
 
 
-void MainWindow::startRepeating(
+bool MainWindow::startRepeating(
   PIRKeyName name,
   unsigned int keysetID)
 {
@@ -505,6 +471,11 @@ void MainWindow::startRepeating(
   {
     commandInFlight = true;
     emit buttonPressed(keysetID, name);
+    return true;
+  }
+  else
+  {
+    return false;
   }
 }
 
@@ -607,3 +578,22 @@ bool MainWindow::selectPrevKeyset()
 {
   return selectKeysetForm->selectPrevKeyset();
 }
+
+
+bool MainWindow::selectFirstKeyset()
+{
+  return selectKeysetForm->selectFirstKeyset();
+}
+
+
+void MainWindow::openCurrentKeysetDialog()
+{
+  selectKeysetForm->openCurrentKeysetDialog();
+}
+
+
+void MainWindow::updateKeysetSelection(
+  unsigned int targetID)
+{
+  selectKeysetForm->selectKeyset(targetID);
+}
index 2eadcde..c27aedf 100644 (file)
@@ -45,10 +45,10 @@ public:
 
   void showExpanded();
 
-  void startRepeating(
+  bool startRepeating(
     PIRKeyName name);
 
-  void startRepeating(
+  bool startRepeating(
     PIRKeyName name,
     unsigned int keysetID);
 
@@ -87,6 +87,11 @@ public:
 
   bool selectNextKeyset();
   bool selectPrevKeyset();
+  bool selectFirstKeyset();
+  void openCurrentKeysetDialog();
+
+  void updateKeysetSelection(
+    unsigned int targetID);
 
 signals:
   void buttonPressed(
index 4819770..1f50d4c 100644 (file)
@@ -78,7 +78,7 @@
   </action>
   <action name="actionBrowse_Device_List">
    <property name="text">
-    <string>Browse Device List</string>
+    <string>Browse Partial Device List</string>
    </property>
   </action>
  </widget>
index 16dd093..c07f271 100644 (file)
@@ -214,7 +214,16 @@ SOURCES += main.cpp mainwindow.cpp \
     keysets/deutschetelekom.cpp \
     keysets/goodmans.cpp \
     keysets/emtec.cpp \
-    protocols/tdcprotocol.cpp
+    protocols/tdcprotocol.cpp \
+    dialogs/pirselectmacrodialog.cpp \
+    macros/pirmacro.cpp \
+    macros/pirmacrocommanditem.cpp \
+    macros/pirmacropack.cpp \
+    macros/pirreversemultitap.cpp \
+    pirkeynames.cpp \
+    dialogs/pircreatecommanddialog.cpp \
+    keysets/creative.cpp \
+    keysets/crown.cpp
 HEADERS += mainwindow.h \
     pirkeynames.h \
     pirmakenames.h \
@@ -404,7 +413,15 @@ HEADERS += mainwindow.h \
     keysets/deutschetelekom.h \
     keysets/goodmans.h \
     keysets/emtec.h \
-    protocols/tdcprotocol.h
+    protocols/tdcprotocol.h \
+    dialogs/pirselectmacrodialog.h \
+    macros/pirmacro.h \
+    macros/pirmacrocommanditem.h \
+    macros/pirmacropack.h \
+    macros/pirreversemultitap.h \
+    dialogs/pircreatecommanddialog.h \
+    keysets/creative.h \
+    keysets/crown.h
 FORMS += mainwindow.ui \
     pirdocumentationform.ui \
     piraboutform.ui \
@@ -435,7 +452,9 @@ FORMS += mainwindow.ui \
     forms/pirroombaform.ui \
     forms/pirstatefulacform.ui \
     forms/pircameraform.ui \
-    forms/pirpowersearchform.ui
+    forms/pirpowersearchform.ui \
+    dialogs/pirselectmacrodialog.ui \
+    dialogs/pircreatecommanddialog.ui
 
 # Please do not modify the following two lines. Required for deployment.
 include(deployment.pri)
index 47e2e8a..473ff1b 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.1, 2012-09-06T16:54:57. -->
+<!-- Written by Qt Creator 2.4.1, 2012-09-10T23:36:40. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -79,7 +79,7 @@
       <value type="QString" key="ProjectExplorer.ProcessStep.Arguments">dpkg-buildpackage -sa -S -uc -us</value>
       <value type="QString" key="ProjectExplorer.ProcessStep.Command">/Users/john/QtSDK/Maemo/4.6.2/bin/mad</value>
       <value type="bool" key="ProjectExplorer.ProcessStep.Enabled">false</value>
-      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-1.1.7</value>
+      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-1.1.10</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" key="ProjectExplorer.ProjectConfiguration.Id">MaemoMountAndInstallDeployStep</value>
       <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedFiles">
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_4_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_0_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_5_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_6_9_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_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_3_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_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_6_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_5_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_5_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_6_7_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_9_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_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_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_0_6_4_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_1_1_2_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_10_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_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_3_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_5_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_0_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_10_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_8_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_6_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_2_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_0_1_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_0_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_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_5_2_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_3_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_9_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_0_0_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_4_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_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_2_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_7_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_6_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_5_2_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_6_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_11_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_8_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_0_1_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_2_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_4_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_0_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_8_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_0_1_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_6_armel.deb</value>
-       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_10_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_2_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_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_1_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_1_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_6_6_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_11_armel.deb</value>
       </valuelist>
       <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedHosts">
        <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">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">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"></value>
        <value type="QString"></value>
        <value type="QString"></value>
+       <value type="QString"></value>
+       <value type="QString"></value>
+       <value type="QString"></value>
       </valuelist>
       <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes">
        <value type="QDateTime">2012-01-19T22:18:07</value>
-       <value type="QDateTime">2012-02-29T10:48:05</value>
-       <value type="QDateTime">2012-02-06T17:22:16</value>
+       <value type="QDateTime">2012-02-22T09:24:57</value>
        <value type="QDateTime">2012-09-06T16:32:59</value>
-       <value type="QDateTime">2012-03-08T23:20:27</value>
-       <value type="QDateTime">2012-09-02T20:43:12</value>
-       <value type="QDateTime">2012-02-12T23:10:44</value>
+       <value type="QDateTime">2012-02-06T17:22:16</value>
        <value type="QDateTime">2012-02-09T18:12:21</value>
-       <value type="QDateTime">2012-02-19T10:29:22</value>
-       <value type="QDateTime">2012-02-22T09:24:57</value>
-       <value type="QDateTime">2012-02-14T21:02:03</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-14T21:42:07</value>
        <value type="QDateTime">2012-02-29T20:01:12</value>
+       <value type="QDateTime">2012-03-04T19:56:48</value>
+       <value type="QDateTime">2012-02-22T09:37:53</value>
+       <value type="QDateTime">2012-09-02T20:43:12</value>
+       <value type="QDateTime">2012-01-17T00:15:23</value>
        <value type="QDateTime">2012-01-17T13:21:05</value>
-       <value type="QDateTime">2012-01-23T09:47:37</value>
-       <value type="QDateTime">2012-02-03T10:04:34</value>
+       <value type="QDateTime">2012-09-10T20:28:17</value>
+       <value type="QDateTime">2012-02-19T19:25:47</value>
        <value type="QDateTime">2012-09-03T18:20:27</value>
-       <value type="QDateTime">2012-03-04T19:56:48</value>
-       <value type="QDateTime">2012-01-01T15:35:35</value>
-       <value type="QDateTime">2012-03-12T20:02:57</value>
-       <value type="QDateTime">2012-02-11T18:03:15</value>
+       <value type="QDateTime">2012-02-03T10:04:34</value>
+       <value type="QDateTime">2012-02-12T23:10:44</value>
        <value type="QDateTime">2012-02-08T20:29:28</value>
-       <value type="QDateTime">2012-02-16T22:03:28</value>
-       <value type="QDateTime">2012-02-23T12:24:04</value>
-       <value type="QDateTime">2012-02-19T19:25:47</value>
-       <value type="QDateTime">2012-02-13T22:02:56</value>
-       <value type="QDateTime">2012-02-14T21:42:07</value>
+       <value type="QDateTime">2012-02-14T21:02:03</value>
+       <value type="QDateTime">2012-09-07T18:35:41</value>
+       <value type="QDateTime">2012-01-30T20:23:06</value>
+       <value type="QDateTime">2012-02-29T10:48:05</value>
+       <value type="QDateTime">2012-03-12T20:02:57</value>
        <value type="QDateTime">2012-01-17T00:03:13</value>
+       <value type="QDateTime">2012-01-17T12:19:28</value>
+       <value type="QDateTime">2012-02-19T10:29:22</value>
+       <value type="QDateTime">2012-01-23T09:47:37</value>
+       <value type="QDateTime">2012-02-11T18:03:15</value>
        <value type="QDateTime">2012-01-14T13:11:32</value>
+       <value type="QDateTime">2012-02-13T22:02:56</value>
+       <value type="QDateTime">2012-09-07T17:19:10</value>
+       <value type="QDateTime">2012-01-01T15:35:35</value>
        <value type="QDateTime">2012-01-25T13:42:55</value>
-       <value type="QDateTime">2012-02-22T09:37:53</value>
-       <value type="QDateTime">2012-01-17T12:19:28</value>
+       <value type="QDateTime">2012-02-16T21:50:07</value>
        <value type="QDateTime">2012-03-02T20:08:41</value>
+       <value type="QDateTime">2012-03-08T23:20:27</value>
+       <value type="QDateTime">2012-02-16T22:03:28</value>
+       <value type="QDateTime">2012-02-23T12:24:04</value>
       </valuelist>
      </valuemap>
      <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
diff --git a/pirkeynames.cpp b/pirkeynames.cpp
new file mode 100644 (file)
index 0000000..1383817
--- /dev/null
@@ -0,0 +1,235 @@
+#include "pirkeynames.h"
+
+#include <QComboBox>
+
+PIRKeynameMgr::PIRKeynameMgr()
+{
+  keynameStrings[Zero_Key] = "0";
+  keynameStrings[One_Key] = "1";
+  keynameStrings[Two_Key] = "2";
+  keynameStrings[Three_Key] = "3";
+  keynameStrings[Four_Key] = "4";
+  keynameStrings[Five_Key] = "5";
+  keynameStrings[Six_Key] = "6";
+  keynameStrings[Seven_Key] = "7";
+  keynameStrings[Eight_Key] = "8";
+  keynameStrings[Nine_Key] = "9";
+  keynameStrings[Enter_Key] = "Enter";
+  keynameStrings[Clear_Key] = "Clear";
+  keynameStrings[PlusOneHundred_Key] = "+100";
+  keynameStrings[Dash_Key] = "- (Dash)";
+  keynameStrings[DoubleDigit_Key] = "-/-- (Double Digit)";
+  keynameStrings[Power_Key] = "Power";
+  keynameStrings[PowerOn_Key] = "Power On";
+  keynameStrings[PowerOff_Key] = "Power Off";
+  keynameStrings[VolumeUp_Key] = "Volume Up";
+  keynameStrings[VolumeDown_Key] = "Volume Down";
+  keynameStrings[Mute_Key] = "Mute";
+  keynameStrings[Surround_Key] = "Surround Sound";
+  keynameStrings[RearVolumeUp_Key] = "Rear Volume Up";
+  keynameStrings[RearVolumeDown_Key] = "Rear Volume Down";
+  keynameStrings[CenterVolumeUp_Key] = "Center Volume Up";
+  keynameStrings[CenterVolumeDown_Key] = "Center Volume Down";
+  keynameStrings[WooferUp_Key] = "Woofer Up";
+  keynameStrings[WooferDown_Key] = "Woofer Down";
+  keynameStrings[ChannelUp_Key] = "Channel Up";
+  keynameStrings[ChannelDown_Key] = "Channel Down";
+  keynameStrings[PrevChannel_Key] = "Previous Channel";
+  keynameStrings[Play_Key] = "Play";
+  keynameStrings[Pause_Key] = "Pause";
+  keynameStrings[Stop_Key] = "Stop";
+  keynameStrings[FastForward_Key] = "FastForward";
+  keynameStrings[Rewind_Key] = "Rewind";
+  keynameStrings[PlayX2_Key] = "PlayX2";
+  keynameStrings[Next_Key] = "Next";
+  keynameStrings[Previous_Key] = "Previous";
+  keynameStrings[StepForward_Key] = "Step Forward";
+  keynameStrings[StepBack_Key] = "Step Back";
+  keynameStrings[Advance_Key] = "Advance";
+  keynameStrings[Replay_Key] = "Replay";
+  keynameStrings[Eject_Key] = "Eject";
+  keynameStrings[Random_Key] = "Random";
+  keynameStrings[Repeat_Key] = "Repeat";
+  keynameStrings[RepeatAB_Key] = "RepeatAB";
+  keynameStrings[Slow_Key] = "Slow";
+  keynameStrings[SlowPlus_Key] = "Slow +";
+  keynameStrings[SlowMinus_Key] = "Slow -";
+  keynameStrings[Timer_Key] = "Timer";
+  keynameStrings[Clock_Key] = "Clock";
+  keynameStrings[Record_Key] = "Record";
+  keynameStrings[RecordPause_Key] = "Record Pause";
+  keynameStrings[RecordStop_Key] = "Record Stop";
+  keynameStrings[RecordMute_Key] = "Record Mute";
+  keynameStrings[RecordTimed_Key] = "Record Timed";
+  keynameStrings[RecordPDC_Key] = "Record PDC (via Teletext)";
+  keynameStrings[Menu_Key] = "Menu";
+  keynameStrings[Up_Key] = "Up";
+  keynameStrings[Down_Key] = "Down";
+  keynameStrings[Left_Key] = "Left";
+  keynameStrings[Right_Key] = "Right";
+  keynameStrings[Select_Key] = "Select";
+  keynameStrings[Exit_Key] = "Exit";
+  keynameStrings[PageUp_Key] = "Page Up";
+  keynameStrings[PageDown_Key] = "Page Down";
+  keynameStrings[Guide_Key] = "Guide";
+  keynameStrings[Red_Key] = "Red";
+  keynameStrings[Green_Key] = "Green";
+  keynameStrings[Yellow_Key] = "Yellow";
+  keynameStrings[Blue_Key] = "Blue";
+  keynameStrings[Teletext_Key] = "Teletext";
+  keynameStrings[TeletextReveal_Key] = "Teletext Reveal";
+  keynameStrings[TeletextHold_Key] = "Teletext Hold";
+  keynameStrings[TeletextSize_Key] = "Teletext Size";
+  keynameStrings[TeletextSelect_Key] = "Teletext Select";
+  keynameStrings[TeletextTime_Key] = "Teletext Time";
+  keynameStrings[TeletextAndTV_Key] = "Teletext and TV";
+  keynameStrings[TeletextMix_Key] = "Teletext Mix";
+  keynameStrings[TeletextDown_Key] = "Teletext Down";
+  keynameStrings[TeletextUp_Key] = "Teletext Up";
+  keynameStrings[TeletextBackgroundTV_Key] = "Teletext Background TV";
+  keynameStrings[TeletextStore_Key] = "Teletext Store";
+  keynameStrings[TeletextIndex_Key] = "Teletext Index";
+  keynameStrings[TeletextOff_Key] = "Teletext Off";
+  keynameStrings[PIP_Key] = "Picture in Picture";
+  keynameStrings[PIPSwap_Key] = "PIP Swap";
+  keynameStrings[PIPMove_Key] = "PIP Move";
+  keynameStrings[PIPSource_Key] = "PIP Source";
+  keynameStrings[PIPChannelUp_Key] = "PIP Channel Up";
+  keynameStrings[PIPChannelDown_Key] = "PIP Channel Down";
+  keynameStrings[PIPPause_Key] = "PIP Pause";
+  keynameStrings[PIPSize_Key] = "PIP Size";
+  keynameStrings[PIPScan_Key] = "PIP Scan";
+  keynameStrings[NextDisc_Key] = "Next Disc";
+  keynameStrings[PrevDisc_Key] = "Previous Disc";
+  keynameStrings[DiscTitle_Key] = "DiscTitle";
+  keynameStrings[DiscMenu_Key] = "DiscMenu";
+  keynameStrings[DiscOne_Key] = "Disc One";
+  keynameStrings[DiscTwo_Key] = "Disc Two";
+  keynameStrings[DiscThree_Key] = "Disc Three";
+  keynameStrings[Angle_Key] = "Angle";
+  keynameStrings[VHSSpeed_Key] = "SP/LP/SLP";
+  keynameStrings[TrackingPlus_Key] = "Tracking +";
+  keynameStrings[TrackingMinus_Key] = "Tracking -";
+  keynameStrings[AutoTracking_Key] = "Auto Tracking";
+  keynameStrings[IndexSearch_Key] = "Index Search (VISS)";
+  keynameStrings[IndexMark_Key] = "Index Mark";
+  keynameStrings[IndexErase_Key] = "Index Erase";
+  keynameStrings[OneTouchPlayBack_Key] = "One Touch Playback";
+  keynameStrings[PictureMode_Key] = "Picture Mode";
+  keynameStrings[SoundMode_Key] = "Sound Mode";
+  keynameStrings[NoiseReduction_Key] = "Noise Reduction";
+  keynameStrings[EnhancedBass_Key] = "Enhanced Bass";
+  keynameStrings[BassUp_Key] = "Bass Up";
+  keynameStrings[BassDown_Key] = "BassDown";
+  keynameStrings[TrebleUp_Key] = "Treble Up";
+  keynameStrings[TrebleDown_Key] = "Treble Down";
+  keynameStrings[BrightnessUp_Key] = "Brightness Up";
+  keynameStrings[BrightnessDown_Key] = "Brightness Down";
+  keynameStrings[ColorUp_Key] = "Color Up";
+  keynameStrings[ColorDown_Key] = "Color Down";
+  keynameStrings[ContrastUp_Key] = "Contrast Up";
+  keynameStrings[ContrastDown_Key] = "Contrast Down";
+  keynameStrings[BalanceRight_Key] = "Balance Right";
+  keynameStrings[BalanceLeft_Key] = "Balance Left";
+  keynameStrings[Input_Key] = "Input";
+  keynameStrings[CDInput_Key] = "CD Input";
+  keynameStrings[PhonoInput_Key] = "Phono Input";
+  keynameStrings[TunerInput_Key] = "Tuner Input";
+  keynameStrings[LineInput_Key] = "Line Input";
+  keynameStrings[TapeInput_Key] = "Tape Input";
+  keynameStrings[AntennaInput_Key] = "Antenna Input";
+  keynameStrings[Antenna2Input_Key] = "Antenna Input 2";
+  keynameStrings[PCInput_Key] = "PC Input";
+  keynameStrings[CompositeInput_Key] = "Composite Input";
+  keynameStrings[Composite2Input_Key] = "Composite Input 2";
+  keynameStrings[SVideoInput_Key] = "S-Video Input";
+  keynameStrings[SVideo2Input_Key] = "S-Video Input 2";
+  keynameStrings[ComponentInput_Key] = "Component Input";
+  keynameStrings[Component2Input_Key] = "Component Input 2";
+  keynameStrings[HDMIInput_Key] = "HDMI Input";
+  keynameStrings[HDMI2Input_Key] = "HDMI Input 2";
+  keynameStrings[HDMI3Input_Key] = "HDMI Input 3";
+  keynameStrings[ScartInput_Key] = "SCART Input";
+  keynameStrings[AuxInput_Key] = "Aux Input";
+  keynameStrings[MDInput_Key] = "MD Input";
+  keynameStrings[LDInput_Key] = "LD Input";
+  keynameStrings[DVDInput_Key] = "DVD Input";
+  keynameStrings[VCRInput_Key] = "VCR Input";
+  keynameStrings[HDDInput_Key] = "HDD Input";
+  keynameStrings[CableInput_Key] = "Cable Input";
+  keynameStrings[SatInput_Key] = "Satellite Input";
+  keynameStrings[DVRInput_Key] = "DVR Input";
+  keynameStrings[OpticalInput_Key] = "Optical Input";
+  keynameStrings[DigitalCoaxInput_Key] = "Digital Coax Input";
+  keynameStrings[USBInput_Key] = "USB Input";
+  keynameStrings[Program_Key] = "Program";
+  keynameStrings[Memory_Key] = "Memory";
+  keynameStrings[Call_Key] = "Call";
+  keynameStrings[NextPreset_Key] = "Next Preset";
+  keynameStrings[PrevPreset_Key] = "Previous Preset";
+  keynameStrings[FMMode_Key] = "FM Mode";
+  keynameStrings[FM_Key] = "FM";
+  keynameStrings[AM_Key] = "AM (MW)";
+  keynameStrings[LW_Key] = "LW";
+  keynameStrings[TempUp_Key] = "Temperature Up";
+  keynameStrings[TempDown_Key] = "Temperature Down";
+  keynameStrings[Fan_Key] = "Fan";
+  keynameStrings[Cool_Key] = "Cool";
+  keynameStrings[Heat_Key] = "Heat";
+  keynameStrings[Oscillate_Key] = "Oscillate";
+  keynameStrings[FanFaster_Key] = "Fan Faster";
+  keynameStrings[FanSlower_Key] = "Fan Slower";
+  keynameStrings[EnergySave_Key] = "Energy Save Mode";
+  keynameStrings[RobotForward_Key] = "Robot Forward";
+  keynameStrings[RobotCW_Key] = "Robot Clockwise";
+  keynameStrings[RobotCCW_Key] = "Robot Counterclockwise";
+  keynameStrings[RobotSpot_Key] = "Robot Spot";
+  keynameStrings[RobotMax_Key] = "Robot Max";
+  keynameStrings[RobotClean_Key] = "Robot Clean";
+  keynameStrings[OpenShutter_Key] = "Open Shutter";
+  keynameStrings[DelayedOpenShutter_Key] = "Open Shutter After Delay";
+  keynameStrings[Captions_Key] = "Captions / Subtitles";
+  keynameStrings[Info_Key] = "Info";
+  keynameStrings[Sleep_Key] = "Sleep";
+  keynameStrings[Reset_Key] = "Reset";
+  keynameStrings[AspectRatio_Key] = "Aspect Ratio";
+  keynameStrings[Audio_Key] = "I / II (Audio)";
+  keynameStrings[Favorites_Key] = "Favorites";
+  keynameStrings[Scan_Key] = "Scan";
+  keynameStrings[Zoom_Key] = "Zoom";
+  keynameStrings[LiveTV_Key] = "Live TV";
+  keynameStrings[Mode_Key] = "Mode";
+
+  KeynameCollection::const_iterator i = keynameStrings.begin();
+  while (i != keynameStrings.end())
+  {
+    keynameIDs[i->second] = i->first;
+    ++i;
+  }
+}
+
+
+QString PIRKeynameMgr::getKeynameString(
+  PIRKeyName keyname)
+{
+  return keynameStrings[keyname];
+}
+
+
+PIRKeyName PIRKeynameMgr::getKeynameID(
+  QString keynameString)
+{
+  return keynameIDs[keynameString];
+}
+
+
+void PIRKeynameMgr::populateComboBox(
+  QComboBox *cb)
+{
+  KeynameCollection::const_iterator i = keynameStrings.begin();
+  while (i != keynameStrings.end())
+  {
+    cb->insertItem(i->first, i->second);
+    ++i;
+  }
+}
index 308cda1..0bd79f4 100644 (file)
@@ -245,4 +245,32 @@ enum PIRKeyName{
   Mode_Key
 };
 
+
+// Need to make the key names visible to users now:
+#include <map>
+#include <QString>
+typedef std::map<PIRKeyName, QString> KeynameCollection;
+typedef std::map<QString, PIRKeyName> ReverseKeynameCollection;
+
+class QComboBox;
+
+class PIRKeynameMgr
+{
+public:
+  PIRKeynameMgr();
+
+  QString getKeynameString(
+    PIRKeyName keyname);
+
+  PIRKeyName getKeynameID(
+    QString keynameString);
+
+  void populateComboBox(
+    QComboBox *cb);
+
+private:
+  KeynameCollection keynameStrings;
+  ReverseKeynameCollection keynameIDs;
+};
+
 #endif // PIRKEYNAMES_H
index 4d9eaf6..90ce663 100644 (file)
@@ -24,6 +24,8 @@
 #include "keysets/canon.h"
 #include "keysets/cisco.h"
 #include "keysets/compro.h"
+#include "keysets/creative.h"
+#include "keysets/crown.h"
 #include "keysets/daewoo.h"
 #include "keysets/dell.h"
 #include "keysets/denon.h"
 
 #include "pirexception.h"
 
-// I'll be handling the threading of the keyset commands in this object:
+// Need mutex for thread support:
 #include <QMutex>
 
 // Debugging includes:
@@ -211,6 +213,13 @@ PIRKeysetManager::PIRKeysetManager()
 
   setupKeyset(new ComproTVCard1(++counter));
 
+  setupKeyset(new CreativeAudio1(++counter));
+  setupKeyset(new CreativeAudio2(++counter));
+  setupKeyset(new CreativeMisc1(++counter));
+
+  setupKeyset(new CrownTV1(++counter));
+  setupKeyset(new CrownAudio1(++counter));
+
   setupKeyset(new DaewooTV1(++counter));
   setupKeyset(new DaewooTV2(++counter));
   setupKeyset(new DaewooTV3(++counter));
@@ -244,7 +253,7 @@ PIRKeysetManager::PIRKeysetManager()
 
   setupKeyset(new DellRemote1(++counter));
 
-  setupKeyset(new DeutscheTelekomSTB1(++counter));
+//  setupKeyset(new DeutscheTelekomSTB1(++counter));
 
   setupKeyset(new DigitalStreamReceiver(++counter));
 
@@ -747,6 +756,7 @@ PIRKeysetManager::PIRKeysetManager()
   setupKeyset(new TriaxSTB1(++counter));
   setupKeyset(new TriaxSTB2(++counter));
   setupKeyset(new TriaxSTB2a(++counter));
+//  setupKeyset(new TriaxSTB2b(++counter));
 
   setupKeyset(new UnitedDVD1(++counter));
   setupKeyset(new UnitedDVBT1(++counter));
index 5f3ba5c..5735025 100644 (file)
@@ -22,6 +22,8 @@ PIRMakeMgr::PIRMakeMgr()
   makes[Canon_Make] = "Canon";
   makes[Cisco_Make] = "Cisco";
   makes[Compro_Make] = "Compro";
+  makes[Creative_Make] = "Creative";
+  makes[Crown_Make] = "Crown";
   makes[Daewoo_Make] = "Daewoo";
   makes[Dell_Make] = "Dell";
   makes[Denon_Make] = "Denon";
index 821f67e..ac3136c 100644 (file)
@@ -23,6 +23,8 @@ enum PIRMakeName{
   Canon_Make,
   Cisco_Make,
   Compro_Make,
+  Creative_Make,
+  Crown_Make,
   Daewoo_Make,
   Dell_Make,
   Denon_Make,
index c8c64b2..e6feafc 100644 (file)
@@ -15,6 +15,7 @@
 #include "forms/piraudiodeviceform.h"
 #include "forms/pircameraform.h"
 #include "forms/pirroombaform.h"
+#include "forms/pirmacroform.h"
 #include "forms/pirpowersearchform.h"
 
 #include "mainwindow.h"
@@ -44,6 +45,7 @@ PIRPanelManager::PIRPanelManager(
     audioDeviceForm(0),
     cameraForm(0),
     roombaForm(0),
+    macroForm(0),
     powerSearchForm(0),
     altMainPanelFlag(false),
     currentTabsName(Universal_Tabs),
@@ -52,7 +54,16 @@ PIRPanelManager::PIRPanelManager(
   QSettings settings("pietrzak.org", "Pierogi");
   if (settings.contains("currentTabsName"))
   {
-    currentTabsName = PIRTabBarName(settings.value("currentTabsName").toInt());
+    int tabVal = settings.value("currentTabsName").toInt();
+
+    if (tabVal >= Last_Tabs_Marker)
+    {
+      currentTabsName = Universal_Tabs;
+    }
+    else
+    {
+      currentTabsName = PIRTabBarName(tabVal);
+    }
   }
 
   // Set up the panel names:
@@ -98,6 +109,9 @@ PIRPanelManager::PIRPanelManager(
   shortPanelNames[Roomba_Panel] = "Roomba";
   longPanelNames[Roomba_Panel] =
     "Roomba Panel - robotic vacuum cleaner controls";
+  shortPanelNames[Macro_Panel] = "Edit Macros";
+  longPanelNames[Macro_Panel] =
+    "Edit Macros Panel - create, delete, edit, and manage macros";
   shortPanelNames[PowerSearch_Panel] = "Keyset Search";
   longPanelNames[PowerSearch_Panel] =
     "Keyset Search Panel - execute power button in each keyset";
@@ -147,6 +161,9 @@ PIRPanelManager::PIRPanelManager(
   roombaForm = new PIRRoombaForm(mainWindow);
   panels[Roomba_Panel] = roombaForm;
 
+  macroForm = new PIRMacroForm(mainWindow);
+  panels[Macro_Panel] = macroForm;
+
   powerSearchForm = new PIRPowerSearchForm(mainWindow);
   panels[PowerSearch_Panel] = powerSearchForm;
 
@@ -210,6 +227,11 @@ PIRPanelManager::PIRPanelManager(
   pset.push_back(Roomba_Panel);
   tabLists[Roomba_Tabs] = pset;
 
+  // The Macro Management collection:
+  pset.clear();
+  pset.push_back(Macro_Panel);
+  tabLists[Macro_Tabs] = pset;
+
   // The Power Search collection:
   pset.clear();
   pset.push_back(PowerSearch_Panel);
index 73b4a5d..ac78131 100644 (file)
@@ -18,6 +18,7 @@ class PIRAirConditionerForm;
 class PIRAudioDeviceForm;
 class PIRCameraForm;
 class PIRRoombaForm;
+class PIRMacroForm;
 class PIRPowerSearchForm;
 
 class PIRKeysetWidgetItem;
@@ -88,6 +89,7 @@ private:
   PIRAudioDeviceForm *audioDeviceForm;
   PIRCameraForm *cameraForm;
   PIRRoombaForm *roombaForm;
+  PIRMacroForm *macroForm;
   PIRPowerSearchForm *powerSearchForm;
 
   PIRPanelDisplayNameCollection shortPanelNames;
index ff65131..cec11b5 100644 (file)
@@ -18,6 +18,7 @@ enum PIRPanelName
   Audio_Panel,
   Camera_Panel,
   Roomba_Panel,
+  Macro_Panel,
   PowerSearch_Panel,
   Last_Panel_Marker // Used when traversing this enumeration.
 };
@@ -35,7 +36,9 @@ enum PIRTabBarName
   Record_Tabs,
   Camera_Tabs,
   Roomba_Tabs,
-  PowerSearch_Tabs
+  Macro_Tabs,
+  PowerSearch_Tabs,
+  Last_Tabs_Marker
 };
 
 #endif // PIRPANELNAMES_H
index 75f4dc7..77746e4 100644 (file)
@@ -14,7 +14,7 @@
    <enum>Qt::WheelFocus</enum>
   </property>
   <property name="windowTitle">
-   <string>Select Device</string>
+   <string>Browse Known Devices</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
    <property name="margin">
index e191da9..94617eb 100644 (file)
@@ -142,6 +142,26 @@ bool PIRSelectKeysetForm::selectPrevKeyset()
 }
 
 
+bool PIRSelectKeysetForm::selectFirstKeyset()
+{
+  if (ui->keysetListWidget->count() == 0)
+  {
+    return false;
+  }
+
+  if (ui->keysetListWidget->currentRow() != 0)
+  {
+    ui->keysetListWidget->setCurrentRow(
+      0, QItemSelectionModel::ClearAndSelect);
+
+    mainWindow->keysetSelectionChanged(
+      ui->keysetListWidget->currentItem());
+  }
+
+  return true;
+}
+
+
 QString PIRSelectKeysetForm::getKeysetName()
 {
   QListWidgetItem *item = ui->keysetListWidget->currentItem();
@@ -255,8 +275,58 @@ void PIRSelectKeysetForm::openKeysetDialog(
 }
 
 
+void PIRSelectKeysetForm::openCurrentKeysetDialog()
+{
+  PIRKeysetWidgetItem *kwi = dynamic_cast<PIRKeysetWidgetItem *> (
+    ui->keysetListWidget->currentItem());
+
+  editDialog->setupDialog(kwi);
+
+  editDialog->exec();
+}
+
+
 void PIRSelectKeysetForm::on_showFavoritesCheckBox_toggled(bool checked)
 {
   showOnlyFavorites = checked;
   refilterList();
 }
+
+
+void PIRSelectKeysetForm::selectKeyset(
+  unsigned int targetID)
+{
+  int count = ui->keysetListWidget->count();
+
+  if (count == 0)
+  {
+    return;
+  }
+
+  QListWidgetItem *localItem;
+  PIRKeysetWidgetItem *kwi;
+  int row = 0;
+
+  while (row < count)
+  {
+    localItem = ui->keysetListWidget->item(row);
+
+    if (localItem)
+    {
+      kwi = dynamic_cast<PIRKeysetWidgetItem *> (localItem);
+
+      if (kwi->getID() == targetID)
+      {
+        ui->keysetListWidget->setCurrentRow(
+          row, QItemSelectionModel::ClearAndSelect);
+
+        mainWindow->keysetSelectionChanged(
+          ui->keysetListWidget->currentItem());
+
+        return;
+      }
+    }
+
+    ++row;
+  }
+}
index 5b94b02..85d579a 100644 (file)
@@ -44,9 +44,15 @@ public:
 
   bool selectNextKeyset();
   bool selectPrevKeyset();
+  bool selectFirstKeyset();
 
   QString getKeysetName();
 
+  void openCurrentKeysetDialog();
+
+  void selectKeyset(
+    unsigned int targetID);
+
 protected:
   void keyPressEvent(
     QKeyEvent *event);
index b6b74f6..91a0d55 100644 (file)
@@ -89,8 +89,8 @@ void PioneerProtocol::startSendingCommand(
 
       // Check whether we've reached the minimum required number of repetitons:
 //      if (repeatCount >= minimumRepetitions)
-      if (repeatCount >= 3)
-      {
+//      if (repeatCount >= 3)
+//      {
         // Check whether we've been asked to stop:
         if (checkRepeatFlag())
         {
@@ -101,7 +101,7 @@ void PioneerProtocol::startSendingCommand(
           return;
 */
         }
-      }
+//      }
 
       ++repeatCount;
     }
index bf70424..74022b4 100644 (file)
@@ -1,3 +1,14 @@
+pierogi (1.1.10) unstable; urgency=low
+  * Adding one more Triax keyset for testing. :)
+
+ -- John Pietrzak <jpietrzak8@gmail.com>  Fri, 07 Sep 2012 18:43:26 -0400
+
+pierogi (1.1.9) unstable; urgency=low
+  * Removing the buggy Deutche Telekom keyset/protocol!
+  * Added an automatic scan / pause feature to the "search for power button" panel.
+
+ -- John Pietrzak <jpietrzak8@gmail.com>  Fri, 07 Sep 2012 17:34:09 -0400
+
 pierogi (1.1.8) unstable; urgency=low
   * A first attempt at the long-asked-for "search for power button" function.  Getting this in required more work on the memory management side of Pierogi, so beware of possible new subtle bugs...
   * A new Camera Shutter panel has been added, for remote controls used with DSLR cameras.
index 383b9cf..1c962a0 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: Added search for power button panel
- The long-wished-for "search for power button" panel has been added to Pierogi.  (It may still require a bit of tweaking.)  Also in this release, a new Camera Shutter panel for DSLR camera remote controls.  First pass at keysets for Deutsche Telekom, Emtec, Goodmans, Nikon, Olympus, and Pentax; and, Canon keyset updated to use new camera panel.
+XB-Maemo-Upgrade-Description: New Keyset on top of Bugfix
+ On top of the bugfix added in the previous update, this update adds a new Triax keyset I'd like to test out.
 XSBC-Bugtracker: https://garage.maemo.org/tracker/?func=add&group_id=2286&atid=7641
 XB-Maemo-Display-Name: Pierogi
 XB-Maemo-Icon-26: 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

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment