navigate.controller.sub_controllers.features_popup.FeatureListGraphController
- class navigate.controller.sub_controllers.features_popup.FeatureListGraphController(feature_list_view, feature_content_view, preview_btn, child_popups=None)
Bases:
object
- __init__(feature_list_view, feature_content_view, preview_btn, child_popups=None)
Initialize feature list window
- Parameters:
feature_list_view (frame) – feature list graph view
feature_content_view (text) – feature list content
preview_btn (button) – preview button
child_popups (list) – list of child config popup windows
Methods
__init__
(feature_list_view, ...[, child_popups])Initialize feature list window
Build the feature list text
Calculate the height of the arrow image
draw_feature_list_graph
([new_list_flag])Draw the feature list graph
flatten_feature_list
(feature_list)Flatten the feature list
Get feature list content
show_config_popup
(idx)Show the feature configuration popup
show_menu
(idx[, flag])Show the popup menu
update
(feature_list_content)Update feature list window
Update feature content
Attributes
The list of feature names.
- build_feature_list_text()
Build the feature list text
- Returns:
content – The feature list text
- Return type:
str
- calculate_arrow_image_height()
Calculate the height of the arrow image
- Returns:
image_height – The height of the arrow image
- Return type:
int
- draw_feature_list_graph(new_list_flag=True)
Draw the feature list graph
- Parameters:
new_list_flag (bool, optional) – Whether the feature list is new, by default True
- flatten_feature_list(feature_list)
Flatten the feature list
- Parameters:
feature_list (list) – The feature list
- get_feature_content()
Get feature list content
- Returns:
content – feature list content
- Return type:
str
- show_config_popup(idx)
Show the feature configuration popup
- Parameters:
idx (int) – The index of the feature
- Returns:
func – The function to show the feature configuration popup
- Return type:
function
- show_menu(idx, flag=True)
Show the popup menu
- Parameters:
idx (int) – The index of the feature
flag (bool, optional) – Whether the feature is a decision node, by default True
- Returns:
func – The function to show the popup menu
- Return type:
function
- update(feature_list_content)
Update feature list window
- Parameters:
feature_list_content (list) – The feature list
- update_feature_content()
Update feature content
- feature_names
The list of feature names.
- Type:
list