mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
QgisInterface::getFeatureForm() returns a QgsAttributeDialog
And some API comments
This commit is contained in:
parent
81055452e4
commit
4ade943937
@ -517,7 +517,7 @@ class QgisInterface : QObject
|
||||
*/
|
||||
virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false ) = 0;
|
||||
|
||||
virtual QDialog* getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0;
|
||||
virtual QgsAttributeDialog* getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0;
|
||||
|
||||
virtual QgsVectorLayerTools* vectorLayerTools() = 0;
|
||||
|
||||
|
@ -619,7 +619,7 @@ void QgisAppInterface::cacheloadForm( QString uifile )
|
||||
}
|
||||
}
|
||||
|
||||
QDialog* QgisAppInterface::getFeatureForm( QgsVectorLayer *l, QgsFeature &feature )
|
||||
QgsAttributeDialog* QgisAppInterface::getFeatureForm( QgsVectorLayer *l, QgsFeature &feature )
|
||||
{
|
||||
QgsDistanceArea myDa;
|
||||
|
||||
|
@ -450,7 +450,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
|
||||
*
|
||||
* @return A feature form
|
||||
*/
|
||||
virtual QDialog* getFeatureForm( QgsVectorLayer *layer, QgsFeature &feature );
|
||||
virtual QgsAttributeDialog* getFeatureForm( QgsVectorLayer *layer, QgsFeature &feature );
|
||||
|
||||
/**
|
||||
* Access the vector layer tools instance.
|
||||
|
@ -25,6 +25,7 @@ class QDockWidget;
|
||||
class QMainWindow;
|
||||
class QWidget;
|
||||
|
||||
class QgsAttributeDialog;
|
||||
class QgsComposerView;
|
||||
class QgsFeature;
|
||||
class QgsLayerTreeView;
|
||||
@ -571,10 +572,36 @@ class GUI_EXPORT QgisInterface : public QObject
|
||||
*/
|
||||
virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false ) = 0;
|
||||
|
||||
virtual QDialog* getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0;
|
||||
/**
|
||||
* Returns a feature form for a given feature
|
||||
*
|
||||
* @param layer The layer for which the dialog will be created
|
||||
* @param feature The feature for which the dialog will be created
|
||||
*
|
||||
* @return A feature form
|
||||
*/
|
||||
virtual QgsAttributeDialog* getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0;
|
||||
|
||||
/**
|
||||
* Access the vector layer tools instance.
|
||||
* With the help of this you can access methods like addFeature, startEditing
|
||||
* or stopEditing while giving the user the appropriate dialogs.
|
||||
*
|
||||
* @return An instance of the vector layer tools
|
||||
*/
|
||||
virtual QgsVectorLayerTools* vectorLayerTools() = 0;
|
||||
|
||||
/** This method is only needed when using a UI form with a custom widget plugin and calling
|
||||
* openFeatureForm or getFeatureForm from Python (PyQt4) and you havn't used the info tool first.
|
||||
* Python will crash bringing QGIS wtih it
|
||||
* if the custom form is not loaded from a C++ method call.
|
||||
*
|
||||
* This method uses a QTimer to call QUiLoader in order to load the form via C++
|
||||
* you only need to call this once after that you can call openFeatureForm/getFeatureForm
|
||||
* like normal
|
||||
*
|
||||
* More information here: http://qt-project.org/forums/viewthread/27098/
|
||||
*/
|
||||
virtual void preloadForm( QString uifile ) = 0;
|
||||
|
||||
/** Return vector layers in edit mode
|
||||
|
Loading…
x
Reference in New Issue
Block a user