|
| QgsField (const QgsField &other) |
| Copy constructor. More...
|
|
| QgsField (const QString &name=QString(), QVariant::Type type=QVariant::Invalid, const QString &typeName=QString(), int len=0, int prec=0, const QString &comment=QString(), QVariant::Type subType=QVariant::Invalid) |
| Constructor. More...
|
|
virtual | ~QgsField () |
|
QString | alias () const |
| Returns the alias for the field (the friendly displayed name of the field ), or an empty string if there is no alias. More...
|
|
QString | comment () const |
| Returns the field comment. More...
|
|
QgsField::ConfigurationFlags | configurationFlags () const |
| Returns the Flags for the field (searchable, …) More...
|
|
const QgsFieldConstraints & | constraints () const |
| Returns constraints which are present for the field. More...
|
|
bool | convertCompatible (QVariant &v, QString *errorMessage=nullptr) const |
| Converts the provided variant to a compatible format. More...
|
|
QgsDefaultValue | defaultValueDefinition () const |
| Returns the expression used when calculating the default value for the field. More...
|
|
QString | displayName () const |
| Returns the name to use when displaying this field. More...
|
|
QString | displayNameWithAlias () const |
| Returns the name to use when displaying this field and adds the alias in parenthesis if it is defined. More...
|
|
QString | displayString (const QVariant &v) const |
| Formats string for display. More...
|
|
QString | displayType (bool showConstraints=false) const |
| Returns the type to use when displaying this field, including the length and precision of the datatype if applicable. More...
|
|
QgsEditorWidgetSetup | editorWidgetSetup () const |
| Gets the editor widget setup for the field. More...
|
|
bool | isDateOrTime () const |
| Returns if this field is a date and/or time type. More...
|
|
bool | isNumeric () const |
| Returns if this field is numeric. More...
|
|
bool | isReadOnly () const |
| Returns true if this field is a read-only field. More...
|
|
int | length () const |
| Gets the length of the field. More...
|
|
QString | name () const |
| Returns the name of the field. More...
|
|
| operator QVariant () const |
| Allows direct construction of QVariants from fields. More...
|
|
bool | operator!= (const QgsField &other) const |
|
QgsField & | operator= (const QgsField &other) |
| Assignment operator. More...
|
|
bool | operator== (const QgsField &other) const |
|
int | precision () const |
| Gets the precision of the field. More...
|
|
void | setAlias (const QString &alias) |
| Sets the alias for the field (the friendly displayed name of the field ). More...
|
|
void | setComment (const QString &comment) |
| Set the field comment. More...
|
|
void | setConfigurationFlags (QgsField::ConfigurationFlags configurationFlags) |
| Sets the Flags for the field (searchable, …) More...
|
|
void | setConstraints (const QgsFieldConstraints &constraints) |
| Sets constraints which are present for the field. More...
|
|
void | setDefaultValueDefinition (const QgsDefaultValue &defaultValueDefinition) |
| Sets an expression to use when calculating the default value for the field. More...
|
|
void | setEditorWidgetSetup (const QgsEditorWidgetSetup &v) |
| Set the editor widget setup for the field. More...
|
|
void | setLength (int len) |
| Set the field length. More...
|
|
void | setName (const QString &name) |
| Set the field name. More...
|
|
void | setPrecision (int precision) |
| Set the field precision. More...
|
|
void | setReadOnly (bool readOnly) |
| Make field read-only if readOnly is set to true. More...
|
|
void | setSubType (QVariant::Type subType) |
| If the field is a collection, set its element's type. More...
|
|
void | setType (QVariant::Type type) |
| Set variant type. More...
|
|
void | setTypeName (const QString &typeName) |
| Set the field type. More...
|
|
QVariant::Type | subType () const |
| If the field is a collection, gets its element's type. More...
|
|
QVariant::Type | type () const |
| Gets variant type of the field as it will be retrieved from data source. More...
|
|
QString | typeName () const |
| Gets the field type. More...
|
|