QFeedbackActuator Class
The QFeedbackActuator class describes actuators for tactile feedback. More...
| Header: | #include <QFeedbackActuator> |
| Instantiated By: | Actuator |
Detailed Description
The QFeedbackActuator class describes actuators for tactile feedback.
An actuator knows how to play a tactile effect. The class gives access to a specified actuator.
An actuator can be used to play QFeedbackHapticsEffects using setActuator(). Usually, you will not have to set an actuator directly on a QFeedbackHapticsEffect. QFeedbackHapticsEffect and QFeedbackFileEffect uses an appropriate actuator by default. However, you can query which actuators are available with actuators().
QFeedbackActuator actuator; // default system actuator QList<QFeedbackActuator> actuators = QFeedbackActuator::actuators(); foreach (const QFeedbackActuator& temp, actuators) { if (temp.name() == "ExampleActuatorName") { actuator = temp; } }
The QFeedbackActuator class gives access to information about the actuator it represents. You can query if the actuator is enabled and if it is valid . Whether an actuator is ready to play an effect can be queried by checking the actuator's state(). The State enum describes the states and actuator can have. You can also get a human readable name for the actuator with the name() function.
See also QFeedbackHapticsEffect, QFeedbackFileEffect, and QFeedbackEffect.