123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
- .. module:: groupedelements
- .. _groupedelements:
- Module groupedelements
- ======================
- Module to easily group elements of a gui
- .. py:class:: GroupWarning(Warning)
- General Warning Class for GroupedObjects
- .. py:class:: GroupedObjects
- This class enables grouping of objects to easily access them as groups throughout the gui.
- .. py:method:: __init__(self)
- Initialise this object
- .. py:method:: setFlags(self, flagDict)
- Set Flags that define the behaviour of GroupedObjects in various events.
- :param flagDict: Dictionary containing the Flags.
- Possible Flags are: (They are to be of type bool)
-
- * warn: If an element is deleted and the corresponding entry is encountered by setEnabled, a
- Warning is raised if warn is True
- * autoremove: If an element is deleted and the corresponding entry is encountered by setEnabled,
- the Element will be removed from GroupedObjects if autoremove is True
- * exception_on_deleted: If an element is deleted and the corresponding entry is encountered by
- setEnabled an Exception will be raised if exception_on_deleted is True
- * notify_deletion: If this is set to True a notification will be printed to STDOUT whenever an
- autoremove is performed (see above)
- .. py:method:: createEmptyGroup(self, group)
- Create an empty group
- :param group: (str) the name of the group
- .. py:method:: addItem(self, group, item)
- Add a item or items to a group and thus register with the GroupedObjects object
- :param group: (list or str) List of groups or single group where the item is to be added
- :param item: (single item or list) What item/s
- .. py:method:: setChecked(self, group, state)
- Set the state of all the checkboxes in the group
- :param group: What group
- :param state: True for checked, False for unchecked
- .. py:method:: setEnabled(self, group, state, exclude=None)
- Set the state of all the items in the group
- :param group: What group
- :param state: True for enabled, False for disabled
- :param exclude: Exclude this item
- .. py:method:: addMenuItem(self, group, item)
- Deprecated. Use addItem.
- .. py:method:: addButton(self, group, item)
- Deprecated. Use addItem.
- .. py:method:: addCheckbox(self, group, item)
- Deprecated. Use addItem.
- .. py:method:: removeItem(self, group, item)
- Remove an element from a gropu
- :param group: (list or str) list of groups or groupname
- :param item: (list or item) list of items or item to remove
- .. py:method:: removeGroup(self, group)
- Remove a group from GroupedObjects. If the group is not registered, a warning will be raised.
- :param group: (str) the group to remove
- .. py:method:: emptyGroup(self, group)
- Unregister all elements from group. (This will delete the group and recreate it.
- :param group: (str) the group to clean out.
- .. py:method:: getElements(self, group)
- Get the elements of a group as list.
- :param group: (str) the gorup you want the elements of
- :return: (list) Elements in group
- .. py:method:: isEnabled(self, group)
- Check if a group is enabled.
- :param group: (str) the gorup to check.
- :return: (bool) State of group
- .. py:class:: LivePlotWindows()
- Container class to hold open LivePlotWindows.
- Added LivePlotWindows will automatically be plotted to on the event of new data.
- .. py:method:: __init__(self)
- .. py:method:: addWindow(self, board_id, window)
- Register a Window.
- :param window: (PlotWidget) The window to be added.
- .. py:method:: getWindows(self, board_id)
- Get the list of registered plot windows.
- :return: (list) List of plotWindows
- .. py:method:: hasWindows(self, board_id)
- Check if Windows are registered.
- :return: (bool) True if there are windows and False if not.
- .. py:method:: removeWindow(self, board_id, window)
- Remove a window from open plot windows
- :param window: the window to remove
|