Calc ui objects
ColumnFormat
¶
Creates a Column object which can be used to build a table with "input_user_table".
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_type |
|
"string_type", "float_type" or "select_type" |
required |
select_options |
|
Default = None, only utilised if data_type is "select_type". |
None
|
description |
|
Default = ''. The description of the column. |
''
|
max_char |
|
Default = 100, only utilised if data_type is "string_type". Default = 100. |
100
|
step |
|
Default = 1. The step between values, only utilised if data_type is "float_type". |
1
|
min_val |
|
Default = 0. Only utilised if data_type is "float_type". |
0
|
max_val |
|
Default = 100. Only utilised if data_type is "float_type". |
100
|
is_editable |
|
Default = True. Defines if the column is editable or not. |
True
|
Returns:
Type | Description |
---|---|
None |
Examples:
1 2 3 4 |
|
UiBoolean
¶
Creates a checkbox or a switch element which can be added to the calculation report.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
flavour |
|
Allowable flavours are "checkbox" and "switch". Default = "checkbox". |
'checkbox'
|
label |
|
Incremental value between the min and max of the range slider. Default = False. |
''
|
Returns:
Type | Description |
---|---|
None |
Examples:
1 |
|
UiNumberInput
¶
Creates a number input element which can be added to the calculation report.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
min_val |
|
Minimum value associated with the number input. |
required |
max_val |
|
Maximum value associated with the number input. |
required |
step |
|
Incremental value between the min and max of the range slider. |
required |
default |
|
Default value. Default = None. |
None
|
Returns:
Type | Description |
---|---|
None |
Examples:
1 |
|
UiRange
¶
Creates a number slider element which can be added to the calculation report.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
min_val |
|
Minimum value associated with the range slider |
required |
max_val |
|
Maximum value associated with the range slider |
required |
step |
|
Incremental value between the min and max of the range slider |
required |
default |
|
Default value. Default = None. |
None
|
Returns:
Type | Description |
---|---|
None |
Examples:
1 |
|
UiSelect
¶
Creates a dropdown input element with variables as defined in "list_vals".
Parameters:
Name | Type | Description | Default |
---|---|---|---|
list_vals |
|
A list of string values which the user can select from. |
required |
default |
|
Must be a value from the list_vals. Default = None. |
None
|
is_numeric |
|
Default = false, therefore it is assumed to be a string, otherwise a numerical value (i.e. float). Default = False. |
False
|
Returns:
Type | Description |
---|---|
None |
Examples:
1 |
|