controlwidget.rst 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
  2. .. module:: controlwidget
  3. .. _controlwidget:
  4. Module controlwidget
  5. ====================
  6. This module defines the Initial view of the gui
  7. .. py:class:: LED(QtGui.QWidget)
  8. Produces a graphical LED
  9. .. py:method:: __init__(self, parent=None, status=1, height=10, width=10)
  10. Initialize a LED
  11. :param parent: (QWidget) parent of this widget
  12. :param status: (int) (0=out, 1=off, 2=orange, 3=on) initial status of this LED
  13. :param height: (int) height of the LED
  14. :param width: (int) width of the LED
  15. .. py:method:: paintEvent(self, event)
  16. .. py:method:: set_on(self)
  17. Set the LED to "on" state
  18. .. py:method:: set_off(self)
  19. Set the LED to "off" state
  20. .. py:method:: set_out(self)
  21. Set the LED to "OUT" state (that is like an LED without power)
  22. .. py:method:: set_tri(self)
  23. Set the LED to "TRI" state (that is led is orange)
  24. .. py:method:: set_status(self, status)
  25. Set the status of the led
  26. :param status: status (in 0, 1, 2, 3)
  27. .. py:class:: StatusLED(QtGui.QWidget)
  28. Create a Status LED with Label next to it
  29. .. py:method:: __init__(self, text, status=None)
  30. Initialise StatusLED
  31. :param text: label text next to the LED
  32. :param status: initial status of the LED
  33. .. py:method:: set_on(self)
  34. See set_on of LED Class
  35. .. py:method:: set_off(self)
  36. See set_off of LED Class
  37. .. py:method:: set_out(self)
  38. See set_out of LED Class
  39. .. py:method:: set_tri(self)
  40. See set_tri of LED Class
  41. .. py:method:: set_status(self, status)
  42. See set_status of LED Class
  43. :param status: the status to set the led to
  44. .. py:class:: BoardControl(kcgw.KCGWidgets)
  45. The main view of the gui for each board at startup
  46. .. py:method:: __init__(self, board_id, single=False)
  47. .. py:method:: toggle_sub_control(self)
  48. Show or hide the subcontrol buttons
  49. .. py:method:: all_in_one(self)
  50. Function that gets called when the Prepare Board Button is pressed.
  51. It Starts the board, syncs it and sets defaults.
  52. This is accomplished via the backendinterface module
  53. .. py:method:: skip_init(self)
  54. Skip board initialisation progress and read data from board. This will adjust the values in the gui to those
  55. on the board (for every value that is stored on the board)
  56. .. py:method:: on_check(self)
  57. This function is the handler for the status leds on the ControlWidget View.
  58. Parses the registers and sets the colors of the leds according.
  59. .. py:class:: ControlWidget(kcgw.KCGWidgets)
  60. Main Widget that is shown at start of gui.
  61. .. py:method:: __init__(self)