QDBusDataMap< T > Class Template Reference

Class to transport maps of D-Bus data types. More...

#include <qdbusdatamap.h>

List of all members.

Public Types

typedef QMapConstIterator< T,
QDBusData
const_iterator

Public Member Functions

 QDBusDataMap ()
 Creates an empty and invalid map.
 QDBusDataMap (QDBusData::Type simpleValueType)
 Creates an empty map with the given simple type for values.
 QDBusDataMap (const QDBusData &containerValueType)
 Creates an empty map with the given container type for values.
 QDBusDataMap (const QDBusDataMap< T > &other)
 Creates a map from the given other map.
 QDBusDataMap (const QMap< T, QDBusData > &other)
 Creates a map from the given QMap of QDBusData objects.
 QDBusDataMap (const QMap< T, bool > &other)
 Creates a list from the given QMap of boolean values.
 QDBusDataMap (const QMap< T, Q_UINT8 > &other)
 Creates a map from the given QMap of byte (unsigned char) values.
 QDBusDataMap (const QMap< T, Q_INT16 > &other)
 Creates a map from the given QMap of signed 16-bit integer values.
 QDBusDataMap (const QMap< T, Q_UINT16 > &other)
 Creates a map from the given QMap of unsigned 16-bit integer values.
 QDBusDataMap (const QMap< T, Q_INT32 > &other)
 Creates a map from the given QMap of signed 32-bit integer values.
 QDBusDataMap (const QMap< T, Q_UINT32 > &other)
 Creates a map from the given QMap of unsigned 32-bit integer values.
 QDBusDataMap (const QMap< T, Q_INT64 > &other)
 Creates a map from the given QMap of signed 64-bit integer values.
 QDBusDataMap (const QMap< T, Q_UINT64 > &other)
 Creates a map from the given QMap of unsigned 64-bit integer values.
 QDBusDataMap (const QMap< T, double > &other)
 Creates a map from the given QMap of double values.
 QDBusDataMap (const QMap< T, QString > &other)
 Creates a map from the given QMap of QString values.
 QDBusDataMap (const QMap< T, QDBusObjectPath > &other)
 Creates a map from the given QMap of object path values.
 QDBusDataMap (const QMap< T, QDBusVariant > &other)
 Creates a map from the given QMap of QDBusVariant values.
QDBusDataMap< T > & operator= (const QDBusDataMap< T > &other)
 Copies from the given other map.
QDBusDataMap< T > & operator= (const QMap< T, QDBusData > &other)
 Copies from the given other map.
QDBusData::Type keyType () const
 Returns the key type of the map object.
QDBusData::Type valueType () const
 Returns the value type of the map object.
bool hasContainerValueType () const
 Checks whether the value type is a data container itself.
QDBusData containerValueType () const
 Returns a container prototype for the map's value type.
bool isValid () const
 Checks whether this map object has a valid value type.
bool isEmpty () const
 Checks whether this map object has any key/value pairs.
uint count () const
 Returns the number of key/value pairs of this map object.
bool operator== (const QDBusDataMap< T > &other) const
 Checks whether the given other map is equal to this one.
void clear ()
 Clears the map.
const_iterator begin () const
 Returns an iterator to the first item according to the key sort order.
const_iterator end () const
 Returns an iterator to an invalid position.
bool insert (const T &key, const QDBusData &data)
 Inserts a given value for a given key.
QMap< T, QDBusDatatoQMap () const
 Converts the map object into a QMap with QDBusData elements.
