Bo Peng a écrit :
Hi, Abdel,

Just to play with the QSyntaxHighlighting which is not available for
qt3, I installed qt4/x11 and port the view-source dialog to it.
Attached is the patch. It is the same for view-source/qt3, plus syntax
highlighting for %, $$ and \whatever. Please have a look. If you feel
like it, commit it.

It looks fine from a quick glance, Bo. Just a few comment on the way it is implemented... I know that you based this on an existent dialog so I understand why it is like so. I would like when time permit to migrate dialogs to a clean model view separation. At least for dialogs that can benefit from this separation i.e. dialogs than have more than one view. I believe this is the case for yours as there are at least two potential views: a dialog window and a dock widget. The first step toward this model/view separation is to make sure that the code that deals with dialogs element is localized in the class that inherits the Ui; in this case QViewSourceDialog. You can take the QToc/QTocDialog separation as an example. The second step is to do the model/view separation, an example is the QCitation/QCitationDialog.

A small comment about header. I would prefer that you use Qt4 style i.e.:
+#include <QTextEdit>
+#include <QPushButton>

If your Qt4 version works i.e. compile and doesn't make lyx crash, please commit it yourself and we work from there.

Thanks a lot for doing this. I am got going to test it right now :-)

BTW, my lyx/qt4 looks really ancient (gray color, big font,...), what
should I do to let it pick up color/font etc from my KDE scheme?

Helge Hafting has the same problem but Edwin Leuven hasn't... I don't have a linux system to test on so I don't know the solution, sorry. There might be a qtconfig or qtstyle maybe? You could probably ask kde-user about that.

Abdel.

Reply via email to