4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS.
16 #include "QDialogView.h"
17 #include <QSyntaxHighlighter>
22 class ControlViewSource;
23 class QViewSourceDialog;
24 class latexHighlighter;
28 : public QController<ControlViewSource, QView<QViewSourceDialog> >
32 friend class QViewSourceDialog;
34 QViewSource(Dialog &);
37 virtual void apply() {}
39 virtual void update_contents();
41 virtual void build_dialog();
42 /// latex syntax highlighter
43 latexHighlighter * highlighter;
48 class latexHighlighter : public QSyntaxHighlighter
53 latexHighlighter(QTextDocument * parent);
56 void highlightBlock(QString const & text);
59 QTextCharFormat commentFormat;
60 QTextCharFormat keywordFormat;
61 QTextCharFormat mathFormat;
65 } // namespace frontend
68 #endif // QVIEWSOURCE_H