26 , mPyFunctionName( function )
27 , mPyFormVarName( pyFormName )
31 QString initLayer = QString(
"%1 = sip.wrapinstance( %2, qgis.core.QgsVectorLayer )" )
33 .arg((
unsigned long ) form->
layer() );
46 QDialogButtonBox* buttonBox =
form()->findChild<QDialogButtonBox*>();
49 QObject::connect( buttonBox, SIGNAL( accepted() ),
form(), SLOT( accept() ) );
54 QDateTime dt = QDateTime::currentDateTime();
55 QString pyFeatureVarName = QString(
"_qgis_feature_%1" ).arg( dt.toString(
"yyyyMMddhhmmsszzz" ) );
56 QString initFeature = QString(
"%1 = sip.wrapinstance( %2, qgis.core.QgsFeature )" )
57 .arg( pyFeatureVarName )
62 QString expr = QString(
"%1( %2, %3, %4)" )
66 .arg( pyFeatureVarName );
70 QString delFeature = QString(
"del %1" ).arg( pyFeatureVarName );
static bool run(QString command, QString messageOnError=QString())
execute a python statement
QString id() const
Get this layer's unique ID, this ID is used to access this layer from map layer registry.