Skip to content

Conversation

@himaj47
Copy link

@himaj47 himaj47 commented Apr 8, 2025

Issue #150 is resolved.

Changes Made

  • Added DropDownListEditor class in params_editor script which parses the additional_constraints as key-value pairs in CSV format and fills the drop-down list, while passing the corresponding integer value (keys) in parameter updates.

  • Introduced key-value pair {"DROP_DOWN_LIST": DropDownListEditor} in EDITOR_TYPES

  • Updated add_editor_widgets function to check if an integer parameter's descriptor has an additional_constraints and assign DropDownListEditor instead of the default integer editor if it does.

  • added a new Qt Widget editor_drop_down_list.ui which uses QComboBox to implement drop down list feature.

This is How it looks

Screenshot from 2025-03-31 10-40-14
Screenshot from 2025-03-31 10-42-52
Screenshot from 2025-03-31 10-39-42

Parameter.Type.BYTE_ARRAY: ArrayEditor,
Parameter.Type.INTEGER_ARRAY: ArrayEditor,
Parameter.Type.DOUBLE_ARRAY: ArrayEditor,
Parameter.Type.STRING_ARRAY: ArrayEditor,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete ARRAY type here?
i have tried directly adding DROP_DOWN_LIST, it works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you see this comment @himaj47 ?

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants