Home · All Classes · Main Classes · Deprecated
Public Slots | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes

MFeedback Class Reference

Used to easily play non-graphical input feedbacks. More...

Inheritance diagram for MFeedback:
Inheritance graph
[legend]
Collaboration diagram for MFeedback:
Collaboration graph
[legend]

List of all members.

Public Slots

void play () const

Public Member Functions

 MFeedback (QObject *parent=0)
 MFeedback (const MFeedback &)
 MFeedback (const QString &name, QObject *parent=0)
MFeedbackoperator= (const MFeedback &other)
 ~MFeedback ()
void setName (const QString &name)
QString name () const

Static Public Member Functions

static void play (const QString &feedbackName)

Static Public Attributes

static const QString Press = "press"
static const QString Release = "release"
static const QString Cancel = "cancel"

Protected Attributes

MFeedbackPrivate *const d_ptr

Detailed Description

Used to easily play non-graphical input feedbacks.

This class can be used to play non-graphical input feedbacks such as vibra, audio or tactile effects. MFeedback has a name which is used to play the correct feedback(s) when play() function is called.

See also:
MFeedbackPlayer

Definition at line 40 of file corelib/feedback/mfeedback.h.


Constructor & Destructor Documentation

MFeedback::MFeedback ( QObject parent = 0  )  [explicit]

Default constructor.

Creates a MFeedback with no name.

Note:
Calling play() for MFeedback with no name causes no feedback to be played.
Parameters:
parent Parent object

Definition at line 34 of file mfeedback.cpp.

    : QObject(parent), d_ptr(new MFeedbackPrivate)
{
}

MFeedback::MFeedback ( const MFeedback feedback  ) 

Copy constructor.

Note:
The underlying QObject is not copied, an empty QObject is created instead.

Definition at line 27 of file mfeedback.cpp.

    : QObject(0), d_ptr(new MFeedbackPrivate)
{
    Q_D(MFeedback);
    d->name = feedback.name();
}

Here is the call graph for this function:

MFeedback::MFeedback ( const QString name,
QObject parent = 0 
) [explicit]

Constructor.

Parameters:
name Name of the feedback
parent Parent object

Definition at line 39 of file mfeedback.cpp.

    : QObject(parent), d_ptr(new MFeedbackPrivate)
{
    Q_D(MFeedback);
    d->name = name;
}

MFeedback::~MFeedback (  ) 

Destructor.

Definition at line 46 of file mfeedback.cpp.

{
    delete d_ptr;
}


Member Function Documentation

QString MFeedback::name (  )  const

Returns the name of the feedback.

Returns:
Name of the feedback.

Definition at line 65 of file mfeedback.cpp.

{
    Q_D(const MFeedback);
    return d->name;
}

MFeedback & MFeedback::operator= ( const MFeedback other  ) 

Assigment operator.

Note:
The underlying QObject is not copied, an empty QObject is created instead.

Definition at line 51 of file mfeedback.cpp.

{
    Q_D(MFeedback);
    d->name = other.name();

    return *this;
}

Here is the call graph for this function:

void MFeedback::play ( const QString feedbackName  )  [static]

Plays a feedback.

Parameters:
feedbackName Name of the feedback to be played

Definition at line 77 of file mfeedback.cpp.

{
    MFeedbackPrivate::play(feedbackName);
}

Here is the call graph for this function:

void MFeedback::play (  )  const [slot]

Plays the feedback.

Definition at line 71 of file mfeedback.cpp.

{
    Q_D(const MFeedback);
    d->play();
}

void MFeedback::setName ( const QString name  ) 

Sets the name of the feedback.

Parameters:
name Name of the feedback

Definition at line 59 of file mfeedback.cpp.

{
    Q_D(MFeedback);
    d->name = name;
}


Member Data Documentation

const QString MFeedback::Cancel = "cancel" [static]

Cancel feedback. Used when finger slides off the object, onto an inactive area.

Also used in cases where a Tap turns into another stroke.

Definition at line 105 of file corelib/feedback/mfeedback.h.

MFeedbackPrivate* const MFeedback::d_ptr [protected]

Definition at line 136 of file corelib/feedback/mfeedback.h.

const QString MFeedback::Press = "press" [static]

Press feedback. Used when the user presses on an object. It is also used when the user presses off an object, but slides the finger onto one.

Definition at line 91 of file corelib/feedback/mfeedback.h.

const QString MFeedback::Release = "release" [static]

Release feedback. Used when finger is released on the object. Indicates that an action was done.

Definition at line 97 of file corelib/feedback/mfeedback.h.


Copyright © 2010 Nokia Corporation Generated on Thu Nov 4 2010 18:14:25 (PDT)
Doxygen 1.7.1
MeeGo Touch