26 connect( mLayerName, SIGNAL( layerChanged(
QgsMapLayer* ) ), mKeyColumn, SLOT( setLayer(
QgsMapLayer* ) ) );
27 connect( mLayerName, SIGNAL( layerChanged(
QgsMapLayer* ) ), mValueColumn, SLOT( setLayer(
QgsMapLayer* ) ) );
28 connect( mEditExpression, SIGNAL( clicked() ),
this, SLOT(
editExpression() ) );
35 cfg.insert(
"Layer", mLayerName->currentLayer()->id() );
36 cfg.insert(
"Key", mKeyColumn->currentField() );
37 cfg.insert(
"Value", mValueColumn->currentField() );
38 cfg.insert(
"AllowMulti", mAllowMulti->isChecked() );
39 cfg.insert(
"AllowNull", mAllowNull->isChecked() );
40 cfg.insert(
"OrderByValue", mOrderByValue->isChecked() );
41 cfg.insert(
"FilterExpression", mFilterExpression->toPlainText() );
49 mLayerName->setLayer( lyr );
50 mKeyColumn->setField( config.value(
"Key" ).toString() );
51 mValueColumn->setField( config.value(
"Value" ).toString() );
52 mAllowMulti->setChecked( config.value(
"AllowMulti" ).toBool() );
53 mAllowNull->setChecked( config.value(
"AllowNull" ).toBool() );
54 mOrderByValue->setChecked( config.value(
"OrderByValue" ).toBool() );
55 mFilterExpression->setPlainText( config.value(
"FilterExpression" ).toString() );
65 dlg.setWindowTitle(
tr(
"Edit filter expression" ) );
67 if ( dlg.exec() == QDialog::Accepted )
69 mFilterExpression->setText( dlg.expressionBuilder()->expressionText() );