QMap< T, bool > toBoolMap (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of bool.
QMap< T, Q_UINT8 > toByteMap (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of Q_UINT8.
QMap< T, Q_INT16 > toInt16Map (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of Q_INT16.
QMap< T, Q_UINT16 > toUInt16Map (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of Q_UINT16.
QMap< T, Q_INT32 > toInt32Map (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of Q_INT32.
QMap< T, Q_UINT32 > toUInt32Map (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of Q_UINT32.
QMap< T, Q_INT64 > toInt64Map (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of Q_INT64.
QMap< T, Q_UINT64 > toUInt64Map (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of Q_UINT64.
QMap< T, double > toDoubleMap (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of double.
QMap< T, QString > toStringMap (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of QString.
QMap< T, QDBusObjectPathtoObjectPathMap (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of object paths.
QMap< T, QDBusVarianttoVariantMap (bool *ok=0) const
 Tries to get the map object's pairs as a QMap of QDBusVariant.

Friends

class QDBusData

Detailed Description

template<typename T>
class QDBusDataMap< T >

Class to transport maps of D-Bus data types.

Note:
while the D-Bus data type is actually called dict this bindings use the term map since QDBusDataMap is essentially a QMap

There are basically two ways to create QDBusDataMap objects:

Example for creating a filled map from content

 QMap<Q_INT16, QString> intToStringMap;
 map.insert(2, "two");
 map.insert(3, "three");
 map.insert(5, "five");
 map.insert(7, "seven");

 QDBusDataMap<Q_INT16> dbusMap(intToStringMap);
 QDBusData data = QDBusData::fromInt16KeyMap(dbusMap);

 // or even shorter, using implicit conversion
 QDBusData other = QDBusData::fromInt16KeyMap(intList);

Example for creating an empty map

 // empty map for a simple type, mapping from QString to double
 QDBusDataMap<QString> list(QDBusData::Double);

 // empty map for value type string lists
 QDBusData valueType = QDBusData::fromList(QDBusDataList(QDBusData::String));
 QDBusDataMap<QString> map(valueType);
See also:
QDBusDataList

Member Typedef Documentation

template<typename T>
typedef QMapConstIterator<T, QDBusData> QDBusDataMap< T >::const_iterator

Constant iterator. A QMapConstIterator with value type specified as QDBusData


Constructor & Destructor Documentation

template<typename T>
QDBusDataMap< T >::QDBusDataMap (  )  [inline]

Creates an empty and invalid map.

See also:
QDBusData::Invalid
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( QDBusData::Type  simpleValueType  )  [inline, explicit]

Creates an empty map with the given simple type for values.

The given type has be one of the non-container types, i.e. any other than QDBusData::Map, QDBusData::List or QDBusData::Struct

For creating a map with elements which are containers themselves, use QDBusDataMap<T>(const QDBusData&);

Parameters:
simpleValueType the type of the values in the new map
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QDBusData containerValueType  )  [inline, explicit]

Creates an empty map with the given container type for values.

For creating a map with simple values you can also use QDBusDataMap<T>(QDBusData::Type);

Parameters:
containerValueType the type of the values in the new map
See also:
hasContainerValueType()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QDBusDataMap< T > &  other  )  [inline]

Creates a map from the given other map.

This behaves basically like copying a QMap through its copy constructor, i.e. no value are actually copied at this time.

Parameters:
other the other map object to copy from
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, QDBusData > &  other  )  [inline]

Creates a map from the given QMap of QDBusData objects.

If the other map is empty, this will behave like QDBusDataMap<T>(), i.e. create an empty and invalid map object.

Type information for the map object, i.e. value type and, if applicable, container value type, will be derived from the other map's elements.

Warning:
if the values of the other map do not all have the same type, the map object will also be empty and invalid
Parameters:
other the QMap of QDBusData objects to copy from
See also:
toQMap()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, bool > &  other  )  [inline]

Creates a list from the given QMap of boolean values.

Type information for the map object will be set to QDBusData::Bool also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::Bool

Parameters:
other the QMap of boolean values to copy from
See also:
toBoolMap()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, Q_UINT8 > &  other  )  [inline]

Creates a map from the given QMap of byte (unsigned char) values.

Type information for the map object will be set to QDBusData::Byte also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::Byte

Parameters:
other the QMap of byte (unsigned char) values to copy from
See also:
toByteMap()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, Q_INT16 > &  other  )  [inline]

Creates a map from the given QMap of signed 16-bit integer values.

Type information for the map object will be set to QDBusData::Int16 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::Int16

Parameters:
other the QMap of signed 16-bit integer values to copy from
See also:
toInt16Map()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, Q_UINT16 > &  other  )  [inline]

Creates a map from the given QMap of unsigned 16-bit integer values.

Type information for the map object will be set to QDBusData::UInt16 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::UInt16

Parameters:
other the QMap of unsigned 16-bit integer values to copy from
See also:
toUInt16Map()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, Q_INT32 > &  other  )  [inline]

Creates a map from the given QMap of signed 32-bit integer values.

Type information for the map object will be set to QDBusData::Int32 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::Int32

Parameters:
other the QMap of signed 32-bit integer values to copy from
See also:
toInt32Map()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, Q_UINT32 > &  other  )  [inline]

Creates a map from the given QMap of unsigned 32-bit integer values.

Type information for the map object will be set to QDBusData::UInt16 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::UInt32

Parameters:
other the QMap of unsigned 32-bit integer values to copy from
See also:
toUInt32Map()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, Q_INT64 > &  other  )  [inline]

Creates a map from the given QMap of signed 64-bit integer values.

Type information for the map object will be set to QDBusData::Int64 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::Int64

Parameters:
other the QMap of signed 64-bit integer values to copy from
See also:
toInt64Map()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, Q_UINT64 > &  other  )  [inline]

