Module defining a widget for updating the formatoption of the current project
Classes:
|
A widget for updating the dimensions |
|
Widget to update the formatoptions of the current project |
- class psyplot_gui.fmt_widget.DimensionsWidget(parent, dim=None)[source]
Bases:
QWidget
A widget for updating the dimensions
Methods:
get_ds
()Clear all comboboxes
set_dim
(dim)set_single_selection
([yes])slice2list
(sl)
- class psyplot_gui.fmt_widget.FormatoptionWidget(*args, **kwargs)[source]
Bases:
QWidget
,DockMixin
Widget to update the formatoptions of the current project
This widget, mainly made out of a combobox for the formatoption group, a combobox for the formatoption, and a text editor, is designed for updating the selected formatoptions for the current subproject.
The widget is connected to the
psyplot.project.Project.oncpchange
signal and refills the comboboxes if the current subproject changes.The text editor either accepts python code that will be executed by the given console, or yaml code.
Methods:
fill_combos_from_project
(project)Fill
group_combo
andfmt_combo
from a projectfill_fmt_combo
(i[, current_text])Fill the
fmt_combo
combobox based on the current group nameget_name
(fmto)Get the name of a
psyplot.plotter.Formatoption
instanceget_obj
()Get the current update text
get_text
()Get the current update text
insert_obj
(obj)Add a string to the formatoption widget
Load the formatoption specific widget
refill_from_rc
(sort_by_key)run_code
()Run the update of the project inside the
shell
Add the value of the current formatoption to the line text
set_fmto
(name)set_obj
(obj)show_all_fmt_info
(what)Show the keys, summaries or docs of the formatoptions
Show the documentation of the formatoption in the help explorer
Attributes:
The combobox for the formatoptions
The formatoption specific widget that is loaded from the formatoption
The combobox for the formatoption groups
The help_explorer to display the documentation of the formatoptions
A line edit for updating the formatoptions
update the fmto combo box or not
The shell to execute the update of the formatoptions in the current project
A multiline text editor for updating the formatoptions
- fill_combos_from_project(project)[source]
Fill
group_combo
andfmt_combo
from a project- Parameters:
project (psyplot.project.Project) – The project to use
- fill_fmt_combo(i, current_text=None)[source]
Fill the
fmt_combo
combobox based on the current group name
- fmt_combo = None
The combobox for the formatoptions
- fmt_widget = None
The formatoption specific widget that is loaded from the formatoption
- property fmto
- get_name(fmto)[source]
Get the name of a
psyplot.plotter.Formatoption
instance
- group_combo = None
The combobox for the formatoption groups
- help_explorer = None
The help_explorer to display the documentation of the formatoptions
- line_edit = None
A line edit for updating the formatoptions
- load_fmt_widget(i)[source]
Load the formatoption specific widget
This method loads the formatoption specific widget from the
psyplot.plotter.Formatoption.get_fmt_widget()
method and displays it above theline_edit
- Parameters:
i (int) – The index of the current formatoption
- property no_fmtos_update
update the fmto combo box or not
- property shell
The shell to execute the update of the formatoptions in the current project
- show_all_fmt_info(what)[source]
Show the keys, summaries or docs of the formatoptions
Calling this function let’s the help browser show the documentation etc. of all docs or only the selected group determined by the state of the
grouped_cb
andall_groups_cb
checkboxes- Parameters:
what ({'keys', 'summaries', 'docs'}) – Determines what to show
- text_edit = None
A multiline text editor for updating the formatoptions