#include <alerttone.h>
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) |
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:
Please check the documentation for the profile-data package or the profile daemon files under /etc/profiled/
AlertTone::AlertTone | ( | const QString & | key | ) |
The constructor of the class sets the key that can't be changed later.
QList< AlertTone * > AlertTone::alertTones | ( | ) | [static] |
void AlertTone::fetchFromBackend | ( | ) | [protected, virtual] |
Method for fetching the backend (profiled) current values
Reimplemented from QProfileValue.
QString AlertTone::fileName | ( | ) |
QString AlertTone::niceName | ( | ) |
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
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 | ( | ) |