magmap.gui.event_handlers module

Handlers for PyQt events.

class magmap.gui.event_handlers.FileOpenHandler(fn_open_image, parent=None)[source]

Bases: QObject

Handle file opening events.

These events are triggered by Apple Events through the PyInstaller bootloader.

Variables:

fn_open_image (func) – Function to open an image, taking the image path.

eventFilter(watched, event)[source]

Handle open file events.

Parameters:
  • watched (PyQt5.QtCore.QObject) – Watched object.

  • event (PyQt5.QtCore.QEvent) – Event oject.

Returns:

True if the event was filtered out; otherwise the return output from the base class.

Return type:

bool