cantor/src/lib
defaulthighlighter.cpp
Go to the documentation of this file.
int position() const
QTextBlock currentBlock() const
QTextCharFormat keywordFormat() const
Definition: defaulthighlighter.cpp:273
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
textCursor
int position() const
T pop()
void addPair(const QChar &openSymbol, const QChar &closeSymbol)
Call this to add a pair of symbols for highlighting.
Definition: defaulthighlighter.cpp:137
QTextCharFormat stringFormat() const
Definition: defaulthighlighter.cpp:298
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
void push(const T &t)
QTextCharFormat mismatchingPairFormat() const
Definition: defaulthighlighter.cpp:308
void highlightWords(const QString &text)
Highlights words added with addRule()
Definition: defaulthighlighter.cpp:189
int size() const
QTextCharFormat matchingPairFormat() const
Definition: defaulthighlighter.cpp:303
QTextCharFormat variableFormat() const
Definition: defaulthighlighter.cpp:263
void setFormat(int start, int count, const QTextCharFormat &format)
QTextCharFormat numberFormat() const
Definition: defaulthighlighter.cpp:278
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
int size() const
QTextCharFormat operatorFormat() const
Definition: defaulthighlighter.cpp:283
virtual QString nonSeparatingCharacters() const
Returns a string that contains a regular expression that matches for characters thar are allowed insi...
Definition: defaulthighlighter.cpp:410
void setTextItem(QGraphicsTextItem *item)
Change the item beeing highlighted.
Definition: defaulthighlighter.cpp:103
QTextCharFormat commentFormat() const
Definition: defaulthighlighter.cpp:293
QTextCharFormat errorFormat() const
Definition: defaulthighlighter.cpp:288
bool operator==(const Cantor::DefaultVariableModel::Variable &one, const Cantor::DefaultVariableModel::Variable &other)
Definition: defaultvariablemodel.cpp:194
bool isEmpty() const
QString trimmed() const
QTextDocument * document() const
bool isNull() const
virtual void highlightBlock(const QString &text)
This method is called by Cantor's KTextEdit and is where all the highlighting must take place...
Definition: defaulthighlighter.cpp:123
QTextCharFormat functionFormat() const
Definition: defaulthighlighter.cpp:258
void positionChanged(QTextCursor)
Called when the cursor moved.
Definition: defaulthighlighter.cpp:350
QTextBlock block() const
QTextDocument * document() const
QTextDocument * document() const
void addRule(const QString &word, const QTextCharFormat &format)
Highlights all instances of the word in the text with the specified format.
Definition: defaulthighlighter.cpp:380
bool skipHighlighting(const QString &text)
Definition: defaulthighlighter.cpp:118
void highlightRegExps(const QString &text)
Highlights all matches from regular expressions added with addRule()
Definition: defaulthighlighter.cpp:245
QTextCharFormat format(int position) const
DefaultHighlighter(QObject *parent)
Definition: defaulthighlighter.cpp:82
~DefaultHighlighter()
Definition: defaulthighlighter.cpp:98
QString mid(int position, int n) const
int blockNumber() const
bool isEmpty() const
void highlightPairs(const QString &text)
Highlight pairs added with addPair()
Definition: defaulthighlighter.cpp:144
int blockNumber() const
QTextCharFormat objectFormat() const
Definition: defaulthighlighter.cpp:268
void removeRule(const QString &word)
Removes any rules previously added for the word word.
Definition: defaulthighlighter.cpp:395
void rulesChanged()
void setDocument(QTextDocument *doc)
void rehighlightBlock(const QTextBlock &block)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
T & top()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.