spinetoolbox.widgets.options_widget

Contains OptionsWidget class.

author:
  1. Vennström (VTT)
date:

1.6.2019

Module Contents

class spinetoolbox.widgets.options_widget.OptionsWidget(options, header='Options', parent=None)[source]

Bases: PySide2.QtWidgets.QWidget

A widget for handling simple options. Used by ConnectionManager.

Creates OptionWidget

Parameters:

options (Dict) – Dict describing what options to build a widget around.

Keyword Arguments:
 
  • header (str) – Title of groupbox (default: {“Options”})
  • parent (QWidget, None) – parent of widget
optionsChanged[source]
_build_ui(self)[source]

Builds ui from specification in dict

set_options(self, options=None, set_missing_default=True)[source]

Sets state of options

Keyword Arguments:
 
  • {Dict} -- Dict with option name as key and value as value (default (options) – {None})
  • {bool} -- Sets missing options to default if True (default (set_missing_default) – {True})
get_options(self)[source]

Returns current state of option widget

Returns:[Dict] – Dict with option name as key and value as value