GlueApplication

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

Bases: glue.core.application_base.Application, PyQt4.QtGui.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
close_tab(index) Close a tab window and all associated data viewers
dragEnterEvent(event)
dropEvent(event)
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(*args, **kwargs) 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
set_setting(key, value) Update a persistent setting in the application.
start([size, position]) Show the GUI and start the application.
tab([index])

Attributes Documentation

current_tab
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_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 QtGui.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

close_tab(index)[source]

Close a tab window and all associated data viewers

dragEnterEvent(event)[source]
dropEvent(event)[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(*args, **kwargs)

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

set_setting(key, value)[source]

Update a persistent setting in the application.

Parameters:
  • key (str) – Name of a setting in the settings registry
  • value (str) – New value for the setting
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]