33{
34 if (!index.isValid()) {
35 return QVariant();
36 }
38 switch (role) {
39 case Qt::DisplayRole: {
40 switch (index.column()) {
41 case 0:
43 case 1: {
45 switch (vt) {
47 return i18n("Invalid");
49 int vt =
m_store->
entries()[index.row()].value().asVariant().type();
50 switch (vt) {
51 case QVariant::Date:
52 case QVariant::DateTime:
53 return i18n("Date");
54 case QVariant::Double:
55 case QVariant::Int:
56 return i18n("Number");
57 case QVariant::String:
58 return i18n("String");
59 default:
60 return i18n("Variant (%1)", vt);
61 }
62 }
64 return i18n("Ordered array");
66 return i18n("Unordered array");
68 return i18n("Alternative array");
70 return i18n("Language array");
72 return i18n("Structure");
74 return i18n("Rational");
75 }
76 break;
77 }
78 case 2:
80 }
81 break;
82 }
83 default:
84 return QVariant();
85 }
86 return QVariant();
87}