'Checks if the block is expanded or collased.
:param block: QTextBlock
:return: False for an open trigger, True for for closed trigger'

@staticmethod
def is_collapsed(block):

    if (block is None):
        return False
    state = block.userState()
    if (state == (-1)):
        state = 0
    return bool((state & 134217728))
