Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions

AlertTone Class Reference

#include <alerttone.h>

Inheritance diagram for AlertTone:
QProfileValue QTrackedVariant

List of all members.

Signals

void refreshed ()

Public Member Functions

 AlertTone (const QString &key)
QString fileName ()
QString niceName ()
QString trackerId ()

Static Public Member Functions

static QList< AlertTone * > alertTones ()

Protected Member Functions

virtual void fetchFromBackend ()
virtual void realSetValue (const QVariant &newValue)

Detailed Description

Class that provides information about an alert tone set to be used when a specific event occurs (e.g. incoming call, new email, etc.). Tracks the changes and emits signals when some change detected.

The AlertTone is created with a specific key called the profile key that identifies the event to which the AlertTone belongs. Here is an example on the available keys:

AlertTone  *alertTone;

alertTone = new AlertTone ("ringing.alert.tone");

Please check the documentation for the profile-data package or the profile daemon files under /etc/profiled/


Constructor & Destructor Documentation

AlertTone::AlertTone ( const QString &  key  ) 

The constructor of the class sets the key that can't be changed later.


Member Function Documentation

QList< AlertTone * > AlertTone::alertTones (  )  [static]

A method for getting AlertTone objects for all available settings (ringing, voip, email, sms, im)

Returns:
AlertTone instances...
void AlertTone::fetchFromBackend (  )  [protected, virtual]

Method for fetching the backend (profiled) current values

Reimplemented from QProfileValue.

QString AlertTone::fileName (  ) 
Returns:
The full path of the currently set sound file.
QString AlertTone::niceName (  ) 
Returns:
The human readable name of the sound file.

For the sound files under the /home directory this method will return the sound file title provided by the tracker subsystem by reading the sound file itself. For files under a different diretory the method will create the nice name from the filename, because tracker will not provide file information for these files. In this case the nice name is created from the basename of the file by removing the file extension and changing underscore ('-') characters to spaces (' ').

void AlertTone::realSetValue ( const QVariant &  newValue  )  [protected, virtual]

This method sets the new value in the profiled

Parameters:
newValue the new value

Reimplemented from QProfileValue.

void AlertTone::refreshed (  )  [signal]

This signal is emitted when the value is not changed but a new detail becomes available so the UI should be refreshed. Currently there is one such a case, the asynchronous tracker connection that reports the song title (nice name of the sound file) once the tracker answers to the qutomatic query.

QString AlertTone::trackerId (  ) 
Returns:
the tracker-id of the sound file when it is available.

The documentation for this class was generated from the following files: