The QFeedbackFileEffect class allows to play a haptics feedback from a file. More...
#include <QFeedbackFileEffect>
Inherits QFeedbackEffect.
QFeedbackFileEffect ( QObject * parent = 0 ) | |
~QFeedbackFileEffect () | |
QString | fileName () const |
bool | isLoaded () const |
void | load () |
void | setFileName ( const QString & ) |
void | setLoaded ( bool ) |
void | unload () |
virtual int | duration () const |
virtual State | state () const |
QStringList | supportedMimeTypes () |
virtual void | setState ( State ) |
The QFeedbackFileEffect class allows to play a haptics feedback from a file.
You can load and unload the file at will to free resources or be as fast as possible. 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.
it can report errors through the error signal.
This property holds the name of the file that is loaded.
Setting that property will automatically unload the previous file and load the new one.
Access functions:
QString | fileName () const |
void | setFileName ( const QString & ) |
This property determines if the file has been successfully loaded.
Access functions:
bool | isLoaded () const |
void | setLoaded ( bool ) |
Constructs the QFeedbackFileEffect class, and passes parent to QObject's constructor.
Stops the feedback and unloads the file if necessary.
makes sure that the file associated with the feedback object is loaded. It will be automatically loaded when setFileName or start functions are called.
See also state().
See also setState().
returns the MIME types supported for playing effects from file.
makes sure that the file associated with the feedback object is unloaded. It will be automatically loaded when the setFileName function is called with another file or the object is destructed.