--- /dev/null
+#include "piraltmainform.h"
+#include "ui_piraltmainform.h"
+
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+// Ugly global:
+extern PIRMakeMgr makeManager;
+
+
+PIRAltMainForm::PIRAltMainForm(
+ MainWindow *mw)
+ : QWidget(0),
+ ui(new Ui::PIRAltMainForm),
+ mainWindow(mw)
+{
+ ui->setupUi(this);
+}
+
+PIRAltMainForm::~PIRAltMainForm()
+{
+ delete ui;
+}
+
+
+void PIRAltMainForm::enableButtons(
+ const PIRKeysetManager *keyset,
+ unsigned int id)
+{
+ emit powerEnabled(keyset->hasKey(id, Power_Key));
+ emit volumeUpEnabled(keyset->hasKey(id, VolumeUp_Key));
+ emit volumeDownEnabled(keyset->hasKey(id, VolumeDown_Key));
+ emit channelUpEnabled(keyset->hasKey(id, ChannelUp_Key));
+ emit channelDownEnabled(keyset->hasKey(id, ChannelDown_Key));
+ emit muteEnabled(keyset->hasKey(id, Mute_Key));
+
+ emit keysetMakeChanged(makeManager.getMakeString(keyset->getMake(id)));
+ emit keysetNameChanged(keyset->getDisplayName(id));
+}
+
+
+void PIRAltMainForm::on_volumeUpButton_pressed()
+{
+ mainWindow->startRepeating(VolumeUp_Key);
+}
+
+void PIRAltMainForm::on_volumeUpButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRAltMainForm::on_volumeDownButton_pressed()
+{
+ mainWindow->startRepeating(VolumeDown_Key);
+}
+
+void PIRAltMainForm::on_volumeDownButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRAltMainForm::on_muteButton_pressed()
+{
+ mainWindow->startRepeating(Mute_Key);
+}
+
+void PIRAltMainForm::on_muteButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRAltMainForm::on_powerButton_pressed()
+{
+ mainWindow->startRepeating(Power_Key);
+}
+
+void PIRAltMainForm::on_powerButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRAltMainForm::on_channelUpButton_pressed()
+{
+ mainWindow->startRepeating(ChannelUp_Key);
+}
+
+void PIRAltMainForm::on_channelUpButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRAltMainForm::on_channelDownButton_pressed()
+{
+ mainWindow->startRepeating(ChannelDown_Key);
+}
+
+void PIRAltMainForm::on_channelDownButton_released()
+{
+ mainWindow->stopRepeating();
+}
--- /dev/null
+#ifndef PIRALTMAINFORM_H
+#define PIRALTMAINFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+class PIRKeysetManager;
+
+namespace Ui {
+class PIRAltMainForm;
+}
+
+class PIRAltMainForm : public QWidget
+{
+ Q_OBJECT
+
+public:
+// explicit PIRAltMainForm(QWidget *parent = 0);
+ PIRAltMainForm(
+ MainWindow *mw);
+
+ ~PIRAltMainForm();
+
+ void enableButtons(
+ const PIRKeysetManager *keyset,
+ unsigned int id);
+
+signals:
+ void powerEnabled(bool);
+ void volumeUpEnabled(bool);
+ void volumeDownEnabled(bool);
+ void channelUpEnabled(bool);
+ void channelDownEnabled(bool);
+ void muteEnabled(bool);
+
+ void keysetMakeChanged(QString);
+ void keysetNameChanged(QString);
+
+private slots:
+ void on_volumeUpButton_pressed();
+ void on_volumeUpButton_released();
+ void on_volumeDownButton_pressed();
+ void on_volumeDownButton_released();
+ void on_muteButton_pressed();
+ void on_muteButton_released();
+ void on_powerButton_pressed();
+ void on_powerButton_released();
+ void on_channelUpButton_pressed();
+ void on_channelUpButton_released();
+ void on_channelDownButton_pressed();
+ void on_channelDownButton_released();
+
+private:
+ Ui::PIRAltMainForm *ui;
+
+ MainWindow *mainWindow;
+};
+
+#endif // PIRALTMAINFORM_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRAltMainForm</class>
+ <widget class="QWidget" name="PIRAltMainForm">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QPushButton" name="volumeUpButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text">
+ <string>Volume Up</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../PierogiResources.qrc">
+ <normaloff>:/icons/sound_high_icon&48.png</normaloff>:/icons/sound_high_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" rowspan="2">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>-1</number>
+ </property>
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="powerButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text">
+ <string>Power</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../PierogiResources.qrc">
+ <normaloff>:/icons/on-off_icon&48.png</normaloff>:/icons/on-off_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="makeLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Keyset Make</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="nameLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Keyset Name</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="muteButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Mute</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../PierogiResources.qrc">
+ <normaloff>:/icons/sound_mute_icon&48.png</normaloff>:/icons/sound_mute_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="2">
+ <widget class="QPushButton" name="channelUpButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Channel Up</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../PierogiResources.qrc">
+ <normaloff>:/icons/br_up_icon&48.png</normaloff>:/icons/br_up_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QPushButton" name="volumeDownButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Volume Down</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../PierogiResources.qrc">
+ <normaloff>:/icons/sound_low_icon&48.png</normaloff>:/icons/sound_low_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QPushButton" name="channelDownButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Channel Down</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../PierogiResources.qrc">
+ <normaloff>:/icons/br_down_icon&48.png</normaloff>:/icons/br_down_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="../PierogiResources.qrc"/>
+ </resources>
+ <connections>
+ <connection>
+ <sender>PIRAltMainForm</sender>
+ <signal>volumeUpEnabled(bool)</signal>
+ <receiver>volumeUpButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>137</x>
+ <y>125</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRAltMainForm</sender>
+ <signal>volumeDownEnabled(bool)</signal>
+ <receiver>volumeDownButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>137</x>
+ <y>358</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRAltMainForm</sender>
+ <signal>channelUpEnabled(bool)</signal>
+ <receiver>channelUpButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>661</x>
+ <y>125</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRAltMainForm</sender>
+ <signal>channelDownEnabled(bool)</signal>
+ <receiver>channelDownButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>661</x>
+ <y>358</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRAltMainForm</sender>
+ <signal>muteEnabled(bool)</signal>
+ <receiver>muteButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>399</x>
+ <y>381</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRAltMainForm</sender>
+ <signal>powerEnabled(bool)</signal>
+ <receiver>powerButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>399</x>
+ <y>98</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRAltMainForm</sender>
+ <signal>keysetMakeChanged(QString)</signal>
+ <receiver>makeLabel</receiver>
+ <slot>setText(QString)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>399</x>
+ <y>224</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRAltMainForm</sender>
+ <signal>keysetNameChanged(QString)</signal>
+ <receiver>nameLabel</receiver>
+ <slot>setText(QString)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>399</x>
+ <y>250</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+ <slots>
+ <signal>volumeUpEnabled(bool)</signal>
+ <signal>volumeDownEnabled(bool)</signal>
+ <signal>muteEnabled(bool)</signal>
+ <signal>powerEnabled(bool)</signal>
+ <signal>channelUpEnabled(bool)</signal>
+ <signal>channelDownEnabled(bool)</signal>
+ <signal>keysetMakeChanged(QString)</signal>
+ <signal>keysetNameChanged(QString)</signal>
+ </slots>
+</ui>
--- /dev/null
+#include "benq.h"
+#include "protocols/necprotocol.h"
+
+
+BenQTV1::BenQTV1(
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "TV Keyset 1",
+ BenQ_Make,
+ index)
+{
+}
+
+
+void BenQTV1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
+
+ setPreData(0x60, 8);
+
+ addKey("power", Power_Key, 0x00, 8);
+ addKey("input", Input_Key, 0x45, 8);
+ addKey("backlight", Unmapped_Key, 0x54, 8);
+ addKey("information", Info_Key, 0x52, 8);
+ addKey("sleeptimer", Sleep_Key, 0x58, 8);
+ addKey("sound", SoundMode_Key, 0x59, 8);
+ addKey("usersituation", Unmapped_Key, 0x55, 8);
+ addKey("audiomode", Audio_Key, 0x53, 8);
+ addKey("teletext_display", TeletextAndTV_Key, 0x4F, 8);
+ addKey("tt_index", TeletextIndex_Key, 0x4C, 8);
+ addKey("tt_info", Unmapped_Key, 0x4E, 8);
+ addKey("tt_subpage", TeletextReveal_Key, 0x4D, 8);
+ addKey("teletext", Teletext_Key, 0x12, 8);
+ addKey("PIP", PIP_Key, 0x10, 8);
+ addKey("up", Up_Key, 0x44, 8);
+ addKey("down", Down_Key, 0x1D, 8);
+ addKey("left", Left_Key, 0x1C, 8);
+ addKey("right", Right_Key, 0x48, 8);
+ addKey("OK", Select_Key, 0x51, 8);
+ addKey("freeze", Pause_Key, 0x11, 8);
+ addKey("aspectratio", AspectRatio_Key, 0x13, 8);
+ addKey("vol+", VolumeUp_Key, 0x19, 8);
+ addKey("vol-", VolumeDown_Key, 0x15, 8);
+ addKey("chan+", ChannelUp_Key, 0x5C, 8);
+ addKey("chan-", ChannelDown_Key, 0x14, 8);
+ addKey("menu", Menu_Key, 0x43, 8);
+ addKey("mute", Mute_Key, 0x42, 8);
+ addKey("zap", Unmapped_Key, 0x0F, 8);
+ addKey("dualdigit", DoubleDigit_Key, 0x0D, 8);
+ addKey("1", One_Key, 0x04, 8);
+ addKey("2", Two_Key, 0x05, 8);
+ addKey("3", Three_Key, 0x5F, 8);
+ addKey("4", Four_Key, 0x07, 8);
+ addKey("5", Five_Key, 0x08, 8);
+ addKey("6", Six_Key, 0x09, 8);
+ addKey("7", Seven_Key, 0x0A, 8);
+ addKey("8", Eight_Key, 0x0B, 8);
+ addKey("9", Nine_Key, 0x0C, 8);
+ addKey("0", Zero_Key, 0x03, 8);
+}
--- /dev/null
+#ifndef BENQ_H
+#define BENQ_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class BenQTV1: public PIRKeysetMetaData
+{
+public:
+ BenQTV1(
+ unsigned int index);
+
+ virtual void populateProtocol(
+ QObject *guiObject);
+};
+
+#endif // BENQ_H
Denon_Make,
index)
{
- addControlledDevice(Denon_Make, "dvd-1000", DVD_Device);
+ addControlledDevice(Denon_Make, "DVD-1000", DVD_Device);
}
Denon_Make,
index)
{
- addControlledDevice(Denon_Make, "avr-1708", Audio_Device);
+ addControlledDevice(Denon_Make, "AVR-1708", Audio_Device);
}
{
setKeysetName("Receiver Keyset 1b");
- addControlledDevice(Denon_Make, "avr-3300", Audio_Device);
+ addControlledDevice(Denon_Make, "AVR-3300", Audio_Device);
}
#include "directv.h"
-#include "protocols/directvprotocol.h"
// Note: volume keys are tricky!
return;
}
- threadableProtocol = new DirectvProtocol(guiObject, index, LowFreq, true);
+ dtvPopulateProtocol(guiObject, LongGap_Directv, LowFreq_Directv);
+}
+
+
+void DirectvReceiver1::dtvPopulateProtocol(
+ QObject *guiObject,
+ DirectvGapSize gap,
+ DirectvFreq freq)
+{
+ DirectvProtocol *dp = new DirectvProtocol(guiObject, index);
+
+ threadableProtocol = dp;
+
+ dp->setProtocolParms(gap, freq);
setPreData(0xC, 4);
addKey("On", PowerOn_Key, 0x80, 8);
addKey("Off", PowerOff_Key, 0x81, 8);
}
+
+
+DirectvReceiver1a::DirectvReceiver1a(
+ unsigned int index)
+ : DirectvReceiver1(index)
+{
+ setKeysetName("Sat Keyset 1a");
+}
+
+
+void DirectvReceiver1a::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ dtvPopulateProtocol(guiObject, ShortGap_Directv, LowFreq_Directv);
+}
+
+
+DirectvReceiver1b::DirectvReceiver1b(
+ unsigned int index)
+ : DirectvReceiver1(index)
+{
+ setKeysetName("Sat Keyset 1b");
+}
+
+
+void DirectvReceiver1b::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ dtvPopulateProtocol(guiObject, ShortGap_Directv, MediumFreq_Directv);
+}
+
+
+DirectvReceiver1c::DirectvReceiver1c(
+ unsigned int index)
+ : DirectvReceiver1(index)
+{
+ setKeysetName("Sat Keyset 1c");
+}
+
+
+void DirectvReceiver1c::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ dtvPopulateProtocol(guiObject, LongGap_Directv, MediumFreq_Directv);
+}
+
+
+DirectvReceiver1d::DirectvReceiver1d(
+ unsigned int index)
+ : DirectvReceiver1(index)
+{
+ setKeysetName("Sat Keyset 1d");
+}
+
+
+void DirectvReceiver1d::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ dtvPopulateProtocol(guiObject, ShortGap_Directv, HighFreq_Directv);
+}
+
+
+DirectvReceiver1e::DirectvReceiver1e(
+ unsigned int index)
+ : DirectvReceiver1(index)
+{
+ setKeysetName("Sat Keyset 1e");
+}
+
+
+void DirectvReceiver1e::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ dtvPopulateProtocol(guiObject, LongGap_Directv, HighFreq_Directv);
+}
#define DIRECTV_H
#include "pirkeysetmetadata.h"
+#include "protocols/directvprotocol.h"
class QObject;
virtual void populateProtocol(
QObject *guiObject);
+
+protected:
+ void dtvPopulateProtocol(
+ QObject *guiObject,
+ DirectvGapSize gap,
+ DirectvFreq freq);
+};
+
+class DirectvReceiver1a: public DirectvReceiver1
+{
+public:
+ DirectvReceiver1a(
+ unsigned int index);
+
+ virtual void populateProtocol(
+ QObject *guiObject);
+};
+
+class DirectvReceiver1b: public DirectvReceiver1
+{
+public:
+ DirectvReceiver1b(
+ unsigned int index);
+
+ virtual void populateProtocol(
+ QObject *guiObject);
+};
+
+class DirectvReceiver1c: public DirectvReceiver1
+{
+public:
+ DirectvReceiver1c(
+ unsigned int index);
+
+ virtual void populateProtocol(
+ QObject *guiObject);
+};
+
+class DirectvReceiver1d: public DirectvReceiver1
+{
+public:
+ DirectvReceiver1d(
+ unsigned int index);
+
+ virtual void populateProtocol(
+ QObject *guiObject);
+};
+
+class DirectvReceiver1e: public DirectvReceiver1
+{
+public:
+ DirectvReceiver1e(
+ unsigned int index);
+
+ virtual void populateProtocol(
+ QObject *guiObject);
};
#endif // DIRECTV_H
JVC_Make,
index)
{
+ addControlledDevice(JVC_Make, "JVC XV-N5SL", DVD_Device);
}
{
setKeysetName("TV Keyset 1c");
- addControlledDevice(LG_Make, "55lw9500", TV_Device);
- addControlledDevice(LG_Make, "60px950", TV_Device);
- addControlledDevice(LG_Make, "60pg60", TV_Device);
+ addControlledDevice(LG_Make, "55LW9500", TV_Device);
+ addControlledDevice(LG_Make, "60PX950", TV_Device);
+ addControlledDevice(LG_Make, "60PG60", TV_Device);
}
--- /dev/null
+#include "octagon.h"
+#include "protocols/necprotocol.h"
+
+
+OctagonSat1::OctagonSat1(
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Sat Keyset 1",
+ Octagon_Make,
+ index)
+{
+}
+
+
+void OctagonSat1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+ setPreData(0xF902, 16);
+
+ addKey("up arrow", Up_Key, 0x00, 8);
+ addKey("down arrow", Down_Key, 0x01, 8);
+ addKey("right arrow", Right_Key, 0x02, 8);
+ addKey("left arrow", Left_Key, 0x03, 8);
+ addKey("menu", Menu_Key, 0x04, 8);
+ addKey("info", Info_Key, 0x06, 8); // "display"
+ addKey("pause", Pause_Key, 0x07, 8);
+ addKey("guide", Guide_Key, 0x08, 8);
+ addKey("last (prev ch)", PrevChannel_Key, 0x09, 8);
+ addKey("power", Power_Key, 0x0A, 8);
+ addKey("subtitle", Captions_Key, 0x0B, 8);
+ addKey("mute", Mute_Key, 0x0C, 8);
+ addKey("teletext", Teletext_Key, 0x0D, 8);
+ addKey("v format", Unmapped_Key, 0x0E, 8);
+ addKey("resolution", Unmapped_Key, 0x0F, 8);
+ addKey("0", Zero_Key, 0x10, 8);
+ addKey("1", One_Key, 0x11, 8);
+ addKey("2", Two_Key, 0x12, 8);
+ addKey("3", Three_Key, 0x13, 8);
+ addKey("4", Four_Key, 0x14, 8);
+ addKey("5", Five_Key, 0x15, 8);
+ addKey("6", Six_Key, 0x16, 8);
+ addKey("7", Seven_Key, 0x17, 8);
+ addKey("8", Eight_Key, 0x18, 8);
+ addKey("9", Nine_Key, 0x19, 8);
+ addKey("tv/radio", Input_Key, 0x1A, 8);
+ addKey("exit", Exit_Key, 0x1C, 8);
+ addKey("sleep", Sleep_Key, 0x1E, 8);
+ addKey("select", Select_Key, 0x1F, 8);
+ addKey("playlist", Unmapped_Key, 0x40, 8);
+ addKey("fav", Favorites_Key, 0x41, 8);
+ addKey("pg dn", PageDown_Key, 0x43, 8);
+ addKey("pg up", PageUp_Key, 0x44, 8);
+ addKey("blue", Blue_Key, 0x48, 8);
+ addKey("yellow", Yellow_Key, 0x49, 8);
+ addKey("green", Green_Key, 0x4A, 8);
+ addKey("red", Red_Key, 0x4B, 8);
+ addKey("next", Next_Key, 0x4C, 8);
+ addKey("vol up", VolumeUp_Key, 0x4E, 8);
+ addKey("vol down", VolumeDown_Key, 0x4F, 8);
+ addKey("prev", Previous_Key, 0x50, 8);
+ addKey("pip", PIP_Key, 0x51, 8);
+ addKey("pip swap", PIPSwap_Key, 0x52, 8);
+ addKey("pip list", Unmapped_Key, 0x53, 8);
+ addKey("stop", Stop_Key, 0x54, 8);
+ addKey("play", Play_Key, 0x55, 8);
+ addKey("record", Record_Key, 0x56, 8);
+ addKey("rewind", Rewind_Key, 0x58, 8);
+ addKey("fast fwd", FastForward_Key, 0x5C, 8);
+ addKey("channel up", ChannelUp_Key, 0x5E, 8);
+ addKey("channel down", ChannelDown_Key, 0x5F, 8);
+}
+
+
+OctagonSat1a::OctagonSat1a(
+ unsigned int index)
+ : OctagonSat1(index)
+{
+ setKeysetName("Sat Keyset 1a");
+}
+
+
+void OctagonSat1a::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ OctagonSat1::populateProtocol(guiObject);
+
+ addKey("channel up", ChannelUp_Key, 0x00, 8);
+ addKey("channel down", ChannelDown_Key, 0x01, 8);
+}
+
+
+OctagonSat2::OctagonSat2(
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Sat Keyset 2",
+ Octagon_Make,
+ index)
+{
+}
+
+
+void OctagonSat2::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+ setPreData(0x7004, 16);
+
+ addKey("yellow", Yellow_Key, 0x00, 8);
+ addKey("uhf", Unmapped_Key, 0x01, 8);
+ addKey("favourite", Favorites_Key, 0x02, 8);
+ addKey("rewind", Rewind_Key, 0x03, 8);
+ addKey("fast fwd", FastForward_Key, 0x04, 8);
+ addKey("X+", Unmapped_Key, 0x08, 8);
+ addKey("red", Red_Key, 0x09, 8);
+ addKey("blue", Blue_Key, 0x0C, 8);
+ addKey("green", Green_Key, 0x0D, 8);
+ addKey("record", Record_Key, 0x10, 8);
+ addKey("play", Play_Key, 0x11, 8);
+ addKey("stop", Stop_Key, 0x12, 8);
+ addKey("pause", Pause_Key, 0x13, 8);
+ addKey("display", Info_Key, 0x14, 8);
+ addKey("tv/radio", Unmapped_Key, 0x15, 8);
+ addKey("last (prev ch)", PrevChannel_Key, 0x16, 8);
+ addKey("freeze", Unmapped_Key, 0x17, 8);
+ addKey("channel up", ChannelUp_Key, 0x18, 8);
+ addKey("up arrow", Up_Key, 0x18, 8);
+ addKey("program guide", Guide_Key, 0x1A, 8);
+ addKey("0", Zero_Key, 0x1B, 8);
+ addKey("menu", Menu_Key, 0x1C, 8);
+ addKey("sat", SatInput_Key, 0x1D, 8);
+ addKey("motor", Unmapped_Key, 0x1E, 8);
+ addKey("opt+", Unmapped_Key, 0x1F, 8);
+ addKey("finetune", Unmapped_Key, 0x20, 8);
+ addKey("sleep", Sleep_Key, 0x21, 8);
+ addKey("colour", Unmapped_Key, 0x22, 8);
+ addKey("save", Unmapped_Key, 0x23, 8);
+ addKey("left arrow", Left_Key, 0x41, 8);
+ addKey("HD", Unmapped_Key, 0x42, 8);
+ addKey("select", Select_Key, 0x45, 8);
+ addKey("channel down", ChannelDown_Key, 0x46, 8);
+ addKey("down arrow", Down_Key, 0x46, 8);
+ addKey("right arrow", Right_Key, 0x49, 8);
+ addKey("exit", Exit_Key, 0x4A, 8);
+ addKey("7", Seven_Key, 0x54, 8);
+ addKey("4", Four_Key, 0x55, 8);
+ addKey("1", One_Key, 0x56, 8);
+ addKey("tv/sat", Input_Key, 0x57, 8);
+ addKey("8", Eight_Key, 0x58, 8);
+ addKey("5", Five_Key, 0x59, 8);
+ addKey("2", Two_Key, 0x5A, 8);
+ addKey("av+", Unmapped_Key, 0x5B, 8);
+ addKey("9", Nine_Key, 0x5C, 8);
+ addKey("6", Six_Key, 0x5D, 8);
+ addKey("3", Three_Key, 0x5E, 8);
+ addKey("power", Power_Key, 0x5F, 8);
+}
--- /dev/null
+#ifndef OCTAGON_H
+#define OCTAGON_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class OctagonSat1: public PIRKeysetMetaData
+{
+public:
+ OctagonSat1(
+ unsigned int index);
+
+ virtual void populateProtocol(
+ QObject *guiObject);
+};
+
+class OctagonSat1a: public OctagonSat1
+{
+public:
+ OctagonSat1a(
+ unsigned int index);
+
+ virtual void populateProtocol(
+ QObject *guiObject);
+};
+
+class OctagonSat2: public PIRKeysetMetaData
+{
+public:
+ OctagonSat2(
+ unsigned int index);
+
+ virtual void populateProtocol(
+ QObject *guiObject);
+};
+
+#endif // OCTAGON_H
setPreData(0x6681, 16);
addKey("Operation", Power_Key, 0x81, 8);
+ addKey("Economy", EnergySave_Key, 0x82, 8);
addKey("Air Swing", Oscillate_Key, 0x83, 8);
addKey("Temp Up", TempUp_Key, 0x85, 8);
addKey("Temp Down", TempDown_Key, 0x8A, 8);
- addKey("Economy", EnergySave_Key, 0x8D, 8);
- addKey("Timer", Timer_Key, 0x90, 8);
addKey("Fan Speed", FanFaster_Key, 0x99, 8);
addKey("Mode", Mode_Key, 0x9B, 8);
+ addKey("Timer", Timer_Key, 0x9F, 8);
}
{
setKeysetName("DVD Keyset 1d");
- addControlledDevice(Philips_Make, "DVD 963sa", DVD_Device);
+ addControlledDevice(Philips_Make, "DVD 963SA", DVD_Device);
}
threadableProtocol = new RC5Protocol(guiObject, index);
- addKey("INFO", Info_Key, 0x128F, 13); // "pilot"
+ addKey("SOUNDOFF", Mute_Key, 0x0286, 13); // "mute"
addKey("EPG", Guide_Key, 0x028F, 13); // "prog"
addKey("UP", Up_Key, 0x0290, 13);
addKey("DOWN", Down_Key, 0x0291, 13);
+ addKey("SERV", Unmapped_Key, 0x0292, 13);
+ addKey("BACK", Unmapped_Key, 0x0293, 13); // "av"
addKey("LEFT", Left_Key, 0x0295, 13);
addKey("RIGHT", Right_Key, 0x0296, 13);
addKey("OK", Select_Key, 0x0297, 13);
+ addKey("FRONT", Unmapped_Key, 0x02A1, 13); // "twoje"
+ addKey("MENU", Menu_Key, 0x02AA, 13); // "perso"
+ addKey("A", Unmapped_Key, 0x02AB, 13);
+ addKey("B", Unmapped_Key, 0x02AC, 13);
+ addKey("C", Unmapped_Key, 0x02AD, 13);
+ addKey("D", Unmapped_Key, 0x02AE, 13);
+ addKey("E", Unmapped_Key, 0x02AF, 13);
+
+ addKey("0", Zero_Key, 0x1280, 13);
addKey("1", One_Key, 0x1281, 13);
addKey("2", Two_Key, 0x1282, 13);
addKey("3", Three_Key, 0x1283, 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("FRONT", Unmapped_Key, 0x02A1, 13); // "twoje"
- addKey("BACK", Unmapped_Key, 0x0293, 13); // "av"
- addKey("SERV", Unmapped_Key, 0x0292, 13);
- addKey("+", Unmapped_Key, 0x12AF, 13);
- addKey("MENU", Menu_Key, 0x02AA, 13); // "perso"
- addKey("A", Unmapped_Key, 0x02AB, 13);
- addKey("B", Unmapped_Key, 0x02AC, 13);
- addKey("C", Unmapped_Key, 0x02AD, 13);
- addKey("D", Unmapped_Key, 0x02AE, 13);
- addKey("E", Unmapped_Key, 0x02AF, 13);
- addKey("SOUNDOFF", Mute_Key, 0x0286, 13); // "mute"
- addKey("TV/SAT", Input_Key, 0x12A8, 13);
addKey("STANDBY", Power_Key, 0x128C, 13);
+ addKey("INFO", Info_Key, 0x128F, 13); // "pilot"
+ addKey("TV/SAT", Input_Key, 0x12A8, 13);
+ addKey("+", Unmapped_Key, 0x12AF, 13);
}
addControlledDevice(Samsung_Make, "SyncMaster 225MW", TV_Device);
addControlledDevice(Samsung_Make, "LN32C530F1FXZA", TV_Device);
addControlledDevice(Samsung_Make, "UE46B6000VPXZG", TV_Device); // ?
+ addControlledDevice(Samsung_Make, "LE22B470C9M", TV_Device);
}
--- /dev/null
+#include "xcruiser.h"
+#include "protocols/necprotocol.h"
+
+
+XcruiserSat1::XcruiserSat1(
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Sat Keyset 1",
+ Xcruiser_Make,
+ index)
+{
+}
+
+
+void XcruiserSat1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
+
+ setPreData(0x08, 8);
+
+ addKey("0", Zero_Key, 0x00, 8);
+ addKey("1", One_Key, 0x01, 8);
+ addKey("2", Two_Key, 0x02, 8);
+ addKey("3", Three_Key, 0x03, 8);
+ addKey("4", Four_Key, 0x04, 8);
+ addKey("5", Five_Key, 0x05, 8);
+ addKey("6", Six_Key, 0x06, 8);
+ addKey("7", Seven_Key, 0x07, 8);
+ addKey("8", Eight_Key, 0x08, 8);
+ addKey("9", Nine_Key, 0x09, 8);
+ addKey("PowerToggle", Power_Key, 0x0A, 8);
+ addKey("Mute", Mute_Key, 0x0B, 8);
+ addKey("TvRadio", Input_Key, 0x0C, 8);
+ addKey("ChannelPrev", PrevChannel_Key, 0x0D, 8);
+ addKey("Menu", Menu_Key, 0x0E, 8);
+ addKey("Advance", Advance_Key, 0x0F, 8);
+ addKey("Info", Info_Key, 0x10, 8);
+ addKey("ChannelUp", ChannelUp_Key, 0x11, 8);
+ addKey("DirectionUp", Up_Key, 0x11, 8);
+ addKey("ChannelDown", ChannelDown_Key, 0x12, 8);
+ addKey("DirectionDown", Down_Key, 0x12, 8);
+ addKey("VolumeDown", VolumeDown_Key, 0x13, 8);
+ addKey("DirectionLeft", Left_Key, 0x13, 8);
+ addKey("VolumeUp", VolumeUp_Key, 0x14, 8);
+ addKey("DirectionRight", Right_Key, 0x14, 8);
+ addKey("Select/Ok", Select_Key, 0x15, 8);
+ addKey("Exit", Exit_Key, 0x16, 8);
+ addKey("Replay", Replay_Key, 0x17, 8);
+ addKey("Guide", Guide_Key, 0x18, 8);
+ addKey("Pause", Pause_Key, 0x19, 8);
+ addKey("LRAudio", Surround_Key, 0x1A, 8);
+ addKey("AltAudio", Audio_Key, 0x1B, 8);
+ addKey("Text", Teletext_Key, 0x1C, 8);
+ addKey("Favourite", Favorites_Key, 0x20, 8);
+ addKey("Rewind", Rewind_Key, 0x22, 8);
+ addKey("Play", Play_Key, 0x23, 8);
+ addKey("FastForward", FastForward_Key, 0x24, 8);
+ addKey("Stop", Stop_Key, 0x26, 8);
+ addKey("Record", Record_Key, 0x27, 8);
+}
--- /dev/null
+#ifndef XCRUISER_H
+#define XCRUISER_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class XcruiserSat1: public PIRKeysetMetaData
+{
+public:
+ XcruiserSat1(
+ unsigned int index);
+
+ virtual void populateProtocol(
+ QObject *guiObject);
+};
+
+#endif // XCRUISER_H
#include "pirselectkeysetform.h"
#include "pirselectdeviceform.h"
#include "pirpanelselectionform.h"
+#include "pirpreferencesform.h"
#include "pirdocumentationform.h"
#include "piraboutform.h"
#include "pirkeysetmanager.h"
selectKeysetForm(0),
selectDeviceForm(0),
panelSelectionForm(0),
+ preferencesForm(0),
documentationForm(0),
aboutForm(0),
currentKeyset(0)
// Set up the panel selection window:
panelSelectionForm = new PIRPanelSelectionForm(this);
+ myPanels->setupPanels(panelSelectionForm);
-// myPanels->setupPanels(panelSelectionForm);
+ // Set up the preferences window:
+ preferencesForm = new PIRPreferencesForm(this);
// Remember any favorites the user has already set:
populateFavorites();
- // Retrieve the user's most recent keyset (if any):
+ // Retrieve the user's preferences:
QSettings settings("pietrzak.org", "Pierogi");
if (settings.contains("currentKeysetName"))
{
settings.value("currentKeysetMake").toString(),
settings.value("currentKeysetName").toString(),
currentKeyset);
-// currentKeyset = settings.value("currentKeyset").toInt();
}
enableButtons();
}
+void MainWindow::useMainPanel()
+{
+ myPanels->useMainPanel();
+}
+
+
+void MainWindow::useAltMainPanel()
+{
+ myPanels->useAltMainPanel();
+}
+
+
void MainWindow::receivedExternalWarning(
const char *warning)
{
panelSelectionForm->show();
}
+void MainWindow::on_actionPreferences_triggered()
+{
+ preferencesForm->show();
+}
+
void MainWindow::on_actionAbout_triggered()
{
if (!aboutForm)
}
+void MainWindow::selectPanel(
+ int index)
+{
+ ui->selectPanelComboBox->setCurrentIndex(index);
+}
+
+
void MainWindow::managePanel(
PIRPanelName name,
int state)
QWidget *panel,
const QString &displayName)
{
- ui->stackedButtonsWidget->insertWidget(index, panel);
ui->selectPanelComboBox->insertItem(index, displayName);
+ ui->stackedButtonsWidget->insertWidget(index, panel);
}
class PIRSelectKeysetForm;
class PIRSelectDeviceForm;
class PIRPanelSelectionForm;
+class PIRPreferencesForm;
class PIRDocumentationForm;
class PIRAboutForm;
class PIRKeysetManager;
void stopRepeating();
+ void selectPanel(
+ int index);
+
void managePanel(
PIRPanelName name,
int state);
void enableButtons();
+ // Preferences actions:
+ void useMainPanel();
+ void useAltMainPanel();
+
signals:
void buttonPressed(
unsigned int keysetID,
void on_actionSelectKeyset_triggered();
void on_actionSelect_Device_By_Name_triggered();
void on_actionArrange_Button_Panels_triggered();
+ void on_actionPreferences_triggered();
void on_actionAbout_triggered();
void on_actionDocumentation_triggered();
PIRSelectKeysetForm *selectKeysetForm;
PIRSelectDeviceForm *selectDeviceForm;
PIRPanelSelectionForm *panelSelectionForm;
+ PIRPreferencesForm *preferencesForm;
PIRDocumentationForm *documentationForm;
PIRAboutForm *aboutForm;
<addaction name="actionSelectKeyset"/>
<addaction name="actionSelect_Device_By_Name"/>
<addaction name="actionArrange_Button_Panels"/>
+ <addaction name="actionPreferences"/>
<addaction name="actionDocumentation"/>
<addaction name="actionAbout"/>
</widget>
<string>Manage Panels</string>
</property>
</action>
+ <action name="actionPreferences">
+ <property name="text">
+ <string>Preferences</string>
+ </property>
+ </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
keysets/magnum.cpp \
keysets/telenet.cpp \
keysets/thomson.cpp \
- keysets/genius.cpp
+ keysets/genius.cpp \
+ forms/piraltmainform.cpp \
+ pirpreferencesform.cpp \
+ keysets/xcruiser.cpp \
+ keysets/benq.cpp \
+ keysets/octagon.cpp
HEADERS += mainwindow.h \
pirkeynames.h \
pirmakenames.h \
keysets/magnum.h \
keysets/telenet.h \
keysets/thomson.h \
- keysets/genius.h
+ keysets/genius.h \
+ forms/piraltmainform.h \
+ pirpreferencesform.h \
+ keysets/xcruiser.h \
+ keysets/benq.h \
+ keysets/octagon.h
FORMS += mainwindow.ui \
pirdocumentationform.ui \
piraboutform.ui \
forms/pirmediaform.ui \
forms/pirfavoritesform.ui \
pirpanelselectionform.ui \
- forms/pirrecordform.ui
+ forms/pirrecordform.ui \
+ forms/piraltmainform.ui \
+ pirpreferencesform.ui
# Please do not modify the following two lines. Required for deployment.
include(deployment.pri)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.1, 2012-03-04T19:04:14. -->
+<!-- Written by Qt Creator 2.4.1, 2012-03-08T16:47:49. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="QString" key="ProjectExplorer.ProcessStep.Arguments">dpkg-buildpackage -sa -S -uc -us</value>
<value type="QString" key="ProjectExplorer.ProcessStep.Command">/Users/john/QtSDK/Maemo/4.6.2/bin/mad</value>
<value type="bool" key="ProjectExplorer.ProcessStep.Enabled">false</value>
- <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-1.1.1</value>
+ <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-1.1.2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.ProcessStep</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_4_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_0_0_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_1_armel.deb</value>
+ <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_3_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_1_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_3_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_7_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_3_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_5_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_0_armel.deb</value>
+ <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_2_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_0_1_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_0_armel.deb</value>
<value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_2_armel.deb</value>
<value type="QString">192.168.0.15</value>
<value type="QString">192.168.0.15</value>
<value type="QString">192.168.0.15</value>
+ <value type="QString">192.168.0.15</value>
+ <value type="QString">192.168.0.15</value>
<value type="QString">localhost</value>
<value type="QString">192.168.0.15</value>
<value type="QString">192.168.0.15</value>
<value type="QString"></value>
<value type="QString"></value>
<value type="QString"></value>
+ <value type="QString"></value>
+ <value type="QString"></value>
</valuelist>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes">
<value type="QDateTime">2012-01-19T22:18:07</value>
<value type="QDateTime">2012-02-29T10:48:05</value>
<value type="QDateTime">2012-02-06T17:22:16</value>
+ <value type="QDateTime">2012-03-08T15:45:17</value>
<value type="QDateTime">2012-02-12T23:10:44</value>
<value type="QDateTime">2012-02-09T18:12:21</value>
<value type="QDateTime">2012-02-19T10:29:22</value>
<value type="QDateTime">2012-01-17T13:21:05</value>
<value type="QDateTime">2012-01-23T09:47:37</value>
<value type="QDateTime">2012-02-03T10:04:34</value>
+ <value type="QDateTime">2012-03-04T19:56:48</value>
<value type="QDateTime">2012-01-01T15:35:35</value>
<value type="QDateTime">2012-02-11T18:03:15</value>
<value type="QDateTime">2012-02-08T20:29:28</value>
#include "keysets/apple.h"
#include "keysets/arcam.h"
#include "keysets/beko.h"
+#include "keysets/benq.h"
#include "keysets/bose.h"
#include "keysets/bush.h"
#include "keysets/cambridge.h"
#include "keysets/motorola.h"
#include "keysets/nad.h"
#include "keysets/nokia.h"
+#include "keysets/octagon.h"
#include "keysets/onida.h"
#include "keysets/panasonic.h"
#include "keysets/philco.h"
#include "keysets/vizio.h"
#include "keysets/wd.h"
#include "keysets/westinghouse.h"
+#include "keysets/xcruiser.h"
#include "keysets/yamaha.h"
#include "keysets/zenith.h"
setupKeyset(new BekoTV1(counter++));
+ setupKeyset(new BenQTV1(counter++));
+
setupKeyset(new BoseRadio1(counter++));
setupKeyset(new BoseRadio2(counter++));
setupKeyset(new BoseRadio3(counter++));
setupKeyset(new DigitalStreamReceiver(counter++));
setupKeyset(new DirectvReceiver1(counter++));
+ setupKeyset(new DirectvReceiver1a(counter++));
+ setupKeyset(new DirectvReceiver1b(counter++));
+ setupKeyset(new DirectvReceiver1c(counter++));
+ setupKeyset(new DirectvReceiver1d(counter++));
+ setupKeyset(new DirectvReceiver1e(counter++));
setupKeyset(new DishReceiver1(counter++));
setupKeyset(new DishReceiver1a(counter++));
setupKeyset(new NokiaGenericVCR(counter++));
+ setupKeyset(new OctagonSat1(counter++));
+ setupKeyset(new OctagonSat1a(counter++));
+ setupKeyset(new OctagonSat2(counter++));
+
setupKeyset(new OnidaTV1(counter++));
setupKeyset(new OnidaDVD1(counter++));
setupKeyset(new WestinghouseTV1(counter++));
setupKeyset(new WestinghouseTV2(counter++));
+ setupKeyset(new XcruiserSat1(counter++));
+
setupKeyset(new YamahaDVD1(counter++));
setupKeyset(new YamahaDVD1a(counter++));
setupKeyset(new YamahaAudio1(counter++));
makes[Apple_Make] = "Apple";
makes[Arcam_Make] = "Arcam";
makes[Beko_Make] = "Beko";
+ makes[BenQ_Make] = "BenQ";
makes[Bose_Make] = "Bose";
makes[Bush_Make] = "Bush";
makes[Cambridge_Make] = "Cambridge Audio";
makes[Motorola_Make] = "Motorola";
makes[NAD_Make] = "NAD";
makes[Nokia_Make] = "Nokia";
+ makes[Octagon_Make] = "Octagon";
makes[Onida_Make] = "Onida";
makes[Panasonic_Make] = "Panasonic";
makes[Philco_Make] = "Philco";
makes[Vizio_Make] = "Vizio";
makes[WD_Make] = "Western Digital";
makes[Westinghouse_Make] = "Westinghouse";
+ makes[Xcruiser_Make] = "Xcruiser";
makes[Yamaha_Make] = "Yamaha";
makes[Zenith_Make] = "Zenith";
}
Apple_Make,
Arcam_Make,
Beko_Make,
+ BenQ_Make,
Bose_Make,
Bush_Make,
Cambridge_Make,
Motorola_Make,
NAD_Make,
Nokia_Make,
+ Octagon_Make,
Onida_Make,
Panasonic_Make,
Philco_Make,
Vizio_Make,
WD_Make,
Westinghouse_Make,
+ Xcruiser_Make,
Yamaha_Make,
Zenith_Make
};
#include "pirpanelmanager.h"
+#include "pirpanelselectionform.h"
+
#include "forms/pirmainform.h"
+#include "forms/piraltmainform.h"
#include "forms/pirutilityform.h"
#include "forms/pirkeypadform.h"
#include "forms/pirmenuform.h"
#include "mainwindow.h"
+#include <QSettings>
+
+// Debugging:
+//#include <QMaemo5InformationBox>
+#include <iostream>
+
PIRPanelManager::PIRPanelManager(MainWindow *mw)
: mainForm(0),
+ altMainForm(0),
utilityForm(0),
keypadForm(0),
menuForm(0),
adjustForm(0),
acForm(0),
favoritesForm(0),
+ altMainPanelFlag(false),
mainWindow(mw)
{
- panelList.push_back(PIRPanelPair(Main_Panel, false));
- panelList.push_back(PIRPanelPair(Utility_Panel, false));
- panelList.push_back(PIRPanelPair(Keypad_Panel, false));
- panelList.push_back(PIRPanelPair(Menu_Panel, false));
- panelList.push_back(PIRPanelPair(Media_Panel, false));
- panelList.push_back(PIRPanelPair(Media2_Panel, false));
- panelList.push_back(PIRPanelPair(Record_Panel, false));
- panelList.push_back(PIRPanelPair(TV_Panel, false));
- panelList.push_back(PIRPanelPair(Input_Panel, false));
- panelList.push_back(PIRPanelPair(Adjust_Panel, false));
- panelList.push_back(PIRPanelPair(AC_Panel, false));
- panelList.push_back(PIRPanelPair(Favorites_Panel, false));
+ // Set up the panel names:
+ shortPanelNames[Main_Panel] = "Main";
+ longPanelNames[Main_Panel] =
+ "Main Panel - power, volume, and channel controls";
+ shortPanelNames[Utility_Panel] = "Utility";
+ longPanelNames[Utility_Panel] =
+ "Utility Panel - commonly used controls";
+ shortPanelNames[Keypad_Panel] = "Keypad";
+ longPanelNames[Keypad_Panel] =
+ "Keypad Panel - numeric value entry";
+ shortPanelNames[Menu_Panel] = "Menu";
+ longPanelNames[Menu_Panel] =
+ "Menu Panel - enter, exit, and navigate menus";
+ shortPanelNames[Media_Panel] = "Media";
+ longPanelNames[Media_Panel] =
+ "Media Panel - control over recorded data";
+ shortPanelNames[Media2_Panel] = "Media2";
+ longPanelNames[Media2_Panel] =
+ "Media2 Panel - additonal media controls";
+ shortPanelNames[Record_Panel] = "Record";
+ longPanelNames[Record_Panel] =
+ "Program/Record Panel - control over memory and storage";
+ shortPanelNames[TV_Panel] = "TV";
+ longPanelNames[TV_Panel] =
+ "TV Panel - teletext and picture-in-picture";
+ shortPanelNames[Input_Panel] = "Input";
+ longPanelNames[Input_Panel] =
+ "Input Panel - manage data sources";
+ shortPanelNames[Adjust_Panel] = "Adjust";
+ longPanelNames[Adjust_Panel] =
+ "Adjust Panel - modify audio and video";
+ shortPanelNames[AC_Panel] = "AC";
+ longPanelNames[AC_Panel] =
+ "A/C Panel - air conditioner controls";
+ shortPanelNames[Favorites_Panel] = "Favorites";
+ longPanelNames[Favorites_Panel] =
+ "Favorites Panel - memorized keysets";
+
+ activePanels[Main_Panel] = false;
+ activePanels[Utility_Panel]= false;
+ activePanels[Keypad_Panel]= false;
+ activePanels[Menu_Panel]= false;
+ activePanels[Media_Panel]= false;
+ activePanels[Media2_Panel]= false;
+ activePanels[Record_Panel]= false;
+ activePanels[TV_Panel]= false;
+ activePanels[Input_Panel]= false;
+ activePanels[Adjust_Panel]= false;
+ activePanels[AC_Panel]= false;
+ activePanels[Favorites_Panel]= false;
}
}
-/*
void PIRPanelManager::setupPanels(
PIRPanelSelectionForm *psf)
{
+ QSettings settings("pietrzak.org", "Pierogi");
+
+ settings.beginGroup("Panels");
+
+ // Do the panel settings exist? (We'll check for "Main_Panel".)
+ if (!settings.contains(shortPanelNames[Main_Panel]))
+ {
+ // A default set of panels:
+ psf->setCheckBox(Main_Panel, true);
+ psf->setCheckBox(Utility_Panel, true);
+ psf->setCheckBox(Keypad_Panel, true);
+ psf->setCheckBox(Menu_Panel, true);
+ psf->setCheckBox(Media_Panel, true);
+ psf->setCheckBox(Favorites_Panel, true);
+ }
+ else
+ {
+ psf->setCheckBox(
+ Main_Panel,
+ settings.value(shortPanelNames[Main_Panel]).toBool());
+
+ if (settings.contains(shortPanelNames[Utility_Panel]))
+ {
+ psf->setCheckBox(
+ Utility_Panel,
+ settings.value(shortPanelNames[Utility_Panel]).toBool());
+ }
+
+ if (settings.contains(shortPanelNames[Keypad_Panel]))
+ {
+ psf->setCheckBox(
+ Keypad_Panel,
+ settings.value(shortPanelNames[Keypad_Panel]).toBool());
+ }
+
+ if (settings.contains(shortPanelNames[Menu_Panel]))
+ {
+ psf->setCheckBox(
+ Menu_Panel,
+ settings.value(shortPanelNames[Menu_Panel]).toBool());
+ }
+
+ if (settings.contains(shortPanelNames[Media_Panel]))
+ {
+ psf->setCheckBox(
+ Media_Panel,
+ settings.value(shortPanelNames[Media_Panel]).toBool());
+ }
+
+ if (settings.contains(shortPanelNames[Media2_Panel]))
+ {
+ psf->setCheckBox(
+ Media2_Panel,
+ settings.value(shortPanelNames[Media2_Panel]).toBool());
+ }
+
+ if (settings.contains(shortPanelNames[Record_Panel]))
+ {
+ psf->setCheckBox(
+ Record_Panel,
+ settings.value(shortPanelNames[Record_Panel]).toBool());
+ }
+
+ if (settings.contains(shortPanelNames[TV_Panel]))
+ {
+ psf->setCheckBox(
+ TV_Panel,
+ settings.value(shortPanelNames[TV_Panel]).toBool());
+ }
+
+ if (settings.contains(shortPanelNames[Input_Panel]))
+ {
+ psf->setCheckBox(
+ Input_Panel,
+ settings.value(shortPanelNames[Input_Panel]).toBool());
+ }
+
+ if (settings.contains(shortPanelNames[Adjust_Panel]))
+ {
+ psf->setCheckBox(
+ Adjust_Panel,
+ settings.value(shortPanelNames[Adjust_Panel]).toBool());
+ }
+
+ if (settings.contains(shortPanelNames[AC_Panel]))
+ {
+ psf->setCheckBox(
+ AC_Panel,
+ settings.value(shortPanelNames[AC_Panel]).toBool());
+ }
+
+ if (settings.contains(shortPanelNames[Favorites_Panel]))
+ {
+ psf->setCheckBox(
+ Favorites_Panel,
+ settings.value(shortPanelNames[Favorites_Panel]).toBool());
+ }
+ }
+
+ settings.endGroup();
}
-*/
void PIRPanelManager::enableButtons(
const PIRKeysetManager *keyset,
unsigned int id)
{
- if (mainForm) mainForm->enableButtons(keyset, id);
+ if (altMainPanelFlag)
+ {
+ if (altMainForm) altMainForm->enableButtons(keyset, id);
+ }
+ else
+ {
+ if (mainForm) mainForm->enableButtons(keyset, id);
+ }
if (utilityForm) utilityForm->enableButtons(keyset, id);
if (keypadForm) keypadForm->enableButtons(keyset, id);
if (menuForm) menuForm->enableButtons(keyset, id);
PIRPanelName name,
int state)
{
- int index = 0;
+ int currentPanel = 0;
+ int displayCount = 0;
- PIRPanelList::iterator i = panelList.begin();
- while (i != panelList.end())
+// PIRPanelList::iterator i = panelList.begin();
+ while (currentPanel < Last_Panel_Marker)
{
- if (i->name == name)
+ if (currentPanel == name)
{
break;
}
- else if (i->displayed)
+ else if (activePanels[PIRPanelName(currentPanel)])
{
- ++index;
+ ++displayCount;
}
- ++i;
+
+ ++currentPanel;
}
- if (i == panelList.end())
+ if (currentPanel == Last_Panel_Marker)
{
// should throw an error message here!!!
return;
}
- if (state == Qt::Unchecked && i->displayed)
+ QSettings settings("pietrzak.org", "Pierogi");
+
+ settings.beginGroup("Panels");
+
+ if (state == Qt::Unchecked && activePanels[PIRPanelName(currentPanel)])
{
- hidePanel(name, index);
- i->displayed = false;
+ hidePanel(name, displayCount);
+ activePanels[PIRPanelName(currentPanel)] = false;
+ settings.setValue(shortPanelNames[PIRPanelName(currentPanel)], false);
}
- else if (state == Qt::Checked && !i->displayed)
+ else if (state == Qt::Checked && !activePanels[PIRPanelName(currentPanel)])
{
- showPanel(name, index);
- i->displayed = true;
+ showPanel(name, displayCount);
+ activePanels[PIRPanelName(currentPanel)] = true;
+ settings.setValue(shortPanelNames[PIRPanelName(currentPanel)], true);
}
+
+ settings.endGroup();
+}
+
+
+void PIRPanelManager::useMainPanel()
+{
+ if (!altMainPanelFlag)
+ {
+ // Already set correctly, nothing to do:
+ return;
+ }
+
+ altMainPanelFlag = false;
+
+ // Is the main panel currently active?
+ if (activePanels[Main_Panel])
+ {
+ mainWindow->removePanel(0, altMainForm);
+ if (!mainForm)
+ {
+ mainForm = new PIRMainForm(mainWindow);
+ }
+
+ mainWindow->insertPanel(0, mainForm, longPanelNames[Main_Panel]);
+ mainWindow->selectPanel(0);
+ }
+
+ mainWindow->enableButtons();
+}
+
+
+void PIRPanelManager::useAltMainPanel()
+{
+ if (altMainPanelFlag)
+ {
+ // Already set correctly, nothing to do:
+ return;
+ }
+
+ altMainPanelFlag = true;
+
+ // Is the main panel currently active?
+ if (activePanels[Main_Panel])
+ {
+ mainWindow->removePanel(0, mainForm);
+ if (!altMainForm)
+ {
+ altMainForm = new PIRAltMainForm(mainWindow);
+ }
+
+ mainWindow->insertPanel(0, altMainForm, longPanelNames[Main_Panel]);
+ mainWindow->selectPanel(0);
+ }
+
+ mainWindow->enableButtons();
}
switch (name)
{
case Main_Panel:
- if (mainForm) mainWindow->removePanel(index, mainForm);
+ if (altMainPanelFlag)
+ {
+ if (altMainForm) mainWindow->removePanel(index, altMainForm);
+ }
+ else
+ {
+ if (mainForm) mainWindow->removePanel(index, mainForm);
+ }
break;
case Utility_Panel:
switch (name)
{
case Main_Panel:
- if (!mainForm)
+ if (altMainPanelFlag)
{
- mainForm = new PIRMainForm(mainWindow);
- mainWindow->enableButtons();
+ if (!altMainForm)
+ {
+ altMainForm = new PIRAltMainForm(mainWindow);
+ mainWindow->enableButtons();
+ }
+
+ mainWindow->insertPanel(
+ index,
+ altMainForm,
+ longPanelNames[Main_Panel]);
+ }
+ else
+ {
+ if (!mainForm)
+ {
+ mainForm = new PIRMainForm(mainWindow);
+ mainWindow->enableButtons();
+ }
+
+ mainWindow->insertPanel(
+ index,
+ mainForm,
+ longPanelNames[Main_Panel]);
}
-
- mainWindow->insertPanel(
- index,
- mainForm,
- QString("Main Panel - power, volume, and channel controls"));
break;
mainWindow->insertPanel(
index,
utilityForm,
- QString("Utility Panel - commonly used controls"));
+ longPanelNames[Utility_Panel]);
break;
mainWindow->insertPanel(
index,
keypadForm,
- QString("Keypad Panel - numeric value entry"));
+ longPanelNames[Keypad_Panel]);
break;
mainWindow->insertPanel(
index,
menuForm,
- QString("Menu Panel - enter, exit, and navigate menus"));
+ longPanelNames[Menu_Panel]);
break;
mainWindow->insertPanel(
index,
mediaForm,
- QString("Media Panel - control over recorded data"));
+ longPanelNames[Media_Panel]);
break;
mainWindow->insertPanel(
index,
media2Form,
- QString("Media2 Panel - additonal media controls"));
+ longPanelNames[Media2_Panel]);
break;
mainWindow->insertPanel(
index,
recordForm,
- QString("Program/Record Panel - control over memory and storage"));
+ longPanelNames[Record_Panel]);
break;
mainWindow->insertPanel(
index,
tvForm,
- QString("TV Panel - teletext and picture-in-picture"));
+ longPanelNames[TV_Panel]);
break;
mainWindow->insertPanel(
index,
inputForm,
- QString("Input Panel - manage data sources"));
+ longPanelNames[Input_Panel]);
break;
mainWindow->insertPanel(
index,
adjustForm,
- QString("Adjust Panel - modify audio and video"));
+ longPanelNames[Adjust_Panel]);
break;
mainWindow->insertPanel(
index,
acForm,
- QString("A/C Panel - air conditioner controls"));
+ longPanelNames[AC_Panel]);
break;
mainWindow->insertPanel(
index,
favoritesForm,
- QString("Favorites Panel - memorized keysets"));
+ longPanelNames[Favorites_Panel]);
break;
#include "pirpanelnames.h"
class PIRMainForm;
+class PIRAltMainForm;
class PIRUtilityForm;
class PIRKeypadForm;
class PIRMenuForm;
class QListWidget;
class MainWindow;
-#include <list>
-
-class PIRPanelPair
-{
-public:
- PIRPanelPair(
- PIRPanelName n,
- bool d)
- : name(n),
- displayed(d)
- {}
-
- PIRPanelName name;
- bool displayed;
-};
-
-typedef std::list<PIRPanelPair> PIRPanelList;
+#include <map>
+#include <QString>
+typedef std::map<PIRPanelName, const char *> PIRPanelDisplayNameCollection;
+typedef std::map<PIRPanelName, bool> PIRActivePanelCollection;
+typedef std::map<QString, PIRPanelName> PIRReversePanelIndex;
class PIRPanelManager
{
~PIRPanelManager();
-/*
void setupPanels(
PIRPanelSelectionForm *psf);
-*/
void enableButtons(
const PIRKeysetManager *keyset,
PIRPanelName name,
int state);
+ void useMainPanel();
+ void useAltMainPanel();
+
void selectPrevFavKeyset();
void selectNextFavKeyset();
int index);
PIRMainForm *mainForm;
+ PIRAltMainForm *altMainForm;
PIRUtilityForm *utilityForm;
PIRKeypadForm *keypadForm;
PIRMenuForm *menuForm;
PIRAirConditionerForm *acForm;
PIRFavoritesForm *favoritesForm;
- PIRPanelList panelList;
+ PIRPanelDisplayNameCollection shortPanelNames;
+ PIRPanelDisplayNameCollection longPanelNames;
+ PIRActivePanelCollection activePanels;
+// PIRReversePanelIndex reverseIndex;
+
+ bool altMainPanelFlag;
MainWindow *mainWindow;
};
Input_Panel,
Adjust_Panel,
AC_Panel,
- Favorites_Panel
+ Favorites_Panel,
+ Last_Panel_Marker // Used when traversing this enumeration.
};
+
#endif // PIRPANELNAMES_H
setAttribute(Qt::WA_Maemo5StackedWindow);
setWindowFlags(windowFlags() | Qt::Window);
-
- // Start by setting up a few initial panels:
- ui->mainCheckBox->setChecked(true);
- ui->utilityCheckBox->setChecked(true);
- ui->keypadCheckBox->setChecked(true);
- ui->menuCheckBox->setChecked(true);
- ui->mediaCheckBox->setChecked(true);
- ui->favoritesCheckBox->setChecked(true);
}
PIRPanelSelectionForm::~PIRPanelSelectionForm()
delete ui;
}
+void PIRPanelSelectionForm::setCheckBox(
+ PIRPanelName name,
+ bool setting)
+{
+ switch (name)
+ {
+ case Main_Panel:
+ ui->mainCheckBox->setChecked(setting);
+ break;
+
+ case Utility_Panel:
+ ui->utilityCheckBox->setChecked(setting);
+ break;
+
+ case Keypad_Panel:
+ ui->keypadCheckBox->setChecked(setting);
+ break;
+
+ case Menu_Panel:
+ ui->menuCheckBox->setChecked(setting);
+ break;
+
+ case Media_Panel:
+ ui->mediaCheckBox->setChecked(setting);
+ break;
+
+ case Media2_Panel:
+ ui->media2CheckBox->setChecked(setting);
+ break;
+
+ case Record_Panel:
+ ui->recordCheckBox->setChecked(setting);
+ break;
+
+ case TV_Panel:
+ ui->tvCheckBox->setChecked(setting);
+ break;
+
+ case Input_Panel:
+ ui->inputCheckBox->setChecked(setting);
+ break;
+
+ case Adjust_Panel:
+ ui->adjustCheckBox->setChecked(setting);
+ break;
+
+ case AC_Panel:
+ ui->acCheckBox->setChecked(setting);
+ break;
+
+ case Favorites_Panel:
+ ui->favoritesCheckBox->setChecked(setting);
+ break;
+
+ default:
+ break;
+ }
+}
+
void PIRPanelSelectionForm::on_mainCheckBox_stateChanged(int arg1)
{
mainWindow->managePanel(Main_Panel, arg1);
explicit PIRPanelSelectionForm(QWidget *parent = 0);
// PIRPanelSelectionForm(MainWindow *mw);
~PIRPanelSelectionForm();
+
+ void setCheckBox(
+ PIRPanelName name,
+ bool setting);
private slots:
void on_mainCheckBox_stateChanged(int arg1);
--- /dev/null
+#include "pirpreferencesform.h"
+#include "ui_pirpreferencesform.h"
+
+#include "mainwindow.h"
+
+#include <QSettings>
+
+PIRPreferencesForm::PIRPreferencesForm(
+ QWidget *parent)
+ : QWidget(parent),
+ ui(new Ui::PIRPreferencesForm)
+{
+ ui->setupUi(this);
+
+ mainWindow = dynamic_cast<MainWindow *>(parent);
+
+ setAttribute(Qt::WA_Maemo5StackedWindow);
+ setWindowFlags(windowFlags() | Qt::Window);
+
+ QSettings settings("pietrzak.org", "Pierogi");
+
+ settings.beginGroup("Preferences");
+
+ if (settings.contains("useAltMain"))
+ {
+ if (settings.value("useAltMain").toBool())
+ {
+ ui->altMainCheckBox->setChecked(true);
+ mainWindow->useAltMainPanel();
+ }
+ }
+
+ settings.endGroup();
+}
+
+
+PIRPreferencesForm::~PIRPreferencesForm()
+{
+ delete ui;
+}
+
+
+void PIRPreferencesForm::on_altMainCheckBox_stateChanged(
+ int arg1)
+{
+ QSettings settings("pietrzak.org", "Pierogi");
+
+ settings.beginGroup("Preferences");
+
+ if (arg1 == Qt::Checked)
+ {
+ settings.setValue("useAltMain", true);
+
+ mainWindow->useAltMainPanel();
+ }
+ else
+ {
+ settings.setValue("useAltMain", false);
+
+ mainWindow->useMainPanel();
+ }
+
+ settings.endGroup();
+}
--- /dev/null
+#ifndef PIRPREFERENCESFORM_H
+#define PIRPREFERENCESFORM_H
+
+#include <QWidget>
+
+class MainWindow;
+
+namespace Ui {
+class PIRPreferencesForm;
+}
+
+class PIRPreferencesForm : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit PIRPreferencesForm(QWidget *parent = 0);
+ ~PIRPreferencesForm();
+
+private slots:
+ void on_altMainCheckBox_stateChanged(int arg1);
+
+private:
+ Ui::PIRPreferencesForm *ui;
+
+ MainWindow *mainWindow;
+};
+
+#endif // PIRPREFERENCESFORM_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRPreferencesForm</class>
+ <widget class="QWidget" name="PIRPreferencesForm">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Pierogi Preferences</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="margin">
+ <number>8</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QScrollArea" name="scrollArea">
+ <property name="widgetResizable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="scrollAreaWidgetContents">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>782</width>
+ <height>462</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QCheckBox" name="altMainCheckBox">
+ <property name="text">
+ <string>Reverse orientation of volume and control buttons</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
DirectvProtocol::DirectvProtocol(
QObject *guiObject,
- unsigned int index,
- DirectvFreq freq,
- bool longGapFlag)
+ unsigned int index)
: PIRProtocol(guiObject, index, 9000, false)
{
- if (longGapFlag)
+}
+
+
+void DirectvProtocol::setProtocolParms(
+ DirectvGapSize gap,
+ DirectvFreq freq)
+{
+ if (gap == ShortGap_Directv)
+ {
+ setGapSize(9000, false);
+ }
+ else
{
setGapSize(30000, false);
}
switch (freq)
{
- case LowFreq:
+ case LowFreq_Directv:
setCarrierFrequency(38000);
break;
- case MediumFreq:
+ case MediumFreq_Directv:
setCarrierFrequency(40000);
break;
- case HighFreq: default:
+ case HighFreq_Directv: default:
setCarrierFrequency(57000);
break;
}
class PIRRX51Hardware;
+enum DirectvGapSize
+{
+ ShortGap_Directv,
+ LongGap_Directv
+};
+
enum DirectvFreq
{
- LowFreq,
- MediumFreq,
- HighFreq
+ LowFreq_Directv,
+ MediumFreq_Directv,
+ HighFreq_Directv
};
class DirectvProtocol: public PIRProtocol
public:
DirectvProtocol(
QObject *guiObject,
- unsigned int index,
- DirectvFreq freq,
- bool longGapFlag);
+ unsigned int index);
+
+ void setProtocolParms(
+ DirectvGapSize gap,
+ DirectvFreq freq);
private:
void startSendingCommand(
+pierogi (1.1.3) unstable; urgency=low
+ * Started work on an actual preferences window!
+ * Pierogi now remembers your panel selections from your previous session.
+ * All six permutations of the Directv protocol now supported.
+ * First pass at keysets for BenQ, Octagon, Xcruiser
+
+ -- John Pietrzak <jpietrzak8@gmail.com> Thu, 08 Mar 2012 11:07:08 -0500
+
pierogi (1.1.2) unstable; urgency=low
* First pass at keysets for Dream Multimedia, Genius, Magnum, Telenet, and Thomson.
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: Keyset Update
- This update contains a first pass at keysets for Dream Multimedia, Genius, Magnum, Telenet, and Thomson. These keysets all need some testing...
+XB-Maemo-Upgrade-Description: Interim Update
+ I'm continuing to mess around with the Pierogi infrastructure. Not much to show yet, though. A very early Preferences window now exists, but so far only adds the option to swap the channel and volume controls on the main panel. In other news, Pierogi should now remember your panel choices (crossing my fingers). Also, all 6 DirecTV keysets are now available, and a first pass has been made at keysets for BenQ, Octagon, and Xcruiser.
XSBC-Bugtracker: https://garage.maemo.org/tracker/?func=add&group_id=2286&atid=7641
XB-Maemo-Display-Name: Pierogi
XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAEChJREFUaIHtmFmsXudVhp/1TXv/+x/OOZ4TO66dZmBo0jZJoxBQW8ookAq0mIhJQhUXcAGIAhICRClDb4q4YBRDGSoBFS2ikQoUSkpNIEkbnJQ0cVL7xLUd2/GZfKZ/2MP3fYuLE6LUDQEFQi/oe7e/X7/2++71an1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