1 /* antimicro Gamepad to KB+M event mapper 2 * Copyright (C) 2015 Travis Nickles <nickles.travis@gmail.com> 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef ADVANCEBUTTONDIALOGHELPER_H 19 #define ADVANCEBUTTONDIALOGHELPER_H 20 21 #include <QObject> 22 23 #include "joybutton.h" 24 #include "joybuttonslot.h" 25 26 class AdvanceButtonDialogHelper : public QObject 27 { 28 Q_OBJECT 29 public: 30 explicit AdvanceButtonDialogHelper(JoyButton *button, 31 QObject *parent = 0); 32 33 protected: 34 JoyButton *button; 35 36 signals: 37 38 public slots: 39 void setAssignedSlot(JoyButtonSlot *otherSlot, int index); 40 void setAssignedSlot(int code, unsigned int alias, int index, 41 JoyButtonSlot::JoySlotInputAction mode=JoyButtonSlot::JoyKeyboard); 42 void insertAssignedSlot(int code, unsigned int alias, int index, 43 JoyButtonSlot::JoySlotInputAction mode=JoyButtonSlot::JoyKeyboard); 44 void removeAssignedSlot(int index); 45 }; 46 47 #endif // ADVANCEBUTTONDIALOGHELPER_H 48