From e2de64d6f1beb9e492daf5b886e19933c1fa41dd Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- noatun/modules/infrared/irprefs.h | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 noatun/modules/infrared/irprefs.h (limited to 'noatun/modules/infrared/irprefs.h') diff --git a/noatun/modules/infrared/irprefs.h b/noatun/modules/infrared/irprefs.h new file mode 100644 index 00000000..7f813ac8 --- /dev/null +++ b/noatun/modules/infrared/irprefs.h @@ -0,0 +1,62 @@ + +#ifndef _IRPREFS_H_ +#define _IRPREFS_H_ + +#include +#include + +class QCheckBox; +class QListViewItem; +class KListView; +class KComboBox; +class KIntSpinBox; +class Lirc; + +class IRPrefs : public CModule +{ +Q_OBJECT +public: + enum Action + { + None, Play, Stop, Pause, Mute, + Previous, Next, VolumeDown, VolumeUp, + SeekBackward, SeekForward, ShowPlaylist, + NextSection, PreviousSection + }; + + IRPrefs(QObject *parent); + + virtual void save(); + + static const QString actionName(Action); + static Action actionFor(const QString &, const QString &, int); + +public slots: + static Lirc *s_lirc; + +private slots: + virtual void reopen(); + void slotCommandSelected(QListViewItem *); + void slotActionActivated(int); + void slotRepeatToggled(bool); + void slotIntervalChanged(int); + +private: + static void readConfig(); + + KListView *m_commands; + KComboBox *m_action; + QCheckBox *m_repeat; + KIntSpinBox *m_interval; + + struct Command + { + Action action; + int interval; + }; + static bool s_configRead; + static QMap s_commands; +}; + +#endif + -- cgit v1.2.1