QFeedbackHapticsInterface Class Reference
The QFeedbackHapticsInterface class is the base class for objects providing custom haptics effects. More...
#include <QFeedbackHapticsInterface>
Inherits QFeedbackInterface.
Public Types
Public Functions
virtual | ~QFeedbackHapticsInterface () |
virtual QVariant | actuatorProperty ( const QFeedbackActuator & actuator, ActuatorProperty property ) = 0 |
virtual QList<QFeedbackActuator> | actuators () = 0 |
virtual QFeedbackEffect::State | effectState ( const QFeedbackHapticsEffect * effect ) = 0 |
virtual bool | isActuatorCapabilitySupported ( const QFeedbackActuator & actuator, QFeedbackActuator::Capability capability ) = 0 |
virtual PluginPriority | pluginPriority () = 0 |
virtual void | setActuatorProperty ( const QFeedbackActuator & actuator, ActuatorProperty property, const QVariant & priority ) = 0 |
virtual void | setEffectState ( const QFeedbackHapticsEffect * effect, QFeedbackEffect::State state ) = 0 |
virtual void | updateEffectProperty ( const QFeedbackHapticsEffect * effect, EffectProperty property ) = 0 |
Static Public Members
Protected Functions
Additional Inherited Members
Detailed Description
The QFeedbackHapticsInterface class is the base class for objects providing custom haptics effects.
This interface will be used to try to play custom effects with specific duration, intensity, envelope and period. An effect is always played on a specified actuator.
Member Type Documentation
enum QFeedbackHapticsInterface::ActuatorProperty
This enum describes all actuator properties.
|
Constant | Value | Description |
QFeedbackHapticsInterface::Name | 0 | The actuator name. |
QFeedbackHapticsInterface::State | 1 | The actuator state. |
QFeedbackHapticsInterface::Enabled | 2 | The actuator enabled state. |
enum QFeedbackHapticsInterface::EffectProperty
This enum describes all effect properties for haptics effects.
|
Constant | Value | Description |
QFeedbackHapticsInterface::Duration | 0 | The effect duration |
QFeedbackHapticsInterface::Intensity | 1 | The effect intensity |
QFeedbackHapticsInterface::AttackTime | 2 | The effect attack time |
QFeedbackHapticsInterface::AttackIntensity | 3 | The effect attack intensity |
QFeedbackHapticsInterface::FadeTime | 4 | The effect fade time |
QFeedbackHapticsInterface::FadeIntensity | 5 | The effect fade intensity |
QFeedbackHapticsInterface::Period | 6 | The effect period, this is an optional effect property. |
Member Function Documentation
QFeedbackHapticsInterface::~QFeedbackHapticsInterface () [virtual]
QVariant QFeedbackHapticsInterface::actuatorProperty ( const QFeedbackActuator & actuator, ActuatorProperty property ) [pure virtual]
returns a property for an actuator
See also setActuatorProperty() and ActuatorProperty.
QList<QFeedbackActuator> QFeedbackHapticsInterface::actuators () [pure virtual]
return the available actuators on the system.
QFeedbackActuator QFeedbackHapticsInterface::createFeedbackActuator ( int id ) [protected]
Creates an instance of QFeedbackActuator with the identifier id. That is the way of the backends to create instances of actuators. It is then up to the backends to manage the identifiers according to their needs.
Get the current state for the effect effect.
See also setEffectState().
QFeedbackHapticsInterface * QFeedbackHapticsInterface::instance () [static]
returns the instance of the object managing haptics custom effects. If no backend has been loaded, this will return a null pointer.
bool QFeedbackHapticsInterface::isActuatorCapabilitySupported ( const QFeedbackActuator & actuator, QFeedbackActuator::Capability capability ) [pure virtual]
return true if the actuator supports the capability.
PluginPriority QFeedbackHapticsInterface::pluginPriority () [pure virtual]
returns the priority for the plugin.
void QFeedbackHapticsInterface::setActuatorProperty ( const QFeedbackActuator & actuator, ActuatorProperty property, const QVariant & priority ) [pure virtual]
Sets a priority on the actuator.
See also actuatorProperty() and ActuatorProperty.
Sets the state to state for the effect effect. If that fails the backend will report an error by calling reportError and effect will in turn emit the error signal.
See also effectState().
void QFeedbackHapticsInterface::updateEffectProperty ( const QFeedbackHapticsEffect * effect, EffectProperty property ) [pure virtual]
Tells the backend that the property