Module defining a widget for updating the formatoption of the current project

Classes:

DimensionsWidget(parent[, dim])

A widget for updating the dimensions

FormatoptionWidget(*args, **kwargs)

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()

insert_from_combo()

reset_combobox()

Clear all comboboxes

set_dim(dim)

set_single_selection([yes])

slice2list(sl)

toggle_close_popup()

get_ds()[source]
insert_from_combo()[source]
reset_combobox()[source]

Clear all comboboxes

set_dim(dim)[source]
set_single_selection(yes=True)[source]
slice2list(sl)[source]
toggle_close_popup()[source]
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:

clear_text()

fill_combos_from_project(project)

Fill group_combo and fmt_combo from a project

fill_fmt_combo(i[, current_text])

Fill the fmt_combo combobox based on the current group name

get_name(fmto)

Get the name of a psyplot.plotter.Formatoption instance

get_obj()

Get the current update text

get_text()

Get the current update text

insert_obj(obj)

Add a string to the formatoption widget

load_fmt_widget(i)

Load the formatoption specific widget

refill_from_rc(sort_by_key)

remove_fmt_widget()

reset_fmt_widget()

run_code()

Run the update of the project inside the shell

set_current_fmt_value(i)

Add the value of the current formatoption to the line text

set_fmto(name)

set_obj(obj)

setup_fmt_completion_model()

show_all_fmt_info(what)

Show the keys, summaries or docs of the formatoptions

show_fmt_info(i)

Show the documentation of the formatoption in the help explorer

toggle_line_edit()

Switch between the line_edit and text_edit

Attributes:

fmt_combo

The combobox for the formatoptions

fmt_widget

The formatoption specific widget that is loaded from the formatoption

fmto

group_combo

The combobox for the formatoption groups

help_explorer

The help_explorer to display the documentation of the formatoptions

line_edit

A line edit for updating the formatoptions

multiline_button

A button to switch between line_edit and text_edit

no_fmtos_update

update the fmto combo box or not

shell

The shell to execute the update of the formatoptions in the current project

text_edit

A multiline text editor for updating the formatoptions

clear_text()[source]
fill_combos_from_project(project)[source]

Fill group_combo and fmt_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

get_obj()[source]

Get the current update text

get_text()[source]

Get the current update text

group_combo = None

The combobox for the formatoption groups

help_explorer = None

The help_explorer to display the documentation of the formatoptions

insert_obj(obj)[source]

Add a string to the formatoption widget

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 the line_edit

Parameters:

i (int) – The index of the current formatoption

multiline_button = None

A button to switch between line_edit and text_edit

property no_fmtos_update

update the fmto combo box or not

refill_from_rc(sort_by_key)[source]
remove_fmt_widget()[source]
reset_fmt_widget()[source]
run_code()[source]

Run the update of the project inside the shell

set_current_fmt_value(i)[source]

Add the value of the current formatoption to the line text

set_fmto(name)[source]
set_obj(obj)[source]
setup_fmt_completion_model()[source]
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 and all_groups_cb checkboxes

Parameters:

what ({'keys', 'summaries', 'docs'}) – Determines what to show

show_fmt_info(i)[source]

Show the documentation of the formatoption in the help explorer

text_edit = None

A multiline text editor for updating the formatoptions

toggle_line_edit()[source]

Switch between the line_edit and text_edit

This method is called when the multiline_button is clicked and switches between the single line :attr:``line_edit` and the multiline text_edit