ConfigOptions: GUI type as enum, not string.

Fixing compilation error in the new Platform code.
Fixing one issue in FDM support after splitting the top/bottom
interface layers.
This commit is contained in:
Vojtech Bubnik 2021-03-11 15:01:24 +01:00
parent 051ba0e6f4
commit a9c3d270e6
10 changed files with 66 additions and 55 deletions

View file

@ -1441,6 +1441,24 @@ private:
class ConfigOptionDef
{
public:
enum class GUIType {
undefined,
// Open enums, integer value could be one of the enumerated values or something else.
i_enum_open,
// Open enums, float value could be one of the enumerated values or something else.
f_enum_open,
// Color picker, string value.
color,
// ???
select_open,
// Currently unused.
slider,
// Static text
legend,
// Vector value, but edited as a single string.
one_string,
};
// Identifier of this option. It is stored here so that it is accessible through the by_serialization_key_ordinal map.
t_config_option_key opt_key;
// What type? bool, int, string etc.
@ -1524,7 +1542,7 @@ public:
// Usually empty.
// Special values - "i_enum_open", "f_enum_open" to provide combo box for int or float selection,
// "select_open" - to open a selection dialog (currently only a serial port selection).
std::string gui_type;
GUIType gui_type { GUIType::undefined };
// Usually empty. Otherwise "serialized" or "show_value"
// The flags may be combined.
// "serialized" - vector valued option is entered in a single edit field. Values are separated by a semicolon.