GlueApplication

class glue.app.qt.application.GlueApplication(data_collection=None, session=None)[source]

Bases: glue.core.application_base.Application, PyQt5.QtWidgets.QMainWindow

The main GUI application for the Qt frontend

Attributes Summary

current_tab

is_empty

Returns True if there are no viewers and no data.

tab_bar

tab_count

The number of open tabs

tab_names

The name of each tab

tab_widget

viewers

A list of lists of open Data Viewers.

Methods Summary

add_fixed_layout_tab(self, tab_cls)

add_widget(self, new_widget[, label, tab, …])

Add a widget to one of the tabs.

choose_new_data_viewer(self[, data])

Create a new visualization window in the current tab

choose_new_fixed_layout_tab(self, \*args)

Creates a new tab with a fixed layout

closeEvent(self, event)

Emit a message to hub before closing.

close_tab(self, index[, warn])

Close a tab window and all associated data viewers

dragEnterEvent(self, QDragEnterEvent)

dropEvent(self, QDropEvent)

exec_(self[, size, position, block, maximized])

Show the GUI and start the application.

gather_current_tab(self, \*args)

Arrange windows in current tab via tiling

get_tab_index(self, widget)

has_terminal(self[, create_if_not])

Returns True if the IPython terminal is present.

keyPressEvent(self, QKeyEvent)

new_data_viewer(self, viewer_class[, data, …])

Create a new data viewer, add it to the UI, and populate with data

new_tab(self, \*args)

Spawn a new tab page

plugin_manager(self, \*args)

redo(self, \*args)

report_error(self, message, detail)

Display an error in a modal

restore_session(path[, show])

Reload a previously-saved session

restore_session_and_close(self, path[, warn])

run_startup_action(self, name)

screenshot(self, filename)

Save a screenshot of the current application window to a file.

start(self[, size, position, block, maximized])

Show the GUI and start the application.

tab(self[, index])

undo(self, \*args)

Attributes Documentation

current_tab
is_empty

Returns True if there are no viewers and no data.

tab_bar
tab_count

The number of open tabs

tab_names

The name of each tab

A list of strings

tab_widget
viewers

A list of lists of open Data Viewers.

Each inner list contains the viewers open on a particular tab.

Methods Documentation

add_fixed_layout_tab(self, tab_cls)[source]
add_widget(self, new_widget, label=None, tab=None, hold_position=False)[source]

Add a widget to one of the tabs.

Returns the window that this widget is wrapped in.

Parameters
  • new_widget – new QtWidgets.QWidget to add

  • label (str) – label for the new window. Optional

  • tab (int) – Tab to add to. Optional (default: current tab)

  • hold_position (bool) – If True, then override Qt’s default placement and retain the original position of new_widget

choose_new_data_viewer(self, data=None)[source]

Create a new visualization window in the current tab

choose_new_fixed_layout_tab(self, *args)[source]

Creates a new tab with a fixed layout

closeEvent(self, event)[source]

Emit a message to hub before closing.

close_tab(self, index, warn=True)[source]

Close a tab window and all associated data viewers

dragEnterEvent(self, QDragEnterEvent)[source]
dropEvent(self, QDropEvent)[source]
exec_(self, size=None, position=None, block=True, maximized=True)

Show the GUI and start the application.

Parameters
size(int, int) Optional

The default width/height of the application. If not provided, uses the full screen

position(int, int) Optional

The default position of the application

gather_current_tab(self, *args)[source]

Arrange windows in current tab via tiling

get_tab_index(self, widget)[source]
has_terminal(self, create_if_not=True)[source]

Returns True if the IPython terminal is present.

keyPressEvent(self, QKeyEvent)[source]
new_data_viewer(self, viewer_class, data=None, state=None)[source]

Create a new data viewer, add it to the UI, and populate with data

new_tab(self, *args)[source]

Spawn a new tab page

plugin_manager(self, *args)[source]
redo(self, *args)[source]
report_error(self, message, detail)[source]

Display an error in a modal

Parameters
  • message (str) – A short description of the error

  • detail (str) – A longer description

static restore_session(path, show=True)[source]

Reload a previously-saved session

Parameters
pathstr

Path to the file to load

showbool, optional

If True (the default), immediately show the widget

Returns
appglue.app.qt.application.GlueApplication

The loaded application

restore_session_and_close(self, path, warn=True)[source]
run_startup_action(self, name)[source]
screenshot(self, filename)[source]

Save a screenshot of the current application window to a file.

start(self, size=None, position=None, block=True, maximized=True)[source]

Show the GUI and start the application.

Parameters
size(int, int) Optional

The default width/height of the application. If not provided, uses the full screen

position(int, int) Optional

The default position of the application

tab(self, index=None)[source]
undo(self, *args)[source]