Changes its appearance depending on the specified type.
More...
#include <fieldvaluewidget.h>
|
| virtual void | focusInEvent (QFocusEvent *event) Q_DECL_OVERRIDE |
| | Sets the focus to the current widget, if any, and pre-selects any content. More...
|
| |
Changes its appearance depending on the specified type.
◆ FieldValueWidget()
Constructs a new widget that changes its appearance depending on the specified type.
- Parameters
-
| facetsController | Controller for validating type facets. |
| projectController | Controller for creating, loading and saving projects. |
| recordsController | Controller for adding, updating and removing records. |
| typesController | Controller for adding, updating and removing custom types. |
| parent | Optional owner widget. |
◆ focusInEvent()
| void FieldValueWidget::focusInEvent |
( |
QFocusEvent * |
event | ) |
|
|
protectedvirtual |
Sets the focus to the current widget, if any, and pre-selects any content.
- Parameters
-
| event | Event for focusing this widget. |
◆ getFieldType()
| QString FieldValueWidget::getFieldType |
( |
| ) |
const |
Gets the current type of the values changed by this widget.
- Returns
- Current type of the values changed by this widget.
◆ getFieldValue()
| QVariant FieldValueWidget::getFieldValue |
( |
| ) |
const |
Gets the current value of this widget.
- Exceptions
-
| std::runtime_error | if the current field type is unknown. |
- Returns
- Current value of this widget.
◆ setFieldType()
| void FieldValueWidget::setFieldType |
( |
const QString & |
fieldType | ) |
|
Sets the current type of the values changed by this widget.
- Exceptions
-
| std::runtime_error | if the field type is unknown. |
- Parameters
-
| fieldType | Current type of the values changed by this widget. |
◆ setFieldValue()
| void FieldValueWidget::setFieldValue |
( |
const QVariant & |
fieldValue | ) |
|
Sets the current value of this widget.
- Exceptions
-
| std::runtime_error | if the current field type is unknown. |
- Parameters
-
| fieldValue | Current value of this widget. |
◆ validate()
| QString FieldValueWidget::validate |
( |
| ) |
|
Validates the current value against all facets of its type.
- Returns
- Translated error message, if any validation errors occur, and an empty string otherwise.
The documentation for this class was generated from the following files:
- Source/Tome/Features/Fields/View/fieldvaluewidget.h
- Source/Tome/Features/Fields/View/fieldvaluewidget.cpp