hyperspyui.hooktraitsui module

Created on Sun Nov 23 17:10:41 2014

@author: Vidar Tonaas Fauske

class hyperspyui.hooktraitsui.HookedDialog(ui, parent, *args, **kwargs)

Bases: traitsui.qt4.ui_base._StickyDialog

closeEvent(e)

Reimplemented to check when the clicks the window close button. (Note that QDialog doesn’t get a close event when the dialog is closed in any other way.)

deleteLater(self)
hyperspyui.hooktraitsui._cb(cbs, *args, **kwargs)
hyperspyui.hooktraitsui._on_closed(*args, **kwargs)
hyperspyui.hooktraitsui._on_closing(*args, **kwargs)
hyperspyui.hooktraitsui._on_created(*args, **kwargs)
hyperspyui.hooktraitsui._on_creating(*args, **kwargs)
hyperspyui.hooktraitsui._on_destroyed(*args, **kwargs)
hyperspyui.hooktraitsui.connect_closed(callback, userdata=None)

Call to subscribe to traitsui dialog closing events. ‘callback’ is called on the event, with the ‘userdata’ as it’s first parameter if it is not None; otherwise this parameter is not included in the parameter list. The only other parameter is the dialog reference. ‘Closed’ events are called just after the dialog is actually closed, and cannot be aborted. Is not fired if the dialog is deleted before it is closed. (See destroyed event)

hyperspyui.hooktraitsui.connect_closing(callback, userdata=None)

Call to subscribe to traitsui dialog closing events. ‘callback’ is called on the event, with the ‘userdata’ as it’s first parameter if it is not None; otherwise this parameter is not included in the parameter list. The only other parameter is the dialog reference. ‘Closing’ events are called before the dialog is actually closed, and might be aborted. Is not fired if the dialog is deleted before it is closed. (See destroyed event)

hyperspyui.hooktraitsui.connect_created(callback, userdata=None)

Call to subscribe to traitsui dialog created events. ‘callback’ is called on the event, with the ‘userdata’ as it’s first parameter if it is not None; otherwise this parameter is not included in the parameter list. The other parameters (listed in order) are the dialog reference, traitsui’s ‘ui’ parameter, and the parent of the dialog. ‘Created’ events are called just after the dialog is actually created.

hyperspyui.hooktraitsui.connect_creating(callback, userdata=None)

Call to subscribe to traitsui dialog creating events. ‘callback’ is called on the event, with the ‘userdata’ as it’s first parameter if it is not None; otherwise this parameter is not included in the parameter list. The other parameters (listed in order) are the dialog reference, traitsui’s ‘ui’ parameter, and the parent of the dialog. ‘Creating’ events are called just before the dialog is actually created.

hyperspyui.hooktraitsui.connect_destroyed(callback, userdata=None)

Call to subscribe to traitsui dialog destroyed events. ‘callback’ is called on the event, with the ‘userdata’ as it’s first parameter if it is not None; otherwise this parameter is not included in the parameter list. The only other parameter is the dialog reference.

hyperspyui.hooktraitsui.dehook_traitsui()

Call this function to remove hooks from traitsui

hyperspyui.hooktraitsui.disconnect_closed(callback)

Disconnect callback from subscription.

hyperspyui.hooktraitsui.disconnect_closing(callback)

Disconnect callback from subscription.

hyperspyui.hooktraitsui.disconnect_created(callback)

Disconnect callback from subscription.

hyperspyui.hooktraitsui.disconnect_creating(callback)

Disconnect callback from subscription.

hyperspyui.hooktraitsui.disconnect_destroyed(callback)

Disconnect callback from subscription.

hyperspyui.hooktraitsui.hook_traitsui()

Call this function to enable hooking of traitsui events