Bug 337652 - Edit flag and enum fields using literals from a structure definition
Summary: Edit flag and enum fields using literals from a structure definition
Status: REPORTED
Alias: None
Product: okteta
Classification: Applications
Component: Structures Tool (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Alex Richardson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-21 07:49 UTC by Leonid Titov
Modified: 2022-06-03 16:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leonid Titov 2014-07-21 07:49:03 UTC
It would be great if it will be possible to edit flag and enum fields using literal names from a structure definition.

Current behaviour:
Imagine I have an enum field. Its value is shown as a text label. When I double-click this field in a structure view, this text label changes to corresponding number and I can change this value using numeric notation. So I need to remember (or lookup over a definition file) mapping of this enum to find necessary number. 

Similar thing happens with a flag field.

Proposed behaviour:
It would be great if I caoud choose a new value from a drop-down list. So after a double-click on an enum field a drop-down list with possible values should be shown (probably together with its numerical codes), and choosing an item from this drop-down list will change the value of this field.

Similar behaviour I expect for flags field, considering multiply choose list to select several flags at once for a field.
Comment 1 Friedrich W. H. Kossebau 2022-06-03 16:49:12 UTC
Git commit 29d529e7cc4be8ca5370bef20d8971a9e79ac941 by Friedrich W. H. Kossebau.
Committed on 31/05/2022 at 14:13.
Pushed by kossebau into branch '0.26'.

Structures tool: use combobox editor for enums with defined values

M  +21   -0    kasten/controllers/view/structures/datatypes/primitive/basicprimitivedatainformation.hpp
M  +16   -0    kasten/controllers/view/structures/datatypes/primitive/bitfield/boolbitfielddatainformation.cpp
M  +4    -0    kasten/controllers/view/structures/datatypes/primitive/bitfield/boolbitfielddatainformation.hpp
M  +16   -0    kasten/controllers/view/structures/datatypes/primitive/bitfield/signedbitfielddatainformation.cpp
M  +4    -0    kasten/controllers/view/structures/datatypes/primitive/bitfield/signedbitfielddatainformation.hpp
M  +16   -0    kasten/controllers/view/structures/datatypes/primitive/bitfield/unsignedbitfielddatainformation.cpp
M  +4    -0    kasten/controllers/view/structures/datatypes/primitive/bitfield/unsignedbitfielddatainformation.hpp
M  +7    -0    kasten/controllers/view/structures/datatypes/primitive/booldatainformation.hpp
M  +6    -0    kasten/controllers/view/structures/datatypes/primitive/chardatainformation.hpp
M  +6    -0    kasten/controllers/view/structures/datatypes/primitive/doubledatainformation.hpp
M  +40   -0    kasten/controllers/view/structures/datatypes/primitive/enumdatainformation.cpp
M  +4    -0    kasten/controllers/view/structures/datatypes/primitive/enumdatainformation.hpp
M  +6    -0    kasten/controllers/view/structures/datatypes/primitive/floatdatainformation.hpp
M  +15   -0    kasten/controllers/view/structures/datatypes/primitive/primitivedatainformation.cpp
M  +9    -0    kasten/controllers/view/structures/datatypes/primitive/primitivedatainformation.hpp
M  +8    -0    kasten/controllers/view/structures/datatypes/primitive/sintdatainformation.hpp
M  +8    -0    kasten/controllers/view/structures/datatypes/primitive/uintdatainformation.hpp

https://invent.kde.org/utilities/okteta/commit/29d529e7cc4be8ca5370bef20d8971a9e79ac941