Skip to content

Commit a7700ba

Browse files
committedMar 8, 2013
Expose dialog created by QgsAttributeDialog to iface
1 parent 0dafb99 commit a7700ba

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed
 

‎python/gui/qgisinterface.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ class QgisInterface : QObject
426426
// @added in 1.6
427427
virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false ) = 0;
428428

429+
virtual QDialog* getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0;
429430
/** Return vector layers in edit mode
430431
* @param modified whether to return only layers that have been modified
431432
* @returns list of layers in legend order, or empty list

‎src/app/qgisappinterface.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,12 @@ bool QgisAppInterface::openFeatureForm( QgsVectorLayer *vlayer, QgsFeature &f, b
533533
return action.editFeature();
534534
}
535535

536+
QDialog* QgisAppInterface::getFeatureForm( QgsVectorLayer *l, QgsFeature &f )
537+
{
538+
QgsAttributeDialog *dialog = new QgsAttributeDialog( l, &f, false );
539+
return dialog->dialog();
540+
}
541+
536542
QList<QgsMapLayer *> QgisAppInterface::editableLayers( bool modified ) const
537543
{
538544
return qgis->editableLayers( modified );

‎src/app/qgisappinterface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ class QgisAppInterface : public QgisInterface
380380
// @added in 1.6
381381
virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false );
382382

383+
virtual QDialog* getFeatureForm(QgsVectorLayer *l, QgsFeature &f);
384+
383385
/** Return vector layers in edit mode
384386
* @param modified whether to return only layers that have been modified
385387
* @returns list of layers in legend order, or empty list

‎src/gui/qgisinterface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,8 @@ class GUI_EXPORT QgisInterface : public QObject
475475
// @added in 1.6
476476
virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false ) = 0;
477477

478+
virtual QDialog* getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0;
479+
478480
/** Return vector layers in edit mode
479481
* @param modified whether to return only layers that have been modified
480482
* @returns list of layers in legend order, or empty list

0 commit comments

Comments
 (0)
Please sign in to comment.