kromatography.ui.adapters package

Submodules

kromatography.ui.adapters.api module

kromatography.ui.adapters.api.register_all_tree_node_adapters()[source]

Register in Traits all ITreeNode adapters so that a DataManager can be displayed automatically using a TreeEditor.

kromatography.ui.adapters.base_chromatography_data_to_i_tree_node module

class kromatography.ui.adapters.base_chromatography_data_to_i_tree_node.BaseChromatographyDataToITreeNode(adaptee, **traits)[source]

Bases: app_common.traitsui.adapters.data_element_to_i_tree_node.DataElementToITreeNode

Adapts a general ChromatographyData to an ITreeNode.

This class implements the ITreeNodeAdapter interface thus allowing the use of TreeEditor for viewing any ChromatographyData.

get_menu()[source]
can_copy()[source]

Returns whether the object’s children can be copied.

can_rename_me()[source]

Returns whether the object can be renamed.

can_delete()[source]

Returns whether the object’s children can be deleted.

can_delete_me()[source]

Returns whether the object can be deleted.

confirm_delete()[source]

Checks whether a specified object can be deleted.

Returns:
  • * **True* if the object should be deleted with no further prompting.*
  • * **False* if the object should not be deleted.*
  • * Anything else (Caller should take its default action (which might) – include prompting the user to confirm deletion).

kromatography.ui.adapters.brute_force_binding_model_optimizer_to_i_tree_node module

class kromatography.ui.adapters.brute_force_binding_model_optimizer_to_i_tree_node.BruteForceBindingModelOptimizerToITreeNode(adaptee, **traits)[source]

Bases: kromatography.ui.adapters.base_chromatography_data_to_i_tree_node.BaseChromatographyDataToITreeNode

Adapts a BruteForce2StepBindingModelOptimizer to an ITreeNode.

This class implements the ITreeNodeAdapter interface thus allowing the use of TreeEditor for viewing any BindingModelOptimizer.

kromatography.ui.adapters.chromatogram_model_to_i_tree_node module

class kromatography.ui.adapters.chromatogram_model_to_i_tree_node.ChromatogramModelToITreeNode(adaptee, **traits)[source]

Bases: traitsui.tree_node.ITreeNodeAdapter

Adapts a ChromatogramModel (supporting plots) to an ITreeNode.

allows_children()[source]
has_children()[source]
get_children()[source]
get_label()[source]

kromatography.ui.adapters.data_manager_to_i_tree_node module

class kromatography.ui.adapters.data_manager_to_i_tree_node.DataManagerToITreeNode(adaptee, **traits)[source]

Bases: traitsui.tree_node.ITreeNodeAdapter

Adapts a DataManager of objects to an ITreeNode.

Note: Not much is done here because the data manager itself shouldn’t show in the tree editor. It will just serve as the root object since it is tricky to have the root be a list.

allows_children()[source]
has_children()[source]
get_children()[source]

kromatography.ui.adapters.data_source_to_i_tree_node module

class kromatography.ui.adapters.data_source_to_i_tree_node.SimpleDataSourceToITreeNode(adaptee, **traits)[source]

Bases: traitsui.tree_node.ITreeNodeAdapter

Adapts a SimpleDataSource of objects to an ITreeNode.

allows_children()[source]
has_children()[source]
get_children()[source]
get_label()[source]

kromatography.ui.adapters.df_with_outputs_df_editor_adapter module

class kromatography.ui.adapters.df_with_outputs_df_editor_adapter.DataFrameWithOutputsAdapter[source]

Bases: traitsui.ui_editors.data_frame_editor.DataFrameAdapter

Custom adapter to colorize the column outputs of a dataframe.

output_color = Color('lightgrey')

Color to use as background for the output columns/rows

df_attr_name = Str

Name of attribute of the object we are editing.

num_outputs = Int

Number of columns/rows that contain outputs to be colorized

class kromatography.ui.adapters.df_with_outputs_df_editor_adapter.DataFrameWithColumnOutputsAdapter[source]

