Qt Mobility Reference Documentation

QFeedbackFileInterface Class Reference

The QFeedbackFileInterface class is the base class for objects providing support for effects stored in files. More...

 #include <QFeedbackFileInterface>

Inherits QFeedbackInterface.


Public Functions

virtual ~QFeedbackFileInterface ()
virtual int effectDuration ( const QFeedbackFileEffect * effect ) = 0
virtual QFeedbackEffect::State effectState ( const QFeedbackFileEffect * effect ) = 0
virtual void setEffectState ( QFeedbackFileEffect * effect, QFeedbackEffect::State state ) = 0
virtual void setLoaded ( QFeedbackFileEffect * effect, bool value ) = 0
virtual QStringList supportedMimeTypes () = 0

Static Public Members

QFeedbackFileInterface * instance ()

Static Protected Members

void reportLoadFinished ( QFeedbackFileEffect * effect, bool success )

Detailed Description

The QFeedbackFileInterface class is the base class for objects providing support for effects stored in files.

They can be of any nature (tactile, audio...). As it is possible to load many different file types using different technologies, all the backend plugins exposing this interface will be loaded at the same time. When loading a file all the backend will be tried in order until one can load the file. It is thus very important that the backends return a load status as soon as possible to not take a too long time to load a file.


Member Function Documentation

QFeedbackFileInterface::~QFeedbackFileInterface () [virtual]

int QFeedbackFileInterface::effectDuration ( const QFeedbackFileEffect * effect ) [pure virtual]

return the duration in msecs of effect. It should return QFileFeedbackEffect::INFINITE in case the duration is infinite or undefined.

QFeedbackEffect::State QFeedbackFileInterface::effectState ( const QFeedbackFileEffect * effect ) [pure virtual]

returns the current state of the effect effect.

See also setEffectState().

QFeedbackFileInterface * QFeedbackFileInterface::instance () [static]

returns the instance of the object managing theme effects. Even if no backend has been loaded, this will never return a null pointer.

void QFeedbackFileInterface::reportLoadFinished ( QFeedbackFileEffect * effect, bool success ) [static protected]

This is the function the backend should call when it has finished trying to load the effect effect. As loading a file is asynchronous, the backend has to call this function in order for the process to perform smoothly. The success of the operation is indicated by success.

void QFeedbackFileInterface::setEffectState ( QFeedbackFileEffect * effect, QFeedbackEffect::State state ) [pure virtual]

set the state of effect to state.

See also effectState().

void QFeedbackFileInterface::setLoaded ( QFeedbackFileEffect * effect, bool value ) [pure virtual]

Sets the state of the effect effect to be loaded or unloaded. Loading a file is asynchronous. Once the backend know if it has loaded or can't load the plugin, it must call the reportLoadFinished function.

See also QFeedbackFileInterface::reportLoadFinished(QFeedbackFileEffect* effect, bool success).

QStringList QFeedbackFileInterface::supportedMimeTypes () [pure virtual]

returns a list of supported MIME types.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.