Creates a map from the given QMap of unsigned 64-bit integer values.

Type information for the map object will be set to QDBusData::UInt64 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::UInt64

Parameters:
other the QMap of unsigned 64-bit integer values to copy from
See also:
toUInt64Map()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, double > &  other  )  [inline]

Creates a map from the given QMap of double values.

Type information for the map object will be set to QDBusData::Double also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::Double

Parameters:
other the QMap of double values to copy from
See also:
toDoubleMap()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, QString > &  other  )  [inline]

Creates a map from the given QMap of QString values.

Type information for the map object will be set to QDBusData::String also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::String

Parameters:
other the QMap of QString values to copy from
See also:
toStringMap()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, QDBusObjectPath > &  other  )  [inline]

Creates a map from the given QMap of object path values.

Type information for the map object will be set to QDBusData::ObjectPath also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::ObjectPath

Parameters:
other the QMap of object path values to copy from
See also:
toObjectPathMap()
template<typename T>
QDBusDataMap< T >::QDBusDataMap ( const QMap< T, QDBusVariant > &  other  )  [inline]

Creates a map from the given QMap of QDBusVariant values.

Type information for the map object will be set to QDBusData::Variant also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using QDBusDataMap<T>(QDBusData::Type) with QDBusData::Variant

Parameters:
other the QMap of variant values to copy from
See also:
toVariantMap()

Member Function Documentation

template<typename T>
const_iterator QDBusDataMap< T >::begin (  )  const [inline]

Returns an iterator to the first item according to the key sort order.

See also:
QMap::begin()

Referenced by QDBusDataMap< T >::operator==().

template<typename T>
void QDBusDataMap< T >::clear (  )  [inline]

Clears the map.

Value type and, if applicable, container value type will stay untouched.

template<typename T>
QDBusData QDBusDataMap< T >::containerValueType (  )  const [inline]

Returns a container prototype for the map's value type.

Lists which have containers as their elements, i.e. hasContainerValueType() returns true this will actually specify the details for the use container, i.e. the returned data object can be queried for type and possible further subtypes.

Returns:
a data object detailing the value type or an invalid data object if the map does not have a container as its element type
See also:
QDBusDataMap<T>(const QDBusData&);
valueType()
QDBusData::Invalid
template<typename T>
uint QDBusDataMap< T >::count (  )  const [inline]

Returns the number of key/value pairs of this map object.

Returns:
the number of key/value pairs
See also:
isEmpty()

Referenced by QDBusDataMap< T >::operator==().

template<typename T>
const_iterator QDBusDataMap< T >::end (  )  const [inline]

Returns an iterator to an invalid position.

See also:
QMap::end()

Referenced by QDBusDataMap< T >::operator==().

template<typename T>
bool QDBusDataMap< T >::hasContainerValueType (  )  const [inline]

Checks whether the value type is a data container itself.

If the value of the map are containers as well, this will return true In this case containerValueType() will return a prototype for such a container.

Returns:
true if the value type is either QDBusData::Map, QDBusData::List or QDBusData::Struct, otherwise false
See also:
QDBusDataMap<T>(const QDBusData&)

