Skip to content

Tree Result Items

Tree items for rule and aggregated validation results.

RuleResultItem

RuleResultItem(parent=None, rule_result=None)

Bases: QTreeWidgetItem

Tree widget item for showing rule result details.

Source code in src/cplus_plugin/gui/validation/result_items.py
def __init__(self, parent=None, rule_result: RuleResult = None):
    super().__init__(parent, RULE_RESULT_TYPE)

    self._result = rule_result
    self._description_item = None
    if self._result is not None:
        self._update()

result property writable

result

Gets the rule result used to show result details.

Returns:

Type Description
RuleResult

Returns the rule result used to show result details.

expand_description

expand_description(expand)

Expand or collapse the result description tree node.

Parameters:

Name Type Description Default
expand bool

True to expand the result description node else False.

required
Source code in src/cplus_plugin/gui/validation/result_items.py
def expand_description(self, expand: bool):
    """Expand or collapse the result description tree node.

    :param expand: True to expand the result description node else False.
    :type expand: bool
    """
    if self._description_item is not None:
        self._description_item.setExpanded(expand)

Last update: November 25, 2024
Back to top