![]() |
Tome
A generic data editor for games supporting arbitrary input and output formats.
|
Restricts the domain of a custom type. More...
#include <facet.h>
Public Member Functions | |
| Facet () | |
| Constructs a new facet for restricting the domain of a custom type. | |
| virtual QWidget * | createWidget (const FacetContext &context) const =0 |
| Creates a widget for specifying the restriction of the domain of the custom type (e.g. QSpinBox). More... | |
| virtual const QVariant | getDefaultValue () const =0 |
| Gets the default restriction of the domain of the custom type (e.g. default minimum value). More... | |
| virtual const QString | getDescriptionForValue (const QVariant facetValue) const =0 |
| 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... | |
| virtual const QString | getDisplayName () const =0 |
| Gets the name of the restriction of the domain of the custom type (e.g. "Minimum Value"). More... | |
| virtual const QString | getKey () const =0 |
| Gets the key of the restriction of the domain of the custom type used for serialization. More... | |
| virtual const QString | getTargetType () const =0 |
| Gets the custom type whose domain can be restricted by this facet. More... | |
| virtual const QVariant | getWidgetValue (QWidget *widget) const =0 |
| 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... | |
| virtual void | setWidgetValue (QWidget *widget, const QVariant value) const =0 |
| 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... | |
| virtual QString | validateValue (const FacetContext &context, const QVariant value, const QVariant facetValue) const =0 |
| Validates the specified field value against the domain restrictions imposed by this facet. More... | |
Restricts the domain of a custom type.
|
pure virtual |
Creates a widget for specifying the restriction of the domain of the custom type (e.g. QSpinBox).
| context | Additional information for creating the widget. |
Implemented in Tome::MaximumIntegerValueFacet, Tome::LocalizedStringFacet, Tome::MaximumRealValueFacet, Tome::MaximumStringLengthFacet, Tome::MinimumIntegerValueFacet, Tome::MinimumRealValueFacet, Tome::RemovedFilePrefixFacet, Tome::RemovedFileSuffixFacet, and Tome::RequiredReferenceAncestorFacet.
|
pure virtual |
Gets the default restriction of the domain of the custom type (e.g. default minimum value).
Implemented in Tome::MaximumIntegerValueFacet, Tome::LocalizedStringFacet, Tome::MaximumRealValueFacet, Tome::MaximumStringLengthFacet, Tome::MinimumIntegerValueFacet, Tome::MinimumRealValueFacet, Tome::RemovedFilePrefixFacet, Tome::RemovedFileSuffixFacet, and Tome::RequiredReferenceAncestorFacet.
|
pure 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.").
| facetValue | Restriction of the domain of the custom type. |
Implemented in Tome::MaximumIntegerValueFacet, Tome::LocalizedStringFacet, Tome::MaximumRealValueFacet, Tome::MaximumStringLengthFacet, Tome::MinimumIntegerValueFacet, Tome::MinimumRealValueFacet, Tome::RemovedFilePrefixFacet, Tome::RemovedFileSuffixFacet, and Tome::RequiredReferenceAncestorFacet.
|
pure virtual |
Gets the name of the restriction of the domain of the custom type (e.g. "Minimum Value").
Implemented in Tome::MaximumIntegerValueFacet, Tome::LocalizedStringFacet, Tome::MaximumRealValueFacet, Tome::MaximumStringLengthFacet, Tome::MinimumIntegerValueFacet, Tome::MinimumRealValueFacet, Tome::RemovedFilePrefixFacet, Tome::RemovedFileSuffixFacet, and Tome::RequiredReferenceAncestorFacet.
|
pure virtual |
Gets the key of the restriction of the domain of the custom type used for serialization.
Implemented in Tome::MaximumIntegerValueFacet, Tome::LocalizedStringFacet, Tome::MaximumRealValueFacet, Tome::MaximumStringLengthFacet, Tome::MinimumIntegerValueFacet, Tome::MinimumRealValueFacet, Tome::RemovedFilePrefixFacet, Tome::RemovedFileSuffixFacet, and Tome::RequiredReferenceAncestorFacet.
|
pure virtual |
Gets the custom type whose domain can be restricted by this facet.
Implemented in Tome::MaximumIntegerValueFacet, Tome::LocalizedStringFacet, Tome::MaximumRealValueFacet, Tome::MaximumStringLengthFacet, Tome::MinimumIntegerValueFacet, Tome::MinimumRealValueFacet, Tome::RemovedFilePrefixFacet, Tome::RemovedFileSuffixFacet, and Tome::RequiredReferenceAncestorFacet.
|
pure 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).
| widget | Widget to get the current value of. |
Implemented in Tome::MaximumIntegerValueFacet, Tome::LocalizedStringFacet, Tome::MaximumRealValueFacet, Tome::MaximumStringLengthFacet, Tome::MinimumIntegerValueFacet, Tome::MinimumRealValueFacet, Tome::RemovedFilePrefixFacet, Tome::RemovedFileSuffixFacet, and Tome::RequiredReferenceAncestorFacet.
|
pure 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).
| widget | Widget to set the current value of. |
| value | Value to set. |
Implemented in Tome::MaximumIntegerValueFacet, Tome::LocalizedStringFacet, Tome::MaximumRealValueFacet, Tome::MaximumStringLengthFacet, Tome::MinimumIntegerValueFacet, Tome::MinimumRealValueFacet, Tome::RemovedFilePrefixFacet, Tome::RemovedFileSuffixFacet, and Tome::RequiredReferenceAncestorFacet.
|
pure virtual |
Validates the specified field value against the domain restrictions imposed by this facet.
| 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). |
Implemented in Tome::MaximumIntegerValueFacet, Tome::LocalizedStringFacet, Tome::MaximumRealValueFacet, Tome::MaximumStringLengthFacet, Tome::MinimumIntegerValueFacet, Tome::MinimumRealValueFacet, Tome::RemovedFilePrefixFacet, Tome::RemovedFileSuffixFacet, and Tome::RequiredReferenceAncestorFacet.
1.8.13