settings.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
  2. .. module:: settings
  3. .. _settings:
  4. Module settings
  5. ===============
  6. .. py:class:: Settings(kcgw.KCGWidgets)
  7. Settings Window
  8. .. py:method:: __init__(self, storage_handler)
  9. Initialise the Settings Window
  10. :param storage_handler: the container class used to store settings
  11. .. py:method:: initUI(self)
  12. Initialise the UI
  13. .. py:method:: build_new_setting(self, handle, value)
  14. Build a new setting.
  15. This will add the setting to the local_storage.
  16. :param handle: the handle of the new setting (input field, checkbox etc)
  17. :param value: (str) key for this setting
  18. :return: the handle :)
  19. .. py:method:: _read_setting_from_object(self, object)
  20. Get the value from a settings object
  21. :param object: the object to read the value from
  22. .. py:method:: _setSettings(self)
  23. Set the values in the settings window to the current values
  24. .. py:method:: _apply(self)
  25. Called when the apply button is pressed. It emits the changed signal if anything was changed
  26. .. py:method:: _ok(self)
  27. Handler for the ok button. It calls _apply and close
  28. .. py:method:: _cancel(self)
  29. Handler for the cancel button. It calls close() and discards changed values
  30. .. py:method:: show(self)
  31. Shows the window and sets the current values (calls _setSettings)
  32. .. py:method:: keyPressEvent(self, QKeyEvent)
  33. Reimplementation of the keyPressEvent of QWidget to close the window on ESC press.