AntiMicroX
mousesensorsettingsdialog.h
Go to the documentation of this file.
1 /* antimicrox Gamepad to KB+M event mapper
2  * Copyright (C) 2022 Max Maisel <max.maisel@posteo.de>
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 #pragma once
18 
19 #include "ui_mousesettingsdialog.h"
20 
21 #include "mousesettingsdialog.h"
22 
23 class JoySensor;
25 
30 {
31  Q_OBJECT
32 
33  public:
34  explicit MouseSensorSettingsDialog(JoySensor *sensor, QWidget *parent = 0);
35 
36  JoySensor *getSensor() const;
37 
38  protected:
42 
43  public slots:
44  void updateConfigHorizontalSpeed(int value);
45  void updateConfigVerticalSpeed(int value);
46  void updateWheelSpeedHorizontalSpeed(int value);
47  void updateWheelSpeedVerticalSpeed(int value);
48 
49  virtual void changeMouseMode(int index);
50  virtual void changeMouseCurve(int index);
51 
52  private:
54 };
MouseSensorSettingsDialog::changeMouseMode
virtual void changeMouseMode(int index)
Not used for sensors but necessary to implement because it is an abstract function in the parent clas...
Definition: mousesensorsettingsdialog.cpp:195
JoyButton::getMouseSpeedY
int getMouseSpeedY()
Definition: joybutton.cpp:2414
SetJoystick::getIndex
int getIndex() const
Definition: setjoystick.cpp:507
MouseSensorSettingsDialog::m_sensor
JoySensor * m_sensor
Definition: mousesensorsettingsdialog.h:53
MouseSensorSettingsDialog
Mouse settings dialog specialized for sensors.
Definition: mousesensorsettingsdialog.h:29
MouseSensorSettingsDialog::calculateWheelSpeedPreset
void calculateWheelSpeedPreset()
Get the maximum mouse wheel speed used by the buttons of the associated sensor and set the UI values ...
Definition: mousesensorsettingsdialog.cpp:92
SetJoystick::getName
QString getName() const
Definition: setjoystick.cpp:948
MouseSensorSettingsDialog::updateConfigVerticalSpeed
void updateConfigVerticalSpeed(int value)
Vertical mouse speed change UI event handler Updates vertical mouse speed on all buttons of the assoc...
Definition: mousesensorsettingsdialog.cpp:153
joysensor.h
MouseSensorSettingsDialog::getSensor
JoySensor * getSensor() const
Gets the underlying JoySensor object.
Definition: mousesensorsettingsdialog.cpp:66
JoyButton::setWheelSpeed
void setWheelSpeed(int speed, QChar ax)
Definition: joybutton.cpp:3600
JoyButton::getMouseSpeedX
int getMouseSpeedX()
Definition: joybutton.cpp:2403
MouseSensorSettingsDialog::MouseSensorSettingsDialog
MouseSensorSettingsDialog(JoySensor *sensor, QWidget *parent=0)
Definition: mousesensorsettingsdialog.cpp:31
JoyButton::getWheelSpeedY
int getWheelSpeedY()
Definition: joybutton.cpp:3614
MouseSensorSettingsDialog::updateWheelSpeedVerticalSpeed
void updateWheelSpeedVerticalSpeed(int value)
Vertical mouse wheel speed change UI event handler Updates vertical mouse wheel speed on all buttons ...
Definition: mousesensorsettingsdialog.cpp:181
MouseSettingsDialog
Definition: mousesettingsdialog.h:30
MouseSensorSettingsDialog::updateWindowTitleSensorName
void updateWindowTitleSensorName()
Shows the sensor name in dialog title.
Definition: mousesensorsettingsdialog.cpp:111
MouseSensorSettingsDialog::updateConfigHorizontalSpeed
void updateConfigHorizontalSpeed(int value)
Horizontal mouse speed change UI event handler Updates horizontal mouse speed on all buttons of the a...
Definition: mousesensorsettingsdialog.cpp:139
SetJoystick::getRealIndex
int getRealIndex() const
Definition: setjoystick.cpp:509
mousesensorsettingsdialog.h
JoySensorButton
Represents a sensor mapping in a SetJoystick.
Definition: joysensorbutton.h:30
mousesettingsdialog.h
inputdevice.h
JoyButton::setMouseSpeedX
void setMouseSpeedX(int speed)
Definition: joybutton.cpp:2394
common.h
JoyButton::getWheelSpeedX
int getWheelSpeedX()
Definition: joybutton.cpp:3612
MouseSettingsDialog::ui
Ui::MouseSettingsDialog * ui
Definition: mousesettingsdialog.h:44
JoySensor
Represents one sensor in a SetJoystick and its connections to other parts of the application....
Definition: joysensor.h:39
setjoystick.h
MouseSensorSettingsDialog::updateWheelSpeedHorizontalSpeed
void updateWheelSpeedHorizontalSpeed(int value)
Horizontal mouse wheel speed change UI event handler Updates horizontal mouse wheel speed on all butt...
Definition: mousesensorsettingsdialog.cpp:167
joysensorbutton.h
JoyButton::setMouseSpeedY
void setMouseSpeedY(int speed)
Definition: joybutton.cpp:2405
JoySensor::getSensorName
QString getSensorName() const
Returns the sensor name.
Definition: joysensor.cpp:242
JoySensor::getParentSet
SetJoystick * getParentSet() const
Get pointer to the set that a sensor belongs to.
Definition: joysensor.cpp:774
MouseSensorSettingsDialog::calculateMouseSpeedPreset
void calculateMouseSpeedPreset()
Get the maximum mouse speed used by the buttons of the associated sensor and set the UI values to it.
Definition: mousesensorsettingsdialog.cpp:72
MouseSettingsDialog::changeSettingsWidgetStatus
void changeSettingsWidgetStatus(int index)
Definition: mousesettingsdialog.cpp:80
SpringModeRegionPreview
Definition: springmoderegionpreview.h:26
JoySensor::getPartialName
QString getPartialName(bool forceFullFormat=false, bool displayNames=false) const
Get the name of this sensor.
Definition: joysensor.cpp:219
MouseSensorSettingsDialog::changeMouseCurve
virtual void changeMouseCurve(int index)
Not used for sensors but necessary to implement because it is an abstract function in the parent clas...
Definition: mousesensorsettingsdialog.cpp:201
JoySensor::getButtons
QHash< JoySensorDirection, JoySensorButton * > * getButtons()
Returns a QHash which maps the SensorDirection to the corresponding JoySensorButton.
Definition: joysensor.cpp:541