API Documentation
|
A joystick that allows the user to move around, reporting the vector of the stick, relative to the center of the joystick. More...
#include <Joystick.h>
Signals | |
void | joystickButtonPressedSignal (const Vector< 2, fltp04 > &location) |
void | joystickButtonReleasedSignal (const Vector< 2, fltp04 > &location) |
void | joystickLocationChangedSignal (const Vector< 2, fltp04 > &location) |
Public Member Functions | |
void | addButton (Button *button) |
QRect | arrowRect (const Vector< 2, sint04 > &location, const Vector< 2, fltp04 > ¢er_point, fltp04 radius) const |
Vector< 2, fltp04 > | centerPoint () const |
bool | event (QEvent *event) override |
bool | isDragging () const |
Joystick (QWidget *parent=nullptr) | |
Vector< 2, fltp04 > | knobLocation () const |
fltp04 | knobRadius () const |
virtual void | mouseMoveEvent (QMouseEvent *ev) override |
virtual void | mousePressEvent (QMouseEvent *ev) override |
virtual void | mouseReleaseEvent (QMouseEvent *ev) override |
fltp04 | outerRadius () const |
void | setBackgroundColor (RGBColor inner, RGBColor outer) |
void | setDeadzone (fltp08 deadzone) |
void | setDrawDeadzone (bool draw_deadzone) |
void | setDrawSensitivity (bool draw_sense) |
void | setJoystickSettingsName (const String &name) |
void | setKnobColor (RGBColor inner, RGBColor outer) |
void | setSettings (const JoystickSettings &mode) |
void | setSnapBackPercent (float snap_percent) |
const JoystickSettings & | settings () const |
void | setValue (const Vector< 2, fltp04 > &location) |
QSize | sizeHint () const override |
float | snapBackPercent () const |
Properties | |
float | snap_back_percent |
A joystick that allows the user to move around, reporting the vector of the stick, relative to the center of the joystick.
|
explicit |
void addButton | ( | Button * | button | ) |
QRect arrowRect | ( | const Vector< 2, sint04 > & | location, |
const Vector< 2, fltp04 > & | center_point, | ||
fltp04 | radius ) const |
|
override |
bool isDragging | ( | ) | const |
fltp04 knobRadius | ( | ) | const |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
fltp04 outerRadius | ( | ) | const |
void setDeadzone | ( | fltp08 | deadzone | ) |
void setDrawDeadzone | ( | bool | draw_deadzone | ) |
void setDrawSensitivity | ( | bool | draw_sense | ) |
void setJoystickSettingsName | ( | const String & | name | ) |
void setSettings | ( | const JoystickSettings & | mode | ) |
void setSnapBackPercent | ( | float | snap_percent | ) |
|
inline |
|
override |
|
inline |
|
readwrite |