eye.widgets.window module

class eye.widgets.window.Window(*args)[source]

Bases: QMainWindow, CategoryMixin, DropAreaMixin

Main window type.

This window type should typically be used for editing windows.

A Window contains a central widget (which is a SplitManager), a menu bar, a status bar, toolbars, and dock widgets. Dock widgets are widgets which can be placed on the 4 sides of the central widget.

Access to menu bar, status bar and toolbars is the same as with a QMainWindow. Dock widgets access can be done with the add_dockable helper.

EditorClass

Class of the widget to create when a new tab is opened.

alias of Editor

add_dockable(area, widget, title='')[source]

Add a widget to a dock of this window

Parameters:
  • area (Qt.DockWidgetArea) – the area where to dock the widget

  • widget – the widget to add

  • title – the (optional) title of the widget in the dock

Returns:

the DockWidget wrapping widget

Return type:

QDockWidget

buffer_close()[source]

Close current buffer.

This slot has signature buffer_close().

buffer_new()[source]

Open a new, empty editor in current tab container.

This slot has signature buffer_new().

buffer_new_at_tabs(tabbar)[source]

Open a new, empty editor in specified tab container.

This slot has signature buffer_new_at_tabs().

buffer_open(path)[source]

Open a new buffer in current tab container and load specified path.

This slot has signature buffer_open().

buffer_open_dialog()[source]

This slot has signature buffer_open_dialog().

buffer_save()[source]

Save current buffer.

This slot has signature buffer_save().

buffer_split_horizontal(widget=None)[source]

Split window horizontally at current buffer.

A new empty editor is created.

This slot has signature buffer_split_horizontal().

buffer_split_vertical(widget=None)[source]

Split window vertically at current buffer.

A new empty editor is created.

This slot has signature buffer_split_vertical().

can_close()[source]
closeEvent(ev)[source]

Overrides a Qt method.

closing = Signal()
create_default_menu_bar()[source]
current_buffer()[source]

Return the current buffer in this window, which has had focus last.

file_dropped = Signal(str)
focused_buffer = Signal(QWidget)
on_tabbar_last_closed(tw)[source]
quit_requested = Signal()

Signal quitRequested()

toggle_full_screen()[source]

This slot has signature toggle_full_screen().

eye.widgets.window.title_on_focus(window, buffer)[source]

Handler to let the window title reflect the focused buffer title

This handler is disabled by default.

This handler is registered for categories ['window'] on signal focused_buffer.