123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- .. _groupedelements:
- Grouped Elements Module
- =======================
- .. module:: groupedelements
- .. py:class:: GroupWarning
- This is a simple Warning issued when elements or groups are not existend
- .. py:class:: GroupedObjects
- Class that keeps track of the groups and its objects and offers methods to enable/disable objects
- .. py:method:: __init__(self)
- Initialising the GroupedElementsObject
- .. _add_item:
- .. py:method:: addItem(self, group, item)
- Add an element `item` to group `group`
- :param str group: Desired group
- :param any item: Item to add
- .. py:method:: setChecked(self, group, state)
- For CheckBoxes this will set the state of all Checkboxes in `group` to `state`.
- This calls the setChecked method for all elements in group.
- :param str group: Desired group
- :param bool state: New state of the Checkboxes
- .. py:method:: setEnabled(self, group, state)
- Sets the elements to Enabled/Disabled if state is True/False.
- This calls the setEnabled method for all elements in group.
- :param str group: Desired group
- :param bool state: New State
- .. py:method:: addMenuItem(self, group, item)
- Deprecated use :ref:`addItem <add_item>`.
- Remains for backwards compatibility.
- .. py:method:: addButton(self, group, item)
- Deprecated use :ref:`addItem <add_item>`.
- Remains for backwards compatibility.
- .. py:method:: addCheckbox(self, group, item)
- Deprecated use :ref:`addItem <add_item>`.
- Remains for backwards compatibility.
- .. py:method:: removeItem(self, group, item)
- Remove an item from a group.
- :param str group: Desired group
- :param any item: Item to remove
- .. py:method:: removeGroup(self, group)
- Remove a group.
- :param str group: Group to remove
- .. py:method:: getElements(self, group)
- Returns list of all elements in a group
- :param str group: Desired group
- :return: List of all elements in group
- :rtype: list
- .. py:method:: createEmptyGroup(self, group)
- Creates a empty group
- :param str group: Desired Group
- .. py:attribute:: Buttons
- GroupedObjects instance see :ref:`Elements <elements>`
- .. py:attribute:: Checkboxes
- GroupedObjects instance see :ref:`Elements <elements>`
- .. py:attribute:: MenuItems
- GroupedObjects instance see :ref:`Elements <elements>`
- .. _elements:
- .. py:attribute:: Elements
- GroupedObjects instance. This is the same instance as Buttons, Checkboxes, MenuItems. Those are only
- references to the same object and are only used to improve readability.
|