hyperspyui.mainwindow module

Created on Fri Oct 24 16:46:35 2014

@author: Vidar Tonaas Fauske

class hyperspyui.mainwindow.MainWindow(splash=None, parent=None, argv=None)

Bases: MainWindowHyperspy

Main window of the application. Top layer in application stack. Is responsible for adding default actions, and filling the menus and toolbars. Also creates the default widgets. Any button-actions should also be accessible as a slot, such that other things can connect into it, and so that it is accessible from the console’s ‘ui’ variable.

_check_add_component_ok(win, action)
_default_tools = [<class 'hyperspyui._tools.pointertool.PointerTool'>, <class 'hyperspyui._tools.hometool.HomeTool'>, <class 'hyperspyui._tools.zoompan.ZoomPanTool'>, <class 'hyperspyui._tools.gaussiantool.GaussianTool'>]
_load_signal_types()
close_all_signals()
close_signal(uisignals=None)
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_widgetbar()

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

handleSecondInstance(argv)

A second instance was launched and suppressed. Process the arguments that were passed to the new instance.

load_complete

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

new_editor()
on_settings_changed()

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

on_subwin_activated(mdi_figure)
open_documentation()
parse_args(argv=None)

Parse command line arguments, either from sys.argv, or from parameter ‘argv’.

select_x_signals(x, titles=None, wrap_col=4)

Displays a blocking dialog prompting the user to select ‘x’ signals. Over each selection box, the title as defined by ‘titles’ is displayed.

set_signal_dtype(data_type, signal=None, clip=False)
set_signal_type(signal_type, signal=None)
Changes the signal type using a combination of hyperspy.Signal.:
  • set_signal_type()

  • set_signal_origin()

  • and by converting with as_signal1D() and as_signal2D()

set_splash(message)

Set splash message

show_plugin_manager()