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_datasets(*args, **kwargs)

Utility method to interactively add datasets to the data_collection.

add_fixed_layout_tab(tab_cls)

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

Add a widget to one of the tabs.

choose_new_data_viewer([data])

Create a new visualization window in the current tab

choose_new_fixed_layout_tab(*args)

Creates a new tab with a fixed layout

closeEvent(event)

Emit a message to hub before closing.

close_tab(index[, warn])

Close a tab window and all associated data viewers

dragEnterEvent(self, QDragEnterEvent)

dropEvent(self, QDropEvent)

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

Show the GUI and start the application.

gather_current_tab(*args)

Arrange windows in current tab via tiling

get_tab_index(widget)

has_terminal([create_if_not])

Returns True if the IPython terminal is present.

keyPressEvent(self, QKeyEvent)

new_data_viewer(viewer_class[, data, state])

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

new_tab(*args)

Spawn a new tab page

plugin_manager(*args)

redo(*args)

report_error(message, detail)

Display an error in a modal

restore_session(path[, show])

Reload a previously-saved session

restore_session_and_close(path[, warn])

run_startup_action(name)

screenshot(filename)

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

set_window_title([detail])

Set the window title

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

Show the GUI and start the application.

tab([index])

undo(*args)

Attributes Documentation

current_tab[source]
is_empty[source]

Returns True if there are no viewers and no data.

tab_bar[source]
tab_count[source]

The number of open tabs

tab_names[source]

The name of each tab

A list of strings

tab_widget[source]
viewers[source]

A list of lists of open Data Viewers.

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

Methods Documentation

add_datasets(*args, **kwargs)[source]

Utility method to interactively add datasets to the data_collection.

Parameters
datasetsData or list of Data

One or more Data instances.

Adds datasets to the collection in the application.
add_fixed_layout_tab(tab_cls)[source]
add_widget(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(data=None)[source]

Create a new visualization window in the current tab

choose_new_fixed_layout_tab(*args)[source]

Creates a new tab with a fixed layout

closeEvent(event)[source]

Emit a message to hub before closing.

close_tab(index, warn=True)[source]

Close a tab window and all associated data viewers

dragEnterEvent(self, QDragEnterEvent)[source]
dropEvent(self, QDropEvent)[source]
exec_(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(*args)[source]

Arrange windows in current tab via tiling

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

Returns True if the IPython terminal is present.

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

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

new_tab(*args)[source]

Spawn a new tab page

plugin_manager(*args)[source]
redo(*args)[source]
report_error(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(path, warn=True)[source]
run_startup_action(name)[source]
screenshot(filename)[source]

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

set_window_title(detail=None)[source]

Set the window title

start(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(index=None)[source]
undo(*args)[source]