VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Public Member Functions | List of all members
VariantConverter< QMap< QString, T > > Class Template Reference

Helper template class to convert QVariantMaps to and from QMaps with a convertable value type T. More...

Public Member Functions

QMap< QString, T > fromVariant (const QVariant &value)
 Returns value converted to a QMap<QString, T>. More...
 
QVariant toVariant (const QMap< QString, T > &value)
 Returns value converted to a QVariant of type QVariantMap. More...
 

Detailed Description

template<typename T>
class VariantConverter< QMap< QString, T > >

Helper template class to convert QVariantMaps to and from QMaps with a convertable value type T.

Template Parameters
Templatetype which can be converted by VariantConverter to and from a QVariant
See also
VariantConverter

Member Function Documentation

template<typename T >
QMap<QString, T> VariantConverter< QMap< QString, T > >::fromVariant ( const QVariant value)
inline

Returns value converted to a QMap<QString, T>.

Template Parameters
Templatetype for which there needs to be a valid VariantConverter specialization.
Parameters
valueQVariant of type QVariantMap to convert
template<typename T >
QVariant VariantConverter< QMap< QString, T > >::toVariant ( const QMap< QString, T > &  value)
inline

Returns value converted to a QVariant of type QVariantMap.

Template Parameters
Templatetype for which there needs to be a valid VariantConverter specialization.
Parameters
valueTemplated QMap to convert