spinetoolbox.widgets.settings_widget¶
Widget for controlling user settings.
| author: |
|
|---|---|
| date: | 17.1.2018 |
Module Contents¶
Classes¶
SettingsWidgetBase |
Initialize class. |
SpineDBEditorSettingsMixin |
|
SpineDBEditorSettingsWidget |
A widget to change user’s preferred settings, but only for the Spine db editor. |
SettingsWidget |
A widget to change user’s preferred settings. |
-
class
spinetoolbox.widgets.settings_widget.SettingsWidgetBase(qsettings)[source]¶ Bases:
PySide2.QtWidgets.QWidgetInitialize class.
-
keyPressEvent(self, e)[source]¶ Close settings form when escape key is pressed.
Parameters: e (QKeyEvent) – Received key press event.
-
mousePressEvent(self, e)[source]¶ Save mouse position at the start of dragging.
Parameters: e (QMouseEvent) – Mouse event
-
mouseReleaseEvent(self, e)[source]¶ Save mouse position at the end of dragging.
Parameters: e (QMouseEvent) – Mouse event
-
mouseMoveEvent(self, e)[source]¶ Moves the window when mouse button is pressed and mouse cursor is moved.
Parameters: e (QMouseEvent) – Mouse event
-
-
class
spinetoolbox.widgets.settings_widget.SpineDBEditorSettingsMixin[source]¶
-
class
spinetoolbox.widgets.settings_widget.SpineDBEditorSettingsWidget(db_mngr)[source]¶ Bases:
spinetoolbox.widgets.settings_widget.SpineDBEditorSettingsMixin,spinetoolbox.widgets.settings_widget.SettingsWidgetBaseA widget to change user’s preferred settings, but only for the Spine db editor.
Initialize class.
-
class
spinetoolbox.widgets.settings_widget.SettingsWidget(toolbox)[source]¶ Bases:
spinetoolbox.widgets.settings_widget.SpineDBEditorSettingsMixin,spinetoolbox.widgets.settings_widget.SettingsWidgetBaseA widget to change user’s preferred settings.
Parameters: toolbox (ToolboxUI) – Parent widget. -
browse_gams_path(self, checked=False)[source]¶ Open file browser where user can select a GAMS program.
Calls static method that shows a file browser for selecting the Julia path.
Calls static method that shows a file browser for selecting a Julia project.
Calls static method that shows a file browser for selecting Python interpreter.
-
show_python_kernel_editor(self, checked=False)[source]¶ Opens kernel editor, where user can make a kernel for the Python Console.
-
python_kernel_editor_closed(self, ret_code)[source]¶ Catches the selected Python kernel name when the editor is closed.
-
show_julia_kernel_editor(self, checked=False)[source]¶ Opens kernel editor, where user can make a kernel the Julia Console.
-
julia_kernel_editor_closed(self, ret_code)[source]¶ Catches the selected Julia kernel name when the editor is closed.
-
browse_work_path(self, checked=False)[source]¶ Open file browser where user can select the path to wanted work directory.
-
show_color_dialog(self, checked=False)[source]¶ Let user pick the bg color.
Parameters: checked (boolean) – Value emitted with clicked signal
-
update_bg_color(self)[source]¶ Set tool button icon as the selected color and update Design View scene background color.
-
update_scene_bg(self, checked=False)[source]¶ Draw background on scene depending on radiobutton states.
Parameters: checked (boolean) – Toggle state
-
toggle_julia_execution_mode(self, checked=False)[source]¶ Toggles between console and non-console Julia execution modes depending on radiobutton states.
Parameters: checked (boolean) – Toggle state
-
toggle_python_execution_mode(self, checked=False)[source]¶ Toggles between console and non-console Python execution modes depending on radiobutton states.
Parameters: checked (boolean) – Toggle state
-
read_settings(self)[source]¶ Read saved settings from app QSettings instance and update UI to display them.
-
read_project_settings(self)[source]¶ Get project name and description and update widgets accordingly.
-
save_settings(self)[source]¶ Get selections and save them to persistent memory. Note: On Linux, True and False are saved as boolean values into QSettings. On Windows, booleans and integers are saved as strings. To make it consistent, we should use strings.
-
update_project_settings(self)[source]¶ Update project name and description if these have been changed.
-