Specifies a maximum length for a custom String type.
More...
#include <maximumstringlengthfacet.h>
|
| QWidget * | createWidget (const FacetContext &context) const Q_DECL_OVERRIDE |
| | Creates a widget for specifying the restriction of the domain of the custom type (e.g. QSpinBox). More...
|
| |
| const QVariant | getDefaultValue () const Q_DECL_OVERRIDE |
| | Gets the default restriction of the domain of the custom type (e.g. default minimum value). More...
|
| |
| const QString | getDescriptionForValue (const QVariant facetValue) const Q_DECL_OVERRIDE |
| | Gets the text to add to the description of a field, explaining the restriction of the domain of the custom type (e.g. "Minimum value is 0."). More...
|
| |
| const QString | getDisplayName () const Q_DECL_OVERRIDE |
| | Gets the name of the restriction of the domain of the custom type (e.g. "Minimum Value"). More...
|
| |
| const QString | getKey () const Q_DECL_OVERRIDE |
| | Gets the key of the restriction of the domain of the custom type used for serialization. More...
|
| |
| const QString | getTargetType () const Q_DECL_OVERRIDE |
| | Gets the custom type whose domain can be restricted by this facet. More...
|
| |
| const QVariant | getWidgetValue (QWidget *widget) const Q_DECL_OVERRIDE |
| | Gets the current value of the widget for specifying the restriction of the domain of the custom type (e.g. value of a QSpinBox). More...
|
| |
| void | setWidgetValue (QWidget *widget, const QVariant value) const Q_DECL_OVERRIDE |
| | Sets the current value of the widget for specifying the restriction of the domain of the custom type (e.g. value of a QSpinBox). More...
|
| |
| QString | validateValue (const FacetContext &context, const QVariant value, const QVariant facetValue) const Q_DECL_OVERRIDE |
| | Validates the specified field value against the domain restrictions imposed by this facet. More...
|
| |
|
| Facet () |
| | Constructs a new facet for restricting the domain of a custom type.
|
| |
Specifies a maximum length for a custom String type.
◆ createWidget()
| QWidget * MaximumStringLengthFacet::createWidget |
( |
const FacetContext & |
context | ) |
const |
|
virtual |
Creates a widget for specifying the restriction of the domain of the custom type (e.g. QSpinBox).
- Parameters
-
| context | Additional information for creating the widget. |
- Returns
- Widget for specifying the restriction of the domain of the custom type.
Implements Tome::Facet.
◆ getDefaultValue()
| const QVariant MaximumStringLengthFacet::getDefaultValue |
( |
| ) |
const |
|
virtual |
Gets the default restriction of the domain of the custom type (e.g. default minimum value).
- Returns
- Default restriction of the domain of the custom type (e.g. default minimum value).
Implements Tome::Facet.
◆ getDescriptionForValue()
| const QString MaximumStringLengthFacet::getDescriptionForValue |
( |
const QVariant |
facetValue | ) |
const |
|
virtual |
Gets the text to add to the description of a field, explaining the restriction of the domain of the custom type (e.g. "Minimum value is 0.").
- Parameters
-
| facetValue | Restriction of the domain of the custom type. |
- Returns
- Text to add to the description of a field, explaining the restriction of the domain of the custom type.
Implements Tome::Facet.
◆ getDisplayName()
| const QString MaximumStringLengthFacet::getDisplayName |
( |
| ) |
const |
|
virtual |
Gets the name of the restriction of the domain of the custom type (e.g. "Minimum Value").
- Returns
- Name of the restriction of the domain of the custom type.
Implements Tome::Facet.
◆ getKey()
| const QString MaximumStringLengthFacet::getKey |
( |
| ) |
const |
|
virtual |
Gets the key of the restriction of the domain of the custom type used for serialization.
- Returns
- Key of the restriction of the domain of the custom type used for serialization.
Implements Tome::Facet.
◆ getTargetType()
| const QString MaximumStringLengthFacet::getTargetType |
( |
| ) |
const |
|
virtual |
Gets the custom type whose domain can be restricted by this facet.
- Returns
- Custom type whose domain can be restricted by this facet.
Implements Tome::Facet.
◆ getWidgetValue()
| const QVariant MaximumStringLengthFacet::getWidgetValue |
( |
QWidget * |
widget | ) |
const |
|
virtual |
Gets the current value of the widget for specifying the restriction of the domain of the custom type (e.g. value of a QSpinBox).
- Parameters
-
| widget | Widget to get the current value of. |
- Returns
- Current value of the widget for specifying the restriction of the domain of the custom type.
Implements Tome::Facet.
◆ setWidgetValue()
| void MaximumStringLengthFacet::setWidgetValue |
( |
QWidget * |
widget, |
|
|
const QVariant |
value |
|
) |
| const |
|
virtual |
Sets the current value of the widget for specifying the restriction of the domain of the custom type (e.g. value of a QSpinBox).
- Parameters
-
| widget | Widget to set the current value of. |
| value | Value to set. |
Implements Tome::Facet.
◆ validateValue()
| QString MaximumStringLengthFacet::validateValue |
( |
const FacetContext & |
context, |
|
|
const QVariant |
value, |
|
|
const QVariant |
facetValue |
|
) |
| const |
|
virtual |
Validates the specified field value against the domain restrictions imposed by this facet.
- Parameters
-
| context | Context to validate the field value in. |
| value | Field value to validate. |
| facetValue | Restriction of the domain of the custom type (e.g. minimum value). |
- Returns
- Translated error message, if any validation errors occur, and an empty string otherwise.
Implements Tome::Facet.
The documentation for this class was generated from the following files:
- Source/Tome/Features/Facets/Controller/maximumstringlengthfacet.h
- Source/Tome/Features/Facets/Controller/maximumstringlengthfacet.cpp