From d359576506dc27d7352e1feaa8c38412818db99c Mon Sep 17 00:00:00 2001 From: John Pietrzak Date: Sun, 2 Sep 2012 21:09:19 -0400 Subject: [PATCH] Adding per-keyset editable data Pierogi now has per-keyset editable data, allowing much greater flexibility and control over individual keysets. The favorites system has been completely revamped to work as per-keyset data; favorites are now retrieved via a pop-up menu on the main screen. Keyset nicknames have also been added. Also in this version, a new "audio" panel, and a first pass at keysets for ADB (I-Can), Anitech, Blaupunkt, Lifetec, Medion, Sylvania, Triax, and Viewsonic. --- PierogiResources.qrc | 1 + dialogs/pireditkeysetdialog.cpp | 250 +++++++++++++++ dialogs/pireditkeysetdialog.h | 41 +++ dialogs/pireditkeysetdialog.ui | 124 ++++++++ dialogs/pirfavoritesdialog.cpp | 158 ++++++++++ dialogs/pirfavoritesdialog.h | 52 +++ dialogs/pirfavoritesdialog.ui | 27 ++ dialogs/pirtabschoicedialog.cpp | 3 + forms/piraudiodeviceform.cpp | 202 ++++++++++++ forms/piraudiodeviceform.h | 87 ++++++ forms/piraudiodeviceform.ui | 504 ++++++++++++++++++++++++++++++ forms/pirfavoritesform.cpp | 111 ------- forms/pirfavoritesform.h | 44 --- forms/pirfavoritesform.ui | 41 --- forms/pirmedia2form.cpp | 4 +- forms/pirvcrform.cpp | 14 + forms/pirvcrform.h | 22 ++ forms/pirvcrform.ui | 191 +++++++++++ forms/pirvideodiscform.cpp | 14 + forms/pirvideodiscform.h | 22 ++ forms/pirvideodiscform.ui | 97 ++++++ icons/folder_plus_icon&32.png | Bin 0 -> 3251 bytes keysets/adb.cpp | 235 ++++++++++++++ keysets/adb.h | 51 +++ keysets/admiral.cpp | 8 +- keysets/aiwa.cpp | 35 ++- keysets/anitech.cpp | 86 +++++ keysets/anitech.h | 28 ++ keysets/arcam.cpp | 4 +- keysets/blaupunkt.cpp | 60 ++++ keysets/blaupunkt.h | 18 ++ keysets/bose.cpp | 12 +- keysets/cambridge.cpp | 2 +- keysets/daewoo.cpp | 8 +- keysets/denon.cpp | 13 +- keysets/goldstar.cpp | 6 +- keysets/grundig.cpp | 5 +- keysets/harmankardon.cpp | 4 +- keysets/hitachi.cpp | 4 +- keysets/hyundai.cpp | 2 +- keysets/jvc.cpp | 4 +- keysets/kenwood.cpp | 9 +- keysets/lg.cpp | 11 +- keysets/lifetec.cpp | 212 +++++++++++++ keysets/lifetec.h | 51 +++ keysets/loewe.cpp | 6 +- keysets/magnavox.cpp | 4 +- keysets/mce.cpp | 34 +- keysets/mce.h | 10 + keysets/medion.cpp | 249 +++++++++++++++ keysets/medion.h | 51 +++ keysets/mitsubishi.cpp | 4 +- keysets/nad.cpp | 7 +- keysets/orion.cpp | 6 +- keysets/panasonic.cpp | 22 +- keysets/philips.cpp | 10 +- keysets/pioneer.cpp | 8 +- keysets/saba.cpp | 4 +- keysets/samsung.cpp | 6 +- keysets/sanyo.cpp | 10 +- keysets/sharp.cpp | 12 +- keysets/sony.cpp | 6 +- keysets/sylvania.cpp | 77 +++++ keysets/sylvania.h | 18 ++ keysets/technics.cpp | 6 +- keysets/thomson.cpp | 4 +- keysets/triax.cpp | 140 +++++++++ keysets/triax.h | 38 +++ keysets/universum.cpp | 18 +- keysets/viewsonic.cpp | 114 +++++++ keysets/viewsonic.h | 28 ++ keysets/yamaha.cpp | 4 +- mainwindow.cpp | 97 +++--- mainwindow.h | 13 +- pierogi.pro | 43 ++- pierogi.pro.user | 10 +- pirkeynames.h | 31 +- pirkeysetmanager.cpp | 151 ++++++++- pirkeysetmanager.h | 10 +- pirkeysetmetadata.cpp | 2 +- pirkeysetwidgetitem.cpp | 46 ++- pirkeysetwidgetitem.h | 76 ++++- pirmakenames.cpp | 22 ++ pirmakenames.h | 14 + pirpanelmanager.cpp | 57 ++-- pirpanelmanager.h | 15 +- pirpanelnames.h | 5 +- pirselectkeysetform.cpp | 37 ++- pirselectkeysetform.h | 16 +- qtc_packaging/debian_fremantle/changelog | 15 +- qtc_packaging/debian_fremantle/control | 4 +- 91 files changed, 3937 insertions(+), 500 deletions(-) create mode 100644 dialogs/pireditkeysetdialog.cpp create mode 100644 dialogs/pireditkeysetdialog.h create mode 100644 dialogs/pireditkeysetdialog.ui create mode 100644 dialogs/pirfavoritesdialog.cpp create mode 100644 dialogs/pirfavoritesdialog.h create mode 100644 dialogs/pirfavoritesdialog.ui create mode 100644 forms/piraudiodeviceform.cpp create mode 100644 forms/piraudiodeviceform.h create mode 100644 forms/piraudiodeviceform.ui delete mode 100644 forms/pirfavoritesform.cpp delete mode 100644 forms/pirfavoritesform.h delete mode 100644 forms/pirfavoritesform.ui create mode 100644 forms/pirvcrform.cpp create mode 100644 forms/pirvcrform.h create mode 100644 forms/pirvcrform.ui create mode 100644 forms/pirvideodiscform.cpp create mode 100644 forms/pirvideodiscform.h create mode 100644 forms/pirvideodiscform.ui create mode 100755 icons/folder_plus_icon&32.png create mode 100644 keysets/adb.cpp create mode 100644 keysets/adb.h create mode 100644 keysets/anitech.cpp create mode 100644 keysets/anitech.h create mode 100644 keysets/blaupunkt.cpp create mode 100644 keysets/blaupunkt.h create mode 100644 keysets/lifetec.cpp create mode 100644 keysets/lifetec.h create mode 100644 keysets/medion.cpp create mode 100644 keysets/medion.h create mode 100644 keysets/sylvania.cpp create mode 100644 keysets/sylvania.h create mode 100644 keysets/triax.cpp create mode 100644 keysets/triax.h create mode 100644 keysets/viewsonic.cpp create mode 100644 keysets/viewsonic.h diff --git a/PierogiResources.qrc b/PierogiResources.qrc index b5ac296..acafd40 100644 --- a/PierogiResources.qrc +++ b/PierogiResources.qrc @@ -35,5 +35,6 @@ icons/red_pause.png icons/delete_icon&48.png icons/align_just_icon&32.png + icons/folder_plus_icon&32.png diff --git a/dialogs/pireditkeysetdialog.cpp b/dialogs/pireditkeysetdialog.cpp new file mode 100644 index 0000000..c0662c3 --- /dev/null +++ b/dialogs/pireditkeysetdialog.cpp @@ -0,0 +1,250 @@ +#include "pireditkeysetdialog.h" +#include "ui_pireditkeysetdialog.h" + +#include "mainwindow.h" +#include "pirkeysetwidgetitem.h" + +#include + +#include "pirmakenames.h" +extern PIRMakeMgr makeManager; + +/* +PIREditKeysetDialog::PIREditKeysetDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::PIREditKeysetDialog) +{ + ui->setupUi(this); +} +*/ + +PIREditKeysetDialog::PIREditKeysetDialog( + MainWindow *mw) + : QDialog(mw), + ui(new Ui::PIREditKeysetDialog), + mainWindow(mw) +{ + ui->setupUi(this); + + connect( + this, + SIGNAL(accepted()), + this, + SLOT(enactChanges()), + Qt::QueuedConnection); +} + +PIREditKeysetDialog::~PIREditKeysetDialog() +{ + delete ui; +} + + +void PIREditKeysetDialog::setupDialog( + PIRKeysetWidgetItem *kwi) +{ + ui->keysetNameLabel->setText( + kwi->text()); + + ui->addToFavoritesCheckBox->setChecked(kwi->isFavorite()); + + if (kwi->hasNickname()) + { + ui->nicknameLineEdit->setText(kwi->getNickname()); + } + + keysetItem = kwi; +} + + +void PIREditKeysetDialog::enactChanges() +{ + // Did the nickname change? + bool nickChanged = false; + QString newNick = ui->nicknameLineEdit->text(); + if (newNick != keysetItem->getNickname()) + { + nickChanged = true; + + keysetItem->setNickname(newNick); + + // Need to update the display name: + QString newDisplayName; + if (!newNick.isEmpty()) + { + newDisplayName = newNick; + newDisplayName.append(" ("); + newDisplayName.append(makeManager.getMakeString(keysetItem->getMake())); + newDisplayName.append(" "); + newDisplayName.append(keysetItem->getInternalName()); + newDisplayName.append(")"); + + updateQSettingsNickname(); + } + else + { + newDisplayName = makeManager.getMakeString(keysetItem->getMake()); + newDisplayName.append(" "); + newDisplayName.append(keysetItem->getInternalName()); + + removeQSettingsNickname(); + } + + keysetItem->setText(newDisplayName); + } + + // Did the favorites setting change? + if (keysetItem->isFavorite()) + { + if (!ui->addToFavoritesCheckBox->isChecked()) + { + // Remove it from the favorites list: + keysetItem->setFavorite(false); + mainWindow->removeFromFavorites(keysetItem->getID()); + } + else + { + // It's already in the favorites list, but if the nickname changed, + // we still need to update its entry: + if (nickChanged) + { + mainWindow->removeFromFavorites(keysetItem->getID()); + mainWindow->addToFavorites(keysetItem); + } + } + } + else + { + if (ui->addToFavoritesCheckBox->isChecked()) + { + keysetItem->setFavorite(true); + mainWindow->addToFavorites(keysetItem); + } + } + + // Finally, clean up the dialog box for the next user: + ui->nicknameLineEdit->clear(); +} + + +// Creating a new QSettings array entry, or updating an existing one, is +// relatively painless: +void PIREditKeysetDialog::updateQSettingsNickname() +{ + QSettings settings("pietrzak.org", "Pierogi"); + + // Try to find an existing entry: + int size = settings.beginReadArray("userNames"); + int index = 0; + QString name; + QString makeStr; + PIRMakeName makeID; + + while (index < size) + { + settings.setArrayIndex(index); + name = settings.value("keysetName").toString(); + + if (name == keysetItem->getInternalName()) + { + makeStr = settings.value("keysetMake").toString(); + makeID = makeManager.getMakeID(makeStr); + + if (makeID == keysetItem->getMake()) + { + // We've found a match, so we just need to update it: + settings.endArray(); + settings.beginWriteArray("userNames"); + settings.setArrayIndex(index); + settings.setValue("keysetNickname", keysetItem->getNickname()); + settings.endArray(); + + // And we're done! + return; + } + } + + ++index; + } + + settings.endArray(); + + // There was no existing entry, so we just need to make one: + settings.beginWriteArray("userNames"); + settings.setArrayIndex(size); + + settings.setValue( + "keysetName", + keysetItem->getInternalName()); + + settings.setValue( + "keysetMake", + makeManager.getMakeString(keysetItem->getMake())); + + settings.setValue( + "keysetNickname", + keysetItem->getNickname()); + + settings.endArray(); +} + + +// Removing an entry from a QSettings array is, unfortunately, quite painful: +struct stringTriple +{ + QString keysetName; + QString keysetMake; + QString keysetNickname; +}; + +typedef std::map PIRSettingsData; + +void PIREditKeysetDialog::removeQSettingsNickname() +{ + QSettings settings("pietrzak.org", "Pierogi"); + + int size = settings.beginReadArray("userNames"); + int index = 0; + int index2 = 0; + PIRSettingsData backupData; + QString nameToRemove = keysetItem->getInternalName(); + QString makeToRemove = makeManager.getMakeString(keysetItem->getMake()); + + while (index < size) + { + settings.setArrayIndex(index); + + if ( (settings.value("keysetName").toString() != nameToRemove) + && (settings.value("keysetMake").toString() != makeToRemove) ) + { + backupData[index2].keysetName = + settings.value("keysetName").toString(); + backupData[index2].keysetMake = + settings.value("keysetMake").toString(); + backupData[index2].keysetNickname = + settings.value("keysetNickname").toString(); + ++index2; + } + + ++index; + } + + // Close the array, blow it away, and create a new one: + + settings.endArray(); + settings.remove("userNames"); + settings.beginWriteArray("userNames"); + + size = index2; + index = 0; + + while (index < size) + { + settings.setArrayIndex(index); + settings.setValue("keysetName", backupData[index].keysetName); + settings.setValue("keysetMake", backupData[index].keysetMake); + settings.setValue("keysetNickname", backupData[index].keysetNickname); + ++index; + } + settings.endArray(); +} diff --git a/dialogs/pireditkeysetdialog.h b/dialogs/pireditkeysetdialog.h new file mode 100644 index 0000000..dc69a9d --- /dev/null +++ b/dialogs/pireditkeysetdialog.h @@ -0,0 +1,41 @@ +#ifndef PIREDITKEYSETDIALOG_H +#define PIREDITKEYSETDIALOG_H + +#include + +class PIRKeysetWidgetItem; +class MainWindow; + +namespace Ui { +class PIREditKeysetDialog; +} + +class PIREditKeysetDialog : public QDialog +{ + Q_OBJECT + +public: +// explicit PIREditKeysetDialog(QWidget *parent = 0); + + PIREditKeysetDialog( + MainWindow *mw); + + ~PIREditKeysetDialog(); + + void setupDialog( + PIRKeysetWidgetItem *kwi); + +private slots: + void enactChanges(); + +private: + void updateQSettingsNickname(); + void removeQSettingsNickname(); + + Ui::PIREditKeysetDialog *ui; + + MainWindow *mainWindow; + PIRKeysetWidgetItem *keysetItem; +}; + +#endif // PIREDITKEYSETDIALOG_H diff --git a/dialogs/pireditkeysetdialog.ui b/dialogs/pireditkeysetdialog.ui new file mode 100644 index 0000000..ad58a57 --- /dev/null +++ b/dialogs/pireditkeysetdialog.ui @@ -0,0 +1,124 @@ + + + PIREditKeysetDialog + + + + 0 + 0 + 800 + 300 + + + + Keyset Settings + + + true + + + + 8 + + + + + + + + 0 + 0 + + + + QFrame::NoFrame + + + Keyset Name + + + + + + + Qt::Horizontal + + + + + + + Add keyset to favorites list + + + + + + + + + + 0 + 0 + + + + Nickname + + + + + + + + + + + + + + Qt::Vertical + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + PIREditKeysetDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + PIREditKeysetDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/dialogs/pirfavoritesdialog.cpp b/dialogs/pirfavoritesdialog.cpp new file mode 100644 index 0000000..3b522ef --- /dev/null +++ b/dialogs/pirfavoritesdialog.cpp @@ -0,0 +1,158 @@ +#include "pirfavoritesdialog.h" +#include "ui_pirfavoritesdialog.h" + +//#include + +#include "mainwindow.h" +#include "pirkeysetwidgetitem.h" +#include + +/* +PIRFavoritesDialog::PIRFavoritesDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::PIRFavoritesDialog) +{ + ui->setupUi(this); +} +*/ + + +PIRFavoritesDialog::PIRFavoritesDialog( + MainWindow *mw) + : QDialog(0), + ui(new Ui::PIRFavoritesDialog), + mainWindow(mw) +{ + ui->setupUi(this); +} + + +PIRFavoritesDialog::~PIRFavoritesDialog() +{ + delete ui; +} + + +void PIRFavoritesDialog::selectPrevFavKeyset() +{ + int size = ui->favoritesListWidget->count(); + + if (size == 0) + { + // No favorites, so nothing to do! + return; + } + + int position = ui->favoritesListWidget->currentRow(); + + --position; + if (position < 0) + { + position = size - 1; + } + + ui->favoritesListWidget->setCurrentRow( + position, + QItemSelectionModel::ClearAndSelect); + + mainWindow->keysetSelectionChanged( + ui->favoritesListWidget->currentItem()); + + // Tell the user about the change: + QMaemo5InformationBox::information( + 0, + ui->favoritesListWidget->item(position)->text()); +} + + +void PIRFavoritesDialog::selectNextFavKeyset() +{ + int size = ui->favoritesListWidget->count(); + + if (size == 0) + { + // No favorites, so just return: + return; + } + + int position = ui->favoritesListWidget->currentRow(); + + ++position; + if (position == size) + { + position = 0; + } + + ui->favoritesListWidget->setCurrentRow( + position, + QItemSelectionModel::ClearAndSelect); + + mainWindow->keysetSelectionChanged( + ui->favoritesListWidget->currentItem()); + + // Tell the user about the change: + QMaemo5InformationBox::information( + 0, + ui->favoritesListWidget->item(position)->text()); +} + + +void PIRFavoritesDialog::addItem( + PIRKeysetWidgetItem *item) +{ + PIRKeysetWidgetItem *itemCopy = new PIRKeysetWidgetItem(item); + ui->favoritesListWidget->addItem(itemCopy); + ui->favoritesListWidget->sortItems(); +} + + +int PIRFavoritesDialog::getCount() +{ + return ui->favoritesListWidget->count(); +} + + +PIRKeysetWidgetItem *PIRFavoritesDialog::getItem( + int index) +{ + return dynamic_cast( + ui->favoritesListWidget->item(index)); +} + + +void PIRFavoritesDialog::removeItem( + unsigned int keysetID) +{ + // Find the keyset in the list (if it is there): + int count = ui->favoritesListWidget->count(); + int index = 0; + PIRKeysetWidgetItem *kwi; + + while (index < count) + { + kwi = dynamic_cast( + ui->favoritesListWidget->item(index)); + + if (kwi->getID() == keysetID) + { + // Deleting the item removes it from the list: + delete kwi; + return; + } + + ++index; + } +} + + +QListWidget *PIRFavoritesDialog::getFavoritesListWidget() +{ + return ui->favoritesListWidget; +} + + +void PIRFavoritesDialog::on_favoritesListWidget_itemClicked() +{ + // Exit from the dialog: + accept(); +} diff --git a/dialogs/pirfavoritesdialog.h b/dialogs/pirfavoritesdialog.h new file mode 100644 index 0000000..4b233f0 --- /dev/null +++ b/dialogs/pirfavoritesdialog.h @@ -0,0 +1,52 @@ +#ifndef PIRFAVORITESDIALOG_H +#define PIRFAVORITESDIALOG_H + +#include + +class QListWidget; +class PIRKeysetWidgetItem; +class QListWidgetItem; +class MainWindow; + +namespace Ui { +class PIRFavoritesDialog; +} + +class PIRFavoritesDialog : public QDialog +{ + Q_OBJECT + +public: +// explicit PIRFavoritesDialog(QWidget *parent = 0); + + PIRFavoritesDialog( + MainWindow *mw); + + ~PIRFavoritesDialog(); + + QListWidget *getFavoritesListWidget(); + + void addItem( + PIRKeysetWidgetItem *item); + + int getCount(); + + PIRKeysetWidgetItem *getItem( + int index); + + void removeItem( + unsigned int keysetID); + + void selectPrevFavKeyset(); + void selectNextFavKeyset(); + +private slots: + void on_favoritesListWidget_itemClicked(); + +private: + Ui::PIRFavoritesDialog *ui; + + MainWindow *mainWindow; +}; + +#endif // PIRFAVORITESDIALOG_H diff --git a/dialogs/pirfavoritesdialog.ui b/dialogs/pirfavoritesdialog.ui new file mode 100644 index 0000000..e59385f --- /dev/null +++ b/dialogs/pirfavoritesdialog.ui @@ -0,0 +1,27 @@ + + + PIRFavoritesDialog + + + + 0 + 0 + 800 + 480 + + + + Choose Favorite Keyset + + + + 8 + + + + + + + + + diff --git a/dialogs/pirtabschoicedialog.cpp b/dialogs/pirtabschoicedialog.cpp index 41a84f6..7cf9a4f 100644 --- a/dialogs/pirtabschoicedialog.cpp +++ b/dialogs/pirtabschoicedialog.cpp @@ -22,6 +22,9 @@ PIRTabsChoiceDialog::PIRTabsChoiceDialog( new PIRTabsWidgetItem("Video Media Panels", VideoMedia_Tabs)); ui->tabsChoiceListWidget->addItem( + new PIRTabsWidgetItem("Audio Device Panels", Audio_Tabs)); + + ui->tabsChoiceListWidget->addItem( new PIRTabsWidgetItem("Recording Panels", Record_Tabs)); ui->tabsChoiceListWidget->addItem( diff --git a/forms/piraudiodeviceform.cpp b/forms/piraudiodeviceform.cpp new file mode 100644 index 0000000..0a26846 --- /dev/null +++ b/forms/piraudiodeviceform.cpp @@ -0,0 +1,202 @@ +#include "piraudiodeviceform.h" +#include "ui_piraudiodeviceform.h" + +#include "mainwindow.h" +#include "pirkeysetmanager.h" + +PIRAudioDeviceForm::PIRAudioDeviceForm( + MainWindow *mw) + : QWidget(0), + ui(new Ui::PIRAudioDeviceForm), + mainWindow(mw) +{ + ui->setupUi(this); +} + +PIRAudioDeviceForm::~PIRAudioDeviceForm() +{ + delete ui; +} + + +void PIRAudioDeviceForm::enableButtons( + const PIRKeysetManager *keyset, + unsigned int id) +{ + emit cdEnabled(keyset->hasKey(id, CDInput_Key)); + emit tapeEnabled(keyset->hasKey(id, TapeInput_Key)); + emit phonoEnabled(keyset->hasKey(id, PhonoInput_Key)); + emit auxEnabled(keyset->hasKey(id, AuxInput_Key)); + emit tunerEnabled(keyset->hasKey(id, TunerInput_Key)); + emit fmEnabled(keyset->hasKey(id, FM_Key)); + emit amEnabled(keyset->hasKey(id, AM_Key)); + emit lwEnabled(keyset->hasKey(id, LW_Key)); + emit fmModeEnabled(keyset->hasKey(id, FMMode_Key)); + emit repeatEnabled(keyset->hasKey(id, Repeat_Key)); + emit repeatABEnabled(keyset->hasKey(id, RepeatAB_Key)); + emit randomEnabled(keyset->hasKey(id, Random_Key)); + emit nextDiscEnabled(keyset->hasKey(id, NextDisc_Key)); + emit prevDiscEnabled(keyset->hasKey(id, PrevDisc_Key)); + emit sleepEnabled(keyset->hasKey(id, Sleep_Key)); + emit infoEnabled(keyset->hasKey(id, Info_Key)); +} + +void PIRAudioDeviceForm::on_cdButton_pressed() +{ + mainWindow->startRepeating(CDInput_Key); +} + +void PIRAudioDeviceForm::on_cdButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_tapeButton_pressed() +{ + mainWindow->startRepeating(TapeInput_Key); +} + +void PIRAudioDeviceForm::on_tapeButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_phonoButton_pressed() +{ + mainWindow->startRepeating(PhonoInput_Key); +} + +void PIRAudioDeviceForm::on_phonoButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_auxButton_pressed() +{ + mainWindow->startRepeating(AuxInput_Key); +} + +void PIRAudioDeviceForm::on_auxButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_tunerButton_pressed() +{ + mainWindow->startRepeating(TunerInput_Key); +} + +void PIRAudioDeviceForm::on_tunerButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_fmButton_pressed() +{ + mainWindow->startRepeating(FM_Key); +} + +void PIRAudioDeviceForm::on_fmButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_amButton_pressed() +{ + mainWindow->startRepeating(AM_Key); +} + +void PIRAudioDeviceForm::on_amButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_lwButton_pressed() +{ + mainWindow->startRepeating(LW_Key); +} + +void PIRAudioDeviceForm::on_lwButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_fmModeButton_pressed() +{ + mainWindow->startRepeating(FMMode_Key); +} + +void PIRAudioDeviceForm::on_fmModeButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_repeatButton_pressed() +{ + mainWindow->startRepeating(Repeat_Key); +} + +void PIRAudioDeviceForm::on_repeatButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_repeatABButton_pressed() +{ + mainWindow->startRepeating(RepeatAB_Key); +} + +void PIRAudioDeviceForm::on_repeatABButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_randomButton_pressed() +{ + mainWindow->startRepeating(Random_Key); +} + +void PIRAudioDeviceForm::on_randomButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_nextDiscButton_pressed() +{ + mainWindow->startRepeating(NextDisc_Key); +} + +void PIRAudioDeviceForm::on_nextDiscButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_prevDiscButton_pressed() +{ + mainWindow->startRepeating(PrevDisc_Key); +} + +void PIRAudioDeviceForm::on_prevDiscButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_sleepButton_pressed() +{ + mainWindow->startRepeating(Sleep_Key); +} + +void PIRAudioDeviceForm::on_sleepButton_released() +{ + mainWindow->stopRepeating(); +} + +void PIRAudioDeviceForm::on_infoButton_pressed() +{ + mainWindow->startRepeating(Info_Key); +} + +void PIRAudioDeviceForm::on_infoButton_released() +{ + mainWindow->stopRepeating(); +} diff --git a/forms/piraudiodeviceform.h b/forms/piraudiodeviceform.h new file mode 100644 index 0000000..e7d0054 --- /dev/null +++ b/forms/piraudiodeviceform.h @@ -0,0 +1,87 @@ +#ifndef PIRAUDIODEVICEFORM_H +#define PIRAUDIODEVICEFORM_H + +#include + +class MainWindow; +class PIRKeysetManager; + +namespace Ui { +class PIRAudioDeviceForm; +} + +class PIRAudioDeviceForm : public QWidget +{ + Q_OBJECT + +public: +// explicit PIRAudioDeviceForm(QWidget *parent = 0); + + PIRAudioDeviceForm( + MainWindow *mw); + + ~PIRAudioDeviceForm(); + + void enableButtons( + const PIRKeysetManager *keyset, + unsigned int id); + +signals: + void cdEnabled(bool); + void tapeEnabled(bool); + void phonoEnabled(bool); + void auxEnabled(bool); + void tunerEnabled(bool); + void fmEnabled(bool); + void amEnabled(bool); + void lwEnabled(bool); + void fmModeEnabled(bool); + void repeatEnabled(bool); + void repeatABEnabled(bool); + void randomEnabled(bool); + void nextDiscEnabled(bool); + void prevDiscEnabled(bool); + void sleepEnabled(bool); + void infoEnabled(bool); + +private slots: + void on_cdButton_pressed(); + void on_cdButton_released(); + void on_tapeButton_pressed(); + void on_tapeButton_released(); + void on_phonoButton_pressed(); + void on_phonoButton_released(); + void on_auxButton_pressed(); + void on_auxButton_released(); + void on_tunerButton_pressed(); + void on_tunerButton_released(); + void on_fmButton_pressed(); + void on_fmButton_released(); + void on_amButton_pressed(); + void on_amButton_released(); + void on_lwButton_pressed(); + void on_lwButton_released(); + void on_fmModeButton_pressed(); + void on_fmModeButton_released(); + void on_repeatButton_pressed(); + void on_repeatButton_released(); + void on_repeatABButton_pressed(); + void on_repeatABButton_released(); + void on_randomButton_pressed(); + void on_randomButton_released(); + void on_nextDiscButton_pressed(); + void on_nextDiscButton_released(); + void on_prevDiscButton_pressed(); + void on_prevDiscButton_released(); + void on_sleepButton_pressed(); + void on_sleepButton_released(); + void on_infoButton_pressed(); + void on_infoButton_released(); + +private: + Ui::PIRAudioDeviceForm *ui; + + MainWindow *mainWindow; +}; + +#endif // PIRAUDIODEVICEFORM_H diff --git a/forms/piraudiodeviceform.ui b/forms/piraudiodeviceform.ui new file mode 100644 index 0000000..20cac6b --- /dev/null +++ b/forms/piraudiodeviceform.ui @@ -0,0 +1,504 @@ + + + PIRAudioDeviceForm + + + + 0 + 0 + 800 + 480 + + + + Form + + + + + + + 0 + 0 + + + + CD + + + + + + + + 0 + 0 + + + + Tape + + + + + + + + 0 + 0 + + + + Phono + + + + + + + + 0 + 0 + + + + Aux + + + + + + + + 0 + 0 + + + + Tuner + + + + + + + + 0 + 0 + + + + FM + + + + + + + + 0 + 0 + + + + AM / MW + + + + + + + + 0 + 0 + + + + LW + + + + + + + + 0 + 0 + + + + FM Stereo/Mono + + + + + + + + 0 + 0 + + + + Repeat + + + + + + + + 0 + 0 + + + + Random + + + + + + + + 0 + 0 + + + + Next Disc + + + + + + + + 0 + 0 + + + + Previous Disc + + + + + + + + 0 + 0 + + + + Sleep + + + + + + + + 0 + 0 + + + + Info + + + + + + + + 0 + 0 + + + + Repeat A-B + + + + + + + + + PIRAudioDeviceForm + cdEnabled(bool) + cdButton + setEnabled(bool) + + + 399 + 239 + + + 103 + 65 + + + + + PIRAudioDeviceForm + tapeEnabled(bool) + tapeButton + setEnabled(bool) + + + 399 + 239 + + + 301 + 65 + + + + + PIRAudioDeviceForm + phonoEnabled(bool) + phonoButton + setEnabled(bool) + + + 399 + 239 + + + 498 + 65 + + + + + PIRAudioDeviceForm + auxEnabled(bool) + auxButton + setEnabled(bool) + + + 399 + 239 + + + 696 + 65 + + + + + PIRAudioDeviceForm + tunerEnabled(bool) + tunerButton + setEnabled(bool) + + + 399 + 239 + + + 103 + 183 + + + + + PIRAudioDeviceForm + fmEnabled(bool) + fmButton + setEnabled(bool) + + + 399 + 239 + + + 301 + 183 + + + + + PIRAudioDeviceForm + amEnabled(bool) + amButton + setEnabled(bool) + + + 399 + 239 + + + 498 + 183 + + + + + PIRAudioDeviceForm + lwEnabled(bool) + lwButton + setEnabled(bool) + + + 399 + 239 + + + 696 + 183 + + + + + PIRAudioDeviceForm + fmModeEnabled(bool) + fmModeButton + setEnabled(bool) + + + 399 + 239 + + + 103 + 300 + + + + + PIRAudioDeviceForm + repeatEnabled(bool) + repeatButton + setEnabled(bool) + + + 399 + 239 + + + 301 + 300 + + + + + PIRAudioDeviceForm + repeatABEnabled(bool) + repeatABButton + setEnabled(bool) + + + 399 + 239 + + + 498 + 300 + + + + + PIRAudioDeviceForm + randomEnabled(bool) + randomButton + setEnabled(bool) + + + 399 + 239 + + + 696 + 300 + + + + + PIRAudioDeviceForm + nextDiscEnabled(bool) + nextDiscButton + setEnabled(bool) + + + 399 + 239 + + + 103 + 418 + + + + + PIRAudioDeviceForm + prevDiscEnabled(bool) + prevDiscButton + setEnabled(bool) + + + 399 + 239 + + + 301 + 418 + + + + + PIRAudioDeviceForm + sleepEnabled(bool) + sleepButton + setEnabled(bool) + + + 399 + 239 + + + 498 + 418 + + + + + PIRAudioDeviceForm + infoEnabled(bool) + infoButton + setEnabled(bool) + + + 399 + 239 + + + 696 + 418 + + + + + + cdEnabled(bool) + tapeEnabled(bool) + phonoEnabled(bool) + auxEnabled(bool) + tunerEnabled(bool) + fmEnabled(bool) + amEnabled(bool) + lwEnabled(bool) + fmModeEnabled(bool) + repeatEnabled(bool) + repeatABEnabled(bool) + randomEnabled(bool) + nextDiscEnabled(bool) + prevDiscEnabled(bool) + sleepEnabled(bool) + infoEnabled(bool) + + diff --git a/forms/pirfavoritesform.cpp b/forms/pirfavoritesform.cpp deleted file mode 100644 index adaa656..0000000 --- a/forms/pirfavoritesform.cpp +++ /dev/null @@ -1,111 +0,0 @@ -#include "pirfavoritesform.h" -#include "ui_pirfavoritesform.h" - -#include "mainwindow.h" -//#include "pirkeysetmanager.h" -#include "pirkeysetwidgetitem.h" - -#include - -PIRFavoritesForm::PIRFavoritesForm( - MainWindow *mw) - : QWidget(0), - ui(new Ui::PIRFavoritesForm), - mainWindow(mw) -{ - ui->setupUi(this); -} - -PIRFavoritesForm::~PIRFavoritesForm() -{ - delete ui; -} - - -void PIRFavoritesForm::selectPrevFavKeyset() -{ - int size = ui->favoriteKeysetsWidget->count(); - - if (size == 0) - { - // No favorites, so nothing to do! - return; - } - - int position = ui->favoriteKeysetsWidget->currentRow(); - - --position; - if (position < 0) - { - position = size - 1; - } - - ui->favoriteKeysetsWidget->setCurrentRow( - position, - QItemSelectionModel::ClearAndSelect); - - mainWindow->keysetSelectionChanged( - ui->favoriteKeysetsWidget->currentItem()); - - // Tell the user about the change: - QMaemo5InformationBox::information( - 0, - ui->favoriteKeysetsWidget->item(position)->text()); -} - - -void PIRFavoritesForm::selectNextFavKeyset() -{ - int size = ui->favoriteKeysetsWidget->count(); - - if (size == 0) - { - // No favorites, so just return: - return; - } - - int position = ui->favoriteKeysetsWidget->currentRow(); - - ++position; - if (position == size) - { - position = 0; - } - - ui->favoriteKeysetsWidget->setCurrentRow( - position, - QItemSelectionModel::ClearAndSelect); - - mainWindow->keysetSelectionChanged( - ui->favoriteKeysetsWidget->currentItem()); - - // Tell the user about the change: - QMaemo5InformationBox::information( - 0, - ui->favoriteKeysetsWidget->item(position)->text()); -} - - -void PIRFavoritesForm::addItem( - PIRKeysetWidgetItem *item) -{ - ui->favoriteKeysetsWidget->addItem(item); -} - - -QListWidget *PIRFavoritesForm::getFavoritesListWidget() -{ - return ui->favoriteKeysetsWidget; -} - - -void PIRFavoritesForm::on_addKeysetButton_clicked() -{ - mainWindow->addCurrentKeyset(ui->favoriteKeysetsWidget); -} - - -void PIRFavoritesForm::on_removeKeysetButton_clicked() -{ - mainWindow->removeFavoriteKeyset(ui->favoriteKeysetsWidget); -} diff --git a/forms/pirfavoritesform.h b/forms/pirfavoritesform.h deleted file mode 100644 index 5e86b54..0000000 --- a/forms/pirfavoritesform.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef PIRFAVORITESFORM_H -#define PIRFAVORITESFORM_H - -#include - -class MainWindow; -//class PIRKeysetManager; -class PIRKeysetWidgetItem; -class QListWidget; - -namespace Ui { -class PIRFavoritesForm; -} - -class PIRFavoritesForm : public QWidget -{ - Q_OBJECT - -public: -// explicit PIRFavoritesForm(QWidget *parent = 0); - PIRFavoritesForm( - MainWindow *mw); - - ~PIRFavoritesForm(); - - void selectPrevFavKeyset(); - void selectNextFavKeyset(); - - void addItem( - PIRKeysetWidgetItem *item); - - QListWidget *getFavoritesListWidget(); - -private slots: - void on_addKeysetButton_clicked(); - void on_removeKeysetButton_clicked(); - -private: - Ui::PIRFavoritesForm *ui; - - MainWindow *mainWindow; -}; - -#endif // PIRFAVORITESFORM_H diff --git a/forms/pirfavoritesform.ui b/forms/pirfavoritesform.ui deleted file mode 100644 index 316e1c3..0000000 --- a/forms/pirfavoritesform.ui +++ /dev/null @@ -1,41 +0,0 @@ - - - PIRFavoritesForm - - - - 0 - 0 - 800 - 480 - - - - Form - - - - 0 - - - - - Add Current Keyset - - - - - - - Remove Selected Keyset - - - - - - - - - - - diff --git a/forms/pirmedia2form.cpp b/forms/pirmedia2form.cpp index 0020cd5..0738eb8 100644 --- a/forms/pirmedia2form.cpp +++ b/forms/pirmedia2form.cpp @@ -22,7 +22,7 @@ void PIRMedia2Form::enableButtons( const PIRKeysetManager *km, unsigned int id) { - emit tunerBandEnabled(km->hasKey(id, TunerBand_Key)); + emit tunerBandEnabled(km->hasKey(id, TunerInput_Key)); emit programEnabled(km->hasKey(id, Program_Key)); emit memoryEnabled(km->hasKey(id, Memory_Key)); emit callEnabled(km->hasKey(id, Call_Key)); @@ -43,7 +43,7 @@ void PIRMedia2Form::enableButtons( void PIRMedia2Form::on_tunerBandButton_pressed() { - mainWindow->startRepeating(TunerBand_Key); + mainWindow->startRepeating(TunerInput_Key); } void PIRMedia2Form::on_tunerBandButton_released() diff --git a/forms/pirvcrform.cpp b/forms/pirvcrform.cpp new file mode 100644 index 0000000..be23444 --- /dev/null +++ b/forms/pirvcrform.cpp @@ -0,0 +1,14 @@ +#include "pirvcrform.h" +#include "ui_pirvcrform.h" + +PIRVCRForm::PIRVCRForm(QWidget *parent) : + QWidget(parent), + ui(new Ui::PIRVCRForm) +{ + ui->setupUi(this); +} + +PIRVCRForm::~PIRVCRForm() +{ + delete ui; +} diff --git a/forms/pirvcrform.h b/forms/pirvcrform.h new file mode 100644 index 0000000..776394e --- /dev/null +++ b/forms/pirvcrform.h @@ -0,0 +1,22 @@ +#ifndef PIRVCRFORM_H +#define PIRVCRFORM_H + +#include + +namespace Ui { +class PIRVCRForm; +} + +class PIRVCRForm : public QWidget +{ + Q_OBJECT + +public: + explicit PIRVCRForm(QWidget *parent = 0); + ~PIRVCRForm(); + +private: + Ui::PIRVCRForm *ui; +}; + +#endif // PIRVCRFORM_H diff --git a/forms/pirvcrform.ui b/forms/pirvcrform.ui new file mode 100644 index 0000000..c8b1fb0 --- /dev/null +++ b/forms/pirvcrform.ui @@ -0,0 +1,191 @@ + + + PIRVCRForm + + + + 0 + 0 + 800 + 480 + + + + Form + + + + + 10 + 310 + 131 + 32 + + + + + 0 + 0 + + + + Auto Tracking + + + + + + 470 + 300 + 99 + 32 + + + + + 0 + 0 + + + + SP/LP/EP + + + + + + 180 + 300 + 109 + 32 + + + + + 0 + 0 + + + + Tracking - + + + + + + 390 + 220 + 86 + 32 + + + + + 0 + 0 + + + + Slow + + + + + + + 330 + 290 + 112 + 32 + + + + + 0 + 0 + + + + Tracking + + + + + + + 210 + 220 + 71 + 32 + + + + + 0 + 0 + + + + Slow + + + + + + 20 + 220 + 83 + 32 + + + + + 0 + 0 + + + + Slow - + + + + + + 10 + 110 + 171 + 32 + + + + Index Search (VISS) + + + + + + 210 + 120 + 114 + 32 + + + + Mark Index + + + + + + 390 + 120 + 114 + 32 + + + + Erase Index + + + + + + diff --git a/forms/pirvideodiscform.cpp b/forms/pirvideodiscform.cpp new file mode 100644 index 0000000..8ca5da9 --- /dev/null +++ b/forms/pirvideodiscform.cpp @@ -0,0 +1,14 @@ +#include "pirvideodiscform.h" +#include "ui_pirvideodiscform.h" + +PIRVideoDiscForm::PIRVideoDiscForm(QWidget *parent) : + QWidget(parent), + ui(new Ui::PIRVideoDiscForm) +{ + ui->setupUi(this); +} + +PIRVideoDiscForm::~PIRVideoDiscForm() +{ + delete ui; +} diff --git a/forms/pirvideodiscform.h b/forms/pirvideodiscform.h new file mode 100644 index 0000000..63670e5 --- /dev/null +++ b/forms/pirvideodiscform.h @@ -0,0 +1,22 @@ +#ifndef PIRVIDEODISCFORM_H +#define PIRVIDEODISCFORM_H + +#include + +namespace Ui { +class PIRVideoDiscForm; +} + +class PIRVideoDiscForm : public QWidget +{ + Q_OBJECT + +public: + explicit PIRVideoDiscForm(QWidget *parent = 0); + ~PIRVideoDiscForm(); + +private: + Ui::PIRVideoDiscForm *ui; +}; + +#endif // PIRVIDEODISCFORM_H diff --git a/forms/pirvideodiscform.ui b/forms/pirvideodiscform.ui new file mode 100644 index 0000000..330bcf0 --- /dev/null +++ b/forms/pirvideodiscform.ui @@ -0,0 +1,97 @@ + + + PIRVideoDiscForm + + + + 0 + 0 + 800 + 480 + + + + Form + + + + + 380 + 170 + 114 + 32 + + + + Title Menu + + + + + + 240 + 50 + 114 + 32 + + + + Select Disc + + + + + + 70 + 170 + 114 + 32 + + + + Repeat + + + + + + 220 + 170 + 114 + 32 + + + + Repeat A-B + + + + + + 80 + 50 + 114 + 32 + + + + Previous Disc + + + + + + 390 + 50 + 114 + 32 + + + + Next Disc + + + + + + diff --git a/icons/folder_plus_icon&32.png b/icons/folder_plus_icon&32.png new file mode 100755 index 0000000000000000000000000000000000000000..ae889390b92fae235d8eaac8fc639413abd43f82 GIT binary patch literal 3251 zcmb_eeQXp(6kowst&$W$NvXzhNkD|V-MjYsvDqsew2E2q=FMzf*|B^^&DVP?eJr7rRx(BFHj$zL=)e4Sxxsve3*4`1@fIvb1ZO7a5~IJXh6`DSP7z*4ME7y`xL&32TcKg zprNt3xp^@N@&TUXgIpl!3p5K2L4oH%;fHOj0ivz;3tiGvgmAsibdx)yR&Q9zU&%0R9QA}ebvFg8den&$*1)Z7FJ3E56VQi(}B3yVuaf>f6( zV_A|hQH>N%z{dxC!B8^LAcR6fL(?KYK+30RpGXLC6Jgm@U|b5b1l+G_st}VxO^vap z=9XZvB}On>TUw)0J`#vXd~jJP8uYkJmXf6jEV`?A=H5vvMKfi6N-(r=fp}Aq)ksdk zB(x3WthhxT(Xl&nhq^{9Sol$706{-0ZiUo21-ETW#yzmQ8L#&z+Sj6~CXfU6yn9DHgi95I4vo$1xa(Z>?K&I%Q9 zOKNV}shc~gtjW1^^i?KJd$fsgvy4e6osR?y8PUk!1edl{Jx?Eqv{%&H0DLvDnwMu5^yS)wXZR*sLpWT)zL{ zrQ@%^e^1rS(7JuEo!j!Ebojf$-j!?5*EOG*zdd{=d;WzdH(kA3UwF`{pZ8O}c*=jF z@$}4v3(o9$rvCDwPZ{v#NcxLh_ai%YYi~ENn_fL%NX))^bjP&Q>8M-Hd&l0BBgUH9RUeEGJ^l0V%qz8XbgAvt7XPN&U&V`S9y?&vzq{v?#c%H4 zxOCUW&%-Z0JAL%8>kpj?T{`67e*Dp|>W+QexNHB&(T^_tfR=_9j4j%m2JxMdY2W>", FastForward_Key, 0x40, 8); diff --git a/keysets/jvc.cpp b/keysets/jvc.cpp index ca01639..6b17505 100644 --- a/keysets/jvc.cpp +++ b/keysets/jvc.cpp @@ -666,7 +666,7 @@ void JVCAudio1::populateProtocol( addKey("MD-AUX", AuxInput_Key, 0x3EA3, 16); // "TAPE-AUX" addKey("TAPE", TapeInput_Key, 0x3FA3, 16); addKey("FM-MODE", FMMode_Key, 0x5AA3, 16); - addKey("TUNER-BAND", TunerBand_Key, 0x5BA3, 16); + addKey("TUNER-BAND", TunerInput_Key, 0x5BA3, 16); addKey("AHB-PRO", Unmapped_Key, 0x75A3, 16); addKey("AUTO-PRESET", Unmapped_Key, 0x77A3, 16); @@ -836,7 +836,7 @@ void JVCAudio2::populateProtocol( addKey("vol+", VolumeUp_Key, 0x01, 8); addKey("vol-", VolumeDown_Key, 0x02, 8); addKey("ACTIVE_HYPER_BASS", EnhancedBass_Key, 0x04, 8); // "bass" - addKey("band", TunerBand_Key, 0x0B, 8); // "TUNER_BAND" + addKey("band", TunerInput_Key, 0x0B, 8); // "TUNER_BAND" addKey("aux", AuxInput_Key, 0x0D, 8); addKey("enter", Enter_Key, 0x11, 8); diff --git a/keysets/kenwood.cpp b/keysets/kenwood.cpp index 0756fba..4679767 100644 --- a/keysets/kenwood.cpp +++ b/keysets/kenwood.cpp @@ -51,8 +51,8 @@ void KenwoodAudio1::populateProtocol( addKey("8", Eight_Key, 0x88, 8); addKey("9", Nine_Key, 0x89, 8); addKey("TUNER_DOWN", ChannelDown_Key, 0x8C, 8); - addKey("TUNER_AM", Unmapped_Key, 0x8E, 8); - addKey("TUNER_BAND", TunerBand_Key, 0x8F, 8); // "Tuner_FM" + addKey("TUNER_AM", AM_Key, 0x8E, 8); + addKey("TUNER_BAND", FM_Key, 0x8F, 8); // "Tuner_FM" addKey("PHONO", PhonoInput_Key, 0x90, 8); addKey("SELECT_TUNER", TunerInput_Key, 0x91, 8); @@ -168,7 +168,8 @@ void KenwoodComponent1::populateProtocol( addKey("7", Seven_Key, 0x87, 8); addKey("8", Eight_Key, 0x88, 8); addKey("9", Nine_Key, 0x89, 8); - addKey("BAND", TunerBand_Key, 0x8F, 8); + addKey("BAND", AM_Key, 0x8F, 8); // This is a hack + addKey("BAND", FM_Key, 0x8F, 8); // This too addKey("Phono-play", Unmapped_Key, 0x90, 8); addKey("TUNER", TunerInput_Key, 0x91, 8); @@ -308,7 +309,7 @@ void KenwoodComponent3::populateProtocol( addKey("tuning>>", FastForward_Key, 0x03, 8); // "SEARCH_FWD" addKey("stop", Stop_Key, 0x04, 8); addKey("", TapeInput_Key, 0x05, 8); // "TAPE" - addKey("tuner/band", TunerBand_Key, 0x06, 8); // "TUNER" + addKey("tuner/band", TunerInput_Key, 0x06, 8); // "TUNER" addKey("cd_play_pause", Play_Key, 0x07, 8); // "CD" addKey("cd_play_pause", Pause_Key, 0x07, 8); addKey("A/B", RepeatAB_Key, 0x08, 8); // "A_B" diff --git a/keysets/lg.cpp b/keysets/lg.cpp index 9a419a1..0fd4e6e 100644 --- a/keysets/lg.cpp +++ b/keysets/lg.cpp @@ -29,7 +29,6 @@ void LGTV1::populateProtocol( threadableProtocol = new NECProtocol(guiObject, index, false, true); -// setPreData(0x20DF, 16); setPreData(0x04, 8); addKey("p+", ChannelUp_Key, 0x00, 8); @@ -375,7 +374,6 @@ void LGDisc1::populateProtocol( threadableProtocol = new NECXProtocol(guiObject, index, true); -// setPreData(0x3434, 16); setPreData(0x2C2C, 16); addKey("cd-dvd", Unmapped_Key, 0x03, 8); @@ -404,7 +402,8 @@ void LGDisc1::populateProtocol( addKey("program", Program_Key, 0x4D, 8); addKey("repeat", Repeat_Key, 0x4E, 8); addKey("pause", Pause_Key, 0x4F, 8); - addKey("band", TunerBand_Key, 0x59, 8); + addKey("band", FM_Key, 0x59, 8); // This is a hack + addKey("band", AM_Key, 0x59, 8); // This too addKey("dimmer", Unmapped_Key, 0x5E, 8); addKey("rds", Unmapped_Key, 0x60, 8); addKey("exit_cancel", Unmapped_Key, 0x69, 8); @@ -413,7 +412,7 @@ void LGDisc1::populateProtocol( addKey("pty", Unmapped_Key, 0x71, 8); addKey("i_ii", Unmapped_Key, 0x7A, 8); addKey("text", Unmapped_Key, 0x7B, 8); - addKey("tv_radio", Unmapped_Key, 0x82, 8); + addKey("tv_radio", TunerInput_Key, 0x82, 8); // addKey("aux", Unmapped_Key, 0x8A, 8); addKey("open-close", Eject_Key, 0x9A, 8); addKey("audio", Audio_Key, 0xA0, 8); @@ -463,7 +462,6 @@ void LGDisc2::populateProtocol( threadableProtocol = new NECXProtocol(guiObject, index, true); -// setPreData(0xB4B4, 16); setPreData(0x2D2D, 16); addKey("POWER", Power_Key, 0x30, 8); @@ -564,7 +562,6 @@ void LGVCR1::populateProtocol( threadableProtocol = new NECProtocol(guiObject, index, false, true); -// setPreData(0x7689, 16); setPreData(0x6E, 8); addKey("eject", Eject_Key, 0x00, 8); @@ -594,7 +591,7 @@ void LGVCR1::populateProtocol( addKey("ok", Select_Key, 0x1E, 8); addKey("clear/reset", Clear_Key, 0x1F, 8); // might be wrong addKey("timer-prog", Program_Key, 0x3A, 8); - addKey("viss", Unmapped_Key, 0x41, 8); // "marker-search" + addKey("viss", IndexSearch_Key, 0x41, 8); // "marker-search" addKey("trk-", TrackingMinus_Key, 0x44, 8); addKey("trk+", TrackingPlus_Key, 0x45, 8); addKey("*", Unmapped_Key, 0x47, 8); diff --git a/keysets/lifetec.cpp b/keysets/lifetec.cpp new file mode 100644 index 0000000..2c93984 --- /dev/null +++ b/keysets/lifetec.cpp @@ -0,0 +1,212 @@ +#include "lifetec.h" +#include "protocols/sircprotocol.h" +#include "protocols/necprotocol.h" +#include "protocols/necxprotocol.h" +#include "protocols/rc5protocol.h" + + +LifetecTV1::LifetecTV1( + unsigned int index) + : PIRKeysetMetaData( + "TV Keyset 1", + Lifetec_Make, + index) +{ +} + + +void LifetecTV1::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new SIRCProtocol(guiObject, index); + + addSIRC12Key("1", One_Key, 0x01, 0x00); + addSIRC12Key("2", Two_Key, 0x01, 0x01); + addSIRC12Key("3", Three_Key, 0x01, 0x02); + addSIRC12Key("4", Four_Key, 0x01, 0x03); + addSIRC12Key("5", Five_Key, 0x01, 0x04); + addSIRC12Key("6", Six_Key, 0x01, 0x05); + addSIRC12Key("7", Seven_Key, 0x01, 0x06); + addSIRC12Key("8", Eight_Key, 0x01, 0x07); + addSIRC12Key("9", Nine_Key, 0x01, 0x08); + addSIRC12Key("0", Zero_Key, 0x01, 0x09); + addSIRC12Key("power", Power_Key, 0x01, 0x15); + addSIRC12Key("prog+", ChannelUp_Key, 0x01, 0x10); + addSIRC12Key("prog-", ChannelDown_Key, 0x01, 0x11); + addSIRC12Key("vol-", VolumeDown_Key, 0x01, 0x13); + addSIRC12Key("vol+", VolumeUp_Key, 0x01, 0x12); + addSIRC12Key("tonaus", Mute_Key, 0x01, 0x14); + addSIRC12Key("menu", Menu_Key, 0x01, 0x60); + addSIRC12Key("exit", Exit_Key, 0x01, 0x34); + addSIRC12Key("links", Left_Key, 0x01, 0x62); + addSIRC12Key("rechts", Right_Key, 0x01, 0x61); + addSIRC12Key("hoch", Up_Key, 0x01, 0x74); + addSIRC12Key("runter", Down_Key, 0x01, 0x75); + addSIRC12Key("ok", Select_Key, 0x01, 0x65); + addSIRC12Key("text", Unmapped_Key, 0x01, 0x3F); + addSIRC12Key("textaus", Unmapped_Key, 0x01, 0x38); + addSIRC12Key("texttransparent", Unmapped_Key, 0x01, 0x5B); + addSIRC12Key("text+", Unmapped_Key, 0x01, 0x3A); + addSIRC12Key("textseitenscrolling", Unmapped_Key, 0x03, 0x4A); + addSIRC12Key("rew", Rewind_Key, 0x03, 0x4C); + addSIRC12Key("play", Play_Key, 0x03, 0x4E); + addSIRC12Key("f.f.", FastForward_Key, 0x03, 0x4F); + addSIRC12Key("rec", Record_Key, 0x01, 0x5B); + addSIRC12Key("stop", Stop_Key, 0x03, 0x4D); + addSIRC12Key("pause", Pause_Key, 0x03, 0x48); +} + + +LifetecTV2::LifetecTV2( + unsigned int index) + : PIRKeysetMetaData( + "TV Keyset 2", + Lifetec_Make, + index) +{ +} + + +void LifetecTV2::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new RC5Protocol(guiObject, index); + + addKey("POWER", Power_Key, 0x100C, 13); + addKey("1", One_Key, 0x1001, 13); + addKey("2", Two_Key, 0x1002, 13); + addKey("3", Three_Key, 0x1003, 13); + addKey("4", Four_Key, 0x1004, 13); + addKey("5", Five_Key, 0x1005, 13); + addKey("6", Six_Key, 0x1006, 13); + addKey("7", Seven_Key, 0x1007, 13); + addKey("8", Eight_Key, 0x1008, 13); + addKey("9", Nine_Key, 0x1009, 13); + addKey("0", Zero_Key, 0x1000, 13); + addKey("MUTE", Mute_Key, 0x100D, 13); + addKey("INFO", Info_Key, 0x100F, 13); + addKey("UP", Up_Key, 0x1020, 13); + addKey("DOWN", Down_Key, 0x1021, 13); + addKey("LEFT", Left_Key, 0x1011, 13); + addKey("RIGHT", Right_Key, 0x1010, 13); + addKey("TV", Unmapped_Key, 0x103C, 13); + addKey("OK", Select_Key, 0x1029, 13); + addKey("RED", Red_Key, 0x1037, 13); + addKey("GREEN", Green_Key, 0x1036, 13); + addKey("YELLOW", Yellow_Key, 0x1032, 13); + addKey("BLUE", Blue_Key, 0x1034, 13); + addKey("F1", Unmapped_Key, 0x001C, 13); + addKey("F2", Unmapped_Key, 0x001D, 13); + addKey("F3", Unmapped_Key, 0x001E, 13); + addKey("F4", Unmapped_Key, 0x001F, 13); + addKey("REWIND", Rewind_Key, 0x1165, 13); + addKey("STOP", Stop_Key, 0x1176, 13); + addKey("PLAY", Play_Key, 0x1175, 13); + addKey("FORWARD", FastForward_Key, 0x1166, 13); +} + + +LifetecVCR1::LifetecVCR1( + unsigned int index) + : PIRKeysetMetaData( + "VCR Keyset 1", + Lifetec_Make, + index) +{ +} + + +void LifetecVCR1::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new NECProtocol(guiObject, index, true, false); + + setPreData(0x7B80, 16); + + addKey("power", Power_Key, 0x13, 8); + addKey("1", One_Key, 0x01, 8); + addKey("2", Two_Key, 0x02, 8); + addKey("3", Three_Key, 0x03, 8); + addKey("4", Four_Key, 0x04, 8); + addKey("5", Five_Key, 0x05, 8); + addKey("6", Six_Key, 0x06, 8); + addKey("7", Seven_Key, 0x07, 8); + addKey("8", Eight_Key, 0x08, 8); + addKey("9", Nine_Key, 0x09, 8); + addKey("0", Zero_Key, 0x00, 8); + addKey("CH-", ChannelDown_Key, 0x0B, 8); + addKey("CH+", ChannelUp_Key, 0x0A, 8); + addKey("REC/OTR", Record_Key, 0x15, 8); + addKey("PAUSE/STILL", Pause_Key, 0x1A, 8); + addKey("<<", Rewind_Key, 0x19, 8); + addKey("PLAY/SLOW", Play_Key, 0x16, 8); + addKey("PLAY/SLOW", Slow_Key, 0x16, 8); + addKey(">>", FastForward_Key, 0x18, 8); + addKey("stop", Stop_Key, 0x17, 8); + addKey("ENTER", Select_Key, 0x45, 8); + addKey("INDEX", IndexSearch_Key, 0x14, 8); + addKey("CANCEL", Clear_Key, 0x4A, 8); + addKey("MENU", Menu_Key, 0x50, 8); + addKey("TIMER_REC", RecordTimed_Key, 0x0D, 8); + addKey("SHOWVIEW", Unmapped_Key, 0x1D, 8); // vhsplus+, etc. + addKey("CALL", Call_Key, 0x5F, 8); + addKey("CLOCK/COUNTER", Unmapped_Key, 0x51, 8); + addKey("COUNTER_RESET", Reset_Key, 0x4C, 8); + addKey("ZERO_RETURN", Unmapped_Key, 0x4B, 8); + addKey("SPEED_SP/LP", VHSSpeed_Key, 0x1E, 8); + addKey("TV/VCR", Input_Key, 0x12, 8); + addKey("AUDIO_SELECT", Audio_Key, 0x0E, 8); + addKey("EJECT", Eject_Key, 0x4E, 8); +} + + +LifetecAudio1::LifetecAudio1( + unsigned int index) + : PIRKeysetMetaData( + "Audio Keyset 1", + Lifetec_Make, + index) +{ +} + + +void LifetecAudio1::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new NECXProtocol(guiObject, index, false); + + setPreData(0xA4A4, 16); + + addKey("power", Power_Key, 0x16, 8); + addKey("play", Play_Key, 0x13, 8); + addKey("rew", Rewind_Key, 0x04, 8); + addKey("ff", FastForward_Key, 0x0C, 8); + addKey("stop", Stop_Key, 0x1B, 8); + addKey("mute", Mute_Key, 0x17, 8); + addKey("vol+", VolumeUp_Key, 0x20, 8); + addKey("vol-", VolumeDown_Key, 0x60, 8); +} diff --git a/keysets/lifetec.h b/keysets/lifetec.h new file mode 100644 index 0000000..09b5613 --- /dev/null +++ b/keysets/lifetec.h @@ -0,0 +1,51 @@ +#ifndef LIFETEC_H +#define LIFETEC_H + +#include "pirkeysetmetadata.h" + +class QObject; + +class LifetecTV1: public PIRKeysetMetaData +{ +public: + LifetecTV1( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + + +class LifetecTV2: public PIRKeysetMetaData +{ +public: + LifetecTV2( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + + +class LifetecVCR1: public PIRKeysetMetaData +{ +public: + LifetecVCR1( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + + +class LifetecAudio1: public PIRKeysetMetaData +{ +public: + LifetecAudio1( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + +#endif // LIFETEC_H diff --git a/keysets/loewe.cpp b/keysets/loewe.cpp index 22e3129..9c676d5 100644 --- a/keysets/loewe.cpp +++ b/keysets/loewe.cpp @@ -115,9 +115,9 @@ void LoeweVCR1::populateProtocol( addKey("TV", Input_Key, 0x15, 8); addKey("LP", VHSSpeed_Key, 0x48, 8); addKey("REST", Clock_Key, 0x4C, 8); - addKey("VISS", Unmapped_Key, 0x41, 8); - addKey("MARK", Unmapped_Key, 0x50, 8); - addKey("ERASE", Unmapped_Key, 0x42, 8); + addKey("VISS", IndexSearch_Key, 0x41, 8); + addKey("MARK", IndexMark_Key, 0x50, 8); + addKey("ERASE", IndexErase_Key, 0x42, 8); addKey("0000", Reset_Key, 0x4D, 8); } diff --git a/keysets/magnavox.cpp b/keysets/magnavox.cpp index ce4e36a..ebe1e75 100644 --- a/keysets/magnavox.cpp +++ b/keysets/magnavox.cpp @@ -120,7 +120,7 @@ void MagnavoxVCR1::populateProtocol( addKey("TvVolumeDn", Unmapped_Key, 0x1011, 13); addKey("TvChUp", Unmapped_Key, 0x1020, 13); addKey("TvChDn", Unmapped_Key, 0x1021, 13); - addKey("SkipSrch", Unmapped_Key, 0x016A, 13); + addKey("SkipSrch", IndexSearch_Key, 0x016A, 13); // Might be wrong addKey("FrameAdvance", StepForward_Key, 0x016B, 13); addKey("VcrChUp", Unmapped_Key, 0x1160, 13); addKey("VcrChDn", Unmapped_Key, 0x1161, 13); @@ -137,7 +137,7 @@ void MagnavoxVCR1::populateProtocol( addKey("Memo", Unmapped_Key, 0x117B, 13); addKey("Speed", VHSSpeed_Key, 0x117A, 13); addKey("VcrTv", Unmapped_Key, 0x117E, 13); - addKey("2xPlay", Unmapped_Key, 0x116A, 13); + addKey("2xPlay", PlayX2_Key, 0x116A, 13); } diff --git a/keysets/mce.cpp b/keysets/mce.cpp index 1740a02..ef6c9ac 100644 --- a/keysets/mce.cpp +++ b/keysets/mce.cpp @@ -53,8 +53,8 @@ void MCERemote1::populateProtocol( addKey("Record", Record_Key, 0x17, 8); addKey("Pause", Pause_Key, 0x18, 8); addKey("Stop", Stop_Key, 0x19, 8); - addKey("Skip", Advance_Key, 0x1A, 8); - addKey("Replay", Replay_Key, 0x1B, 8); + addKey("Skip", Advance_Key, 0x1A, 8); // next? + addKey("Replay", Replay_Key, 0x1B, 8); // previous? addKey("Hash", Unmapped_Key, 0x1C, 8); // "Caps Lock" addKey("Star", Unmapped_Key, 0x1D, 8); // "Mouse" @@ -83,10 +83,10 @@ void MCERemote1::populateProtocol( addKey("DVD angle", Angle_Key, 0x4B, 8); addKey("DVD audio", Audio_Key, 0x4C, 8); addKey("DVD subtitle", Captions_Key, 0x4D, 8); - addKey("Print", Unmapped_Key, 0x4E, 8); - addKey("Radio", TunerInput_Key, 0x50, 8); + addKey("Radio", TunerInput_Key, 0x50, 8); + addKey("title", DiscTitle_Key, 0x51, 8); addKey("Teletext", Teletext_Key, 0x5A, 8); addKey("Red", Red_Key, 0x5B, 8); addKey("Green", Green_Key, 0x5C, 8); @@ -259,3 +259,29 @@ void MCERemote1g::populateProtocol( setPreData(0x74, 7); } + + +MCEXboxRemote1::MCEXboxRemote1( + unsigned int index) + : MCERemote1g(index) +{ + setKeysetName("XBox 360 Remote 1"); +} + + +void MCEXboxRemote1::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + MCERemote1g::populateProtocol(guiObject); + + addKey("A", Green_Key, 0x12, 8); + addKey("X", Blue_Key, 0x13, 8); + addKey("B", Red_Key, 0x25, 8); + addKey("Y", Yellow_Key, 0x26, 8); +} diff --git a/keysets/mce.h b/keysets/mce.h index e43d7d5..8e6011c 100644 --- a/keysets/mce.h +++ b/keysets/mce.h @@ -85,4 +85,14 @@ public: QObject *guiObject); }; +class MCEXboxRemote1: public MCERemote1g +{ +public: + MCEXboxRemote1( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + #endif // MCE_H diff --git a/keysets/medion.cpp b/keysets/medion.cpp new file mode 100644 index 0000000..947967f --- /dev/null +++ b/keysets/medion.cpp @@ -0,0 +1,249 @@ +#include "medion.h" +#include "protocols/necprotocol.h" +#include "protocols/paceprotocol.h" + +MedionSTB1::MedionSTB1( + unsigned int index) + : PIRKeysetMetaData( + "TV DVR Keyset 1", + Medion_Make, + index) +{ + addControlledDevice(Medion_Make, "HDD-DVR 0905", Other_Device); +} + + +void MedionSTB1::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new NECProtocol(guiObject, index, true, true); + + setPreData(0x6917, 16); + + addKey("power", Power_Key, 0x0E, 8); + addKey("vol+", VolumeUp_Key, 0x49, 8); + addKey("vol-", VolumeDown_Key, 0x43, 8); + addKey("ch+", ChannelUp_Key, 0x51, 8); + addKey("ch-", ChannelDown_Key, 0x4D, 8); + addKey("left", Left_Key, 0x1C, 8); + addKey("right", Right_Key, 0x48, 8); + addKey("up", Up_Key, 0x44, 8); + addKey("down", Down_Key, 0x1D, 8); + addKey("ok", Select_Key, 0x5C, 8); + addKey("mute", Mute_Key, 0x16, 8); + addKey("menu", Menu_Key, 0x54, 8); + addKey("epg", Guide_Key, 0x12, 8); + addKey("exit", Exit_Key, 0x42, 8); + addKey("1", One_Key, 0x13, 8); + addKey("2", Two_Key, 0x10, 8); + addKey("3", Three_Key, 0x11, 8); + addKey("4", Four_Key, 0x0F, 8); + addKey("5", Five_Key, 0x0C, 8); + addKey("6", Six_Key, 0x0D, 8); + addKey("7", Seven_Key, 0x0B, 8); + addKey("8", Eight_Key, 0x08, 8); + addKey("9", Nine_Key, 0x09, 8); + addKey("0", Zero_Key, 0x47, 8); + addKey("av", Input_Key, 0x1F, 8); + addKey("-/--", DoubleDigit_Key, 0x50, 8); + addKey("rew", Rewind_Key, 0x15, 8); + addKey("play", Play_Key, 0x1B, 8); + addKey("fwd", FastForward_Key, 0x55, 8); + addKey("rec", Record_Key, 0x02, 8); + addKey("stop", Stop_Key, 0x59, 8); + addKey("pause", Pause_Key, 0x19, 8); + addKey("u1", Unmapped_Key, 0x04, 8); + addKey("u2", Unmapped_Key, 0x14, 8); + addKey("u3", Unmapped_Key, 0x03, 8); + addKey("u4", Unmapped_Key, 0x00, 8); + addKey("einbl", Unmapped_Key, 0x5A, 8); + addKey("red", Red_Key, 0x17, 8); + addKey("green", Green_Key, 0x52, 8); + addKey("yellow", Yellow_Key, 0x53, 8); + addKey("blue", Blue_Key, 0x18, 8); + addKey("pink", Unmapped_Key, 0x4C, 8); +} + + + +MedionDVD1::MedionDVD1( + unsigned int index) + : PIRKeysetMetaData( + "DVD Keyset 1", + Medion_Make, + index) +{ +} + + +void MedionDVD1::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new NECProtocol(guiObject, index, false, false); + + setPreData(0x00, 8); + + addKey("POWER", Power_Key, 0x00, 8); + addKey("PAUSE", Pause_Key, 0x03, 8); + addKey("PLAY", Play_Key, 0x06, 8); + addKey("EJECT", Eject_Key, 0x0C, 8); + addKey("SETUP", Menu_Key, 0x0F, 8); + + addKey("STOP", Stop_Key, 0x13, 8); + + addKey("1", One_Key, 0x4B, 8); + addKey("2", Two_Key, 0x47, 8); + addKey("3", Three_Key, 0x43, 8); + addKey("4", Four_Key, 0x4A, 8); + addKey("5", Five_Key, 0x46, 8); + addKey("6", Six_Key, 0x42, 8); + addKey("7", Seven_Key, 0x49, 8); + addKey("8", Eight_Key, 0x45, 8); + addKey("9", Nine_Key, 0x41, 8); + addKey("0", Zero_Key, 0x44, 8); + + addKey("FFWD", FastForward_Key, 0x50, 8); + addKey("NEXT", Next_Key, 0x51, 8); + addKey("VOLPLUS", VolumeUp_Key, 0x52, 8); + addKey("MUTE", Mute_Key, 0x53, 8); + addKey("FREV", Rewind_Key, 0x54, 8); + addKey("PREV", Previous_Key, 0x55, 8); + addKey("VOLMINUS", VolumeDown_Key, 0x56, 8); + addKey("SUBTITLE", Captions_Key, 0x5E, 8); +} + + +MedionDVD2::MedionDVD2( + unsigned int index) + : PIRKeysetMetaData( + "DVD Keyset 2", + Medion_Make, + index) +{ +} + + +void MedionDVD2::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new PaceProtocol(guiObject, index); + + setPreData(0x5, 3); + + addKey("ZOOM", Zoom_Key, 0x12, 6); + addKey("PREV", Previous_Key, 0x15, 6); + addKey("NEXT", Next_Key, 0x16, 6); + addKey("MENU", DiscMenu_Key, 0x17, 6); + addKey("MUTE", Mute_Key, 0x18, 6); + addKey("PLAY", Play_Key, 0x19, 6); + addKey("PAUSE", Pause_Key, 0x1A, 6); + addKey("8", Eight_Key, 0x1C, 6); + addKey("4", Four_Key, 0x1D, 6); + addKey("POWER", Power_Key, 0x1E, 6); + addKey("INDEX", Unmapped_Key, 0x1F, 6); + + addKey("INFO", Info_Key, 0x20, 6); + addKey("RIGHT", Right_Key, 0x21, 6); + addKey("STOP", Stop_Key, 0x22, 6); + addKey("CLEAR", Clear_Key, 0x23, 6); + addKey("7", Seven_Key, 0x24, 6); + addKey("3", Three_Key, 0x25, 6); + addKey("EJECT", Eject_Key, 0x26, 6); + addKey("TITLE", DiscTitle_Key, 0x27, 6); + addKey("UP", Up_Key, 0x28, 6); + addKey("OK", Select_Key, 0x29, 6); + addKey("DOWN", Down_Key, 0x2A, 6); + addKey("0", Zero_Key, 0x2B, 6); + addKey("6", Six_Key, 0x2C, 6); + addKey("2", Two_Key, 0x2D, 6); + addKey("CAMERA", Angle_Key, 0x2E, 6); + + addKey("EXIT", Exit_Key, 0x30, 6); + addKey("LEFT", Left_Key, 0x31, 6); + addKey("FORWARD", FastForward_Key, 0x32, 6); + addKey("9", Nine_Key, 0x33, 6); + addKey("5", Five_Key, 0x34, 6); + addKey("1", One_Key, 0x35, 6); + addKey("BACKWARD", Rewind_Key, 0x37, 6); +} + + +MedionVCR1::MedionVCR1( + unsigned int index) + : PIRKeysetMetaData( + "VCR Keyset 1", + Medion_Make, + index) +{ +} + + +void MedionVCR1::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new NECProtocol(guiObject, index, true, false); + + setPreData(0x7B80, 16); + + addKey("PowerOff", Power_Key, 0x13, 8); + addKey("Eject", Eject_Key, 0x4E, 8); + addKey("TimerRec", RecordTimed_Key, 0x0D, 8); + addKey("1", One_Key, 0x01, 8); + addKey("2", Two_Key, 0x02, 8); + addKey("3", Three_Key, 0x03, 8); + addKey("4", Four_Key, 0x04, 8); + addKey("5", Five_Key, 0x05, 8); + addKey("6", Six_Key, 0x06, 8); + addKey("7", Seven_Key, 0x07, 8); + addKey("8", Eight_Key, 0x08, 8); + addKey("9", Nine_Key, 0x09, 8); + addKey("0", Zero_Key, 0x00, 8); + addKey("TV/VCR", Input_Key, 0x12, 8); + addKey("CannelTracking+", ChannelUp_Key, 0x0A, 8); + addKey("CannelTracking+", TrackingPlus_Key, 0x0A, 8); + addKey("ChannelTracking-", ChannelDown_Key, 0x0B, 8); + addKey("ChannelTracking-", TrackingMinus_Key, 0x0B, 8); + addKey("SpeedSP/LP", VHSSpeed_Key, 0x1E, 8); + addKey("Rec-EndSearch", Unmapped_Key, 0x47, 8); + addKey("Call", Call_Key, 0x5F, 8); + addKey("REC/OTR", Record_Key, 0x15, 8); + addKey("Pause/Still", Pause_Key, 0x1A, 8); + addKey("Play", Play_Key, 0x16, 8); + addKey("FastReturn", Rewind_Key, 0x19, 8); + addKey("FastForward", FastForward_Key, 0x18, 8); + addKey("Stop", Stop_Key, 0x17, 8); + addKey("ShowView/Program", Unmapped_Key, 0x1D, 8); // vhsplus+, etc. + addKey("Enter", Select_Key, 0x45, 8); + addKey("Menu", Menu_Key, 0x50, 8); + addKey("Cancel", Exit_Key, 0x4A, 8); + addKey("Index", IndexSearch_Key, 0x14, 8); + addKey("ATR", AutoTracking_Key, 0x52, 8); + addKey("Clock/Counter", Unmapped_Key, 0x51, 8); + addKey("ZeroReturn", Unmapped_Key, 0x4B, 8); + addKey("CounterReset", Reset_Key, 0x4C, 8); + addKey("AudioSelect", Audio_Key, 0x0E, 8); +} diff --git a/keysets/medion.h b/keysets/medion.h new file mode 100644 index 0000000..6c17e2f --- /dev/null +++ b/keysets/medion.h @@ -0,0 +1,51 @@ +#ifndef MEDION_H +#define MEDION_H + +#include "pirkeysetmetadata.h" + +class QObject; + +class MedionSTB1: public PIRKeysetMetaData +{ +public: + MedionSTB1( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + + +class MedionDVD1: public PIRKeysetMetaData +{ +public: + MedionDVD1( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + + +class MedionDVD2: public PIRKeysetMetaData +{ +public: + MedionDVD2( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + + +class MedionVCR1: public PIRKeysetMetaData +{ +public: + MedionVCR1( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + +#endif // MEDION_H diff --git a/keysets/mitsubishi.cpp b/keysets/mitsubishi.cpp index ef6900c..ae94c7d 100644 --- a/keysets/mitsubishi.cpp +++ b/keysets/mitsubishi.cpp @@ -95,7 +95,7 @@ void MitsubishiTV1::populateProtocol( addKey("DEGAUSS", Unmapped_Key, 0xCE, 8); addKey("DEMO", Unmapped_Key, 0x62, 8); addKey("PRESET", Unmapped_Key, 0xA2, 8); - addKey("BAND", TunerBand_Key, 0xAE, 8); + addKey("BAND", TunerInput_Key, 0xAE, 8); addKey("AFT", Unmapped_Key, 0xA6, 8); addKey("SKIP", Unmapped_Key, 0xB6, 8); addKey("REALNAME", Unmapped_Key, 0xDA, 8); @@ -208,7 +208,7 @@ void MitsubishiVCR1::populateProtocol( addKey("DAILY/WEEKLY", Unmapped_Key, 0xF2, 8); addKey("COUNT_RES", Unmapped_Key, 0xDC, 8); addKey("display", Info_Key, 0xE4, 8); // "DATA_SCRN" - addKey("x2", Unmapped_Key, 0x5C, 8); + addKey("x2", PlayX2_Key, 0x5C, 8); addKey("audio/video", Unmapped_Key, 0x02, 8); addKey("adjust+", Right_Key, 0x82, 8); addKey("cancel", Exit_Key, 0xD0, 8); diff --git a/keysets/nad.cpp b/keysets/nad.cpp index 606ab35..878f437 100644 --- a/keysets/nad.cpp +++ b/keysets/nad.cpp @@ -55,8 +55,8 @@ void NADAudio1::populateProtocol( addKey("TapeA-Rewind", Unmapped_Key, 0x57, 8); addKey("Standby", Power_Key, 0x80, 8); // "RCVR_POWER" - addKey("Input-TunerFM", Unmapped_Key, 0x81, 8); - addKey("Input-TunerAM", Unmapped_Key, 0x82, 8); + addKey("Input-TunerFM", FM_Key, 0x81, 8); + addKey("Input-TunerAM", AM_Key, 0x82, 8); addKey("Input-CD", CDInput_Key, 0x85, 8); addKey("VolumeUp", VolumeUp_Key, 0x88, 8); addKey("Input-Disc", PhonoInput_Key, 0x89, 8); @@ -93,7 +93,6 @@ void NADAudio1::populateProtocol( addKey("Tuner-PresetLeft", ChannelDown_Key, 0xD1, 8); addKey("Tuner-PresetRight", ChannelUp_Key, 0xD2, 8); - addKey("FM/AM", TunerBand_Key, 0xDD, 8); // "tuner" addKey("FM/AM", TunerInput_Key, 0xDD, 8); // "tuner" addKey("TapeB-Rev", Unmapped_Key, 0xDE, 8); } @@ -149,7 +148,7 @@ void NADTuner1::populateProtocol( addKey("tuner-fm-mute", Unmapped_Key, 0x37, 8); addKey("tuner-blend", Unmapped_Key, 0x35, 8); - addKey("tuner-am-fm-dab", TunerBand_Key, 0xDD, 8); + addKey("tuner-am-fm-dab", TunerInput_Key, 0xDD, 8); addKey("Standby", Power_Key, 0x80, 8); // "RCVR_POWER" addKey("VolumeUp", VolumeUp_Key, 0x88, 8); diff --git a/keysets/orion.cpp b/keysets/orion.cpp index 3fea824..4bfcb33 100644 --- a/keysets/orion.cpp +++ b/keysets/orion.cpp @@ -225,13 +225,13 @@ void OrionVCR1::populateProtocol( addKey("CH9", Nine_Key, 0x09, 8); addKey("CHUP", Up_Key, 0x0A, 8); addKey("CHDN", Down_Key, 0x0B, 8); - addKey("TIMER_REC", Timer_Key, 0x0D, 8); + addKey("TIMER_REC", RecordTimed_Key, 0x0D, 8); addKey("AUDIOSELECT", Audio_Key, 0x0E, 8); addKey("CH10+", DoubleDigit_Key, 0x0F, 8); addKey("TVVCR", Input_Key, 0x12, 8); addKey("POWER", Power_Key, 0x13, 8); - addKey("INDEX", Unmapped_Key, 0x14, 8); + addKey("INDEX", IndexSearch_Key, 0x14, 8); addKey("RECOTR", Record_Key, 0x15, 8); addKey("PLAY", Play_Key, 0x16, 8); addKey("STOP", Stop_Key, 0x17, 8); @@ -239,7 +239,7 @@ void OrionVCR1::populateProtocol( addKey("REW", Rewind_Key, 0x19, 8); addKey("PAUSESTILL", Pause_Key, 0x1A, 8); addKey("CLOCKSET", Unmapped_Key, 0x1C, 8); - addKey("SHOWVIEW", Unmapped_Key, 0x1D, 8); + addKey("SHOWVIEW", Unmapped_Key, 0x1D, 8); // vhsplus+, etc. addKey("SPEEDSPLP", VHSSpeed_Key, 0x1E, 8); addKey("PRESET", Unmapped_Key, 0x40, 8); diff --git a/keysets/panasonic.cpp b/keysets/panasonic.cpp index cee2505..21647cc 100644 --- a/keysets/panasonic.cpp +++ b/keysets/panasonic.cpp @@ -448,10 +448,10 @@ void PanasonicVCR1::populateProtocol( addKaseikyoKey("INFO", Info_Key, 0x009, 0x39); addKaseikyoKey("-/--", DoubleDigit_Key, 0x009, 0x3B); addKaseikyoKey("POWER", Power_Key, 0x009, 0x3D); - addKaseikyoKey("INDEX", Unmapped_Key, 0x009, 0x40); + addKaseikyoKey("INDEX", IndexSearch_Key, 0x009, 0x40); addKaseikyoKey("time_search", Unmapped_Key, 0x009, 0x44); - addKaseikyoKey("INDEXL", Unmapped_Key, 0x009, 0x49); - addKaseikyoKey("INDEXR", Unmapped_Key, 0x009, 0x4A); + addKaseikyoKey("INDEXL", Previous_Key, 0x009, 0x49); + addKaseikyoKey("INDEXR", Next_Key, 0x009, 0x4A); addKaseikyoKey("mem_rep", Unmapped_Key, 0x009, 0x53); addKaseikyoKey("COUNTER_RESET", Unmapped_Key, 0x009, 0x54); addKaseikyoKey("TAPE_REMAIN", Unmapped_Key, 0x009, 0x55); @@ -462,7 +462,7 @@ void PanasonicVCR1::populateProtocol( addKaseikyoKey("TRACKING_AUTO", AutoTracking_Key, 0x009, 0xB0); addKaseikyoKey("TRACKING_PLUS", TrackingPlus_Key, 0x009, 0xB1); addKaseikyoKey("TRACKING_MINUS", TrackingMinus_Key, 0x009, 0xB2); - addKaseikyoKey("TIMERREC", Timer_Key, 0x009, 0xB4); + addKaseikyoKey("TIMERREC", RecordTimed_Key, 0x009, 0xB4); addKaseikyoKey("AV", Unmapped_Key, 0x009, 0xC0); addKaseikyoKey("DIRECT_TV_REC", Unmapped_Key, 0x009, 0xC2); addKaseikyoKey("mesecam", Unmapped_Key, 0x009, 0xC9); @@ -481,7 +481,7 @@ void PanasonicVCR1::populateProtocol( addKaseikyoKey("rotatedown", Unmapped_Key, 0x019, 0x03); addKaseikyoKey("set", Unmapped_Key, 0x019, 0x04); addKaseikyoKey("clear", Unmapped_Key, 0x019, 0x05); - addKaseikyoKey("VPS/PDC", Unmapped_Key, 0x019, 0x06); + addKaseikyoKey("VPS/PDC", RecordPDC_Key, 0x019, 0x06); addKaseikyoKey("OffTimer", Sleep_Key, 0x019, 0x08); addKaseikyoKey("CANCEL", Clear_Key, 0x019, 0x09); addKaseikyoKey("SPEED", VHSSpeed_Key, 0x019, 0x0A); @@ -489,7 +489,7 @@ void PanasonicVCR1::populateProtocol( addKaseikyoKey("RADIO_TUNE", Unmapped_Key, 0x019, 0x38); addKaseikyoKey("MENU", Menu_Key, 0x019, 0x56); addKaseikyoKey("OK", Select_Key, 0x019, 0x58); - addKaseikyoKey("SHOWVIEW", Unmapped_Key, 0x019, 0x5D); + addKaseikyoKey("SHOWVIEW", Unmapped_Key, 0x019, 0x5D); // vhsplus+, etc. addKaseikyoKey("DISPLAY", Unmapped_Key, 0x019, 0x5F); addKaseikyoKey("EXIT", Exit_Key, 0x019, 0x66); addKaseikyoKey("CHECK+", Unmapped_Key, 0x019, 0x90); @@ -535,7 +535,7 @@ void PanasonicVCR1a::populateProtocol( addKaseikyoKey("OSD", Info_Key, 0x009, 0x57); addKaseikyoKey("AV", Input_Key, 0x009, 0xC0); - addKaseikyoKey("DISPLAY", Info_Key, 0x019, 0x5F); + addKaseikyoKey("DISPLAY", Unmapped_Key, 0x019, 0x5F); } @@ -619,7 +619,7 @@ void PanasonicVCR2::populateProtocol( addPanOldKey("PLAY", Play_Key, 0x02, 0x0A); addPanOldKey("REV_PLAY", Unmapped_Key, 0x02, 0x0B); addPanOldKey("F.ADV", StepForward_Key, 0x02, 0x0C); - addPanOldKey("x2", Unmapped_Key, 0x02, 0x0E); + addPanOldKey("x2", PlayX2_Key, 0x02, 0x0E); addPanOldKey("SLOW", Slow_Key, 0x02, 0x0F); addPanOldKey("1", One_Key, 0x02, 0x10); addPanOldKey("2", Two_Key, 0x02, 0x11); @@ -641,10 +641,10 @@ void PanasonicVCR2::populateProtocol( addPanOldKey("MEMORY_SEARCH", Memory_Key, 0x02, 0x32); addPanOldKey("RESET_INDEX", Reset_Key, 0x02, 0x33); addPanOldKey("INTRO_SCAN", Unmapped_Key, 0x02, 0x34); - addPanOldKey("timer_rec", Timer_Key, 0x02, 0x36); + addPanOldKey("timer_rec", RecordTimed_Key, 0x02, 0x36); addPanOldKey("AUDIO-SELECT", Audio_Key, 0x02, 0x3D); - addPanOldKey("VPS", VHSSpeed_Key, 0x03, 0x06); // Might be wrong + addPanOldKey("VPS", RecordPDC_Key, 0x03, 0x06); addPanOldKey("prog", Program_Key, 0x03, 0x2C); addPanOldKey("next", Next_Key, 0x03, 0x3A); @@ -848,7 +848,7 @@ void PanasonicAudio1::populateProtocol( addKaseikyoKey("vol+", VolumeUp_Key, 0xC2A, 0xB0); addKaseikyoKey("vol-", VolumeDown_Key, 0xC2A, 0xB1); addKaseikyoKey("cd", CDInput_Key, 0xC2A, 0xB6); - addKaseikyoKey("tuner-band", TunerBand_Key, 0xC2A, 0xB8); + addKaseikyoKey("tuner-band", TunerInput_Key, 0xC2A, 0xB8); addKaseikyoKey("sleep", Sleep_Key, 0xC2A, 0xBC); addKaseikyoKey("power", Power_Key, 0xC2A, 0xBF); diff --git a/keysets/philips.cpp b/keysets/philips.cpp index f8da887..15c1b1f 100644 --- a/keysets/philips.cpp +++ b/keysets/philips.cpp @@ -1037,10 +1037,10 @@ void PhilipsVCR1::populateProtocol( addKey("-/--", DoubleDigit_Key, 0x114A, 13); addKey("100", PlusOneHundred_Key, 0x114A, 13); addKey("VCR-Dash", Dash_Key, 0x114A, 13); - addKey("Index", Unmapped_Key, 0x0170, 13); + addKey("Index", IndexSearch_Key, 0x0170, 13); addKey("reset", Reset_Key, 0x1171, 13); // "clear" addKey("play<", Unmapped_Key, 0x116F, 13); - addKey("x>", Unmapped_Key, 0x116A, 13); // "X2_PLAY" + addKey("x>", PlayX2_Key, 0x116A, 13); // "X2_PLAY" addKey("speed", VHSSpeed_Key, 0x117A, 13); // "SP/LP" addKey("Childlock", Unmapped_Key, 0x017F, 13); addKey("System", Unmapped_Key, 0x094A, 13); @@ -1153,14 +1153,14 @@ void PhilipsVCR1c::populateProtocol( addKey("Previous", Previous_Key, 0x0171, 13); addKey("Next", Next_Key, 0x0170, 13); addKey("SET_CLOCK", Unmapped_Key, 0x1164, 13); - addKey("VPS", Unmapped_Key, 0x114B, 13); + addKey("VPS", RecordPDC_Key, 0x114B, 13); addKey("Cassette", Eject_Key, 0x017E, 13); addKey("DECODER", Unmapped_Key, 0x0169, 13); addKey("Tuner", TunerInput_Key, 0x017D, 13); addKey("Monitor", Unmapped_Key, 0x017A, 13); addKey("SYSTEM", Unmapped_Key, 0x014A, 13); addKey("REC_MODE", Unmapped_Key, 0x115E, 13); - addKey("SHOWVIEW", Unmapped_Key, 0x0145, 13); + addKey("SHOWVIEW", Unmapped_Key, 0x0145, 13); // vhsplus+, etc. addKey("DW", Unmapped_Key, 0x0144, 13); // "D/W" addKey("SPEED-", SlowMinus_Key, 0x1165, 13); addKey("SPEED+", SlowPlus_Key, 0x1166, 13); @@ -1422,7 +1422,7 @@ void PhilipsAudio1::populateProtocol( addKey("tuner_next", Next_Key, 0x1460, 13); // "presetUp" addKey("tuner_previous", Previous_Key, 0x1461, 13); // "presetDown" addKey("tuner_program", Program_Key, 0x047A, 13); // Create Preset - addKey("tuner", TunerBand_Key, 0x147F, 13); + addKey("tuner", TunerInput_Key, 0x147F, 13); addKey("tape_power", Unmapped_Key, 0x148C, 13); addKey("tape_next", Unmapped_Key, 0x14A0, 13); addKey("tape_previous", Unmapped_Key, 0x14A1, 13); diff --git a/keysets/pioneer.cpp b/keysets/pioneer.cpp index 3ae1695..e444b62 100644 --- a/keysets/pioneer.cpp +++ b/keysets/pioneer.cpp @@ -295,7 +295,7 @@ void PioneerAudio1::populateProtocol( addNECKey("12/CLR", Clear_Key, 0xA6, 0x41); addNECKey("cd", CDInput_Key, 0xA6, 0x44); // "CD_PLAY" addNECKey("scan", Scan_Key, 0xA6, 0x48); - addNECKey("FM/AM", TunerBand_Key, 0xA6, 0x49); // "BAND" + addNECKey("FM/AM", TunerInput_Key, 0xA6, 0x49); // "BAND" addNECKey("aux", AuxInput_Key, 0xA6, 0x4C); addNECKey("TAPE1_PLAY", Unmapped_Key, 0xA6, 0x5A); addNECKey("KARAOKE", Unmapped_Key, 0xA6, 0x69); @@ -489,7 +489,8 @@ void PioneerAudio3::populateProtocol( addNECKey("am", Unmapped_Key, 0xA4, 0x0E); addNECKey("tuner_station+", NextPreset_Key, 0xA4, 0x10); addNECKey("tuner_station-", PrevPreset_Key, 0xA4, 0x11); - addNECKey("tuner_band", TunerBand_Key, 0xA4, 0x13); + addNECKey("tuner_band", AM_Key, 0xA4, 0x13); // This is a hack + addNECKey("tuner_band", FM_Key, 0xA4, 0x13); // This too addNECKey("tuner_power", Unmapped_Key, 0xA4, 0x1C); addNECKey("mpx", Unmapped_Key, 0xA4, 0x1E); // Toggle mono FM addNECKey("tunerclass", Unmapped_Key, 0xA4, 0x40); // class A, B, C @@ -668,7 +669,8 @@ void PioneerAudio5::populateProtocol( addKey("POWER", Power_Key, 0x9867, 16); addKey("MONO", FMMode_Key, 0x48B7, 16); addKey("MEM_SCAN", Unmapped_Key, 0x8877, 16); - addKey("TUNER_BAND", TunerBand_Key, 0x18E7, 16); + addKey("TUNER_BAND", AM_Key, 0x18E7, 16); // This is a hack + addKey("TUNER_BAND", FM_Key, 0x18E7, 16); // This too addKey("1", One_Key, 0x00FF, 16); addKey("2", Two_Key, 0x807F, 16); addKey("3", Three_Key, 0x40BF, 16); diff --git a/keysets/saba.cpp b/keysets/saba.cpp index c90e6a7..15127dd 100644 --- a/keysets/saba.cpp +++ b/keysets/saba.cpp @@ -59,8 +59,8 @@ void SabaTV1::populateProtocol( addKey("Clock", Unmapped_Key, 0x38, 7); // "C" addKey("Menu", Menu_Key, 0x39, 7); // "Install" addKey("Ch.setup", Unmapped_Key, 0x3B, 7); // "B" - addKey("Mark", Unmapped_Key, 0x3C, 7); - addKey("Scan/Erase", Unmapped_Key, 0x3D, 7); // "Index" + addKey("Mark", IndexMark_Key, 0x3C, 7); + addKey("Scan/Erase", IndexSearch_Key, 0x3D, 7); // "Index" } diff --git a/keysets/samsung.cpp b/keysets/samsung.cpp index 7cbfd67..2001f37 100644 --- a/keysets/samsung.cpp +++ b/keysets/samsung.cpp @@ -409,12 +409,12 @@ void SamsungVCR1::populateProtocol( addKey("Eject", Eject_Key, 0x20, 8); addKey("auto_track", AutoTracking_Key, 0x21, 8); // "A.TRK" addKey("Captions", Captions_Key, 0x22, 8); - addKey("BAND", TunerBand_Key, 0x23, 8); + addKey("BAND", TunerInput_Key, 0x23, 8); addKey("input", Unmapped_Key, 0x24, 8); addKey("shift", Unmapped_Key, 0x25, 8); addKey("100+", PlusOneHundred_Key, 0x26, 8); addKey("Down", Down_Key, 0x29, 8); // "erase" - addKey("mark/search", Unmapped_Key, 0x2B, 8); // "index" + addKey("mark/search", IndexSearch_Key, 0x2B, 8); // "index" addKey("trk_up", TrackingPlus_Key, 0x2C, 8); // "FINE_UP" addKey("trk_down", TrackingMinus_Key, 0x2D, 8); // "FINE_DOWN" addKey("dub", Unmapped_Key, 0x2E, 8); @@ -425,7 +425,7 @@ void SamsungVCR1::populateProtocol( addKey("SYSTEM", Unmapped_Key, 0x32, 8); addKey("CLK_COUNT", Unmapped_Key, 0x33, 8); // "clk/cnt" addKey("PRESET", Unmapped_Key, 0x35, 8); - addKey("VPS", Unmapped_Key, 0x38, 8); + addKey("VPS", RecordPDC_Key, 0x38, 8); addKey("progressive/speed", VHSSpeed_Key, 0x3A, 8); // "SP-LP" addKey("Q_PRO", Unmapped_Key, 0x3D, 8); diff --git a/keysets/sanyo.cpp b/keysets/sanyo.cpp index 23a5957..5af60c6 100644 --- a/keysets/sanyo.cpp +++ b/keysets/sanyo.cpp @@ -36,7 +36,7 @@ void SanyoVCR1::populateProtocol( addKey("3", Three_Key, 0x06, 8); addKey("4", Four_Key, 0x07, 8); addKey("TV/VCR", Input_Key, 0x08, 8); - addKey("x2", Unmapped_Key, 0x0B, 8); + addKey("x2", PlayX2_Key, 0x0B, 8); addKey("5", Five_Key, 0x0C, 8); addKey("6", Six_Key, 0x0D, 8); addKey("7", Seven_Key, 0x0E, 8); @@ -47,25 +47,25 @@ void SanyoVCR1::populateProtocol( addKey("FF", FastForward_Key, 0x13, 8); addKey("Play", Play_Key, 0x14, 8); addKey("Rec", Record_Key, 0x15, 8); - addKey("Index", Unmapped_Key, 0x19, 8); + addKey("Index", IndexSearch_Key, 0x19, 8); addKey("Slow", Slow_Key, 0x1A, 8); addKey("+100", PlusOneHundred_Key, 0x1B, 8); addKey("9", Nine_Key, 0x1C, 8); addKey("0", Zero_Key, 0x1D, 8); addKey("Input", Unmapped_Key, 0x1E, 8); // need a subclass for this? - addKey("ATR", Unmapped_Key, 0x1F, 8); + addKey("ATR", AutoTracking_Key, 0x1F, 8); addKey("Memory", Memory_Key, 0x43, 8); // "->0<-" addKey("Reset", Reset_Key, 0x44, 8); addKey("PROG", Program_Key, 0x46, 8); addKey("Cancel", Clear_Key, 0x4A, 8); addKey("Ok", Select_Key, 0x4B, 8); addKey("Display", Info_Key, 0x4C, 8); - addKey("VPS", Unmapped_Key, 0x4F, 8); // "vps/pdc", "dpc" + addKey("VPS", RecordPDC_Key, 0x4F, 8); // "vps/pdc", "dpc" addKey("Monitor", Unmapped_Key, 0x51, 8); addKey("Clock", Clock_Key, 0x56, 8); addKey("Power", Power_Key, 0x5B, 8); addKey("SP/LP", VHSSpeed_Key, 0x5E, 8); - addKey("ShowView", Unmapped_Key, 0x8C, 8); + addKey("ShowView", Unmapped_Key, 0x8C, 8); // vhsplus+, etc. addKey("Right", Right_Key, 0x94, 8); addKey("Left", Left_Key, 0x95, 8); addKey("Down", Down_Key, 0x96, 8); diff --git a/keysets/sharp.cpp b/keysets/sharp.cpp index 1214b07..eb83536 100644 --- a/keysets/sharp.cpp +++ b/keysets/sharp.cpp @@ -153,9 +153,11 @@ void SharpTV1a::populateProtocol( addSharpKey("Stop", Stop_Key, 0x01, 0x27); addSharpKey("REC", Record_Key, 0x01, 0x28); addSharpKey("Slow", Slow_Key, 0x01, 0x29); - addSharpKey("DPSS+", Unmapped_Key, 0x01, 0x2F); + addSharpKey("DPSS+", SlowPlus_Key, 0x01, 0x2F); + addSharpKey("DPSS+", Next_Key, 0x01, 0x2F); - addSharpKey("DPSS-", Unmapped_Key, 0x01, 0x30); + addSharpKey("DPSS-", SlowMinus_Key, 0x01, 0x30); + addSharpKey("DPSS-", Previous_Key, 0x01, 0x30); addSharpKey("Input", Input_Key, 0x01, 0x34); addSharpKey("ZeroBack", Unmapped_Key, 0x01, 0x83); addSharpKey("SkipSearch", Advance_Key, 0x01, 0x90); @@ -332,11 +334,13 @@ void SharpVCR1::populateProtocol( addSharpKey("Slow", Slow_Key, 0x03, 0x29); addSharpKey("CLOCK", Clock_Key, 0x03, 0x2C); addSharpKey("DPSS+", SlowPlus_Key, 0x03, 0x2F); // "slow+" + addSharpKey("DPSS+", Next_Key, 0x03, 0x2F); addSharpKey("DPSS-", SlowMinus_Key, 0x03, 0x30); // "slow-" - addSharpKey("x2", Unmapped_Key, 0x03, 0x31); + addSharpKey("DPSS-", Previous_Key, 0x03, 0x30); // "slow-" + addSharpKey("x2", PlayX2_Key, 0x03, 0x31); addSharpKey("EJECT", Eject_Key, 0x03, 0x33); addSharpKey("InputSelect", Input_Key, 0x03, 0x34); // "simul" - addSharpKey("SEARCH", Unmapped_Key, 0x03, 0x37); + addSharpKey("SEARCH", IndexSearch_Key, 0x03, 0x37); addSharpKey("ZeroBack", Unmapped_Key, 0x03, 0x83); // "MEMORY" addSharpKey("cancel", Unmapped_Key, 0x03, 0x84); // could be exit key addSharpKey("TRACKING_UP", TrackingPlus_Key, 0x03, 0x85); diff --git a/keysets/sony.cpp b/keysets/sony.cpp index 78f6581..1940c01 100644 --- a/keysets/sony.cpp +++ b/keysets/sony.cpp @@ -381,7 +381,7 @@ void SonyAudio1::populateProtocol( addSIRC12Key("DSG", Unmapped_Key, 0x0C, 0x31); addSIRC12Key("MEMORY", Program_Key, 0x0D, 0x0E); - addSIRC12Key("TUNER-BAND", TunerBand_Key, 0x0D, 0x0F); + addSIRC12Key("TUNER-BAND", TunerInput_Key, 0x0D, 0x0F); addSIRC12Key("TUNING_MODE", Unmapped_Key, 0x0D, 0x17); addSIRC12Key("STEREO-MONO", FMMode_Key, 0x0D, 0x21); @@ -389,7 +389,7 @@ void SonyAudio1::populateProtocol( addSIRC12Key("REC", Record_Key, 0x0E, 0x1E); addSIRC12Key("TAPE", TapeInput_Key, 0x0E, 0x34); - addSIRC12Key("tuner", TunerInput_Key, 0x10, 0x0F); // "Tune Up" + addSIRC12Key("tuner", ChannelUp_Key, 0x10, 0x0F); // "Tune Up" addSIRC12Key("VOL+", VolumeUp_Key, 0x10, 0x12); addSIRC12Key("VOL-", VolumeDown_Key, 0x10, 0x13); addSIRC12Key("ON-OFF", Power_Key, 0x10, 0x15); @@ -743,7 +743,7 @@ void SonyDVD1c::populateProtocol( SonyDVD2::SonyDVD2( unsigned int index) : PIRKeysetMetaData( - "DVD Keyset 1", + "DVD Keyset 2", Sony_Make, index) { diff --git a/keysets/sylvania.cpp b/keysets/sylvania.cpp new file mode 100644 index 0000000..b73140b --- /dev/null +++ b/keysets/sylvania.cpp @@ -0,0 +1,77 @@ +#include "sylvania.h" +#include "protocols/necprotocol.h" + +SylvaniaTV1::SylvaniaTV1( + unsigned int index) + : PIRKeysetMetaData( + "TV Keyset 1", + Sylvania_Make, + index) +{ + addControlledDevice(Sylvania_Make, "6513DD", TV_Device); + addControlledDevice(Sylvania_Make, "6519DD", TV_Device); +} + + +void SylvaniaTV1::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new NECProtocol(guiObject, index, true, true); + + setPreData(0x2287, 16); + + addKey("A-B", RepeatAB_Key, 0x43, 8); + addKey("open close", Eject_Key, 0x44, 8); + addKey("rewind", Rewind_Key, 0x52, 8); + addKey("fast fwd", FastForward_Key, 0x53, 8); + addKey("pause", Pause_Key, 0x5B, 8); + addKey("mode", Mode_Key, 0x5C, 8); + addKey("f.rew/prev track", Previous_Key, 0x5D, 8); + addKey("play", Play_Key, 0x5E, 8); + addKey("f.fwd/next track", Next_Key, 0x5F, 8); + addKey("stop", Stop_Key, 0x60, 8); + addKey("title", DiscTitle_Key, 0x70, 8); + addKey("repeat", Repeat_Key, 0x70, 8); + addKey("menu", DiscMenu_Key, 0x71, 8); + addKey("select", Select_Key, 0x72, 8); + addKey("return", Exit_Key, 0x72, 8); + addKey("last (prev ch)", PrevChannel_Key, 0x73, 8); + addKey("angle", Angle_Key, 0x79, 8); + addKey("subtitle", Captions_Key, 0x7A, 8); + addKey("audio", Audio_Key, 0x7B, 8); + addKey("v.surr", Surround_Key, 0x81, 8); + addKey("right arrow", Right_Key, 0xC6, 8); + addKey("left arrow", Left_Key, 0xC7, 8); + addKey("channel down", ChannelDown_Key, 0xC8, 8); + addKey("picture", PictureMode_Key, 0xC9, 8); + addKey("sleep", Sleep_Key, 0xCB, 8); + addKey("select", Unmapped_Key, 0xCD, 8); // Two select keys? + addKey("display", Info_Key, 0xCF, 8); + addKey("channel up", ChannelUp_Key, 0xD0, 8); + addKey("1", One_Key, 0xDF, 8); + addKey("power", Power_Key, 0xE0, 8); + addKey("2", Two_Key, 0xE1, 8); + addKey("3", Three_Key, 0xE2, 8); + addKey("4", Four_Key, 0xE3, 8); + addKey("5", Five_Key, 0xE4, 8); + addKey("6", Six_Key, 0xE5, 8); + addKey("7", Seven_Key, 0xE6, 8); + addKey("8", Eight_Key, 0xE7, 8); + addKey("9", Nine_Key, 0xE8, 8); + addKey("0", Zero_Key, 0xE9, 8); + addKey("+10", DoubleDigit_Key, 0xEC, 8); + addKey("+100", PlusOneHundred_Key, 0xEC, 8); + addKey("setup", Unmapped_Key, 0xEF, 8); + addKey("search mode", Unmapped_Key, 0xEF, 8); + addKey("vol up", VolumeUp_Key, 0xF0, 8); + addKey("vol down", VolumeDown_Key, 0xF1, 8); + addKey("mute", Mute_Key, 0xF3, 8); + addKey("up arrow", Up_Key, 0xF6, 8); + addKey("down arrow", Down_Key, 0xF7, 8); +} diff --git a/keysets/sylvania.h b/keysets/sylvania.h new file mode 100644 index 0000000..9ec3eff --- /dev/null +++ b/keysets/sylvania.h @@ -0,0 +1,18 @@ +#ifndef SYLVANIA_H +#define SYLVANIA_H + +#include "pirkeysetmetadata.h" + +class QObject; + +class SylvaniaTV1: public PIRKeysetMetaData +{ +public: + SylvaniaTV1( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + +#endif // SYLVANIA_H diff --git a/keysets/technics.cpp b/keysets/technics.cpp index 1b12d09..fc8d376 100644 --- a/keysets/technics.cpp +++ b/keysets/technics.cpp @@ -138,7 +138,7 @@ void TechnicsAudio2::populateProtocol( addKaseikyoKey("CD", CDInput_Key, 0x005, 0x94); addKaseikyoKey("AUTO/MONO", FMMode_Key, 0x045, 0x33); - addKaseikyoKey("TUNER/BAND", TunerBand_Key, 0x045, 0xA4); + addKaseikyoKey("TUNER/BAND", TunerInput_Key, 0x045, 0xA4); addKaseikyoKey("DECKSTOP", Unmapped_Key, 0x085, 0x00); addKaseikyoKey("DECK<<", Unmapped_Key, 0x085, 0x02); @@ -207,7 +207,7 @@ void TechnicsAudio3::populateProtocol( addKaseikyoKey("muting", Mute_Key, 0x00A, 0x32); addKaseikyoKey("VCR/VDP", VCRInput_Key, 0x00A, 0x86); addKaseikyoKey("phono", PhonoInput_Key, 0x00A, 0x90); - addKaseikyoKey("Amp.Tuner", TunerInput_Key, 0x00A, 0x92); + addKaseikyoKey("Amp.Tuner", Unmapped_Key, 0x00A, 0x92); addKaseikyoKey("cd", CDInput_Key, 0x00A, 0x94); addKaseikyoKey("tape", TapeInput_Key, 0x00A, 0x96); addKaseikyoKey("TAPE2", Unmapped_Key, 0x00A, 0x97); @@ -224,7 +224,7 @@ void TechnicsAudio3::populateProtocol( addKaseikyoKey("auto/mono", FMMode_Key, 0x04A, 0x33); addKaseikyoKey("Tuner.Preset.up", ChannelUp_Key, 0x04A, 0x34); addKaseikyoKey("Tuner.Preset.down", ChannelDown_Key, 0x04A, 0x35); - addKaseikyoKey("tuner/band", TunerBand_Key, 0x04A, 0xA4); + addKaseikyoKey("tuner/band", TunerInput_Key, 0x04A, 0xA4); addKaseikyoKey("tape_stop", Unmapped_Key, 0x08A, 0x00); addKaseikyoKey("tape_open/close", Unmapped_Key, 0x08A, 0x01); diff --git a/keysets/thomson.cpp b/keysets/thomson.cpp index aa56a3c..6ce906b 100644 --- a/keysets/thomson.cpp +++ b/keysets/thomson.cpp @@ -189,7 +189,7 @@ void ThomsonVCR1::populateProtocol( addKey("RED", Red_Key, 0x39, 7); // "vcr_Lock" addKey("GREEN", Green_Key, 0x3B, 7); addKey("vcr_timer", Timer_Key, 0x3B, 7); - addKey("INDEX_MARK", Unmapped_Key, 0x3C, 7); // "vcr_zoom"? + addKey("INDEX_MARK", IndexSearch_Key, 0x3C, 7); addKey("Reset_counter", Reset_Key, 0x3D, 7); addKey("EXIT", Exit_Key, 0x3E, 7); // "vcr_clear" -- need child keyset? } @@ -394,7 +394,7 @@ void ThomsonAudio1::populateProtocol( addKey("trackBack", Previous_Key, 0x90, 8); addKey("volUp", VolumeUp_Key, 0x91, 8); addKey("soundEffect", Unmapped_Key, 0x93, 8); - addKey("band", TunerBand_Key, 0x94, 8); + addKey("band", TunerInput_Key, 0x94, 8); addKey("mode", Mode_Key, 0x95, 8); addKey("select", Select_Key, 0x99, 8); // ? addKey("presUp", ChannelUp_Key, 0x9C, 8); diff --git a/keysets/triax.cpp b/keysets/triax.cpp new file mode 100644 index 0000000..e98aaf7 --- /dev/null +++ b/keysets/triax.cpp @@ -0,0 +1,140 @@ +#include "triax.h" +#include "protocols/rc5protocol.h" +#include "protocols/necprotocol.h" + +TriaxSTB1::TriaxSTB1( + unsigned int index) + : PIRKeysetMetaData( + "Satellite Receiver 1", + Triax_Make, + index) +{ + addControlledDevice(Triax_Make, "DVB 40S", Other_Device); +} + + +void TriaxSTB1::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new RC5Protocol(guiObject, index); + + addKey("Power", Power_Key, 0x128C, 13); + addKey("1", One_Key, 0x1281, 13); + addKey("2", Two_Key, 0x1282, 13); + addKey("3", Three_Key, 0x1283, 13); + addKey("4", Four_Key, 0x1284, 13); + addKey("5", Five_Key, 0x1285, 13); + addKey("6", Six_Key, 0x1286, 13); + addKey("7", Seven_Key, 0x1287, 13); + addKey("8", Eight_Key, 0x1288, 13); + addKey("9", Nine_Key, 0x1289, 13); + addKey("0", Zero_Key, 0x1280, 13); + addKey("Mute", Mute_Key, 0x0286, 13); + addKey("Help", Unmapped_Key, 0x128F, 13); + addKey("Left", Left_Key, 0x0295, 13); + addKey("Right", Right_Key, 0x0296, 13); + addKey("Up", Up_Key, 0x0290, 13); + addKey("Down", Down_Key, 0x0291, 13); + addKey("Guide", Guide_Key, 0x028F, 13); + addKey("Menu", Menu_Key, 0x02AA, 13); + addKey("TV/Sat", Input_Key, 0x12A8, 13); + addKey("Plus", Unmapped_Key, 0x12AF, 13); +} + + +TriaxSTB2::TriaxSTB2( + unsigned int index) + : PIRKeysetMetaData( + "Satellite Receiver 2", + Triax_Make, + index) +{ +} + + +void TriaxSTB2::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new NECProtocol(guiObject, index, true, true); + + setPreData(0xDF00, 16); + + addKey("f2", Unmapped_Key, 0x00, 8); + addKey("3", Three_Key, 0x01, 8); + addKey("channel up", ChannelUp_Key, 0x02, 8); + addKey("menu", Menu_Key, 0x03, 8); + addKey("2", Two_Key, 0x05, 8); + addKey("satellite", Input_Key, 0x06, 8); + addKey("1", One_Key, 0x09, 8); + addKey("select", Select_Key, 0x0A, 8); + addKey("vol down", VolumeDown_Key, 0x0B, 8); + addKey("power", Power_Key, 0x0C, 8); + addKey("vol up", VolumeUp_Key, 0x0D, 8); + addKey("f1", Unmapped_Key, 0x0E, 8); + addKey("f0", Unmapped_Key, 0x0F, 8); + addKey("info", Info_Key, 0x10, 8); + addKey("blue", Blue_Key, 0x10, 8); + addKey("audio", Audio_Key, 0x14, 8); + addKey("yellow", Yellow_Key, 0x14, 8); + addKey("sleep", Sleep_Key, 0x18, 8); + addKey("green", Green_Key, 0x18, 8); + addKey("tv/radio", TunerInput_Key, 0x1A, 8); + addKey("mosaic", PIP_Key, 0x1C, 8); + addKey("red", Red_Key, 0x1C, 8); + addKey("channel down", ChannelDown_Key, 0x1E, 8); + addKey("right arrow", Right_Key, 0x40, 8); + addKey("0", Zero_Key, 0x41, 8); + addKey("9", Nine_Key, 0x42, 8); + addKey("6", Six_Key, 0x43, 8); + addKey("up arrow", Up_Key, 0x44, 8); + addKey("teletext", Teletext_Key, 0x45, 8); + addKey("8", Eight_Key, 0x46, 8); + addKey("5", Five_Key, 0x47, 8); + addKey("down arrow", Down_Key, 0x48, 8); + addKey("exit", Exit_Key, 0x49, 8); + addKey("7", Seven_Key, 0x4A, 8); + addKey("4", Four_Key, 0x4B, 8); + addKey("left arrow", Left_Key, 0x4C, 8); + addKey("zoom", Zoom_Key, 0x50, 8); + addKey("mute", Mute_Key, 0x55, 8); + addKey("prev track", Previous_Key, 0x57, 8); + addKey("last (prev ch)", PrevChannel_Key, 0x59, 8); + addKey("next track", Next_Key, 0x5B, 8); + addKey("fav", Favorites_Key, 0x5C, 8); + addKey("program guide", Guide_Key, 0x5D, 8); +} + + +TriaxSTB2a::TriaxSTB2a( + unsigned int index) + : TriaxSTB2(index) +{ + setKeysetName("Satellite Receiver 2a"); +} + + +void TriaxSTB2a::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + TriaxSTB2::populateProtocol(guiObject); + + setPreData(0x6681, 16); +} diff --git a/keysets/triax.h b/keysets/triax.h new file mode 100644 index 0000000..5fcae4b --- /dev/null +++ b/keysets/triax.h @@ -0,0 +1,38 @@ +#ifndef TRIAX_H +#define TRIAX_H + +#include "pirkeysetmetadata.h" + +class QObject; + +class TriaxSTB1: public PIRKeysetMetaData +{ +public: + TriaxSTB1( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + +class TriaxSTB2: public PIRKeysetMetaData +{ +public: + TriaxSTB2( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + +class TriaxSTB2a: public TriaxSTB2 +{ +public: + TriaxSTB2a( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + +#endif // TRIAX_H diff --git a/keysets/universum.cpp b/keysets/universum.cpp index 6097475..c6f9be5 100644 --- a/keysets/universum.cpp +++ b/keysets/universum.cpp @@ -48,7 +48,7 @@ void UniversumVCR1::populateProtocol( addKey("play", Play_Key, 0x14, 8); addKey("rec", Record_Key, 0x15, 8); addKey("type", Unmapped_Key, 0x18, 8); - addKey("index", Unmapped_Key, 0x19, 8); + addKey("index", IndexSearch_Key, 0x19, 8); addKey("slow", Slow_Key, 0x1A, 8); addKey("9", Nine_Key, 0x1C, 8); addKey("0", Zero_Key, 0x1D, 8); @@ -61,12 +61,12 @@ void UniversumVCR1::populateProtocol( addKey("clear", Clear_Key, 0x4A, 8); addKey("ok", Select_Key, 0x4B, 8); addKey("display", Info_Key, 0x4C, 8); - addKey("dpc_plus/vps/pdc", Unmapped_Key, 0x4F, 8); + addKey("dpc_plus/vps/pdc", RecordPDC_Key, 0x4F, 8); addKey("Surround", Surround_Key, 0x50, 8); addKey("remain", Unmapped_Key, 0x57, 8); addKey("power", Power_Key, 0x5B, 8); addKey("sp/lp", VHSSpeed_Key, 0x5E, 8); - addKey("showview", Unmapped_Key, 0x8C, 8); + addKey("showview", Unmapped_Key, 0x8C, 8); // vhsplus+, etc. addKey("pip", PIP_Key, 0x8D, 8); addKey("strobe", Unmapped_Key, 0x9A, 8); addKey("preset", Unmapped_Key, 0x9E, 8); @@ -113,7 +113,7 @@ void UniversumVCR2::populateProtocol( addKey("0", Zero_Key, 0x1140, 13); addKey("+", ChannelUp_Key, 0x1160, 13); addKey("-", ChannelDown_Key, 0x1161, 13); - addKey("SEL/VPS", Unmapped_Key, 0x114B, 13); + addKey("SEL/VPS", RecordPDC_Key, 0x114B, 13); addKey("CLEAR", Clear_Key, 0x1171, 13); addKey("RECORD", Record_Key, 0x1177, 13); addKey("STILL", Pause_Key, 0x1169, 13); @@ -174,9 +174,9 @@ void UniversumVCR3::populateProtocol( addKey("once", Unmapped_Key, 0x58, 8); addKey("daily", Unmapped_Key, 0x49, 8); addKey("weekly", Unmapped_Key, 0x4D, 8); - addKey("timer_rec", Unmapped_Key, 0x0D, 8); + addKey("timer_rec", RecordTimed_Key, 0x0D, 8); addKey("clock_counter", Unmapped_Key, 0x51, 8); - addKey("aft_vps", Unmapped_Key, 0x46, 8); + addKey("aft_vps", RecordPDC_Key, 0x46, 8); addKey("preset", Unmapped_Key, 0x40, 8); addKey("memory", Memory_Key, 0x4B, 8); addKey("reset", Reset_Key, 0x4C, 8); @@ -398,9 +398,9 @@ void UniversumAudio1::populateProtocol( setPreData(0x1010, 16); - addKey("FM", TunerBand_Key, 0x00, 8); - addKey("MW", Unmapped_Key, 0x01, 8); - addKey("LW", Unmapped_Key, 0x02, 8); + addKey("FM", FM_Key, 0x00, 8); + addKey("MW", AM_Key, 0x01, 8); + addKey("LW", LW_Key, 0x02, 8); addKey("CDP", CDInput_Key, 0x03, 8); addKey("CD_PLAY", Play_Key, 0x04, 8); addKey("CD_STOP", Stop_Key, 0x05, 8); diff --git a/keysets/viewsonic.cpp b/keysets/viewsonic.cpp new file mode 100644 index 0000000..169c6f5 --- /dev/null +++ b/keysets/viewsonic.cpp @@ -0,0 +1,114 @@ +#include "viewsonic.h" +#include "protocols/necprotocol.h" + +ViewsonicProjector1::ViewsonicProjector1( + unsigned int index) + : PIRKeysetMetaData( + "Projector Keyset 1", + Viewsonic_Make, + index) +{ + addControlledDevice(Viewsonic_Make, "PJ750", Other_Device); +} + + +void ViewsonicProjector1::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new NECProtocol(guiObject, index, true, true); + + setPreData(0x4587, 16); + + addKey("power", Power_Key, 0x17, 8); + addKey("RGB", Unmapped_Key, 0x18, 8); + addKey("video", PictureMode_Key, 0x19, 8); + addKey("menu", Menu_Key, 0x20, 8); + addKey("select", Select_Key, 0x21, 8); + addKey("reset", Reset_Key, 0x22, 8); + addKey("auto", Unmapped_Key, 0x24, 8); + addKey("up", Up_Key, 0x28, 8); + addKey("right", Right_Key, 0x2A, 8); + addKey("down", Down_Key, 0x2C, 8); + addKey("left", Left_Key, 0x2E, 8); + addKey("position", Unmapped_Key, 0x30, 8); + addKey("blank screen", Unmapped_Key, 0x41, 8); + addKey("vol-", VolumeDown_Key, 0x50, 8); + addKey("vol+", VolumeUp_Key, 0x51, 8); + addKey("mute", Mute_Key, 0x52, 8); + addKey("magnify+", Unmapped_Key, 0xB1, 8); + addKey("magnify-", Unmapped_Key, 0xB2, 8); + addKey("magnify off", Unmapped_Key, 0xB3, 8); + addKey("freeze", Pause_Key, 0xB4, 8); + addKey("keystone", Unmapped_Key, 0xB6, 8); +} + + +ViewsonicProjector2::ViewsonicProjector2( + unsigned int index) + : PIRKeysetMetaData( + "Projector Keyset 2", + Viewsonic_Make, + index) +{ + addControlledDevice(Viewsonic_Make, "PJ250", Other_Device); +} + + +void ViewsonicProjector2::populateProtocol( + QObject *guiObject) +{ + if (threadableProtocol) + { + // Keyset already populated. + return; + } + + threadableProtocol = new NECProtocol(guiObject, index, true, true); + + setPreData(0x1586, 16); + + addKey("7", Seven_Key, 0x03, 8); + addKey("Video", AuxInput_Key, 0x03, 8); + addKey("5", Five_Key, 0x04, 8); + addKey("RGB", ComponentInput_Key, 0x04, 8); + addKey("4", Four_Key, 0x05, 8); + addKey("Digital", PCInput_Key, 0x05, 8); + addKey("tv/vcr", Input_Key, 0x06, 8); + addKey("Power On", Power_Key, 0x08, 8); + addKey("0", Zero_Key, 0x10, 8); + addKey("Aspect", AspectRatio_Key, 0x10, 8); + addKey("sleep", Sleep_Key, 0x14, 8); + addKey("select", Select_Key, 0x17, 8); + addKey("exit", Exit_Key, 0x25, 8); + addKey("9", Nine_Key, 0x2B, 8); + addKey("YCbCr", Unmapped_Key, 0x2B, 8); + addKey("6", Six_Key, 0x2C, 8); + addKey("YPbPr", Unmapped_Key, 0x2C, 8); + addKey("pip on/off", PIP_Key, 0x30, 8); + addKey("1", One_Key, 0x32, 8); + addKey("Horiz Keystone", Unmapped_Key, 0x32, 8); + addKey("enter", Enter_Key, 0x34, 8); + addKey("Menu", Menu_Key, 0x46, 8); + addKey("Mute", Mute_Key, 0x47, 8); + addKey("last/prev ch", PrevChannel_Key, 0x48, 8); + addKey("L-", Unmapped_Key, 0x4C, 8); + addKey("Freeze", Pause_Key, 0x4C, 8); + addKey("right arrow", Right_Key, 0x5C, 8); + addKey("left arrow", Left_Key, 0x5D, 8); + addKey("up arrow", Up_Key, 0x5E, 8); + addKey("down arrow", Down_Key, 0x5F, 8); + addKey("L+", Unmapped_Key, 0x89, 8); + addKey("Zoom", Zoom_Key, 0x89, 8); + addKey("3", Three_Key, 0x8B, 8); + addKey("Vert Keystone", Unmapped_Key, 0x8B, 8); + addKey("8", Eight_Key, 0xC6, 8); + addKey("S-Video", SVideoInput_Key, 0xC6, 8); + addKey("Increase (+)", Unmapped_Key, 0xDE, 8); + addKey("Decrease (-)", Unmapped_Key, 0xDF, 8); +} diff --git a/keysets/viewsonic.h b/keysets/viewsonic.h new file mode 100644 index 0000000..0ff5d6f --- /dev/null +++ b/keysets/viewsonic.h @@ -0,0 +1,28 @@ +#ifndef VIEWSONIC_H +#define VIEWSONIC_H + +#include "pirkeysetmetadata.h" + +class QObject; + +class ViewsonicProjector1: public PIRKeysetMetaData +{ +public: + ViewsonicProjector1( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + +class ViewsonicProjector2: public PIRKeysetMetaData +{ +public: + ViewsonicProjector2( + unsigned int index); + + virtual void populateProtocol( + QObject *guiObject); +}; + +#endif // VIEWSONIC_H diff --git a/keysets/yamaha.cpp b/keysets/yamaha.cpp index 55e4127..03caebe 100644 --- a/keysets/yamaha.cpp +++ b/keysets/yamaha.cpp @@ -244,7 +244,7 @@ void YamahaAudio2::populateProtocol( addKey("vcr", Unmapped_Key, 0x0F, 8); addKey("ch+", ChannelUp_Key, 0x10, 8); addKey("ch-", ChannelDown_Key, 0x11, 8); - addKey("abcde", TunerBand_Key, 0x12, 8); // "A/B/C/D/E" "tuner-toggle" + addKey("abcde", Unmapped_Key, 0x12, 8); // "A/B/C/D/E" "tuner-toggle" addKey("GO_VCR2", Unmapped_Key, 0x13, 8); addKey("phono", PhonoInput_Key, 0x14, 8); addKey("cd", CDInput_Key, 0x15, 8); @@ -531,7 +531,7 @@ void YamahaAudio4::populateProtocol( addKey("tape_back", Unmapped_Key, 0x45, 8); addKey("rec", Record_Key, 0x46, 8); addKey("tape1/2", Unmapped_Key, 0x47, 8); - addKey("tuner", TunerBand_Key, 0x4B, 8); + addKey("tuner", TunerInput_Key, 0x4B, 8); addKey("sleep", Sleep_Key, 0x4F, 8); addKey("up_arrow", Up_Key, 0x55, 8); addKey("down_arrow", Down_Key, 0x56, 8); diff --git a/mainwindow.cpp b/mainwindow.cpp index 78744b4..bdce733 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -19,6 +19,7 @@ #include "pirdocumentationform.h" #include "piraboutform.h" #include "dialogs/pirtabschoicedialog.h" +#include "dialogs/pirfavoritesdialog.h" #include "pirkeysetmanager.h" #include "pirpanelmanager.h" @@ -65,21 +66,16 @@ MainWindow::MainWindow(QWidget *parent) // Display the panels: myPanels->updateTabSet(); - // Add the corner button: - insertCornerButton(); - // Construct the rest of the forms: selectKeysetForm = new PIRSelectKeysetForm(this); - myKeysets->populateSelectionWidget(selectKeysetForm); + favoritesDialog = new PIRFavoritesDialog(this); + myKeysets->populateListWidgets(selectKeysetForm, favoritesDialog); selectDeviceForm = new PIRSelectDeviceForm(this); PIRKeysetMetaData::populateDevices(selectDeviceForm); preferencesForm = new PIRPreferencesForm(this, myKeysets); - // Remember any favorites the user has already set: - populateFavorites(); - // Retrieve the user's preferences: QSettings settings("pietrzak.org", "Pierogi"); if (settings.contains("currentKeysetName")) @@ -90,9 +86,12 @@ MainWindow::MainWindow(QWidget *parent) currentKeyset); } + // Add the corner buttons: + insertCornerButtons(); + enableButtons(); - QListWidget *fkw = myPanels->getFavoritesListWidget(); + QListWidget *fkw = favoritesDialog->getFavoritesListWidget(); connect( fkw, @@ -376,34 +375,11 @@ void MainWindow::finalCleanup() } -void MainWindow::addCurrentKeyset( - QListWidget *qlw) +void MainWindow::addToFavorites( + PIRKeysetWidgetItem *kwi) { - // Is the current keyset already a favorite? - int count = qlw->count(); - int index = 0; - PIRKeysetWidgetItem *kwi = NULL; - while (index < count) - { - kwi = dynamic_cast( - qlw->item(index)); - - if (kwi && (kwi->getID() == currentKeyset)) - { - // Current keyset already in list! No need to continue. - return; - } - ++index; - } - - // Ok, add the current keyset to the favorites: - PIRMakeName make = myKeysets->getMake(currentKeyset); - - QString name = makeManager.getMakeString(make); - name.append(" "); - name.append(myKeysets->getDisplayName(currentKeyset)); - - qlw->addItem(new PIRKeysetWidgetItem(name, currentKeyset, make)); + //Add keyset to the favorites: + favoritesDialog->addItem(new PIRKeysetWidgetItem(kwi)); // And, add the keyset id to the persistent list: QSettings settings("pietrzak.org", "Pierogi"); @@ -416,22 +392,18 @@ void MainWindow::addCurrentKeyset( settings.setValue( "keysetMake", - makeManager.getMakeString(myKeysets->getMake(currentKeyset))); + makeManager.getMakeString(kwi->getMake())); - settings.setValue("keysetName", myKeysets->getDisplayName(currentKeyset)); + settings.setValue("keysetName", kwi->getInternalName()); settings.endArray(); } -void MainWindow::removeFavoriteKeyset( - QListWidget *qlw) +void MainWindow::removeFromFavorites( + unsigned int keysetID) { - // Deleting an item removes it from the list, so just grab the currently - // selected item and delete it: - QListWidgetItem *item = qlw->currentItem(); - - if (item) delete item; + favoritesDialog->removeItem(keysetID); // Remove this item from the persistent list. Well, actually, it seems a // little more convenient to just blow away the existing list of favorites @@ -441,7 +413,7 @@ void MainWindow::removeFavoriteKeyset( settings.remove("favorites"); - int count = qlw->count(); + int count = favoritesDialog->getCount(); // If the count is empty, we can stop right here: if (count == 0) return; @@ -452,7 +424,7 @@ void MainWindow::removeFavoriteKeyset( settings.beginWriteArray("favorites"); while (index < count) { - kwi = dynamic_cast(qlw->item(index)); + kwi = favoritesDialog->getItem(index); settings.setArrayIndex(index); id = kwi->getID(); @@ -469,6 +441,7 @@ void MainWindow::removeFavoriteKeyset( } +/* void MainWindow::populateFavorites() { QSettings settings("pietrzak.org", "Pierogi"); @@ -491,7 +464,7 @@ void MainWindow::populateFavorites() if (kwi) { // Keyset does exist, so continue: - myPanels->addFavoritesItem(kwi); + favoritesDialog->addItem(kwi); } ++index; @@ -499,6 +472,7 @@ void MainWindow::populateFavorites() settings.endArray(); } +*/ void MainWindow::startRepeating( @@ -535,24 +509,25 @@ void MainWindow::stopRepeating() void MainWindow::selectPrevFavKeyset() { - myPanels->selectPrevFavKeyset(); + favoritesDialog->selectPrevFavKeyset(); } void MainWindow::selectNextFavKeyset() { - myPanels->selectNextFavKeyset(); + favoritesDialog->selectNextFavKeyset(); } -void MainWindow::insertCornerButton() +void MainWindow::insertCornerButtons() { - // Set up the dialog box: + // Set up the dialog boxes: PIRTabsChoiceDialog *tcd = new PIRTabsChoiceDialog(this); +// favoritesDialog = new PIRFavoritesDialog(this); - // Next, set up the corner button itself: + // Next, set up the corner buttons: QPushButton *button = - new QPushButton(QIcon(":/icons/align_just_icon&32.png"), ""); + new QPushButton(QIcon(":/icons/folder_plus_icon&32.png"), ""); button->setFlat(true); @@ -563,7 +538,21 @@ void MainWindow::insertCornerButton() SLOT(exec()), Qt::QueuedConnection); - ui->mainTabWidget->setCornerWidget(button); + ui->mainTabWidget->setCornerWidget(button, Qt::TopRightCorner); + + button = + new QPushButton(QIcon(":/icons/align_just_icon&32.png"), ""); + + button->setFlat(true); + + connect( + button, + SIGNAL(clicked()), + favoritesDialog, + SLOT(exec()), + Qt::QueuedConnection); + + ui->mainTabWidget->setCornerWidget(button, Qt::TopLeftCorner); } diff --git a/mainwindow.h b/mainwindow.h index 7b321ff..ef6f19a 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -16,6 +16,8 @@ class PIRSelectDeviceForm; class PIRPreferencesForm; class PIRDocumentationForm; class PIRAboutForm; +class PIRFavoritesDialog; +class PIRKeysetWidgetItem; class PIRKeysetManager; class PIRPanelManager; @@ -53,11 +55,11 @@ public: void stopRepeating(); // Favorites panel actions: - void addCurrentKeyset( - QListWidget *qlw); + void addToFavorites( + PIRKeysetWidgetItem *kwi); - void removeFavoriteKeyset( - QListWidget *qlw); + void removeFromFavorites( + unsigned int keysetID); void enableButtons(); @@ -73,7 +75,7 @@ public: return currentKeyset; } - void insertCornerButton(); + void insertCornerButtons(); void disableUpdates(); void enableUpdates(); void clearTabs(); @@ -119,6 +121,7 @@ private: PIRPreferencesForm *preferencesForm; PIRDocumentationForm *documentationForm; PIRAboutForm *aboutForm; + PIRFavoritesDialog *favoritesDialog; PIRKeysetManager *myKeysets; PIRPanelManager *myPanels; diff --git a/pierogi.pro b/pierogi.pro index 5f13397..0d16845 100644 --- a/pierogi.pro +++ b/pierogi.pro @@ -145,7 +145,6 @@ SOURCES += main.cpp mainwindow.cpp \ forms/pirkeypadform.cpp \ forms/pirmenuform.cpp \ forms/pirmediaform.cpp \ - forms/pirfavoritesform.cpp \ pirpanelmanager.cpp \ protocols/nokia32protocol.cpp \ protocols/kathreinprotocol.cpp \ @@ -189,7 +188,20 @@ SOURCES += main.cpp mainwindow.cpp \ dialogs/pirtabswidgetitem.cpp \ keysets/technisat.cpp \ keysets/strong.cpp \ - keysets/proview.cpp + keysets/proview.cpp \ + dialogs/pireditkeysetdialog.cpp \ + keysets/adb.cpp \ + keysets/triax.cpp \ + keysets/sylvania.cpp \ + keysets/anitech.cpp \ + keysets/viewsonic.cpp \ + forms/pirvcrform.cpp \ + forms/pirvideodiscform.cpp \ + forms/piraudiodeviceform.cpp \ + dialogs/pirfavoritesdialog.cpp \ + keysets/medion.cpp \ + keysets/blaupunkt.cpp \ + keysets/lifetec.cpp HEADERS += mainwindow.h \ pirkeynames.h \ pirmakenames.h \ @@ -309,7 +321,6 @@ HEADERS += mainwindow.h \ forms/pirkeypadform.h \ forms/pirmenuform.h \ forms/pirmediaform.h \ - forms/pirfavoritesform.h \ pirpanelnames.h \ pirpanelmanager.h \ protocols/nokia32protocol.h \ @@ -354,7 +365,20 @@ HEADERS += mainwindow.h \ dialogs/pirtabswidgetitem.h \ keysets/technisat.h \ keysets/strong.h \ - keysets/proview.h + keysets/proview.h \ + dialogs/pireditkeysetdialog.h \ + keysets/adb.h \ + keysets/sylvania.h \ + keysets/triax.h \ + keysets/anitech.h \ + keysets/viewsonic.h \ + forms/pirvcrform.h \ + forms/pirvideodiscform.h \ + forms/piraudiodeviceform.h \ + dialogs/pirfavoritesdialog.h \ + keysets/medion.h \ + keysets/blaupunkt.h \ + keysets/lifetec.h FORMS += mainwindow.ui \ pirdocumentationform.ui \ piraboutform.ui \ @@ -371,13 +395,17 @@ FORMS += mainwindow.ui \ forms/pirkeypadform.ui \ forms/pirmenuform.ui \ forms/pirmediaform.ui \ - forms/pirfavoritesform.ui \ forms/pirrecordform.ui \ forms/piraltmainform.ui \ pirpreferencesform.ui \ forms/pirmacroform.ui \ dialogs/pirtextentrydialog.ui \ - dialogs/pirtabschoicedialog.ui + dialogs/pirtabschoicedialog.ui \ + dialogs/pireditkeysetdialog.ui \ + forms/pirvcrform.ui \ + forms/pirvideodiscform.ui \ + forms/piraudiodeviceform.ui \ + dialogs/pirfavoritesdialog.ui # Please do not modify the following two lines. Required for deployment. include(deployment.pri) @@ -446,7 +474,8 @@ OTHER_FILES += \ qtc_packaging/debian_fremantle/postrm \ icons/red_pause.png \ icons/delete_icon&48.png \ - icons/align_just_icon&32.png + icons/align_just_icon&32.png \ + icons/folder_plus_icon&32.png RESOURCES += \ PierogiResources.qrc diff --git a/pierogi.pro.user b/pierogi.pro.user index 48b33d1..98159bc 100644 --- a/pierogi.pro.user +++ b/pierogi.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget @@ -79,7 +79,7 @@ dpkg-buildpackage -sa -S -uc -us /Users/john/QtSDK/Maemo/4.6.2/bin/mad false - /Users/john/Develop/n900/pierogi-1.1.4 + /Users/john/Develop/n900/pierogi-1.1.5 Custom Process Step ProjectExplorer.ProcessStep @@ -199,6 +199,7 @@ /Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_3_armel.deb /Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_5_armel.deb /Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_0_armel.deb + /Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_6_armel.deb /Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_2_armel.deb /Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_0_1_armel.deb /Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_4_armel.deb @@ -235,6 +236,7 @@ 192.168.0.15 192.168.0.15 192.168.0.15 + 192.168.0.15 localhost 192.168.0.15 192.168.0.15 @@ -285,13 +287,14 @@ + 2012-01-19T22:18:07 2012-02-29T10:48:05 2012-02-06T17:22:16 2012-03-08T23:20:27 - 2012-08-30T16:08:14 + 2012-09-02T20:43:12 2012-02-12T23:10:44 2012-02-09T18:12:21 2012-02-19T10:29:22 @@ -304,6 +307,7 @@ 2012-01-17T13:21:05 2012-01-23T09:47:37 2012-02-03T10:04:34 + 2012-09-02T21:07:05 2012-03-04T19:56:48 2012-01-01T15:35:35 2012-03-12T20:02:57 diff --git a/pirkeynames.h b/pirkeynames.h index 27a9222..148a334 100644 --- a/pirkeynames.h +++ b/pirkeynames.h @@ -53,12 +53,9 @@ enum PIRKeyName{ Play_Key, Pause_Key, Stop_Key, - Record_Key, - RecordPause_Key, - RecordStop_Key, - RecordMute_Key, FastForward_Key, Rewind_Key, + PlayX2_Key, Next_Key, Previous_Key, StepForward_Key, @@ -74,8 +71,12 @@ enum PIRKeyName{ SlowMinus_Key, Timer_Key, Clock_Key, - NextDisc_Key, - PrevDisc_Key, + Record_Key, + RecordPause_Key, + RecordStop_Key, + RecordMute_Key, + RecordTimed_Key, + RecordPDC_Key, // Menu control: Menu_Key, @@ -123,8 +124,13 @@ enum PIRKeyName{ PIPScan_Key, // DVD / Blue-ray / etc. keys: + NextDisc_Key, + PrevDisc_Key, DiscTitle_Key, DiscMenu_Key, + DiscOne_Key, + DiscTwo_Key, + DiscThree_Key, Angle_Key, // VHS / Beta / etc. keys: @@ -132,6 +138,10 @@ enum PIRKeyName{ TrackingPlus_Key, TrackingMinus_Key, AutoTracking_Key, + IndexSearch_Key, // also known as VISS + IndexMark_Key, + IndexErase_Key, + OneTouchPlayBack_Key, // Audio/Video Adjustment Controls: PictureMode_Key, @@ -191,6 +201,13 @@ enum PIRKeyName{ NextPreset_Key, PrevPreset_Key, + // Audio controls: +// TunerBand_Key, + FMMode_Key, + FM_Key, + AM_Key, // also "MW" + LW_Key, + // Air Conditioner controls: TempUp_Key, TempDown_Key, @@ -213,8 +230,6 @@ enum PIRKeyName{ Scan_Key, Zoom_Key, LiveTV_Key, - TunerBand_Key, - FMMode_Key, Mode_Key }; diff --git a/pirkeysetmanager.cpp b/pirkeysetmanager.cpp index 0be5987..0141a4d 100644 --- a/pirkeysetmanager.cpp +++ b/pirkeysetmanager.cpp @@ -1,17 +1,23 @@ #include "pirkeysetmanager.h" +#include + #include "pirkeysetmetadata.h" #include "pirselectkeysetform.h" #include "pirkeysetwidgetitem.h" +#include "dialogs/pirfavoritesdialog.h" #include "keysets/acer.h" +#include "keysets/adb.h" #include "keysets/admiral.h" #include "keysets/aiwa.h" +#include "keysets/anitech.h" #include "keysets/aoc.h" #include "keysets/apple.h" #include "keysets/arcam.h" #include "keysets/beko.h" #include "keysets/benq.h" +#include "keysets/blaupunkt.h" #include "keysets/bose.h" #include "keysets/bush.h" #include "keysets/cambridge.h" @@ -52,11 +58,13 @@ #include "keysets/kenwood.h" #include "keysets/lexuz.h" #include "keysets/lg.h" +#include "keysets/lifetec.h" #include "keysets/loewe.h" #include "keysets/logitech.h" #include "keysets/magnavox.h" #include "keysets/magnum.h" #include "keysets/mce.h" +#include "keysets/medion.h" #include "keysets/mitsubishi.h" #include "keysets/motorola.h" #include "keysets/nad.h" @@ -84,6 +92,7 @@ #include "keysets/sony.h" #include "keysets/starsat.h" #include "keysets/strong.h" +#include "keysets/sylvania.h" #include "keysets/technics.h" #include "keysets/technisat.h" #include "keysets/telefunken.h" @@ -92,10 +101,12 @@ #include "keysets/tivo.h" #include "keysets/topfield.h" #include "keysets/toshiba.h" +#include "keysets/triax.h" #include "keysets/united.h" #include "keysets/universum.h" #include "keysets/vestel.h" #include "keysets/viewsat.h" +#include "keysets/viewsonic.h" #include "keysets/virgin.h" #include "keysets/vizio.h" #include "keysets/wd.h" @@ -109,6 +120,9 @@ // I'll be handling the threading of the keyset commands in this object: #include +// Debugging includes: +//#include + // Global communications mechanism: extern bool stopRepeatingFlag; extern QMutex stopRepeatingMutex; @@ -125,6 +139,11 @@ PIRKeysetManager::PIRKeysetManager() setupKeyset(new AcerTV1(++counter)); setupKeyset(new AcerPC1(++counter)); + setupKeyset(new ADBSTB1(++counter)); + setupKeyset(new ADBSTB2(++counter)); + setupKeyset(new ADBSTB3(++counter)); + setupKeyset(new ADBSTB4(++counter)); + setupKeyset(new AdmiralTV1(++counter)); setupKeyset(new AdmiralTV2(++counter)); setupKeyset(new AdmiralVCR1(++counter)); @@ -145,6 +164,9 @@ PIRKeysetManager::PIRKeysetManager() setupKeyset(new AiwaCarStereo1(++counter)); setupKeyset(new AiwaDVD1(++counter)); + setupKeyset(new AnitechTV1(++counter)); + setupKeyset(new AnitechVCR1(++counter)); + setupKeyset(new AOCTV1(++counter)); setupKeyset(new AppleWhiteRemote(++counter)); @@ -155,6 +177,8 @@ PIRKeysetManager::PIRKeysetManager() setupKeyset(new BenQTV1(++counter)); + setupKeyset(new BlaupunktVCR1(++counter)); + setupKeyset(new BoseRadio1(++counter)); setupKeyset(new BoseRadio2(++counter)); setupKeyset(new BoseRadio3(++counter)); @@ -388,6 +412,11 @@ PIRKeysetManager::PIRKeysetManager() setupKeyset(new LGVCR1b(++counter)); setupKeyset(new LGAC1(++counter)); + setupKeyset(new LifetecTV1(++counter)); + setupKeyset(new LifetecTV2(++counter)); + setupKeyset(new LifetecVCR1(++counter)); + setupKeyset(new LifetecAudio1(++counter)); + setupKeyset(new LoeweTV1(++counter)); setupKeyset(new LoeweVCR1(++counter)); setupKeyset(new LoeweDVD1(++counter)); @@ -411,6 +440,11 @@ PIRKeysetManager::PIRKeysetManager() setupKeyset(new MCERemote1f(++counter)); setupKeyset(new MCERemote1g(++counter)); + setupKeyset(new MedionSTB1(++counter)); + setupKeyset(new MedionDVD1(++counter)); + setupKeyset(new MedionDVD2(++counter)); + setupKeyset(new MedionVCR1(++counter)); + setupKeyset(new MitsubishiTV1(++counter)); setupKeyset(new MitsubishiTV1a(++counter)); setupKeyset(new MitsubishiVCR1(++counter)); @@ -629,6 +663,8 @@ PIRKeysetManager::PIRKeysetManager() setupKeyset(new StrongSat3(++counter)); setupKeyset(new StrongSat4(++counter)); + setupKeyset(new SylvaniaTV1(++counter)); + setupKeyset(new TechnicsAudio1(++counter)); setupKeyset(new TechnicsAudio1a(++counter)); setupKeyset(new TechnicsAudio2(++counter)); @@ -683,6 +719,10 @@ PIRKeysetManager::PIRKeysetManager() setupKeyset(new ToshibaDisc1c(++counter)); setupKeyset(new ToshibaDisc1d(++counter)); + setupKeyset(new TriaxSTB1(++counter)); + setupKeyset(new TriaxSTB2(++counter)); + setupKeyset(new TriaxSTB2a(++counter)); + setupKeyset(new UnitedDVD1(++counter)); setupKeyset(new UnitedDVBT1(++counter)); @@ -700,6 +740,9 @@ PIRKeysetManager::PIRKeysetManager() setupKeyset(new ViewsatSat1(++counter)); setupKeyset(new ViewsatSat1a(++counter)); + setupKeyset(new ViewsonicProjector1(++counter)); + setupKeyset(new ViewsonicProjector2(++counter)); + setupKeyset(new VirginSTB1(++counter)); setupKeyset(new VizioTV1(++counter)); @@ -808,7 +851,7 @@ PIRKeysetWidgetItem *PIRKeysetManager::makeKeysetItem( fullname.append(" "); fullname.append(name); - return new PIRKeysetWidgetItem(fullname, id, getMake(id)); + return new PIRKeysetWidgetItem(fullname, name, id, getMake(id)); } @@ -878,22 +921,111 @@ void PIRKeysetManager::setupKeyset( } -void PIRKeysetManager::populateSelectionWidget( - PIRSelectKeysetForm *skf) const +struct PIRUserData +{ + bool favorite; + QString nickname; +}; +typedef std::map PIRUDInnerMap; +typedef std::map PIRUDOuterMap; + +void PIRKeysetManager::populateListWidgets( + PIRSelectKeysetForm *skf, + PIRFavoritesDialog *fd) const { - PIRMakeName make; + // First, pull out the user's keyset metadata: + QSettings settings("pietrzak.org", "Pierogi"); + + // Part 1 - The user's keyset nicknames: + int size = settings.beginReadArray("userNames"); + int index = 0; + QString makeStr; + QString name; + PIRMakeName makeID; + QString userName; + PIRUDOuterMap userData; + + while (index < size) + { + settings.setArrayIndex(index); + name = settings.value("keysetName").toString(); + makeStr = settings.value("keysetMake").toString(); + makeID = makeManager.getMakeID(makeStr); + userName = settings.value("keysetNickname").toString(); + + // Insert an entry into the map. We initialize the favorites bool to + // false here, it'll be changed to true below if needed: + userData[makeID][name].nickname = userName; + userData[makeID][name].favorite = false; + ++index; + } + settings.endArray(); + + // Part 2 - The user's favorites: + size = settings.beginReadArray("favorites"); + index = 0; + + while (index < size) + { + settings.setArrayIndex(index); + name = settings.value("keysetName").toString(); + makeStr = settings.value("keysetMake").toString(); + makeID = makeManager.getMakeID(makeStr); + + // Insert an entry into the map: + userData[makeID][name].favorite = true; + + ++index; + } + settings.endArray(); + + // Now, we load the data into their respective QLists. PIRKeysetWidgetItem *kwi; + QString displayString; + PIRUDOuterMap::const_iterator outerIter; + PIRUDInnerMap::const_iterator innerIter; PIRKeysetCollection::const_iterator i = keysetsInfo.begin(); while (i != keysetsInfo.end()) { // Create a widget for the keyset: - make = i->second->getMake(); - QString tempString = makeManager.getMakeString(make); - tempString.append(" "); - tempString.append(i->second->getKeysetName()); - kwi = new PIRKeysetWidgetItem(tempString, i->first, make); + makeID = i->second->getMake(); + name = i->second->getKeysetName(); + displayString = makeManager.getMakeString(makeID); + displayString.append(" "); + displayString.append(name); + + kwi = new PIRKeysetWidgetItem(displayString, name, i->first, makeID); + + outerIter = userData.find(makeID); + if (outerIter != userData.end()) + { + innerIter = outerIter->second.find(name); + if (innerIter != outerIter->second.end()) + { + // We have user data for this keyset! + QString nick = innerIter->second.nickname; + if (!nick.isEmpty()) + { + kwi->setNickname(nick); + + displayString = nick; + displayString.append(" ("); + displayString.append(kwi->text()); + displayString.append(")"); + kwi->setText(displayString); + } + + // If this is a favorite, add it to favorites list: + if (innerIter->second.favorite) + { + kwi->setFavorite(true); + fd->addItem(kwi); + } + } + } + skf->addWidgetItem(kwi); ++i; @@ -913,3 +1045,4 @@ void PIRKeysetManager::populateDeviceTypes( } } */ + diff --git a/pirkeysetmanager.h b/pirkeysetmanager.h index af95199..98f5ab7 100644 --- a/pirkeysetmanager.h +++ b/pirkeysetmanager.h @@ -10,6 +10,7 @@ class QObject; class PIRSelectKeysetForm; class PIRSelectDeviceForm; +class PIRFavoritesDialog; class PIRKeysetWidgetItem; #include @@ -28,8 +29,9 @@ public: ~PIRKeysetManager(); - void populateSelectionWidget( - PIRSelectKeysetForm *skf) const; + void populateListWidgets( + PIRSelectKeysetForm *skf, + PIRFavoritesDialog *fd) const; bool keysetExists( unsigned int keysetID) const; @@ -63,6 +65,10 @@ public: QObject *guiObject, unsigned int keysetID); + void populateFavorites( + PIRFavoritesDialog *favoritesDialog, + PIRSelectKeysetForm *keysetForm); + private: void setupKeyset( PIRKeysetMetaData *keyset); diff --git a/pirkeysetmetadata.cpp b/pirkeysetmetadata.cpp index 05d6011..71b2c33 100644 --- a/pirkeysetmetadata.cpp +++ b/pirkeysetmetadata.cpp @@ -55,7 +55,7 @@ void PIRKeysetMetaData::populateDevices( tempString.append(i->first.model); kwi = new PIRKeysetWidgetItem( - tempString, i->second, i->first.make, i->first.type); + tempString, i->first.model, i->second, i->first.make, i->first.type); sdf->addWidgetItem(kwi); diff --git a/pirkeysetwidgetitem.cpp b/pirkeysetwidgetitem.cpp index 1fe4ba7..f4fc546 100644 --- a/pirkeysetwidgetitem.cpp +++ b/pirkeysetwidgetitem.cpp @@ -1,42 +1,58 @@ #include "pirkeysetwidgetitem.h" PIRKeysetWidgetItem::PIRKeysetWidgetItem( - QString name, + QString displayName, + QString in, unsigned int i, PIRMakeName m) - : QListWidgetItem(name), + : QListWidgetItem(displayName), id(i), - make(m) + make(m), + favorite(false), + nicknameNotEmpty(false), + internalName(in) { } PIRKeysetWidgetItem::PIRKeysetWidgetItem( - QString name, + QString displayName, + QString in, unsigned int i, PIRMakeName m, PIRDeviceTypeName t) - : QListWidgetItem(name), + : QListWidgetItem(displayName), id(i), make(m), - deviceType(t) + deviceType(t), + favorite(false), + nicknameNotEmpty(false), + internalName(in) { } -unsigned int PIRKeysetWidgetItem::getID() +PIRKeysetWidgetItem::PIRKeysetWidgetItem( + PIRKeysetWidgetItem *original) + : QListWidgetItem(original->text()), + id(original->getID()), + make(original->getMake()), + deviceType(original->getDeviceType()), + favorite(original->isFavorite()), + nicknameNotEmpty(original->hasNickname()), + internalName(original->getInternalName()) { - return id; + if (nicknameNotEmpty) + { + nickname = original->getNickname(); + } } -PIRMakeName PIRKeysetWidgetItem::getMake() +void PIRKeysetWidgetItem::setNickname( + QString nn) { - return make; -} + nickname = nn; - -PIRDeviceTypeName PIRKeysetWidgetItem::getDeviceType() -{ - return deviceType; + nicknameNotEmpty = !nn.isEmpty(); } diff --git a/pirkeysetwidgetitem.h b/pirkeysetwidgetitem.h index c03d173..5271ef7 100644 --- a/pirkeysetwidgetitem.h +++ b/pirkeysetwidgetitem.h @@ -10,26 +10,98 @@ class PIRKeysetWidgetItem: public QListWidgetItem { public: PIRKeysetWidgetItem( - QString name, + QString displayName, + QString internalName, unsigned int id, PIRMakeName make); PIRKeysetWidgetItem( - QString name, + QString displayName, + QString internalName, unsigned int id, PIRMakeName make, PIRDeviceTypeName dt); + PIRKeysetWidgetItem( + PIRKeysetWidgetItem *original); + unsigned int getID(); PIRMakeName getMake(); PIRDeviceTypeName getDeviceType(); + void setFavorite( + bool favorite); + + bool isFavorite(); + + bool hasNickname(); + + void setNickname( + QString nn); + + QString getNickname(); + + QString getInternalName(); + private: unsigned int id; PIRMakeName make; PIRDeviceTypeName deviceType; + bool favorite; + bool nicknameNotEmpty; + QString internalName; + QString nickname; }; + +inline unsigned int PIRKeysetWidgetItem::getID() +{ + return id; +} + + +inline PIRMakeName PIRKeysetWidgetItem::getMake() +{ + return make; +} + + +inline PIRDeviceTypeName PIRKeysetWidgetItem::getDeviceType() +{ + return deviceType; +} + + +inline void PIRKeysetWidgetItem::setFavorite( + bool f) +{ + favorite = f; +} + + +inline bool PIRKeysetWidgetItem::isFavorite() +{ + return favorite; +} + + +inline bool PIRKeysetWidgetItem::hasNickname() +{ + return nicknameNotEmpty; +} + + +inline QString PIRKeysetWidgetItem::getNickname() +{ + return nickname; +} + + +inline QString PIRKeysetWidgetItem::getInternalName() +{ + return internalName; +} + #endif // PIRKEYSETWIDGETITEM_H diff --git a/pirmakenames.cpp b/pirmakenames.cpp index ad947de..dd8c547 100644 --- a/pirmakenames.cpp +++ b/pirmakenames.cpp @@ -6,13 +6,16 @@ PIRMakeMgr::PIRMakeMgr() { makes[Any_Make] = "Any"; makes[Acer_Make] = "Acer"; + makes[ADB_Make] = "ADB"; makes[Admiral_Make] = "Admiral"; makes[Aiwa_Make] = "Aiwa"; + makes[Anitech_Make] = "Anitech"; makes[AOC_Make] = "AOC"; makes[Apple_Make] = "Apple"; makes[Arcam_Make] = "Arcam"; makes[Beko_Make] = "Beko"; makes[BenQ_Make] = "BenQ"; + makes[Blaupunkt_Make] = "Blaupunkt"; makes[Bose_Make] = "Bose"; makes[Bush_Make] = "Bush"; makes[Cambridge_Make] = "Cambridge Audio"; @@ -53,10 +56,12 @@ PIRMakeMgr::PIRMakeMgr() makes[Kenwood_Make] = "Kenwood"; makes[Lexuz_Make] = "Lexuz"; makes[LG_Make] = "LG"; + makes[Lifetec_Make] = "Lifetec"; makes[Loewe_Make] = "Loewe"; makes[Logitech_Make] = "Logitech"; makes[Magnavox_Make] = "Magnavox"; makes[Magnum_Make] = "Magnum"; + makes[Medion_Make] = "Medion"; makes[Microsoft_Make] = "Microsoft"; makes[Mitsubishi_Make] = "Mitsubishi"; makes[Motorola_Make] = "Motorola"; @@ -85,6 +90,7 @@ PIRMakeMgr::PIRMakeMgr() makes[Sony_Make] = "Sony"; makes[Starsat_Make] = "Starsat"; makes[Strong_Make] = "Strong"; + makes[Sylvania_Make] = "Sylvania"; makes[Technics_Make] = "Technics"; makes[Technisat_Make] = "Technisat"; makes[Telefunken_Make] = "Telefunken"; @@ -93,10 +99,12 @@ PIRMakeMgr::PIRMakeMgr() makes[Tivo_Make] = "TiVo"; makes[Topfield_Make] = "Topfield"; makes[Toshiba_Make] = "Toshiba"; + makes[Triax_Make] = "Triax"; makes[United_Make] = "United"; makes[Universum_Make] = "Universum"; makes[Vestel_Make] = "Vestel"; makes[Viewsat_Make] = "Viewsat"; + makes[Viewsonic_Make] = "Viewsonic"; makes[Virgin_Make] = "Virgin Media"; makes[Vizio_Make] = "Vizio"; makes[WD_Make] = "Western Digital"; @@ -104,6 +112,13 @@ PIRMakeMgr::PIRMakeMgr() makes[Xcruiser_Make] = "Xcruiser"; makes[Yamaha_Make] = "Yamaha"; makes[Zenith_Make] = "Zenith"; + + MakeCollection::const_iterator i = makes.begin(); + while (i != makes.end()) + { + makeIDs[i->second] = i->first; + ++i; + } } const char *PIRMakeMgr::getMakeString( @@ -113,6 +128,13 @@ const char *PIRMakeMgr::getMakeString( } +PIRMakeName PIRMakeMgr::getMakeID( + QString name) +{ + return makeIDs[name]; +} + + void PIRMakeMgr::populateComboBox( QComboBox *cb) { diff --git a/pirmakenames.h b/pirmakenames.h index 25074f8..3661044 100644 --- a/pirmakenames.h +++ b/pirmakenames.h @@ -7,13 +7,16 @@ class QComboBox; enum PIRMakeName{ Any_Make, Acer_Make, + ADB_Make, Admiral_Make, Aiwa_Make, + Anitech_Make, AOC_Make, Apple_Make, Arcam_Make, Beko_Make, BenQ_Make, + Blaupunkt_Make, Bose_Make, Bush_Make, Cambridge_Make, @@ -54,10 +57,12 @@ enum PIRMakeName{ Kenwood_Make, Lexuz_Make, LG_Make, + Lifetec_Make, Loewe_Make, Logitech_Make, Magnavox_Make, Magnum_Make, + Medion_Make, Microsoft_Make, Mitsubishi_Make, Motorola_Make, @@ -86,6 +91,7 @@ enum PIRMakeName{ Sony_Make, Starsat_Make, Strong_Make, + Sylvania_Make, Technics_Make, Technisat_Make, Telefunken_Make, @@ -94,10 +100,12 @@ enum PIRMakeName{ Tivo_Make, Topfield_Make, Toshiba_Make, + Triax_Make, United_Make, Universum_Make, Vestel_Make, Viewsat_Make, + Viewsonic_Make, Virgin_Make, Vizio_Make, WD_Make, @@ -111,7 +119,9 @@ enum PIRMakeName{ // An object of convenience: #include +#include typedef std::map MakeCollection; +typedef std::map ReverseMakeCollection; class PIRMakeMgr { @@ -121,11 +131,15 @@ public: const char *getMakeString( PIRMakeName n); + PIRMakeName getMakeID( + QString name); + void populateComboBox( QComboBox *cb); private: MakeCollection makes; + ReverseMakeCollection makeIDs; }; #endif // PIRMAKENAMES_H diff --git a/pirpanelmanager.cpp b/pirpanelmanager.cpp index 11e6094..36e61b5 100644 --- a/pirpanelmanager.cpp +++ b/pirpanelmanager.cpp @@ -12,7 +12,7 @@ #include "forms/pirinputform.h" #include "forms/piradjustform.h" #include "forms/pirairconditionerform.h" -#include "forms/pirfavoritesform.h" +#include "forms/piraudiodeviceform.h" #include "mainwindow.h" @@ -38,7 +38,7 @@ PIRPanelManager::PIRPanelManager( inputForm(0), adjustForm(0), acForm(0), - favoritesForm(0), + audioDeviceForm(0), altMainPanelFlag(false), currentTabsName(Universal_Tabs), mainWindow(mw) @@ -83,9 +83,9 @@ PIRPanelManager::PIRPanelManager( shortPanelNames[AC_Panel] = "AC"; longPanelNames[AC_Panel] = "A/C Panel - air conditioner controls"; - shortPanelNames[Favorites_Panel] = "Favorites"; - longPanelNames[Favorites_Panel] = - "Favorites Panel - memorized keysets"; + shortPanelNames[Audio_Panel] = "Audio"; + longPanelNames[Audio_Panel] = + "Audio Device Panel - various audio related buttons"; mainForm = new PIRMainForm(mainWindow); panels[Main_Panel] = mainForm; @@ -123,8 +123,8 @@ PIRPanelManager::PIRPanelManager( acForm = new PIRAirConditionerForm(mainWindow); panels[AC_Panel] = acForm; - favoritesForm = new PIRFavoritesForm(mainWindow); - panels[Favorites_Panel] = favoritesForm; + audioDeviceForm = new PIRAudioDeviceForm(mainWindow); + panels[Audio_Panel] = audioDeviceForm; // Set up the panel collections: PIRPanelNameList pset; @@ -135,17 +135,17 @@ PIRPanelManager::PIRPanelManager( pset.push_back(Keypad_Panel); pset.push_back(Menu_Panel); pset.push_back(Media_Panel); - pset.push_back(Favorites_Panel); + pset.push_back(Input_Panel); tabLists[Universal_Tabs] = pset; // The TV collection: pset.clear(); pset.push_back(Main_Panel); + pset.push_back(Utility_Panel); pset.push_back(Keypad_Panel); pset.push_back(Menu_Panel); pset.push_back(TV_Panel); pset.push_back(Adjust_Panel); - pset.push_back(Favorites_Panel); tabLists[TV_Tabs] = pset; // The video media collection: @@ -155,20 +155,25 @@ PIRPanelManager::PIRPanelManager( pset.push_back(Media_Panel); pset.push_back(Media2_Panel); pset.push_back(Input_Panel); - pset.push_back(Favorites_Panel); tabLists[VideoMedia_Tabs] = pset; + // Audio panel collection: + pset.clear(); + pset.push_back(Main_Panel); + pset.push_back(Keypad_Panel); + pset.push_back(Media_Panel); + pset.push_back(Audio_Panel); + tabLists[Audio_Tabs] = pset; + // The air conditioner collection: pset.clear(); pset.push_back(AC_Panel); - pset.push_back(Favorites_Panel); tabLists[AC_Tabs] = pset; // The recording collection: pset.clear(); pset.push_back(Record_Panel); pset.push_back(Keypad_Panel); - pset.push_back(Favorites_Panel); tabLists[Record_Tabs] = pset; } @@ -246,6 +251,7 @@ void PIRPanelManager::commonEnableButtons( inputForm->enableButtons(keyset, id); adjustForm->enableButtons(keyset, id); acForm->enableButtons(keyset, id); + audioDeviceForm->enableButtons(keyset, id); } @@ -277,31 +283,7 @@ void PIRPanelManager::useAltMainPanel() } -void PIRPanelManager::selectPrevFavKeyset() -{ - favoritesForm->selectPrevFavKeyset(); -} - - -void PIRPanelManager::selectNextFavKeyset() -{ - favoritesForm->selectNextFavKeyset(); -} - - -void PIRPanelManager::addFavoritesItem( - PIRKeysetWidgetItem *item) -{ - favoritesForm->addItem(item); -} - - -QListWidget *PIRPanelManager::getFavoritesListWidget() -{ - return favoritesForm->getFavoritesListWidget(); -} - - +/* void PIRPanelManager::setupUniversalTabs() { if (currentTabsName == Universal_Tabs) return; @@ -345,6 +327,7 @@ void PIRPanelManager::setupRecordTabs() currentTabsName = Record_Tabs; updateTabSet(); } +*/ void PIRPanelManager::setupTabs( diff --git a/pirpanelmanager.h b/pirpanelmanager.h index c7d842d..8c065ed 100644 --- a/pirpanelmanager.h +++ b/pirpanelmanager.h @@ -15,7 +15,7 @@ class PIRTVForm; class PIRInputForm; class PIRAdjustForm; class PIRAirConditionerForm; -class PIRFavoritesForm; +class PIRAudioDeviceForm; class PIRKeysetWidgetItem; class PIRKeysetManager; @@ -56,20 +56,13 @@ public: void useMainPanel(); void useAltMainPanel(); - void selectPrevFavKeyset(); - void selectNextFavKeyset(); - - void addFavoritesItem( - PIRKeysetWidgetItem *item); - - // This is a hack: - QListWidget *getFavoritesListWidget(); - +/* void setupUniversalTabs(); void setupTVTabs(); void setupVideoTabs(); void setupACTabs(); void setupRecordTabs(); +*/ void setupTabs(PIRTabBarName name); private: @@ -89,7 +82,7 @@ private: PIRInputForm *inputForm; PIRAdjustForm *adjustForm; PIRAirConditionerForm *acForm; - PIRFavoritesForm *favoritesForm; + PIRAudioDeviceForm *audioDeviceForm; PIRPanelDisplayNameCollection shortPanelNames; PIRPanelDisplayNameCollection longPanelNames; diff --git a/pirpanelnames.h b/pirpanelnames.h index 44d48dc..19f3eee 100644 --- a/pirpanelnames.h +++ b/pirpanelnames.h @@ -15,7 +15,7 @@ enum PIRPanelName Input_Panel, Adjust_Panel, AC_Panel, - Favorites_Panel, + Audio_Panel, Last_Panel_Marker // Used when traversing this enumeration. }; @@ -25,6 +25,9 @@ enum PIRTabBarName Universal_Tabs, TV_Tabs, VideoMedia_Tabs, +// VideoDisc_Tabs, +// VideoTape_Tabs, + Audio_Tabs, AC_Tabs, Record_Tabs }; diff --git a/pirselectkeysetform.cpp b/pirselectkeysetform.cpp index 39ac645..f4c2cb7 100644 --- a/pirselectkeysetform.cpp +++ b/pirselectkeysetform.cpp @@ -1,15 +1,22 @@ #include "pirselectkeysetform.h" #include "ui_pirselectkeysetform.h" -#include "pirkeysetwidgetitem.h" + //#include +//#include #include +#include "mainwindow.h" +#include "pirkeysetwidgetitem.h" +#include "dialogs/pireditkeysetdialog.h" + extern PIRMakeMgr makeManager; PIRSelectKeysetForm::PIRSelectKeysetForm( - QWidget *parent) - : QWidget(parent), + MainWindow *mw) + : QWidget(mw), // is this right? ui(new Ui::PIRSelectKeysetForm), + mainWindow(mw), + editDialog(0), currentMake(Any_Make) { ui->setupUi(this); @@ -30,7 +37,7 @@ PIRSelectKeysetForm::PIRSelectKeysetForm( connect( ui->keysetListWidget, SIGNAL(itemActivated(QListWidgetItem *)), - parent, + mainWindow, SLOT(keysetSelectionChanged(QListWidgetItem *)), Qt::QueuedConnection); @@ -41,6 +48,17 @@ PIRSelectKeysetForm::PIRSelectKeysetForm( this, SLOT(filterListByMake(int)), Qt::QueuedConnection); + + // Open editor dialog for indivual keysets: + connect( + ui->keysetListWidget, + SIGNAL(itemClicked(QListWidgetItem *)), + this, + SLOT(openKeysetDialog(QListWidgetItem *)), + Qt::QueuedConnection); + + // Go ahead and construct the dialog window right now: + editDialog = new PIREditKeysetDialog(mainWindow); } @@ -151,3 +169,14 @@ void PIRSelectKeysetForm::refilterList() ++index; } } + + +void PIRSelectKeysetForm::openKeysetDialog( + QListWidgetItem *item) +{ + PIRKeysetWidgetItem *kwi = dynamic_cast(item); + + editDialog->setupDialog(kwi); + + editDialog->exec(); +} diff --git a/pirselectkeysetform.h b/pirselectkeysetform.h index bb0ed2b..29e5667 100644 --- a/pirselectkeysetform.h +++ b/pirselectkeysetform.h @@ -7,9 +7,11 @@ #include "pirmakenames.h" class QListWidget; +class QListWidgetItem; class PIRKeysetWidgetItem; class QKeyEvent; -//class PIRSearchStringDialog; +class PIREditKeysetDialog; +class MainWindow; namespace Ui { class PIRSelectKeysetForm; @@ -20,7 +22,11 @@ class PIRSelectKeysetForm : public QWidget Q_OBJECT public: - explicit PIRSelectKeysetForm(QWidget *parent = 0); +// explicit PIRSelectKeysetForm(QWidget *parent = 0); + + PIRSelectKeysetForm( + MainWindow *mw); + ~PIRSelectKeysetForm(); /* @@ -46,6 +52,9 @@ private slots: void filterListByString( QString string); + + void openKeysetDialog( + QListWidgetItem *); void on_searchStringLineEdit_textChanged(const QString &arg1); void on_ssClosePushButton_clicked(); @@ -55,6 +64,9 @@ private: Ui::PIRSelectKeysetForm *ui; + MainWindow *mainWindow; + PIREditKeysetDialog *editDialog; + PIRMakeName currentMake; QString searchString; }; diff --git a/qtc_packaging/debian_fremantle/changelog b/qtc_packaging/debian_fremantle/changelog index f8a8656..2b948ab 100644 --- a/qtc_packaging/debian_fremantle/changelog +++ b/qtc_packaging/debian_fremantle/changelog @@ -1,14 +1,17 @@ pierogi (1.1.6) unstable; urgency=low - * Hey, I'm back! The big change in this update is a move back to real tabbed windows. I've finally figured out how to quickly customize the tab bar. - * First pass at keysets for Cisco, Loewe, Orion, Proview, Strong, Technisat, and Telefunken. - * New keysets added for Panasonic, Sony, Toshiba, and Zenith. + * A big change this time: the move to support true per-keyset editable config data. All favorites data has been moved into the keyset configs, and nicknames have been added. The favorites are now accessed with a pop-up menu. + * A new "audio" panel has been added. + * First pass at keysets for ADB (I-Can), Anitech, Blaupunkt, Lifetec, Medion, Sylvania, Triax, and Viewsonic. + * Many updates to existing keysets, too numerous to mention; mostly to support new audio panel buttons. - -- John Pietrzak Thu, 30 Aug 2012 16:16:21 -0400 + -- John Pietrzak Sun, 02 Sep 2012 20:54:03 -0400 pierogi (1.1.5) unstable; urgency=low - * First pass at keysets for Gadmei, Onkyo. + * Hey, I'm back! The big change in this update is a move back to real tabbed windows. I've finally figured out how to quickly customize the tab bar. + * First pass at keysets for Cisco, Gadmei, Loewe, Onkyo, Orion, Proview, Strong, Technisat, and Telefunken. + * New keysets added for Panasonic, Sony, Toshiba, and Zenith. - -- John Pietrzak Thu, 15 Mar 2012 15:11:11 -0400 + -- John Pietrzak Thu, 30 Aug 2012 16:16:21 -0400 pierogi (1.1.4) unstable; urgency=low * Finally added the ability to search the keyset and device lists using the keyboard. diff --git a/qtc_packaging/debian_fremantle/control b/qtc_packaging/debian_fremantle/control index 21b3a82..01f6427 100644 --- a/qtc_packaging/debian_fremantle/control +++ b/qtc_packaging/debian_fremantle/control @@ -11,8 +11,8 @@ Architecture: armel Depends: ${shlibs:Depends}, ${misc:Depends} Description: Universal Infrared (IR) Remote Control for N900 Pierogi is a Universal Infrared Remote Control app for the Nokia N900. It is independent from the LIRC server, and stores all configuration info internally. -XB-Maemo-Upgrade-Description: Lists now searchable - I've finally set up the keyset and device selection lists to be searchable using the keyboard. Turns out that it was easier than I expected... Also in this update, the ability to select a "default keyset", although you can't do much with it yet. In keysets, a fix to the Digital Stream keyset was made, a new Grundig satellite receiver and Daewoo TV were added, and a new keyset created for Lexuz. +XB-Maemo-Upgrade-Description: New Favorites, Nicknames + With the move to per-keyset editable data, the entire favorites system is revamped, and keyset nicknames have been added. A new "audio" panel has also been created. And, a first pass made at keysets for ADB (I-Can), Anitech, Blaupunkt, Lifetec, Medion, Sylvania, Triax, and Viewsonic. XSBC-Bugtracker: https://garage.maemo.org/tracker/?func=add&group_id=2286&atid=7641 XB-Maemo-Display-Name: Pierogi XB-Maemo-Icon-26: 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 -- 1.7.9.5