4 # Copyright 2009 Develer S.r.l. (http://www.develer.com/)
9 # Author: Lorenzo Berni <duplo@develer.com>
12 from PyQt4.QtCore import *
14 def getString(qvariant):
15 string = unicode(qvariant.toString())
18 def getStringList(qvariant):
19 string_list = [unicode(string) for string in qvariant.toStringList()]
22 def getStringDict(qvariant):
24 for key, value in qvariant.toMap().items():
25 dict_str_str[unicode(key)] = unicode(value.toString())
28 def getBool(qvariant):
29 return qvariant.toBool()
31 def getDict(qvariant):
33 for key, value in qvariant.toMap().items():
34 dict_str_variant[unicode(key)] = value
35 return dict_str_variant