pluginplayer.utility_manager ============================ .. py:module:: pluginplayer.utility_manager .. autoapi-nested-parse:: The need for a utility manager Throughout the GUI it is essential to keep track of added class types, adding new class types, and browsing files. The `UtilityManager` class handles this to allow for helper functions needed throughout the application. Browsing files Browsing files in kivy can be done by clicking the browse button to run the `browse` function and open a popup to view your system's files. The `browse` function reads text input from an entry and interprets it as a potential path to browse to in the system. Using a `ScrollView` widget, a user can navigate through their system and select a filepath of their plugin they would like to import. Viewing class types To add an input or property type to a module's run settings, a user may need to declare a special variable type, evaluating their statement with an extra list of imported classes is necessary to allow for a more complex module run. Viewing imported class types within the `view_config` and `add_input` widget runs the `class_types` function, opening a popup to view a list of imported class types and a button to import a new type. Importing a new class type Directed from the `class_types` popup, you can enter a python partial import statement defining the library to import from as well as the type name. Clicking the Import button, the `new_type` function runs `importlib` to import the new class type into the system's main modules which is used in evaluating import and property type statements. If a module is unable to be imported, a message is displayed and the system's modules are not modified. Classes ------- .. autoapisummary:: pluginplayer.utility_manager.UtilityManager Module Contents --------------- .. py:class:: UtilityManager(plugin_player) Helper class for the PluginPlayer application to browse files, view class types, and import new class types. .. py:attribute:: plugin_player .. py:attribute:: imported_classes :value: [] .. py:attribute:: custom_declaration_widget :value: None .. py:method:: browse(instance) Browse for a new file from the file system and place in entry box :param instance: The button to browse for files :type instance: kivy.uix.button .. py:method:: class_types() Show a popup to see all class types imported .. py:method:: new_type(instance) Defines a new class type for custom inputs and property types :param instance: The button to submit a new type :type instance: kivy.uix.button