spinetoolbox.widgets.settings_widget
¶
Widget for controlling user settings.
- author
Savolainen (VTT)
- date
17.1.2018
Module Contents¶
Classes¶
|
|
A widget to change user’s preferred settings, but only for the Spine db editor. |
|
A widget to change user’s preferred settings. |
Functions¶
|
|
|
|
|
|
|
|
|
- class spinetoolbox.widgets.settings_widget.SettingsWidgetBase(qsettings)[source]¶
Bases:
PySide2.QtWidgets.QWidget
- Parameters
qsettings (QSettings) – Toolbox settings
- 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(multi_db_editor)[source]¶
Bases:
SpineDBEditorSettingsMixin
,SettingsWidgetBase
A 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:
SpineDBEditorSettingsMixin
,SettingsWidgetBase
A 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.
- browse_julia_button_clicked(self, checked=False)[source]¶
Calls static method that shows a file browser for selecting the Julia path.
- browse_julia_project_button_clicked(self, checked=False)[source]¶
Calls static method that shows a file browser for selecting a Julia project.
- browse_python_button_clicked(self, checked=False)[source]¶
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
- 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.