Public Types | Public Member Functions | Protected Member Functions

QProfileValue Class Reference

#include <qprofilevalue.h>

Inheritance diagram for QProfileValue:
QTrackedVariant AlertTone

List of all members.

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)

Detailed Description

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.).


Member Enumeration Documentation

Enum for handling the different range-types


Constructor & Destructor Documentation

QProfileValue::QProfileValue ( const QString &  key,
bool  setAllProfiles = false 
)
Parameters:
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


Member Function Documentation

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  ) 
Parameters:
p_rangeType Textual representation of the range or NULL to retrieve the range from the profile database.
Returns:
The list of the acceptable values of the profile key.
void QProfileValue::realSetValue ( const QVariant &  newValue  )  [protected, virtual]

This method sets the new value in the profiled

Parameters:
newValue the new value

Reimplemented from QTrackedVariant.

Reimplemented in AlertTone.

bool QProfileValue::startWatchFile ( const QString &  filename  )  [protected, virtual]
Parameters:
filename The full path of the file to watch.
Returns:
true if the file exists, false otherwise.

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]
Returns:
true if a file was watched before the method is called.

Stops the file watching.


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