Sets the Widget checked state.

        :param state: New check state.
        :type state: bool
        :return: Method success.
        :rtype: bool

def set_checked(self, state):
        """
        Sets the Widget checked state.

        :param state: New check state.
        :type state: bool
        :return: Method success.
        :rtype: bool
        """

        if not self.__checkable:
            return False

        if state:
            self.__checked = True
            self.setPixmap(self.__active_pixmap)
        else:
            self.__checked = False
            self.setPixmap(self.__default_pixmap)
        self.toggled.emit(state)
        return True