Computer Assisted Medical Intervention Tool Kit  version 6.0
Loading...
Searching...
No Matches
camitk::LogSyntaxHighlighter Class Reference

Simple Syntax highlighter for CamiTK Log syntax. More...

#include <LogSyntaxHighlighter.h>

Public Member Functions

 LogSyntaxHighlighter (QTextDocument *parent=nullptr)
 constructor
void setHighlight (QString text)
 highlight a specific text (sending null or empty string does the same as unsetHighlight)
void unsetHighlight ()
 remove all highlighting
Public Member Functions inherited from camitk::SyntaxHighlighter
void addRule (QString regexp, QColor color, int weight=QFont::Normal, bool italic=false, QColor backgroundColor=Qt::transparent)
 add a new rule (can be done on the fly)
bool removeRule (QString regexp)
 remove an existing rule (can be done on the fly)
 SyntaxHighlighter (QTextDocument *parent=nullptr)
 constructor

Detailed Description

Simple Syntax highlighter for CamiTK Log syntax.

Usage: QTextEdit* textEdit = new QTextEdit(); new LogSyntaxHighlighter(textEdit->document());

Constructor & Destructor Documentation

◆ LogSyntaxHighlighter()

LogSyntaxHighlighter::LogSyntaxHighlighter ( QTextDocument * parent = nullptr)

constructor

Parameters
parent(optional) if not given during instantiation, use setDocument(..) afterward

References camitk::SyntaxHighlighter::addRule(), and camitk::SyntaxHighlighter::SyntaxHighlighter().

Member Function Documentation

◆ setHighlight()

void camitk::LogSyntaxHighlighter::setHighlight ( QString text)

highlight a specific text (sending null or empty string does the same as unsetHighlight)

References camitk::SyntaxHighlighter::addRule(), and unsetHighlight().

◆ unsetHighlight()

void camitk::LogSyntaxHighlighter::unsetHighlight ( )

remove all highlighting

References camitk::SyntaxHighlighter::removeRule().

Referenced by setHighlight().


The documentation for this class was generated from the following files: