AntiMicroX
joysensorcontextmenu.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 "joysensorpreset.h"
20 
21 #include <QMenu>
22 
23 class JoySensor;
24 class QWidget;
25 
29 class JoySensorContextMenu : public QMenu
30 {
31  Q_OBJECT
32 
33  public:
34  explicit JoySensorContextMenu(JoySensor *sensor, QWidget *parent = nullptr);
35  void buildMenu();
36 
37  private slots:
39 
40  private:
43 };
JoySensorContextMenu::buildMenu
void buildMenu()
Populates the context menu.
Definition: joysensorcontextmenu.cpp:42
JoySensorPreset::setSensorPreset
void setSensorPreset(Preset)
Assigns given preset to the underlying sensor This function defines the preset mappings and sensor pa...
Definition: joysensorpreset.cpp:250
MouseSensorSettingsDialog
Mouse settings dialog specialized for sensors.
Definition: mousesensorsettingsdialog.h:29
JoySensorPreset::getPresetName
QString getPresetName(Preset)
Get the translated name of a given preset.
Definition: joysensorpreset.cpp:212
joysensor.h
JoySensorPreset
Defines presets for a sensor.
Definition: joysensorpreset.h:24
JoySensorContextMenu::openMouseSettingsDialog
void openMouseSettingsDialog()
Opens MouseSensorSettingsDialog from context menu.
Definition: joysensorcontextmenu.cpp:73
JoySensorPreset::Preset
Preset
Definition: joysensorpreset.h:29
joysensorpreset.h
JoySensorContextMenu::m_sensor
JoySensor * m_sensor
Definition: joysensorcontextmenu.h:41
mousesensorsettingsdialog.h
inputdevice.h
JoySensor::getType
JoySensorType getType() const
Returns the sensor type.
Definition: joysensor.cpp:247
JoySensorContextMenu::JoySensorContextMenu
JoySensorContextMenu(JoySensor *sensor, QWidget *parent=nullptr)
Definition: joysensorcontextmenu.cpp:31
JoySensorContextMenu::m_preset
JoySensorPreset m_preset
Definition: joysensorcontextmenu.h:42
common.h
JoySensorContextMenu
The control stick context menu widget used by SensorPushButtonGroup.
Definition: joysensorcontextmenu.h:29
joysensorcontextmenu.h
JoySensor
Represents one sensor in a SetJoystick and its connections to other parts of the application....
Definition: joysensor.h:39
joysensorbutton.h
JoySensorPreset::getAvailablePresets
QList< Preset > getAvailablePresets()
Get available presets for the underlying sensor type.
Definition: joysensorpreset.cpp:37
GYROSCOPE
@ GYROSCOPE
Definition: joysensortype.h:26
JoySensorPreset::currentPreset
Preset currentPreset()
Determines the preset used by the underlying sensor.
Definition: joysensorpreset.cpp:62