Module containing the project content widget to display the selection

This module redefines the psyplot.project.Project class with additional features for an interactive usage with graphical qt user interface. There is no need to import this module because the GuiProject class defined here replaces the project class in the psyplot.project module.

Classes:

ArrayItem(ref, *args, **kwargs)

A listwidget item that takes it's informations from a given array

DatasetTree(*args, **kwargs)

A QTreeWidget showing informations on all datasets in the main project

DatasetTreeItem(ds[, columns])

A QTreeWidgetItem showing informations on one dataset in the main project

FiguresTree(*args, **kwargs)

A tree widget sorting the arrays by their figure

FiguresTreeItem(ref, *args, **kwargs)

An item displaying the information on a data object in one figure

PlotterList([plotter_type])

QListWidget showing multiple ArrayItems of one Plotter class

ProjectContent(*args, **kwargs)

Display the content in the current project

ProjectContentWidget(*args, **kwargs)

A combination of selection buttons and the ProjectContent

SelectAllButton(*args, **kwargs)

A button to select all data objects in the current main project

SelectNoneButton(*args, **kwargs)

A button to select no data objects in the current main project

Functions:

escape_html(s)

class psyplot_gui.content_widget.ArrayItem(ref, *args, **kwargs)[source]

Bases: QListWidgetItem

A listwidget item that takes it’s informations from a given array

Attributes:

arr

The psyplot.data.InteractiveList or psyplot.data.InteractiveArray instance

Methods:

disconnect_from_array()

set_text_from_array()

Set the text and tooltop from the psyplot.data.InteractiveArray._short_info() and __str__ methods

arr = None

The psyplot.data.InteractiveList or psyplot.data.InteractiveArray instance

disconnect_from_array()[source]
set_text_from_array()[source]

Set the text and tooltop from the psyplot.data.InteractiveArray._short_info() and __str__ methods

class psyplot_gui.content_widget.DatasetTree(*args, **kwargs)[source]

Bases: QTreeWidget, DockMixin

A QTreeWidget showing informations on all datasets in the main project

Methods:

add_datasets_from_cp([project])

Clear the tree and add the datasets based upon the given project

create_dataset_tree()

Set up the columns and insert the DatasetTreeItem instances from the current project

expand_items(expanded_items)

Expand tree items

expanded_items()

Create a mapping from dataset numbers to variables that are expanded.

is_coord(item)

is_variable(item)

load_variable_desc(item)

make_plot(ds, name[, exec_])

open_menu(pos)

refresh_items([item])

set_columns([columns])

Set up the columns in the DatasetTree.

Attributes:

tooltips

add_datasets_from_cp(project=None)[source]

Clear the tree and add the datasets based upon the given project

Parameters:

project (psyplot.project.Project) – The project containing the data array. If the project is not a main project, it’s main project is used.

create_dataset_tree()[source]

Set up the columns and insert the DatasetTreeItem instances from the current project

expand_items(expanded_items)[source]

Expand tree items

Parameters:

expanded_items (dict) – A mapping as returned by the expanded_items() method

expanded_items()[source]

Create a mapping from dataset numbers to variables that are expanded.

static is_coord(item)[source]
static is_variable(item)[source]
load_variable_desc(item)[source]
make_plot(ds, name, exec_=None)[source]
open_menu(pos)[source]
refresh_items(item=None)[source]
set_columns(columns=['Value'])[source]

Set up the columns in the DatasetTree.

Parameters:

columns (list of str) – A list of netCDF attributes that shall be shown in columns

tooltips = {'Add to project': 'Add this variable or a plot of it to the current project', 'Refresh': 'Refresh the selected dataset', 'Refresh all': 'Refresh all datasets'}
class psyplot_gui.content_widget.DatasetTreeItem(ds, columns=[], *args, **kwargs)[source]

Bases: QTreeWidgetItem

A QTreeWidgetItem showing informations on one dataset in the main project

Methods:

add_attrs([attrs, item])

add_variables([ds])

Add children of variables and coords to this TreeWidgetItem

get_plots_item(item)

refresh_plots_item(item, vname[, mp, sp])

add_attrs(attrs=None, item=None)[source]
add_variables(ds=None)[source]

Add children of variables and coords to this TreeWidgetItem

