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:
|
A listwidget item that takes it's informations from a given array |
|
A QTreeWidget showing informations on all datasets in the main project |
|
A QTreeWidgetItem showing informations on one dataset in the main project |
|
A tree widget sorting the arrays by their figure |
|
An item displaying the information on a data object in one figure |
|
QListWidget showing multiple ArrayItems of one Plotter class |
|
Display the content in the current project |
|
A combination of selection buttons and the ProjectContent |
|
A button to select all data objects in the current main project |
|
A button to select no data objects in the current main project |
Functions:
|
- class psyplot_gui.content_widget.ArrayItem(ref, *args, **kwargs)[source]
Bases:
QListWidgetItemA listwidget item that takes it’s informations from a given array
Attributes:
The
psyplot.data.InteractiveListorpsyplot.data.InteractiveArrayinstanceMethods:
Set the text and tooltop from the
psyplot.data.InteractiveArray._short_info()and __str__ methods- arr = None
The
psyplot.data.InteractiveListorpsyplot.data.InteractiveArrayinstance
- class psyplot_gui.content_widget.DatasetTree(*args, **kwargs)[source]
Bases:
QTreeWidget,DockMixinA 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
Set up the columns and insert the
DatasetTreeIteminstances from the current projectexpand_items(expanded_items)Expand tree 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:
- 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
DatasetTreeIteminstances 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
- 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:
QTreeWidgetItemA 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])
- class psyplot_gui.content_widget.FiguresTree(*args, **kwargs)[source]
Bases:
QTreeWidget,DockMixinA 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
- class psyplot_gui.content_widget.FiguresTreeItem(ref, *args, **kwargs)[source]
Bases:
QTreeWidgetItemAn item displaying the information on a data object in one figure
Methods:
Disconect this item from the corresponding array
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:
QListWidgetQListWidget showing multiple ArrayItems of one Plotter class
Attributes:
Iterable of
ArrayItemitems in this listList of The InteractiveBase instances in this list
boolean.
str.
updated_from_project(*args, **kwargs)Methods:
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 arrays
List of The InteractiveBase instances in this list
- can_import_plotter = True
- 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.Projectclass
- 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:
QToolBoxDisplay the content in the current project
This toolbox contains several
PlotterListthat show the content of the current main and subprojectMethods:
add_plotterlist(identifier[, force])Create a
PlotterListfrom an identifier from thepsyplot.project.Projectclassenable_list(list_widget)Enable a given list widget based upon whether it is empty or not
Update the current list from the current main and sub project
update_lists(p)Attributes:
dictcontaining thePlotterListinstances of the different selection attributes- add_plotterlist(identifier, force=False)[source]
Create a
PlotterListfrom an identifier from thepsyplot.project.Projectclass
- property current_names
- lists = {}
dictcontaining thePlotterListinstances of the different selection attributes
- class psyplot_gui.content_widget.ProjectContentWidget(*args, **kwargs)[source]
Bases:
QWidget,DockMixinA combination of selection buttons and the ProjectContent
- class psyplot_gui.content_widget.SelectAllButton(*args, **kwargs)[source]
Bases:
QPushButtonA 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 arrays
- class psyplot_gui.content_widget.SelectNoneButton(*args, **kwargs)[source]
Bases:
QPushButtonA 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
Clear current subproject