Bases: kromatography.ui.adapters.df_with_outputs_df_editor_adapter.DataFrameWithOutputsAdapter

Custom adapter to colorize the column outputs of a dataframe.

get_bg_color(obj, trait, row, column=0)[source]

Colorize the outputs in grey.

kromatography.ui.adapters.experiment_optimizer_step_to_i_tree_node module

class kromatography.ui.adapters.experiment_optimizer_step_to_i_tree_node.ExperimentOptimizerStepToITreeNode(adaptee, **traits)[source]

Bases: app_common.traitsui.adapters.data_element_to_i_tree_node.DataElementToITreeNode

Adapts a ExperimentOptimizerStep to an ITreeNode.

This class implements the ITreeNodeAdapter interface thus allowing the use of TreeEditor for viewing any ExperimentOptimizerStep.

kromatography.ui.adapters.experiment_optimizer_to_i_tree_node module

class kromatography.ui.adapters.experiment_optimizer_to_i_tree_node.ExperimentOptimizerToITreeNode(adaptee, **traits)[source]

Bases: kromatography.ui.adapters.base_chromatography_data_to_i_tree_node.BaseChromatographyDataToITreeNode

Adapts a ExperimentOptimizer to an ITreeNode.

This class implements the ITreeNodeAdapter interface thus allowing the use of TreeEditor for viewing any ExperimentOptimizer.

kromatography.ui.adapters.simulation_group_to_i_tree_node module

class kromatography.ui.adapters.simulation_group_to_i_tree_node.SimulationGroupToITreeNode(adaptee, **traits)[source]

Bases: kromatography.ui.adapters.base_chromatography_data_to_i_tree_node.BaseChromatographyDataToITreeNode

Adapts a SimulationGroup to an ITreeNode.

This class implements the ITreeNodeAdapter interface thus allowing the use of TreeEditor for viewing any SimulationGroup.

get_label()[source]

kromatography.ui.adapters.simulation_to_i_tree_node module

class kromatography.ui.adapters.simulation_to_i_tree_node.SimulationToITreeNode(adaptee, **traits)[source]

Bases: kromatography.ui.adapters.base_chromatography_data_to_i_tree_node.BaseChromatographyDataToITreeNode

Adapts a Simulation to an ITreeNode.

This class implements the ITreeNodeAdapter interface thus allowing the use of TreeEditor for viewing any Simulation.

kromatography.ui.adapters.study_analysis_tools_to_i_tree_node module

class kromatography.ui.adapters.study_analysis_tools_to_i_tree_node.StudyAnalysisToolsToITreeNode(adaptee, **traits)[source]

Bases: kromatography.ui.adapters.base_chromatography_data_to_i_tree_node.BaseChromatographyDataToITreeNode

Adapts a Study to an ITreeNode.

This class implements the ITreeNodeAdapter interface thus allowing the use of TreeEditor for viewing any Study.

get_label()[source]

kromatography.ui.adapters.study_to_i_tree_node module

class kromatography.ui.adapters.study_to_i_tree_node.StudyToITreeNode(adaptee, **traits)[source]

Bases: kromatography.ui.adapters.base_chromatography_data_to_i_tree_node.BaseChromatographyDataToITreeNode

Adapts a Study to an ITreeNode.

This class implements the ITreeNodeAdapter interface thus allowing the use of TreeEditor for viewing any Study.

get_menu()[source]
when_children_changed(listener, remove)[source]

This takes care of propagating a change in the children of this list back to the tree editor by receiving the TreeEditor listener, and hot adding it as a listener on all children.

Parameters:
  • listener (Callable) – TreeEditor listener that must be called to force a repaint of the tree.
  • remove (Bool) – Whether we should add a new listener to call the tree editor listener because the tree is being built, or removed because the tree editor is being cleaned up.
children_changed(object, name, old, new)[source]

This calls the tree editor’s listener with the appropriate arguments, which is the object that changed, the elements that were added as children and removed from children.

FIXME: This is a horrible hack and we should figure out why the parent class is currently not doing it right.

get_label()[source]