References QDBusData::List, QDBusData::Map, and QDBusData::Struct.

Referenced by QDBusDataMap< T >::operator==().

template<typename T>
bool QDBusDataMap< T >::insert ( const T &  key,
const QDBusData data 
) [inline]

Inserts a given value for a given key.

Basically works like the respective QMap method, but checks if type of the new value matches the value type of the list. Maps that are invalid will accept any new type and will then be typed accordingly.

If data is invalid itself, it will not be inserted at any time.

Note:
the more common use case is to work with a QMap and then use the respective constructor to create the QDBusDataMap object
Parameters:
key the key were to insert into the map
data the data item to insert into the map
Returns:
true on successfull insert, otherwise false

References QDBusData::buildDBusSignature(), QDBusData::Invalid, QDBusData::type(), and QDBusData::typeName().

template<typename T>
bool QDBusDataMap< T >::isEmpty (  )  const [inline]

Checks whether this map object has any key/value pairs.

Returns:
true if there are no key/values in this map, otherwise false
See also:
count()
template<typename T>
bool QDBusDataMap< T >::isValid (  )  const [inline]

Checks whether this map object has a valid value type.

This is equal to checking valueType() for not being QDBusData::Invalid

Returns:
true if the map object is valid, otherwise false

References QDBusData::Invalid.

template<typename T>
QDBusData::Type QDBusDataMap< T >::keyType (  )  const [inline]

Returns the key type of the map object.

Returns:
one of the values of the QDBusData::Type enum suitable for map keys. See QDBusData::Map for details
See also:
valueType()
template<typename T>
QDBusDataMap<T>& QDBusDataMap< T >::operator= ( const QMap< T, QDBusData > &  other  )  [inline]

Copies from the given other map.

This behaves basically like copying a QMap through its assignment operator, i.e. no value are actually copied at this time.

Warning:
the value of the given other map have to be of the same type. If they aren't this maps's content will cleared and the value type will be set to QDBusData::Invalid
Parameters:
other the other map object to copy from
Returns:
a reference to this map object

References QDBusData::Invalid, QDBusData::operator=(), and QDBusData::QDBusData().

template<typename T>
QDBusDataMap<T>& QDBusDataMap< T >::operator= ( const QDBusDataMap< T > &  other  )  [inline]

Copies from the given other map.

This behaves basically like copying a QMap through its assignment operator, i.e. no value are actually copied at this time.

Parameters:
other the other map object to copy from
Returns:
a reference to this map object

References QDBusData::operator=().

template<typename T>
bool QDBusDataMap< T >::operator== ( const QDBusDataMap< T > &  other  )  const [inline]

Checks whether the given other map is equal to this one.

Two maps are considered equal when they have the same value type (and same container value type if the have one) and the key/value pairs are equal as well.

Parameters:
other the other map object to compare with
Returns:
true if the maps are equal, otherwise false
See also:
QDBusData::operator==()

References QDBusDataMap< T >::begin(), QDBusData::buildDBusSignature(), QDBusDataMap< T >::count(), QDBusDataMap< T >::end(), and QDBusDataMap< T >::hasContainerValueType().

template<typename T>
QMap<T, bool> QDBusDataMap< T >::toBoolMap ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of bool.

This is a convenience overload for the case when the map is of value type QDBusData::Bool.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::Bool)
Returns:
a QMap of bool containing the list object's boolean values or an empty map when converting fails
See also:
QDBusData::toBool()

References QDBusData::Bool.

template<typename T>
QMap<T, Q_UINT8> QDBusDataMap< T >::toByteMap ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of Q_UINT8.

This is a convenience overload for the case when the map is of value type QDBusData::Byte.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::Byte)
Returns:
a QMap of Q_UINT8 containing the list object's byte values or an empty map when converting fails
See also:
QDBusData::toBool()

References QDBusData::Byte.

template<typename T>
QMap<T, double> QDBusDataMap< T >::toDoubleMap ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of double.

This is a convenience overload for the case when the map is of value type QDBusData::Double.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::Double)
Returns:
a QMap of double containing the map object's double values or an empty map when converting fails
See also:
QDBusData::toDouble()