get_plots_item(item)[source]
refresh_plots_item(item, vname, mp=None, sp=None)[source]
class psyplot_gui.content_widget.FiguresTree(*args, **kwargs)[source]

Bases: QTreeWidget, DockMixin

A tree widget sorting the arrays by their figure

This widget uses the current sub and main project to show the open figures

Methods:

add_figures_from_cp(project)

Add the items in this tree based upon the figures in the given project

add_figures_from_cp(project)[source]

Add the items in this tree based upon the figures in the given project

class psyplot_gui.content_widget.FiguresTreeItem(ref, *args, **kwargs)[source]

Bases: QTreeWidgetItem

An item displaying the information on a data object in one figure

Methods:

disconnect_from_array()

Disconect this item from the corresponding array

set_text_from_array()

Set the text and tooltop from the psyplot.data.InteractiveArray._short_info() and __str__ methods

disconnect_from_array()[source]

Disconect this item from the corresponding array

set_text_from_array()[source]

Set the text and tooltop from the psyplot.data.InteractiveArray._short_info() and __str__ methods

class psyplot_gui.content_widget.PlotterList(plotter_type=None, *args, **kwargs)[source]

Bases: QListWidget

QListWidget showing multiple ArrayItems of one Plotter class

Attributes:

array_items

Iterable of ArrayItem items in this list

arrays

List of The InteractiveBase instances in this list

can_import_plotter

is_empty

boolean.

project_attribute

str.

updated_from_project(*args, **kwargs)

Methods:

disconnect_items()

Disconnect the items in this list from the arrays

update_cp(*args, **kwargs)

Update the current project from what is selected in this list

update_from_project(project)

Update the content from the given Project

property array_items

Iterable of ArrayItem items in this list

property arrays

List of The InteractiveBase instances in this list

can_import_plotter = True
disconnect_items()[source]

Disconnect the items in this list from the arrays

is_empty = True

boolean. True if the current project does not contain any arrays in the attribute identified by the project_attribute

project_attribute = None

str. The name of the attribute of the psyplot.project.Project class

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

Update the current project from what is selected in this list

update_from_project(project)[source]

Update the content from the given Project

Parameters:

project (psyplot.project.Project) – If the project is a main project, new items will be added. Otherwise only the current selection changes

updated_from_project(*args, **kwargs)
class psyplot_gui.content_widget.ProjectContent(*args, **kwargs)[source]

Bases: QToolBox

Display the content in the current project

This toolbox contains several PlotterList that show the content of the current main and subproject

Methods:

add_plotterlist(identifier[, force])

Create a PlotterList from an identifier from the psyplot.project.Project class

enable_list(list_widget)

Enable a given list widget based upon whether it is empty or not

update_current_list()

Update the current list from the current main and sub project

update_lists(p)

Attributes:

current_names

lists

dict containing the PlotterList instances of the different selection attributes

add_plotterlist(identifier, force=False)[source]

Create a PlotterList from an identifier from the psyplot.project.Project class

property current_names
enable_list(list_widget)[source]

Enable a given list widget based upon whether it is empty or not

lists = {}

dict containing the PlotterList instances of the different selection attributes

update_current_list()[source]

Update the current list from the current main and sub project

update_lists(p)[source]
class psyplot_gui.content_widget.ProjectContentWidget(*args, **kwargs)[source]

Bases: QWidget, DockMixin

A combination of selection buttons and the ProjectContent

class psyplot_gui.content_widget.SelectAllButton(*args, **kwargs)[source]

Bases: QPushButton

A button to select all data objects in the current main project

Methods:

enable_from_project(project)

Enable the button if the given project is not empty

select_all()

Select all arrays

enable_from_project(project)[source]

Enable the button if the given project is not empty

select_all()[source]

Select all arrays

class psyplot_gui.content_widget.SelectNoneButton(*args, **kwargs)[source]

Bases: QPushButton

A button to select no data objects in the current main project

Methods:

enable_from_project(project)

Enable the button if the given project is not empty

select_none()

Clear current subproject

enable_from_project(project)[source]

Enable the button if the given project is not empty

select_none()[source]

Clear current subproject

psyplot_gui.content_widget.escape_html(s)[source]