Since ListView seems to be efficient enough to handle resizes sanely, we don't
have to resort to do manual wordwrapping and could significantly simplify our
text layouting code...
While playing around with various approaches to how to implement ChatView in QML, I think slowly
things are shaping up. We now have extended the QmlMessageModel to provide all info needed for rendering
a QmlChatLine in one data stracture, in order to avoid numerous calls to the model whenever a ChatLine
is instantiated.
Currently there's a lot of code duplication with the related non-QML classes, but this will either go away
once we decide to kill the QGV-based ChatView, or be unified into a common set of base classes if we
find out that both implementations are going to stay around.
Now that I get my brain wrapped around QML a bit, let's take things
more seriously. Turns out, while Text elements seem to be efficient enough,
TextEdit elements (needed for selection and mousehandling) are not, so resizing
is sluggish.
Thus, instead of using any of the stock elements, we're now implementing this ourselves
in C++, and will probably do much the same as we did for the QGV-based ChatView (minus
some of the hackery, if we're lucky). This means layouting and drawing the text ourselves.
On the upside, we can just keep using the old styleengine for now...
Here's hoping that things will turn out to be more efficient anyway, because ListView seems
to be creating and discarding its items as needed; so there shouldn't be a scene with thousands
of items involved to manage...
This marks the beginnings of QML widgets in Quassel. The first widget to be ported is ChatView;
this commit does the following:
* Extend the build system for supporting QML
* Add a new qmlui module
* Add a (very) rudimentary ChatView component that connects to
* the new QmlMessageModel, which is intended for proxying between the client and the QuickUI
For now, -DWITH_QML=ON is required for cmake to build Quassel with QML. No, it's not worth trying out
at the moment.