API Documentation
Loading...
Searching...
No Matches
Joystick Class Reference

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>

Inheritance diagram for Joystick:
[legend]
Collaboration diagram for Joystick:
[legend]

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 > &center_point, fltp04 radius) const
 
Vector< 2, fltp04centerPoint () const
 
bool event (QEvent *event) override
 
bool isDragging () const
 
 Joystick (QWidget *parent=nullptr)
 
Vector< 2, fltp04knobLocation () 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 JoystickSettingssettings () const
 
void setValue (const Vector< 2, fltp04 > &location)
 
QSize sizeHint () const override
 
float snapBackPercent () const
 

Properties

float snap_back_percent
 

Detailed Description

A joystick that allows the user to move around, reporting the vector of the stick, relative to the center of the joystick.


Constructor & Destructor Documentation

◆ Joystick()

Joystick ( QWidget * parent = nullptr)
explicit

Member Function Documentation

◆ addButton()

void addButton ( Button * button)

◆ arrowRect()

QRect arrowRect ( const Vector< 2, sint04 > & location,
const Vector< 2, fltp04 > & center_point,
fltp04 radius ) const

◆ centerPoint()

Vector< 2, fltp04 > centerPoint ( ) const

◆ event()

bool event ( QEvent * event)
override

◆ isDragging()

bool isDragging ( ) const

◆ joystickButtonPressedSignal

void joystickButtonPressedSignal ( const Vector< 2, fltp04 > & location)
signal

◆ joystickButtonReleasedSignal

void joystickButtonReleasedSignal ( const Vector< 2, fltp04 > & location)
signal

◆ joystickLocationChangedSignal

void joystickLocationChangedSignal ( const Vector< 2, fltp04 > & location)
signal

◆ knobLocation()

Vector< 2, fltp04 > knobLocation ( ) const

◆ knobRadius()

fltp04 knobRadius ( ) const

◆ mouseMoveEvent()

virtual void mouseMoveEvent ( QMouseEvent * ev)
overridevirtual

◆ mousePressEvent()

virtual void mousePressEvent ( QMouseEvent * ev)
overridevirtual

◆ mouseReleaseEvent()

virtual void mouseReleaseEvent ( QMouseEvent * ev)
overridevirtual

◆ outerRadius()

fltp04 outerRadius ( ) const

◆ setBackgroundColor()

void setBackgroundColor ( RGBColor inner,
RGBColor outer )

◆ setDeadzone()

void setDeadzone ( fltp08 deadzone)

◆ setDrawDeadzone()

void setDrawDeadzone ( bool draw_deadzone)

◆ setDrawSensitivity()

void setDrawSensitivity ( bool draw_sense)

◆ setJoystickSettingsName()

void setJoystickSettingsName ( const String & name)

◆ setKnobColor()

void setKnobColor ( RGBColor inner,
RGBColor outer )

◆ setSettings()

void setSettings ( const JoystickSettings & mode)

◆ setSnapBackPercent()

void setSnapBackPercent ( float snap_percent)

◆ settings()

const JoystickSettings & settings ( ) const
inline

◆ setValue()

void setValue ( const Vector< 2, fltp04 > & location)

◆ sizeHint()

QSize sizeHint ( ) const
override

◆ snapBackPercent()

float snapBackPercent ( ) const
inline

Property Documentation

◆ snap_back_percent

float snap_back_percent
readwrite

The documentation for this class was generated from the following file: