Qt Mobility Reference Documentation

QFeedbackFileEffect Class Reference

The QFeedbackFileEffect class allows to play a haptics feedback from a file. More...

 #include <QFeedbackFileEffect>

Inherits QFeedbackEffect.


Properties


Public Functions

QFeedbackFileEffect ( QObject * parent = 0 )
~QFeedbackFileEffect ()
QString fileName () const
bool isLoaded () const
void load ()
void setFileName ( const QString & )
void setLoaded ( bool )
void unload ()

Reimplemented Public Functions

virtual int duration () const
virtual State state () const

Static Public Members

QStringList supportedMimeTypes ()

Reimplemented Protected Functions

virtual void setState ( State )

Additional Inherited Members


Detailed Description

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.


Property Documentation

fileName : QString

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 & )

loaded : bool

This property determines if the file has been successfully loaded.

Access functions:

bool isLoaded () const
void setLoaded ( bool )

Member Function Documentation

QFeedbackFileEffect::QFeedbackFileEffect ( QObject * parent = 0 )

Constructs the QFeedbackFileEffect class, and passes parent to QObject's constructor.

QFeedbackFileEffect::~QFeedbackFileEffect ()

Stops the feedback and unloads the file if necessary.

int QFeedbackFileEffect::duration () const [virtual]

void QFeedbackFileEffect::load ()

makes sure that the file associated with the feedback object is loaded. It will be automatically loaded when setFileName or start functions are called.

void QFeedbackFileEffect::setState ( State ) [virtual protected]

See also state().

State QFeedbackFileEffect::state () const [virtual]

See also setState().

QStringList QFeedbackFileEffect::supportedMimeTypes () [static]

returns the MIME types supported for playing effects from file.

void QFeedbackFileEffect::unload ()

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.


Copyright © 2009-2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.1.0