leftbar.rst 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
  2. .. module:: leftbar
  3. .. _leftbar:
  4. Module leftbar
  5. ==============
  6. .. py:class:: BoardSpecificInformation(kcgw.KCGWidgets)
  7. Specific Part for each board
  8. .. py:method:: __init__(self, board_id)
  9. This creates the information part for board with id board_id.
  10. This is used to be able to create a variable number of board information areas.
  11. :param board_id: the id of the board
  12. .. py:class:: AcquisitionAndInfo(kcgw.KCGWidgets)
  13. Widget to show below the plot list.
  14. Show certain information.
  15. Provide Start Acquisition button and settings.
  16. .. py:method:: __init__(self)
  17. .. py:method:: toggle_acquisition(self)
  18. Turn acquisition on/off. This gets the information about which board to use by checking state of the checkboxes.
  19. .. py:method:: update_acq_tickboxes(self)
  20. If at least one checkbox is checked, set all checkboxes with other state (acquiring or not)
  21. to disabled. This prevents the user to start with one board and stop with the other simultaneously.
  22. TODO: add option in settings to allow the now eliminated behaviour
  23. .. py:method:: acquisition_stopped(self, board_id)
  24. This is called when a acquisition is stopped.
  25. (has to be registered in Callbacks under 'acquisition_stopped'
  26. :param board_id: id of the board
  27. .. py:method:: acquisition_started(self, board_id)
  28. This is called when a acquisition is started.
  29. (has to be registered in Callbacks under 'acquisition_started'
  30. :param board_id: id of the board
  31. .. py:method:: do_log_w_comment(self)
  32. Function to handle logging with comments
  33. .. py:method:: log_configure_context_menu(self, event)
  34. Function that creates the context menu for the log buttons
  35. :param event: (QEvent) the event
  36. .. py:method:: update_consistency(self, status)
  37. Set consistency indicator
  38. :param status: True if consistent, False if inconsistent, None is nothing
  39. .. py:class:: LeftBar(kcgw.KCGWidgets)
  40. Left bar in the main view of the gui.
  41. Shows plot list and acquisition and info panel
  42. .. py:method:: __init__(self, parent)
  43. .. py:method:: initUI(self)
  44. Initialise the UI
  45. .. py:method:: _generate_menu(self, menu, item)
  46. Generate the right click menu
  47. :param menu: the menu to add the entries to
  48. :param item: the item that was clicked on
  49. .. py:method:: contextMenuEventListView(self, event)
  50. Gets called when right mouse button is clicked
  51. :param event: the event that causes the call of this function
  52. .. py:method:: plot_clicked(self, item, i)
  53. Function to handle when a plot item is clicked.
  54. :param item: what item is clicked
  55. :param i: what column
  56. .. py:method:: add_plot_tree(self, text=False, unique_id=None, datatype=None)
  57. Add a top node to the plot list.
  58. :param text: (str) text to be displayed in the plot list
  59. :param unique_id: (int) unique id of this top node
  60. :param datatype: (int) live or data from file
  61. .. py:method:: read_data(self, d_type, uid, file_name)
  62. Reads datafile
  63. :param d_type: FILE or LIVE - type of datasource
  64. :param uid: unique id for the treeelement
  65. :param file_name: filename if type is FILE
  66. .. py:method:: add_plot_node(self, board_id=None, text=False, unique_id=None, d_type=None, datatype=None)
  67. Actually open a new plot window.
  68. :param board_id: the id of the board to which the plot corresponds
  69. :param text: (str) text that is displayed in the plot list
  70. :param unique_id: (int) unique id of this plot window
  71. :param d_type: (int) type of this plot window
  72. :param datatype: (int) live or data from file
  73. .. py:method:: remove_plot(self, unique_id, silent=False, close_plot_window=False)
  74. Removes a plot from the plot list.
  75. :param unique_id: (int) the unique id of the plot to remove
  76. :param silent: (bool) Ask to close the plot source node in the list if the last plot window is closed
  77. (if False the source node will not be closed)
  78. :param close_plot_window: (bool) close the corresponding plot window
  79. .. py:method:: remove_plot_tree(self, unique_id, silent=False)
  80. Remove the top node from the plot list
  81. :param unique_id: (int) the id of the top node
  82. :param silent: (bool) ask to close even if corresponding plot windows are open
  83. .. py:method:: update_plot(self, uid, b_type, add)
  84. Updates the plot list when the type of a plot window changes
  85. :param uid: (int) unique id of the plot window to update
  86. :param b_type: (int) type of that plot window
  87. :param str add: the add, board and additional text to update
  88. .. py:method:: handle_dialog(self, value, diag=None,)
  89. Function that handles the return of the dialog that asks for live or data from file
  90. :param value: (int) the value of the pressed button in the dialog
  91. :param diag: (QDialog) the dialog that is to be closed (optional)
  92. .. py:method:: add_plot(self, d_type=None)
  93. Handles the creation of a plot.
  94. Also shows the dialog that asks for the data source.
  95. :param d_type: the type of the plot to add