64 SyntaxHighlighterBase(
const QString &name, QTextDocument *parent,
const QString &description =
"", QSharedPointer<CodeEditorStyle> editorStyle = QSharedPointer<CodeEditorStyle>());
68 void setFoldDetector(QSharedPointer<FoldDetector> foldDetector);
70 virtual void onStateChanged(
bool state);
73 QSharedPointer<CodeEditorStyle> editorStyle()
const {
return m_editorStyle; }
82 void highlightBlock(
const QString &text);
84 void refreshEditor(QSharedPointer<CodeEditorStyle> editorStyle);
92 virtual void highlight_block(
const QString &text, QTextBlock &block) = 0;
94 virtual void default_highlight_block(
const QString &text,
const TextBlockUserData *textBlockUserData) = 0;
96 virtual void rehighlight();
99 static QTextBlock findPrevNonBlankBlock(
const QTextBlock ¤tBlock);
101 void highlightWhitespaces(
const QString &text);
103 QRegularExpression m_regWhitespaces;
104 QRegularExpression m_regSpacesPtrn;
105 QSharedPointer<CodeEditorStyle> m_editorStyle;
106 QSharedPointer<FoldDetector> m_foldDetector;
Definition textBlockUserData.h:56