Qt Mobility Reference Documentation

QFeedbackHapticsEffect Class Reference

The QFeedbackHapticsEffect class allows to play a haptics feedback on an actuator. More...

 #include <QFeedbackHapticsEffect>

Inherits QFeedbackEffect.


Properties


Public Functions

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 )

Reimplemented Public Functions

virtual int duration () const
virtual State state () const

Reimplemented Protected Functions

virtual void setState ( State )

Additional Inherited Members


Detailed Description

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.


Property Documentation

actuator : 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 )

attackIntensity : qreal

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 )

attackTime : int

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 )

duration : int

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 )

fadeIntensity : int

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 )

fadeTime : int

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 )

intensity : qreal

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 )

period : int

This property holds set the period for the effect.

It has a default value of -1, which mean that it is not a periodic effect. Note: not all actuators support periodic effects

Access functions:

int period () const
void setPeriod ( int msecs )

Member Function Documentation

QFeedbackHapticsEffect::QFeedbackHapticsEffect ( QObject * parent = 0 )

Constructs the QFeedbackHatpicsEffect class, and passes parent to QObject's constructor.

QFeedbackHapticsEffect::~QFeedbackHapticsEffect ()

Stops the feedback if it is running.

void QFeedbackHapticsEffect::setState ( State ) [virtual protected]

See also state().

State QFeedbackHapticsEffect::state () const [virtual]

See also setState().


Copyright © 2009-2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.1.0