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