The QFeedbackHapticsEffect class allows to play a haptics feedback on an actuator. More...
#include <QFeedbackHapticsEffect>
Inherits QFeedbackEffect.
|
|
QFeedbackHapticsEffect ( QObject * parent = 0 ) | |
~QFeedbackHapticsEffect () | |
QFeedbackActuator | actuator () const |
qreal | attackIntensity () const |
int | attackTime () const |
qreal | fadeIntensity () const |
int | fadeTime () const |
qreal | intensity () const |
int | period () const |
void | setActuator ( const QFeedbackActuator & actuator ) |
void | setAttackIntensity ( qreal intensity ) |
void | setAttackTime ( int msecs ) |
void | setDuration ( int msecs ) |
void | setFadeIntensity ( qreal intensity ) |
void | setFadeTime ( int msecs ) |
void | setIntensity ( qreal intensity ) |
void | setPeriod ( int msecs ) |
virtual int | duration () const |
virtual State | state () const |
virtual void | setState ( State ) |
The QFeedbackHapticsEffect class allows to play a haptics feedback on an actuator.
It is possible to set the duration, intensity, envelope and period of the effect. It is a subclass of QFeedbackEffect (subclass of QObject), which makes it inherit its properties: duration and state. It can also be started, stopped or paused.
You can set the duration to INFINITE. It is then up to the program to stop the effect.
A feedback effect always works on a feedback actuator.
it can report errors through the error signal.
See also QFeedbackActuator.
This property holds the actuator on which the effect operates.
This property defines the actuator on which the effect operates.
Access functions:
QFeedbackActuator | actuator () const |
void | setActuator ( const QFeedbackActuator & actuator ) |
This property holds the initial intensity of the effect.
This property defines the initial intensity of the effect, before it fades in. It is usually lower than intensity.
Access functions:
qreal | attackIntensity () const |
void | setAttackIntensity ( qreal intensity ) |
This property holds the duration of the fade-in effect.
This property defines the duration of the fade-in effect in msecs.
Access functions:
int | attackTime () const |
void | setAttackTime ( int msecs ) |
This property holds the expected duration of the effect.
This property defines the duration of the feedback effect.
Access functions:
virtual int | duration () const |
void | setDuration ( int msecs ) |
This property holds the final intensity of the effect.
This property defines the final intensity of the effect, after it fades out. It is usually lower than intensity.
Access functions:
qreal | fadeIntensity () const |
void | setFadeIntensity ( qreal intensity ) |
This property holds the duration of the fade-out effect.
This property defines the duration of the fade-out effect in msecs.
Access functions:
int | fadeTime () const |
void | setFadeTime ( int msecs ) |
This property holds the intensity of the effect.
This property defines the intensity of the feedback effect. The value can be between 0 and 1.
Access functions:
qreal | intensity () const |
void | setIntensity ( qreal intensity ) |
This property holds set the period for the effect.
It has a default value of -1, which means that it is not a periodic effect. It is not supported to change the period while an effect is running. Note: not all actuators support periodic effects
Access functions:
int | period () const |
void | setPeriod ( int msecs ) |
Constructs the QFeedbackHatpicsEffect class, and passes parent to QObject's constructor.
Stops the feedback if it is running.
See also state().
See also setState().