#include <qprofilevalue.h>
Public Types | |
enum | RangeType { Interval, List, Invalid } |
Public Member Functions | |
QProfileValue (const QString &key, bool setAllProfiles=false) | |
~QProfileValue () | |
QList< QVariant > | possibleValues (RangeType *p_rangeType=NULL) |
Protected Member Functions | |
virtual void | fetchFromBackend () |
virtual void | realSetValue (const QVariant &newValue) |
virtual bool | stopWatchFiles () |
virtual bool | startWatchFile (const QString &filename) |
Base class to access (both read and write) for all the information stored in the profile database to control audio and haptic feedback for specific events (e.g. incoming call, incoming email, etc.).
Enum for handling the different range-types
QProfileValue::QProfileValue | ( | const QString & | key, | |
bool | setAllProfiles = false | |||
) |
key | The key identifies the profile entry. | |
setAllProfiles | If true the changing of the value will be reflected in every profile. |
The constructor the class sets the key identifies the profile entry. The key will not be changed for the full lifetime of the object.
QProfileValue::~QProfileValue | ( | ) |
QProfileValue destructor
void QProfileValue::fetchFromBackend | ( | ) | [protected, virtual] |
Method for fetching the backend (profiled) current values
Reimplemented from QTrackedVariant.
Reimplemented in AlertTone.
QList< QVariant > QProfileValue::possibleValues | ( | RangeType * | p_rangeType = NULL |
) |
p_rangeType | Textual representation of the range or NULL to retrieve the range from the profile database. |
void QProfileValue::realSetValue | ( | const QVariant & | newValue | ) | [protected, virtual] |
This method sets the new value in the profiled
newValue | the new value |
Reimplemented from QTrackedVariant.
Reimplemented in AlertTone.
bool QProfileValue::startWatchFile | ( | const QString & | filename | ) | [protected, virtual] |
filename | The full path of the file to watch. |
The QProfileValue is able to watch the file system to sense when the sound file is removed/deleted. This virtual method will start watching the file if the file exists. If the file is watched and removed the class will set the value to "" in order to get the file name of the default sound file from the profile daemon and emit the changed() signal when the default file is returned. Setting the file name to the empty string is necessary because every event has its own unique default file name that can be retrieved only when the value set to "".
bool QProfileValue::stopWatchFiles | ( | ) | [protected, virtual] |
Stops the file watching.