Qt Mobility Reference Documentation

QFeedbackEffect Class Reference

The QFeedbackEffect class is the abstract base class for the feedback framework. More...

 #include <QFeedbackEffect>

Inherited by QFeedbackFileEffect and QFeedbackHapticsEffect.


Public Types

enum Duration { INFINITE }
enum ErrorType { UnknownError, DeviceBusy }
enum State { Stopped, Paused, Running, Loading }
enum ThemeEffect { ThemeBasic, ThemeSensitive, ThemeBasicButton, ThemeSensitiveButton, ..., ThemeUser }

Properties


Public Functions

QFeedbackEffect ( QObject * parent = 0 )
virtual int duration () const = 0
virtual State state () const = 0

Public Slots

void pause ()
void start ()
void stop ()

Signals

void error ( QFeedbackEffect::ErrorType ) const

Static Public Members

bool playThemeEffect ( ThemeEffect effect )
bool supportsThemeEffect ()

Protected Functions

virtual void setState ( State ) = 0

Detailed Description

The QFeedbackEffect class is the abstract base class for the feedback framework.

It has the concepts of duration and state.


Member Type Documentation

enum QFeedbackEffect::Duration

This enum describes the possible effect duration types.

ConstantValueDescription
QFeedbackEffect::INFINITE-1Infinite effect duration

enum QFeedbackEffect::ErrorType

This enum describes the possible errors happening on the effect.

ConstantValueDescription
QFeedbackEffect::UnknownError0An unknown error occurred.
QFeedbackEffect::DeviceBusy1The feedback could not start because the device is busy.

See also error().

enum QFeedbackEffect::State

This enum describes the state of the effect.

ConstantValueDescription
QFeedbackEffect::Stopped0The feedback is not running. This is the initial state. The state changes to either Loading when loading a feedback or to Running when the feedback is started by calling start().
QFeedbackEffect::Paused1The feedback is paused. Calling start() will resume it.
QFeedbackEffect::Running2The feedback is running. You can control the current state by calling the state() function.
QFeedbackEffect::Loading3The feedback is loading. That can happen when loading is done asynchronously.

See also state().

enum QFeedbackEffect::ThemeEffect

This enum describes all possible theme effect types.

ConstantValueDescription
QFeedbackEffect::ThemeBasic0 
QFeedbackEffect::ThemeSensitive1 
QFeedbackEffect::ThemeBasicButton2 
QFeedbackEffect::ThemeSensitiveButton3 
QFeedbackEffect::ThemeBasicKeypad4 
QFeedbackEffect::ThemeSensitiveKeypad5 
QFeedbackEffect::ThemeBasicSlider6 
QFeedbackEffect::ThemeSensitiveSlider7 
QFeedbackEffect::ThemeBasicItem8 
QFeedbackEffect::ThemeSensitiveItem9 
QFeedbackEffect::ThemeItemScroll10 
QFeedbackEffect::ThemeItemPick11 
QFeedbackEffect::ThemeItemDrop12 
QFeedbackEffect::ThemeItemMoveOver13 
QFeedbackEffect::ThemeBounceEffect14 
QFeedbackEffect::ThemeCheckBox15 
QFeedbackEffect::ThemeMultipleCheckBox16 
QFeedbackEffect::ThemeEditor17 
QFeedbackEffect::ThemeTextSelection18 
QFeedbackEffect::ThemeBlankSelection19 
QFeedbackEffect::ThemeLineSelection20 
QFeedbackEffect::ThemeEmptyLineSelection21 
QFeedbackEffect::ThemePopUp22 
QFeedbackEffect::ThemePopupOpen23 
QFeedbackEffect::ThemePopupClose24 
QFeedbackEffect::ThemeFlick25 
QFeedbackEffect::ThemeStopFlick26PopUp -> Popup
QFeedbackEffect::ThemeMultitouchActivate27 
QFeedbackEffect::ThemeRotateStep28 
QFeedbackEffect::ThemeLongPress29 
QFeedbackEffect::ThemePositiveTacticon30 
QFeedbackEffect::ThemeNeutralTacticon31 
QFeedbackEffect::ThemeNegativeTacticon32 
QFeedbackEffect::NumberOfThemeEffects33 
QFeedbackEffect::ThemeUser65535 

Property Documentation

duration : const int

This property holds duration of the feedback.

Access functions:

virtual int duration () const = 0

state : const State

This property holds state of the feedback.

It has a default value of Stopped. Each time you call the state() the backend is called to get the actual feedback effect state.

Access functions:

virtual State state () const = 0

Member Function Documentation

QFeedbackEffect::QFeedbackEffect ( QObject * parent = 0 )

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

void QFeedbackEffect::error ( QFeedbackEffect::ErrorType ) const [signal]

void QFeedbackEffect::pause () [slot]

bool QFeedbackEffect::playThemeEffect ( ThemeEffect effect ) [static]

plays instant feedback and return true if the effect could be played.

That feedback is defined by the theme of the system.

void QFeedbackEffect::setState ( State ) [pure virtual protected]

See also state().

void QFeedbackEffect::start () [slot]

void QFeedbackEffect::stop () [slot]

bool QFeedbackEffect::supportsThemeEffect () [static]

Returns if playing themed feedback is available.


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