2010-08-24 21:57:43 +02:00
|
|
|
/* This file is part of Clementine.
|
|
|
|
|
|
|
|
Clementine is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Clementine is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WIIMOTEDEVSHORTCUTSCONFIG_H
|
|
|
|
#define WIIMOTEDEVSHORTCUTSCONFIG_H
|
|
|
|
|
2010-08-25 18:19:54 +02:00
|
|
|
#include <QSettings>
|
2010-08-24 21:57:43 +02:00
|
|
|
#include <QWidget>
|
|
|
|
|
2010-08-25 20:10:44 +02:00
|
|
|
class QTreeWidgetItem;
|
2010-08-24 21:57:43 +02:00
|
|
|
class Ui_WiimotedevShortcutsConfig;
|
|
|
|
|
|
|
|
class WiimotedevShortcutsConfig : public QWidget {
|
2010-08-25 18:19:54 +02:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2010-08-24 21:57:43 +02:00
|
|
|
WiimotedevShortcutsConfig(QWidget* parent = 0);
|
|
|
|
Ui_WiimotedevShortcutsConfig* ui_;
|
|
|
|
|
2010-08-26 17:37:07 +02:00
|
|
|
struct Shortcut {
|
|
|
|
QTreeWidgetItem* object;
|
|
|
|
quint64 button;
|
|
|
|
quint32 action;
|
|
|
|
};
|
|
|
|
|
|
|
|
QList <struct Shortcut> actions_;
|
|
|
|
|
2010-08-25 18:19:54 +02:00
|
|
|
private:
|
|
|
|
QSettings settings_;
|
2010-08-25 20:10:44 +02:00
|
|
|
QString current_id_;
|
|
|
|
|
2010-08-26 17:37:07 +02:00
|
|
|
QTreeWidgetItem* selected_item_;
|
|
|
|
|
|
|
|
QMap <quint64, QString> text_buttons_;
|
|
|
|
QMap <quint32, QString> text_actions_;
|
2010-08-25 20:10:44 +02:00
|
|
|
|
|
|
|
QString GetReadableWiiremoteSequence(quint64 value);
|
2010-08-25 18:19:54 +02:00
|
|
|
|
|
|
|
private slots:
|
2010-08-26 17:37:07 +02:00
|
|
|
void LoadSettings();
|
|
|
|
void DefaultSettings();
|
|
|
|
void DeleteAction();
|
|
|
|
|
2010-08-25 18:19:54 +02:00
|
|
|
void WiimotedevEnabledChecked(bool checked);
|
2010-08-26 17:37:07 +02:00
|
|
|
void ItemClicked(QTreeWidgetItem*);
|
2010-08-24 21:57:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // WIIMOTEDEVSHORTCUTSCONFIG_H
|