27 , mPyFunctionName( function )
28 , mPyFormVarName( pyFormName )
30 mPyLayerVarName = QString(
"_qgis_layer_%1" ).arg( form->
layer()->
id() );
31 mPyLayerVarName.replace( QRegExp(
"[^a-zA-Z0-9_]" ),
"_" );
33 QString initLayer = QString(
"%1 = sip.wrapinstance( %2, qgis.core.QgsVectorLayer )" )
34 .arg( mPyLayerVarName )
35 .arg((
unsigned long ) form->
layer() );
42 QString delLayer = QString(
"del %1" ).arg( mPyLayerVarName );
48 QDialogButtonBox* buttonBox =
form()->findChild<QDialogButtonBox*>();
53 QObject::disconnect( buttonBox, SIGNAL( accepted() ),
form(), SLOT( accept() ) );
54 QObject::connect( buttonBox, SIGNAL( accepted() ),
form(), SLOT( accept() ) );
59 QDateTime dt = QDateTime::currentDateTime();
60 QString pyFeatureVarName = QString(
"_qgis_feature_%1" ).arg( dt.toString(
"yyyyMMddhhmmsszzz" ) );
61 QString initFeature = QString(
"%1 = sip.wrapinstance( %2, qgis.core.QgsFeature )" )
62 .arg( pyFeatureVarName )
67 QString expr = QString(
"%1( %2, %3, %4)" )
68 .arg( mPyFunctionName )
69 .arg( mPyFormVarName )
70 .arg( mPyLayerVarName )
71 .arg( pyFeatureVarName );
75 QString delFeature = QString(
"del %1" ).arg( pyFeatureVarName );