pluginplayer.tree_manager ========================= .. py:module:: pluginplayer.tree_manager .. autoapi-nested-parse:: Managing tree generation The `TreeManager` class handles setting the module to be viewed in a tree view, and generates the tree with its connections. When a user wants to view a module on the tree, they can select the Graph button from the PluginSection (left). The Module will then be placed as the root node on the tree and it will build a map for each layer of the tree, adding a new layer with the submodules of the previous layer, including their mappings. This is done with the `submodule_dependencies` function. The `generate_tree` function will use the built map to center and place the nodes into a tree like structure. The `add_connections` function will then bind the mappings of each node with a line connecting them. Deleting the tree All canvas instructions and widgets added to the tree section are removed, and the set inputs and property types are cleared. Classes ------- .. autoapisummary:: pluginplayer.tree_manager.TreeManager Module Contents --------------- .. py:class:: TreeManager(plugin_player) TreeManager is a helper class for the PluginPlayer application to add/delete nodes from the module tree, run the tree, and delete the tree .. py:attribute:: plugin_player .. py:attribute:: saved_output :value: None .. py:attribute:: tree_module :value: None .. py:attribute:: node_height .. py:attribute:: node_width .. py:method:: delete_tree() Delete the entire tree, its edges, and nodes. .. py:method:: create_node(module_name) Create a new node to add the tree section :param module_name: The name of the module the node will represent :type module_name: String .. py:method:: set_module(instance) Adds a module to the tree and saves its information to the tree Args: instance (kivy.uix.button): The button clicked to add the module to the tree .. py:method:: submodule_dependencies() generates a 2D array of each level of the tree .. py:method:: generate_tree(module_tree) Generates the visual tree map, filling with module nodes Args: module_tree (Array): The 2d Array filled with the module layers of the trees .. py:method:: add_connections(module_tree, tree_nodes) Adds the lines to connect nodes Args: module_tree (Array): 2d Array mapping the modules and their submodule dependencies by layer tree_nodes (Array): 2d Array holding the module's node widgets by layer