Parser constants definitions¶
Constant definitions that are used in the code to parse the json configs
Supported attribute types¶
- Parser.constants.ATTRIB_TYPE_STRING = 'string'¶
defines an attribute that is a string. For further information see
String Attribute
- Parser.constants.ATTRIB_TYPE_INT = 'int'¶
defines an attribute that is an integer. For further information see
Int Attribute
- Parser.constants.ATTRIB_TYPE_FLOAT = 'float'¶
defines an attribute that is a float. For further information see
Float Attribute
- Parser.constants.ATTRIB_TYPE_BOOL = 'bool'¶
defines an attribute that is a boolean. For further information see
Bool Attribute
- Parser.constants.ATTRIB_TYPE_HEX = 'hex'¶
defines an attribute that is a hexadecimal number. For further information see
Hex Attribute
- Parser.constants.ATTRIB_TYPE_REFERENCE_LIST = 'referenceList'¶
defines an attribute that is a list of references. For further information see
Reference List Attribute
- Parser.constants.ATTRIB_TYPE_STRING_LIST = 'stringList'¶
defines an attribute that is a list of strings. For further information see
String List Attribute
- Parser.constants.ATTRIB_TYPE_SELECTION = 'selection'¶
defines an attribute that is a selection. For further information see
Selection Attribute
- Parser.constants.ATTRIB_TYPE_SLIDER = 'slider'¶
defines an attribute that is a slider. For further information see
Slider Attribute
- Parser.constants.ATTRIB_TYPE_PARENT_REFERENCE = 'parentReference'¶
defines an attribute that is a reference to a parent attribute. For further information see
Parent Reference Attribute
Supported JSON config file keys¶
- Parser.constants.TYPE_KEY = 'type'¶
[ attribute type, REQUIRED ] Selects the type of an attribute definition
- Parser.constants.TOOLTIP_KEY = 'tooltip'¶
[ string, default = None ] Display a tooltip with additional information about this attribute definition
- Parser.constants.LABEL_KEY = 'label'¶
[ string, REQUIRED ] Used to define the label that is used in the UI this attribute definition
- Parser.constants.PLACEHOLDER_KEY = 'placeholder'¶
[ bool, default = False ] Specify that an attribute definition has a value that is assigned during runtime, for example by a logic runner invoked by the generator, thus a attribute instance of this definition does not have a value property.
- Parser.constants.HIDDEN_KEY = 'hidden'¶
[ bool, default = False ] Hides this attribute from the user interface if set to true
- Parser.constants.INHERIT_KEY = 'inherit'¶
[
link
, default = None ] Inherit all properties of an attribute definition to another attribute definition with the possibility to overwrite them if desidered
- Parser.constants.VALIDATION_KEY = 'validation'¶
[ string, default = None ] Used to specify a regex validation rule for this attribute definition
- Parser.constants.ELEMENTS_LIST_KEY = 'elements'¶
[ list, REQUIRED in certain cases ] Used to specify a list of valid elements for this attribute definition. The list element types can differ depending on the attribute type.
- Parser.constants.STEP_KEY = 'step'¶
[ number, default = 1 ] Used to specify a the step value for this attribute definition which will define how a spinner UI element will behave when the user clicks on the up or down arrow. If the value is an integer, the spinner will behave as a integer spinner. If the value is a float, the spinner will behave as a float spinner.
- Parser.constants.MIN_KEY = 'min'¶
[ number, default = None ] Used to specify a the minimum value for this attribute definition which will define the minimum value for a spinner UI element.
- Parser.constants.MAX_KEY = 'max'¶
[ number, default = None ] Used to specify a the maximum value for this attribute definition which will define the maximum value for a spinner UI element.
- Parser.constants.ALIGNMENT_KEY = 'alignment'¶
[ number, default = None ] Used to specify a alignment value for this attribute definition which will define make sure any input is a multiple of this number.