2011-03-23 00:58:54 +00:00
|
|
|
|
|
|
|
// \brief create attribute widget for editing
|
|
|
|
class QgsAttributeEditor : QObject
|
2011-03-22 23:18:06 +00:00
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
2011-03-23 00:00:23 +00:00
|
|
|
#include <qgsattributeeditor.h>
|
2011-03-22 23:18:06 +00:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2011-03-22 23:18:06 +00:00
|
|
|
public:
|
2015-02-18 17:00:36 +11:00
|
|
|
QgsAttributeEditor( QObject *parent /TransferThis/ );
|
2014-01-27 09:22:24 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates or prepares a attribute editor widget
|
|
|
|
* @param parent The parent object
|
|
|
|
* @param editor The widget to prepare. Set to null if it should be generated
|
|
|
|
* @param vl The vector layer to use as data source
|
|
|
|
* @param idx The field index this widget refers to
|
|
|
|
* @param value the value to initiate this widget with
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static QWidget* createAttributeEditor( QWidget* parent, QWidget* editor, QgsVectorLayer* vl, int idx, const QVariant& value ) /Factory/;
|
|
|
|
/**
|
|
|
|
* Creates or prepares a attribute editor widget
|
|
|
|
* @param parent The parent object
|
|
|
|
* @param editor The widget to prepare. Set to null if it should be generated
|
|
|
|
* @param vl The vector layer to use as data source
|
|
|
|
* @param idx The field index this widget refers to
|
|
|
|
* @param value the value to initiate this widget with
|
|
|
|
* @param context the context used for the created attribute editor
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static QWidget* createAttributeEditor( QWidget* parent, QWidget* editor, QgsVectorLayer* vl, int idx, const QVariant& value, QgsAttributeEditorContext& context ) /Factory/;
|
|
|
|
|
2011-03-22 23:18:06 +00:00
|
|
|
static bool retrieveValue( QWidget *widget, QgsVectorLayer *vl, int idx, QVariant &value );
|
|
|
|
static bool setValue( QWidget *widget, QgsVectorLayer *vl, int idx, const QVariant &value );
|
|
|
|
};
|