49 cfg.insert(
"Layer", configElement.attribute(
"Layer" ) );
50 cfg.insert(
"Key", configElement.attribute(
"Key" ) );
51 cfg.insert(
"Value", configElement.attribute(
"Value" ) );
52 cfg.insert(
"FilterExpression", configElement.attribute(
"FilterExpression" ) );
53 cfg.insert(
"OrderByValue", configElement.attribute(
"OrderByValue" ) );
54 cfg.insert(
"AllowMulti", configElement.attribute(
"AllowMulti" ) );
55 cfg.insert(
"AllowNull", configElement.attribute(
"AllowNull" ) );
66 configElement.setAttribute(
"Layer", config.value(
"Layer" ).toString() );
67 configElement.setAttribute(
"Key", config.value(
"Key" ).toString() );
68 configElement.setAttribute(
"Value", config.value(
"Value" ).toString() );
69 configElement.setAttribute(
"FilterExpression", config.value(
"FilterExpression" ).toString() );
70 configElement.setAttribute(
"OrderByValue", config.value(
"OrderByValue" ).toBool() );
71 configElement.setAttribute(
"AllowMulti", config.value(
"AllowMulti" ).toBool() );
72 configElement.setAttribute(
"AllowNull", config.value(
"AllowNull" ).toBool() );
82 if ( cache.isValid() )
91 if ( config.value(
"AllowMulti" ).toBool() )
93 QStringList keyList = value.toString().remove( QChar(
'{' ) ).remove( QChar(
'}' ) ).split(
"," );
94 QStringList valueList;
98 if ( keyList.contains( item.first.toString() ) )
100 valueList << item.second;
104 return valueList.join(
", " ).prepend(
'{' ).append(
'}' );
108 if ( value.isNull() )
111 return settings.value(
"qgis/nullValue",
"NULL" ).toString();
116 if ( item.first == value )
123 return QString(
"(%1)" ).arg( value.toString() );