Home · All Classes · Main Classes · Deprecated
Signals | Public Member Functions

MDataAccess Class Reference

Interface for reading and storing key values. More...

Inherits QObject.

Inherited by MAggregateDataAccess, and MDataStore.

List of all members.

Signals

void valueChanged (const QString &key, const QVariant &value)

Public Member Functions

virtual ~MDataAccess ()
virtual QVariant value (const QString &key) const =0
virtual bool setValue (const QString &key, const QVariant &value)=0
virtual QStringList allKeys () const =0
virtual bool contains (const QString &key) const =0

Detailed Description

Interface for reading and storing key values.

Users can read and write key values using this interface. The user also get notified when changes happen in the key values.


Constructor & Destructor Documentation

virtual MDataAccess::~MDataAccess (  )  [inline, virtual]

Destroys the MDataAccess.


Member Function Documentation

virtual QStringList MDataAccess::allKeys (  )  const [pure virtual]

Returns a list of all specified keys.

virtual bool MDataAccess::contains ( const QString key  )  const [pure virtual]

Returns true if there exists a key called key and false otherwise.

Parameters:
key the key to test
Returns:
a boolean value telling if the key exists or not
See also:
value() and setValue().
virtual bool MDataAccess::setValue ( const QString key,
const QVariant value 
) [pure virtual]

Sets a new value for a key. If the key isn't found, nothing happens and false is returned.

Parameters:
key the key to be changed.
value the new value.
Returns:
true if setting was successful, false otherwise
virtual QVariant MDataAccess::value ( const QString key  )  const [pure virtual]

Returns a value for a key. If the key doesn't exist, an invalid (QVariant::Invalid) value is returned.

Parameters:
key the key.
Returns:
the requested value.
void MDataAccess::valueChanged ( const QString key,
const QVariant value 
) [signal]

A signal that is emitted when a key value changes.

Parameters:
key the key that changed.
value the new value.

Copyright © 2010 Nokia Corporation
MeeGo Touch