diff options
Diffstat (limited to 'src/__TODO/UiGuiHighlighter.cpp')
-rw-r--r-- | src/__TODO/UiGuiHighlighter.cpp | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/src/__TODO/UiGuiHighlighter.cpp b/src/__TODO/UiGuiHighlighter.cpp index 7ee13e8..cfbf299 100644 --- a/src/__TODO/UiGuiHighlighter.cpp +++ b/src/__TODO/UiGuiHighlighter.cpp @@ -74,15 +74,15 @@ #include <Qsci/qscilexeryaml.h> #endif -//! \defgroup grp_EditorComponent All concerning editor widget. +// \defgroup grp_EditorComponent All concerning editor widget. -/*! +/* \class UiGuiHighlighter \ingroup grp_EditorComponent \brief UiGuiHighlighter used for selecting the syntax highlighter/lexer for the QsciScintilla component. */ -/*! +/* \brief The constructor initializes some regular expressions and keywords to identify cpp tokens */ UiGuiHighlighter::UiGuiHighlighter(QsciScintilla *parent) : @@ -159,7 +159,7 @@ UiGuiHighlighter::UiGuiHighlighter(QsciScintilla *parent) : setLexerForExtension("cpp"); } -/*! +/* \brief Returns the available highlighters as TQStringList. */ TQStringList UiGuiHighlighter::getAvailableHighlighters() @@ -167,7 +167,7 @@ TQStringList UiGuiHighlighter::getAvailableHighlighters() return _mapHighlighternameToExtension.keys(); } -/*! +/* \brief This slot handles signals coming from selecting another syntax highlighter. */ void UiGuiHighlighter::setHighlighterByAction(TQAction *highlighterAction) @@ -182,7 +182,7 @@ void UiGuiHighlighter::setHighlighterByAction(TQAction *highlighterAction) _qsciEditorParent->verticalScrollBar()->setValue(scrollPos); } -/*! +/* \brief Turns the syntax parser on. */ void UiGuiHighlighter::turnHighlightOn() @@ -192,23 +192,18 @@ void UiGuiHighlighter::turnHighlightOn() readCurrentSettings(""); } -/*! +/* \brief Turns the syntax parser off. */ void UiGuiHighlighter::turnHighlightOff() { _highlightningIsOn = false; _qsciEditorParent->setLexer(); -#if defined (Q_OS_WIN) || defined (Q_OS_MAC) - _qsciEditorParent->setFont(TQFont("Courier", 10, TQFont::Normal)); - _qsciEditorParent->setMarginsFont(TQFont("Courier", 10, TQFont::Normal)); -#else _qsciEditorParent->setFont(TQFont("Monospace", 10, TQFont::Normal)); _qsciEditorParent->setMarginsFont(TQFont("Monospace", 10, TQFont::Normal)); -#endif } -/*! +/* \brief Read the settings for the current lexer from the settings file. */ @@ -271,9 +266,6 @@ bool UiGuiHighlighter::readCurrentSettings(const char *prefix) { TQFont f; -#if defined (Q_OS_WIN) || defined (Q_OS_MAC) - f.setFamily(fdesc[0]); -#else if (fdesc[0].contains("courier", TQt::CaseInsensitive)) { f.setFamily("Monospace"); @@ -282,7 +274,6 @@ bool UiGuiHighlighter::readCurrentSettings(const char *prefix) { f.setFamily(fdesc[0]); } -#endif f.setPointSize(fdesc[1].toInt()); f.setBold(fdesc[2].toInt()); f.setItalic(fdesc[3].toInt()); @@ -317,7 +308,7 @@ bool UiGuiHighlighter::readCurrentSettings(const char *prefix) return rc; } -/*! +/* \brief Write the settings for the current lexer to the settings file. */ void UiGuiHighlighter::writeCurrentSettings(const char *prefix) @@ -390,7 +381,7 @@ void UiGuiHighlighter::writeCurrentSettings(const char *prefix) } } -/*! +/* \brief Sets the \a color for the given \a style. */ void UiGuiHighlighter::setColor(const TQColor &color, int style) @@ -399,7 +390,7 @@ void UiGuiHighlighter::setColor(const TQColor &color, int style) _lexer->setColor(color, style); } -/*! +/* \brief Sets the \a font for the given \a style. */ void UiGuiHighlighter::setFont(const TQFont &font, int style) @@ -408,7 +399,7 @@ void UiGuiHighlighter::setFont(const TQFont &font, int style) _lexer->setFont(font, style); } -/*! +/* \brief Sets the to be used lexer by giving his name. */ void UiGuiHighlighter::setLexerByName(TQString lexerName) @@ -416,7 +407,7 @@ void UiGuiHighlighter::setLexerByName(TQString lexerName) setLexerForExtension(_mapHighlighternameToExtension[lexerName].first()); } -/*! +/* \brief Sets the proper highlighter / lexer for the given file \a extension. Returns the index of the used lexer in the list. */ int UiGuiHighlighter::setLexerForExtension(TQString extension) |