Expose dialog created by QgsAttributeDialog to iface

This commit is contained in:
Nathan Woodrow 2013-03-08 14:28:52 +10:00
parent 0dafb99993
commit a7700bafe6
4 changed files with 11 additions and 0 deletions

View File

@ -426,6 +426,7 @@ class QgisInterface : QObject
// @added in 1.6
virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false ) = 0;
virtual QDialog* getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0;
/** Return vector layers in edit mode
* @param modified whether to return only layers that have been modified
* @returns list of layers in legend order, or empty list

View File

@ -533,6 +533,12 @@ bool QgisAppInterface::openFeatureForm( QgsVectorLayer *vlayer, QgsFeature &f, b
return action.editFeature();
}
QDialog* QgisAppInterface::getFeatureForm( QgsVectorLayer *l, QgsFeature &f )
{
QgsAttributeDialog *dialog = new QgsAttributeDialog( l, &f, false );
return dialog->dialog();
}
QList<QgsMapLayer *> QgisAppInterface::editableLayers( bool modified ) const
{
return qgis->editableLayers( modified );

View File

@ -380,6 +380,8 @@ class QgisAppInterface : public QgisInterface
// @added in 1.6
virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false );
virtual QDialog* getFeatureForm(QgsVectorLayer *l, QgsFeature &f);
/** Return vector layers in edit mode
* @param modified whether to return only layers that have been modified
* @returns list of layers in legend order, or empty list

View File

@ -475,6 +475,8 @@ class GUI_EXPORT QgisInterface : public QObject
// @added in 1.6
virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false ) = 0;
virtual QDialog* getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0;
/** Return vector layers in edit mode
* @param modified whether to return only layers that have been modified
* @returns list of layers in legend order, or empty list