34#include <NDEVR/INIInterface.h>
35#include <NDEVR/Vector.h>
36#include <NDEVR/RGBColor.h>
38class QPropertyAnimation;
82 Q_PROPERTY(
float snap_back_percent READ snapBackPercent WRITE setSnapBackPercent)
99 bool event(QEvent* event)
override;
114 void showSettings(
const PopupInfo& info);
115 void updateButton(
uint04 button);
116 void updateButtons();
118 void resizeEvent(QResizeEvent* event)
override;
119 void paintEvent(QPaintEvent* paint_event)
override;
122 Button* m_settings_button;
131 fltp04 m_snap_back_percent = 0.0f;
132 QPropertyAnimation* m_joystick_release_animation;
136 bool m_draw_deadzone;
137 bool m_draw_sensitivity;
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
Contains methods for easily reading and writing to an INI file including efficient casting,...
Definition INIReader.h:68
Contains methods for easily reading and writing to an INI file including.
Definition INIInterface.h:45
A joystick that allows the user to move around, reporting the vector of the stick,...
Definition Joystick.h:80
virtual void mousePressEvent(QMouseEvent *ev) override
float snapBackPercent() const
Definition Joystick.h:93
fltp04 outerRadius() const
void setValue(const Vector< 2, fltp04 > &location)
QSize sizeHint() const override
void setDeadzone(fltp08 deadzone)
void setDrawDeadzone(bool draw_deadzone)
bool event(QEvent *event) override
void joystickLocationChangedSignal(const Vector< 2, fltp04 > &location)
Joystick(QWidget *parent=nullptr)
void setBackgroundColor(RGBColor inner, RGBColor outer)
void setSettings(const JoystickSettings &mode)
void setJoystickSettingsName(const String &name)
void setDrawSensitivity(bool draw_sense)
void joystickButtonReleasedSignal(const Vector< 2, fltp04 > &location)
virtual void mouseReleaseEvent(QMouseEvent *ev) override
void setKnobColor(RGBColor inner, RGBColor outer)
void addButton(Button *button)
fltp04 knobRadius() const
void setSnapBackPercent(float snap_percent)
virtual void mouseMoveEvent(QMouseEvent *ev) override
Vector< 2, fltp04 > centerPoint() const
void joystickButtonPressedSignal(const Vector< 2, fltp04 > &location)
QRect arrowRect(const Vector< 2, sint04 > &location, const Vector< 2, fltp04 > ¢er_point, fltp04 radius) const
const JoystickSettings & settings() const
Definition Joystick.h:102
Vector< 2, fltp04 > knobLocation() const
Settings that define how a Joystick will behave.
Definition Joystick.h:49
fltp04 deadzone
Definition Joystick.h:58
void getINI(INIFactory &factory) override
SensitivityMode sensitivity_mode
Definition Joystick.h:59
SensitivityMode
Definition Joystick.h:53
@ e_exponential
Definition Joystick.h:55
@ e_linear
Definition Joystick.h:54
@ e_sinusoidal
Definition Joystick.h:56
bool operator==(const JoystickSettings &settings) const
Definition Joystick.h:63
fltp04 sensitivity
Definition Joystick.h:60
bool uses_knob
Definition Joystick.h:62
bool uses_buttons
Definition Joystick.h:61
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
The core String class for the NDEVR API.
Definition String.h:69
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149