MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QFeedbackFileInterface Class Reference

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

 #include <QFeedbackFileInterface>

Inherits: QFeedbackInterface.

This class was introduced in Qt Mobility 1.1.

Public Functions

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 Protected Members

void reportLoadFinished ( QFeedbackFileEffect * effect, bool success )

Detailed Description

The QFeedbackFileInterface class is the base class for plugins 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

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

Return the duration of effect, in milliseconds. It should return QFeedbackEffect::Infinite in case the duration is infinite, or 0 if undefined or unknown.

This function was introduced in Qt Mobility 1.1.

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

Returns the current state of the effect effect.

This function was introduced in Qt Mobility 1.1.

See also setEffectState().

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 and multiple plugins are attempted after each other, the backend has to call this function in order for the process to perform smoothly. The success of the operation is indicated by the success parameter.

This function was introduced in Qt Mobility 1.1.

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

Sets the state of effect to state.

This function was introduced in Qt Mobility 1.1.

See also effectState().

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

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

This function was introduced in Qt Mobility 1.1.

QStringList QFeedbackFileInterface::supportedMimeTypes () [pure virtual]

Returns a list of the MIME types supported by this plugin.

This function was introduced in Qt Mobility 1.1.