hyperspyui.mainwindowbase module

Created on Mon Oct 27 21:17:42 2014

@author: Vidar Tonaas Fauske

class hyperspyui.mainwindowbase.MainWindowBase(parent=None)

Bases: QMainWindow

Base layer in application stack. Should handle the connection to our custom matplotlib backend, and manage the Figures. As such, it does not know anything about hyperspy, and can readily be reused for other projects. Should also set up basic UI with utilities, and relevant functions for inhereting classes to override.

_get_console_config()
_get_console_exec()
_get_console_exports()
static _set_low_process_priority(value)
_update_icon_size()
check_action_selections(mdi_figure=None)
closeEvent(self, a0: QCloseEvent | None)
create_console()
create_default_actions()

Create default actions that can be used for e.g. toolbars and menus, or triggered manually.

create_menu()
create_toolbars()

Override to create toolbars and toolbar buttons on UI construction. It is called after create_default_action(), so add_toolbar_button() can be used to add previously defined acctions.

create_tools()

Override to create tools on UI construction.

create_ui()
create_widgetbar()

The widget bar itself is created and managed implicitly by Qt. Override this function to add widgets on UI construction.

property cur_dir
edit_settings()

Shows a dialog for editing the application and plugins settings.

handleSecondInstance(argv)
init_plugins()
property low_process_priority
on_console_executed(response)

Override when inherited to perform actions after executing, given the ‘response’ returned.

on_console_executing(source)

Override when inherited to perform actions before exectuing ‘source’.

on_destroy_figure(figure, userdata=None)

Callback for MPL backend.

on_new_figure(figure, userdata=None)

Callback for MPL backend.

on_settings_changed()

Callback for SettingsDialog, or anything else that updates settings and need to apply the change.

on_subwin_activated(mdi_figure)
property plugins
reset_geometry()
select_tool(tool)
property toolbar_button_size
hyperspyui.mainwindowbase.lowpriority()

Set the priority of the process to below-normal.

hyperspyui.mainwindowbase.myexcepthook(exctype, value, traceback)
hyperspyui.mainwindowbase.normalpriority()

Set the priority of the process to normal.

hyperspyui.mainwindowbase.tr(text)