<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mousePressEvent(self, event):
 """ Handle file link clicks. """

        super(OutputWindow, self).mousePressEvent(event)
        if self._link_match:
            path = self._link_match.group('url')
            line = self._link_match.group('line')
            if line is not None:
                line = int(line) - 1
            else:
                line = 0
            self.open_file_requested.emit(path, line)