GlueApplication

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

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

The main GUI application for the Qt frontend

Attributes Summary

current_tab
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_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
closeEvent(event) Emit a message to hub before closing.
close_tab(index) Close a tab window and all associated data viewers
dragEnterEvent(self, QDragEnterEvent)
dropEvent(self, QDropEvent)
exec_([size, position]) Show the GUI and start the application.
gather_current_tab() Arrange windows in current tab via tiling
has_terminal() Returns True if the IPython terminal is present.
keyPressEvent(event) Hold down modifier keys to temporarily set edit mode
keyReleaseEvent(event) Unset any temporary edit mode
new_data_viewer(viewer_class[, data]) Create a new data viewer, add it to the UI,
new_tab() Spawn a new tab page
plugin_manager()
report_error(message, detail) Display an error in a modal
restore_session(path[, show]) Reload a previously-saved session
start([size, position]) Show the GUI and start the application.
tab([index])

Attributes Documentation

current_tab[source]
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_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

closeEvent(event)[source]

Emit a message to hub before closing.

close_tab(index)[source]

Close a tab window and all associated data viewers

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

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()[source]

Arrange windows in current tab via tiling

has_terminal()[source]

Returns True if the IPython terminal is present.

keyPressEvent(event)[source]

Hold down modifier keys to temporarily set edit mode

keyReleaseEvent(event)[source]

Unset any temporary edit mode

new_data_viewer(viewer_class, data=None)

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

new_tab()[source]

Spawn a new tab page

plugin_manager()[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:

path : str

Path to the file to load

show : bool, optional

If True (the default), immediately show the widget

Returns:

app : glue.app.qt.application.GlueApplication

The loaded application

start(size=None, position=None)[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]