Fraxinus  18.10
An IGT application
snwSyntaxHighlighter.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef SNWSYNTAXHIGHLIGHTER_H_
13 #define SNWSYNTAXHIGHLIGHTER_H_
14 
15 #include "cxResourceWidgetsExport.h"
16 
17 #include <QSyntaxHighlighter>
18 
19 namespace snw
20 {
21 
28 class cxResourceWidgets_EXPORT SyntaxHighlighter : public QSyntaxHighlighter
29 {
30 public:
31  SyntaxHighlighter(QTextDocument* parent);
32  virtual void highlightBlock(const QString &text);
33  virtual ~SyntaxHighlighter() {}
34 private:
35  void highlightTimestamp(const QString &text);
36  void applyFormat(const QString &text, const QTextCharFormat& format, const QString pattern);
37 };
38 
39 }
40 
41 #endif /*SNWSYNTAXHIGHLIGHTER_H_*/
Provides syntax highlighting for sonowand log files.