46 QHash<const char *, int> map = QHash<const char *, int>();
47 map.insert( QDateTimeEdit::staticMetaObject.className(), 10 );
48 map.insert( QgsDateTimeEdit::staticMetaObject.className(), 10 );
55 const QVariant::Type type = field.
type();
57 if ( type == QVariant::DateTime || type == QVariant::Date || type == QVariant::Time || config.contains( QStringLiteral(
"field_format" ) ) )
QgsEditorWidgetWrapper * create(QgsVectorLayer *vl, int fieldIdx, QWidget *editor, QWidget *parent) const override
Override this in your implementation.
QgsDateTimeEditFactory(const QString &name)
Wraps a date time widget.
QgsEditorWidgetSetup editorWidgetSetup() const
Get the editor widget setup for the field.
QHash< const char *, int > supportedWidgetTypes() override
Returns a list of widget types which this editor widget supports.
QgsFields fields() const override
Returns the list of fields of this layer.
QgsSearchWidgetWrapper * createSearchWidget(QgsVectorLayer *vl, int fieldIdx, QWidget *parent) const override
By default a simple QgsFilterLineEdit is returned as search widget.
Encapsulate a field in an attribute table or data source.
unsigned int fieldScore(const QgsVectorLayer *vl, int fieldIdx) const override
This method allows disabling this editor widget type for a certain field.
QgsEditorConfigWidget * configWidget(QgsVectorLayer *vl, int fieldIdx, QWidget *parent) const override
Override this in your implementation.
Represents a vector layer which manages a vector based data sets.
QgsField field(int fieldIdx) const
Get field at particular index (must be in range 0..N-1)