initialconfig.rst 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
  2. .. module:: initialconfig
  3. .. _initialconfig:
  4. Module initialconfig
  5. ====================
  6. This defines the window for initial configuration
  7. .. py:class:: ConfigEntry(kcgw.KCGWidgets)
  8. Container for a single entry in the init config window
  9. .. py:method:: __init__(self, comm='', conf='', type=str, multiline=False)
  10. Initialise an entry
  11. :param comm: comment
  12. :param conf: configuration option
  13. :param type: data type for this option
  14. :param multiline: if multiline editfield or not
  15. .. py:method:: toggle(self)
  16. Toggle the visibility of the comment
  17. .. py:method:: set_comment(self, comm)
  18. Set the comment
  19. :param comm:
  20. .. py:method:: set_config(self, conf)
  21. Set the config option
  22. :param conf:
  23. .. py:method:: validate(self, mark=False)
  24. Validate if entered value is valid
  25. :param mark: mark false entered values?
  26. .. py:method:: san(self, val)
  27. Sanitise string entries (adding " or ' and converting mixed ones)
  28. :param val: the value to sanitise
  29. :return: sanitised value and errors
  30. .. py:method:: __str__(self)
  31. Convert this entry to a string that can be saved to a configuration file
  32. .. py:class:: ConfigSetup(kcgw.KCGWidgets)
  33. This is the Config window
  34. .. py:method:: __init__(self, restart=False)
  35. Initialise this config window
  36. .. py:method:: save(self)
  37. Save the configuration entered in the config window to a configuration file
  38. namely: os.path.expanduser("~")+"/.kcg/config.cfg"
  39. This also makes shure the entered information is valid to some level