qterminal/qtermwidget — pull request #20 by 0xd34df00d (2014-05-23 23:40:24+00:00)
Title: Links highlighting and handling

This pull request introduces a new signal, `QTermWidget::urlActivated(QUrl)` which is emitted when a link is Ctrl+clicked (I also think of adding an option to support handling links by just a click in another PR when this gets merged).

For this, an `UrlFilter` class is added to the filter chain in the `TerminalDisplay`, which is then refreshed (via `processFilters()`) on each resize/scroll/view change.

If this such refreshes seem suboptimal, the refresh logic could be slightly optimized, for example, in the following way: processing filters in a delayed manner, starting/refreshing a timer in scroll/view change slot and calling `processFilters()` in the timer handler. This is hardly an issue though IMO, as `updateLineProperties()` and `updateImage()` slots are already called each time the `outputChanged()` is emitted. Anyway, this can always be a subject for another PR :)

`Filter` class now also derives from `QObject` to support signals & slots machinery.

This PR also pretty much fixes issue #16.