Skip to content
Snippets Groups Projects
Commit 40746f60 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

added documentation with an image

parent 31dc7615
No related branches found
No related tags found
No related merge requests found
etc/doxygen/images/JoystickControlWidget_widget.png

2.33 KiB

......@@ -79,6 +79,38 @@ namespace armarx
/**
* @brief Provides a simple joystick control.
*
* The widget emits signals when the control is moved.
*
* The signal
* @code{.cpp}
* positionChanged(QPointF)
* @endcode
* passes the nibble's current position.
* The position is in the unit circle.
* The x-axis is horizontal and increases to the right.
* The y-axis is vertical and increases upwards.
*
* The signal
* @code{.cpp}
* rotationChanged(double)
* @endcode
* passes the position vectors rotation in polar coordinates (-pi,pi].
* The up position is 0.
* The down position is pi.
* The Quadrants 1 and 4 have positive value.
*
* If the constructor is called with useQuadrant3and4==true the control is the whole unit circle.
* If the constructor is called with useQuadrant3and4==false the control is the unit circle's upper semicircle. (y>=0)
*
* Possible positions can be influenced with
* \code{.cpp}
* setSteps(int steps);
* \endcode
* - steps>0 : only position vectors with a length from {n/steps | n in {0,1,...,steps} are valid. The nibble snaps to a valid position.
* - steps<=0: all positions in the unit circle are valid.
*
* @image html JoystickControlWidget_widget.png "Left: A widget with 2 steps using the whole unit circle. Right: A widget using the unit circle's upper semi circle." width=300px
*/
class JoystickControlWidget : public QWidget
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment