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 MOUSECONTROLSTICKSETTINGSDIALOG_H 19 #define MOUSECONTROLSTICKSETTINGSDIALOG_H 20 21 #include "mousesettingsdialog.h" 22 #include "springmoderegionpreview.h" 23 24 #include <joycontrolstick.h> 25 #include "uihelpers/mousecontrolsticksettingsdialoghelper.h" 26 27 class MouseControlStickSettingsDialog : public MouseSettingsDialog 28 { 29 Q_OBJECT 30 public: 31 explicit MouseControlStickSettingsDialog(JoyControlStick *stick, QWidget *parent=0); 32 33 protected: 34 void selectCurrentMouseModePreset(); 35 void calculateSpringPreset(); 36 void calculateMouseSpeedPreset(); 37 void calculateWheelSpeedPreset(); 38 void updateWindowTitleStickName(); 39 40 void calculateExtraAccelrationStatus(); 41 void calculateExtraAccelerationMultiplier(); 42 43 void calculateStartAccelerationMultiplier(); 44 void calculateMinAccelerationThreshold(); 45 void calculateMaxAccelerationThreshold(); 46 void calculateAccelExtraDuration(); 47 48 void calculateReleaseSpringRadius(); 49 void calculateExtraAccelerationCurve(); 50 51 JoyControlStick *stick; 52 SpringModeRegionPreview *springPreviewWidget; 53 MouseControlStickSettingsDialogHelper helper; 54 55 signals: 56 57 public slots: 58 void changeMouseMode(int index); 59 void changeMouseCurve(int index); 60 void updateConfigHorizontalSpeed(int value); 61 void updateConfigVerticalSpeed(int value); 62 void updateSpringWidth(int value); 63 void updateSpringHeight(int value); 64 void updateSensitivity(double value); 65 void updateAccelerationCurvePresetComboBox(); 66 void updateWheelSpeedHorizontalSpeed(int value); 67 void updateWheelSpeedVerticalSpeed(int value); 68 void updateSpringRelativeStatus(bool value); 69 70 private slots: 71 void updateExtraAccelerationCurve(int index); 72 }; 73 74 #endif // MOUSECONTROLSTICKSETTINGSDIALOG_H 75