References QDBusData::Double.

template<typename T>
QMap<T, Q_INT16> QDBusDataMap< T >::toInt16Map ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of Q_INT16.

This is a convenience overload for the case when the map is of value type QDBusData::Int16.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::Int16)
Returns:
a QMap of Q_INT16 containing the map object's signed 16-bit integer values or an empty map when converting fails
See also:
QDBusData::toInt16()

References QDBusData::Int16.

template<typename T>
QMap<T, Q_INT32> QDBusDataMap< T >::toInt32Map ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of Q_INT32.

This is a convenience overload for the case when the map is of value type QDBusData::Int32.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::Int32)
Returns:
a QMap of Q_INT32 containing the map object's signed 32-bit integer values or an empty map when converting fails
See also:
QDBusData::toInt32()

References QDBusData::Int32.

template<typename T>
QMap<T, Q_INT64> QDBusDataMap< T >::toInt64Map ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of Q_INT64.

This is a convenience overload for the case when the map is of value type QDBusData::Int64.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::Int64)
Returns:
a QMap of Q_INT64 containing the map object's signed 64-bit integer values or an empty map when converting fails
See also:
QDBusData::toInt64()

References QDBusData::Int64.

template<typename T>
QMap<T, QDBusObjectPath> QDBusDataMap< T >::toObjectPathMap ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of object paths.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::ObjectPath)
Returns:
a QMap of object paths containing the map object's object path values or an empty map when converting fails
See also:
QDBusData::toObjectPath()

References QDBusData::ObjectPath.

template<typename T>
QMap<T, QDBusData> QDBusDataMap< T >::toQMap (  )  const [inline]

Converts the map object into a QMap with QDBusData elements.

Returns:
the key/value pairs of the map object as a QMap
template<typename T>
QMap<T, QString> QDBusDataMap< T >::toStringMap ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of QString.

This is a convenience overload for the case when the map is of value type QDBusData::String, see also toQStringList().

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::String)
Returns:
a QMap of QString containing the map object's string values or an empty map when converting fails
See also:
QDBusData::toString()

References QDBusData::String.

template<typename T>
QMap<T, Q_UINT16> QDBusDataMap< T >::toUInt16Map ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of Q_UINT16.

This is a convenience overload for the case when the map is of value type QDBusData::UInt16.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::UInt16)
Returns:
a QMap of Q_UINT16 containing the map object's unsigned 16-bit integer values or an empty map when converting fails
See also:
QDBusData::toUInt16()

References QDBusData::UInt16.

template<typename T>
QMap<T, Q_UINT32> QDBusDataMap< T >::toUInt32Map ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of Q_UINT32.

This is a convenience overload for the case when the map is of value type QDBusData::UInt32.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::UInt32)
Returns:
a QMap of Q_UINT32 containing the map object's unsigned 32-bit integer values or an empty map when converting fails
See also:
QDBusData::toUInt32()

References QDBusData::UInt32.

template<typename T>
QMap<T, Q_UINT64> QDBusDataMap< T >::toUInt64Map ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of Q_UINT64.

This is a convenience overload for the case when the map is of value type QDBusData::UInt64.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::UInt64)
Returns:
a QMap of Q_UINT64 containing the map object's unsigned 64-bit integer values or an empty map when converting fails
See also:
QDBusData::toUInt64()

References QDBusData::UInt64.

template<typename T>
QMap<T, QDBusVariant> QDBusDataMap< T >::toVariantMap ( bool *  ok = 0  )  const [inline]

Tries to get the map object's pairs as a QMap of QDBusVariant.

This is a convenience overload for the case when the map is of value type QDBusData::Variant.

Parameters:
ok optional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type QDBusData::Variant)
Returns:
a QMap of QDBusVariant containing the map object's QDBusVariant values or an empty map when converting fails
See also:
QDBusData::toVariant()

References QDBusData::Variant.

template<typename T>
QDBusData::Type QDBusDataMap< T >::valueType (  )  const [inline]

Returns the value type of the map object.

Returns:
one of the values of the QDBusData::Type enum
See also:
hasContainerValueType()
containerValueType()
keyType()

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

Generated by  doxygen 1.6.2