maverig.data¶
maverig.data.config¶
-
maverig.data.config.import_method(module_method_address)¶ Return the python method at the given address.
module_method_address is a string which consists of module address and method name separated by ‘:’.
-
maverig.data.config.read_components()¶ Return all component descriptions from maverig/data/components as dict from sim_model to component description content
-
maverig.data.config.read_simulators()¶ Return all simulator descriptions as dict from simulators name to simulator description content
-
maverig.data.config.read_json(filename)¶ Return the content dict of a *.json file
-
maverig.data.config.write_json(filename, obj)¶ Write a content dict (obj) into a *.json file
-
maverig.data.config.read_config()¶ Return the application configuration dict from maverig/data/cfg.json
-
maverig.data.config.write_config(cfg)¶ Write cfg into the configuration file maverig/data/cfg.json.
-
maverig.data.config.restore_config()¶ Write the default settings in
maverig.data.settings.defaultSettingsinto the configuration file maverig/data/cfg.json.
-
class
maverig.data.config.ConfigKeys¶ Bases:
objectConstants with configuration dict keys.
-
UI_STATE= 'ui_state'¶
-
MAIN_WINDOW_GEOMETRY= 'main_window_geometry'¶
-
MAIN_WINDOW_STATE= 'main_window_state'¶
-
SPLITTER_MAIN_GEOMETRY= 'splitter_main_geometry'¶
-
SPLITTER_MAIN_STATE= 'splitter_main_state'¶
-
SPLITTER_LEFT_GEOMETRY= 'splitter_left_geometry'¶
-
SPLITTER_LEFT_STATE= 'splitter_left_state'¶
-
SPLITTER_RIGHT_GEOMETRY= 'splitter_right_geometry'¶
-
SPLITTER_RIGHT_STATE= 'splitter_right_state'¶
-
IS_ATTRIBUTE_PANEL_VISIBLE= 'is_attribute_panel_visible'¶
-
IS_COMPONENT_PANEL_VISIBLE= 'is_component_panel_visible'¶
-
IS_CONSOLE_PANEL_VISIBLE= 'is_console_panel_visible'¶
-
IS_PROGRESS_BAR_VISIBLE= 'is_progress_bar_visible'¶
-
IS_PROPERTY_PANEL_VISIBLE= 'is_property_panel_visible'¶
-
IS_STATUS_BAR_VISIBLE= 'is_status_bar_visible'¶
-
ATTRIBUTE_GRAPHS_VISIBLE= 'attribute_graphs_visible'¶
-
GENERAL_SETTINGS= 'general_settings'¶
-
LANGUAGE= 'language'¶
-
SIMULATION_SETTINGS= 'simulation_settings'¶
-
IS_DAY_NIGHT_VIS_ENABLED= 'is_day_night_vis_enabled'¶
-
IS_HEAT_VALUE_EFFECT_FOR_GRIDS_ENABLED= 'is_heat_value_effect_for_grids_enabled'¶
-
IS_HEAT_VALUE_EFFECT_FOR_CPP_ENABLED= 'is_heat_value_effect_for_cpp_enabled'¶
-
HEAT_VALUE_EFFECT_GRIDS= 'heat_value_effect_grids'¶
-
HEAT_VALUE_EFFECT_CPP= 'heat_value_effect_cpp'¶
-
MODE_PANEL_SETTINGS= 'mode_panel_settings'¶
-
INVISIBLE_COMPONENTS= 'invisible_components'¶
-
SHOW_INVISIBLE_COMPONENTS= 'show_invisible_components'¶
-
-
maverig.data.config.raster_pos(pos)¶ Return the nearest
PySide.QtCore.QPointFraster coord position to pos.
-
maverig.data.config.ACTIVATED_COMPONENT_MODE()¶
-
maverig.data.config.ACTIVATED_HAND_MODE()¶
-
maverig.data.config.ACTIVATED_SELECTION_MODE()¶
-
maverig.data.config.ACTIVATED_SIMULATION_MODE()¶
-
maverig.data.config.ACTIVATED_AUTO_LAYOUT_MODE()¶
-
maverig.data.config.SEPARATOR()¶
-
maverig.data.config.SIMULATION_SPEED()¶
-
maverig.data.config.SIMULATION_PAUSED()¶
-
maverig.data.config.CREATION_INVALID()¶
-
maverig.data.config.DOCKING_VALID()¶
-
maverig.data.config.LINE_TOO_SHORT()¶
-
maverig.data.config.DOCKING_INVALID()¶
-
maverig.data.config.DOCKING_NO_ITEMS()¶
-
maverig.data.config.ZERO_KM_LENGTH()¶
-
maverig.data.config.FILE_SAVED()¶
-
maverig.data.config.FILE_OPENED()¶
-
maverig.data.config.MULTI_SELECT_DIFFERENT_VALUES()¶
-
maverig.data.config.SIMULATION_COMPLETED()¶
-
maverig.data.config.create_components_language_po_entries(components=None)¶ Write keys found in components into language *.po files under maverig/data/languages in order to simplify the component developers translation process.
maverig.data.dataHandler¶
-
maverig.data.dataHandler.ensure_dir(path)¶ Create directories contained in path if they don’t exist.
-
maverig.data.dataHandler.get_maverig_dir()¶ Return the maverig directory, e.g.
'C:\Programs\maverig\maverig'.
-
maverig.data.dataHandler.get_relpath(path)¶ Return the path relative to maverig directory.
For example
get_relpath('C:\Programs\maverig\maverig\data')will return'maverig\data'.
-
maverig.data.dataHandler.get_normpath(path, sub_dir='', create_dir=False)¶ Return the complete normalized path for the current os environment.
For example
get_normpath('maverig\data\configs\cfg.json')orget_normpath('cfg.json', sub_dir='maverig\data\configs')will return'C:\Programs\maverig\maverig\data\configs\cfg.json'.Set create_dir to True if non existing directories should be created.
-
maverig.data.dataHandler.get_component_icon(filename)¶ Return the complete component icon path for the given filename relative to maverig/data/components/icons.
-
maverig.data.dataHandler.get_icon(filename)¶ Return the complete icon path for the given filename relative to maverig/data/icons.
-
maverig.data.dataHandler.get_lang_path(create_dir=False)¶ Return the complete languages locale path of maverig/data/languages/.
-
maverig.data.dataHandler.get_temp_file(filename)¶ Return the complete temporary files path for the given filename relative to maverig/data/temp.
-
maverig.data.dataHandler.get_config_file(filename)¶ Return the complete configuration file path for the given filename relative to maverig/data/configs.