[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
KLFLatexSyntaxHighlighter Class Reference

#include <klflatexedit.h>

Inheritance diagram for KLFLatexSyntaxHighlighter:
Collaboration diagram for KLFLatexSyntaxHighlighter:

Classes

struct  ParsedBlock

Public Slots

void setCaretPos (int position)
void refreshAll ()
void resetEditing ()
void setHighlightEnabled (bool on)
void setHighlightParensOnly (bool on)
void setHighlightLonelyParens (bool on)
void setFmtKeyword (const QTextFormat &f)
void setFmtComment (const QTextFormat &f)
void setFmtParenMatch (const QTextFormat &f)
void setFmtParenMismatch (const QTextFormat &f)
void setFmtLonelyParen (const QTextFormat &f)

Signals

void newSymbolTyped (const QString &symbolName)

Public Member Functions

 KLFLatexSyntaxHighlighter (QTextEdit *textedit, QObject *parent)
virtual ~KLFLatexSyntaxHighlighter ()
QList< ParsedBlockparsedContent () const
QList< ParsedBlockparsedBlocksForPos (int pos, unsigned int filter_type=0xffffffff) const
virtual void highlightBlock (const QString &text)
bool highlightEnabled () const
bool highlightParensOnly () const
bool highlightLonelyParens () const
QTextCharFormat fmtKeyword () const
QTextCharFormat fmtComment () const
QTextCharFormat fmtParenMatch () const
QTextCharFormat fmtParenMismatch () const
QTextCharFormat fmtLonelyParen () const
Public Member Functions inherited from QSyntaxHighlighter
 QSyntaxHighlighter (QObject *parent)
 QSyntaxHighlighter (QTextDocument *parent)
virtual ~QSyntaxHighlighter ()
void setDocument (QTextDocument *doc)
QTextDocumentdocument () const
void rehighlight ()
void rehighlightBlock (const QTextBlock &block)
Public Member Functions inherited from QObject
 QObject (QObject *parent)
virtual ~QObject ()
virtual bool event (QEvent *e)
virtual bool eventFilter (QObject *watched, QEvent *event)
virtual const QMetaObjectmetaObject () const
QString objectName () const
void setObjectName (const QString &name)
bool isWidgetType () const
bool isWindowType () const
bool signalsBlocked () const
bool blockSignals (bool block)
QThreadthread () const
void moveToThread (QThread *targetThread)
int startTimer (int interval, Qt::TimerType timerType)
void killTimer (int id)
findChild (const QString &name, Qt::FindChildOptions options) const
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const
const QObjectList & children () const
void setParent (QObject *parent)
void installEventFilter (QObject *filterObj)
void removeEventFilter (QObject *obj)
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
bool disconnect (const char *signal, const QObject *receiver, const char *method) const
bool disconnect (const QObject *receiver, const char *method) const
void dumpObjectTree ()
void dumpObjectInfo ()
bool setProperty (const char *name, const QVariant &value)
QVariant property (const char *name) const
QList< QByteArraydynamicPropertyNames () const
void destroyed (QObject *obj)
void objectNameChanged (const QString &objectName)
QObjectparent () const
bool inherits (const char *className) const
void deleteLater ()

Properties

bool highlightEnabled
bool highlightParensOnly
bool highlightLonelyParens
QTextFormat fmtKeyword
QTextFormat fmtComment
QTextFormat fmtParenMatch
QTextFormat fmtParenMismatch
QTextFormat fmtLonelyParen
Properties inherited from QObject
 objectName

Additional Inherited Members

Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
bool disconnect (const QMetaObject::Connection &connection)
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
Protected Member Functions inherited from QSyntaxHighlighter
void setFormat (int start, int count, const QTextCharFormat &format)
void setFormat (int start, int count, const QColor &color)
void setFormat (int start, int count, const QFont &font)
QTextCharFormat format (int position) const
int previousBlockState () const
int currentBlockState () const
void setCurrentBlockState (int newState)
void setCurrentBlockUserData (QTextBlockUserData *data)
QTextBlockUserDatacurrentBlockUserData () const
QTextBlock currentBlock () const
Protected Member Functions inherited from QObject
QObjectsender () const
int senderSignalIndex () const
int receivers (const char *signal) const
bool isSignalConnected (const QMetaMethod &signal) const
virtual void timerEvent (QTimerEvent *event)
virtual void childEvent (QChildEvent *event)
virtual void customEvent (QEvent *event)
virtual void connectNotify (const QMetaMethod &signal)
virtual void disconnectNotify (const QMetaMethod &signal)

Detailed Description

Definition at line 187 of file klflatexedit.h.

Constructor & Destructor Documentation

◆ KLFLatexSyntaxHighlighter()

KLFLatexSyntaxHighlighter::KLFLatexSyntaxHighlighter ( QTextEdit * textedit,
QObject * parent )

◆ ~KLFLatexSyntaxHighlighter()

KLFLatexSyntaxHighlighter::~KLFLatexSyntaxHighlighter ( )
virtual

Definition at line 407 of file klflatexedit.cpp.

Member Function Documentation

◆ fmtComment()

QTextCharFormat KLFLatexSyntaxHighlighter::fmtComment ( ) const
inline

Definition at line 248 of file klflatexedit.h.

◆ fmtKeyword()

QTextCharFormat KLFLatexSyntaxHighlighter::fmtKeyword ( ) const
inline

Definition at line 247 of file klflatexedit.h.

◆ fmtLonelyParen()

QTextCharFormat KLFLatexSyntaxHighlighter::fmtLonelyParen ( ) const
inline

Definition at line 251 of file klflatexedit.h.

◆ fmtParenMatch()

QTextCharFormat KLFLatexSyntaxHighlighter::fmtParenMatch ( ) const
inline

Definition at line 249 of file klflatexedit.h.

◆ fmtParenMismatch()

QTextCharFormat KLFLatexSyntaxHighlighter::fmtParenMismatch ( ) const
inline

Definition at line 250 of file klflatexedit.h.

◆ highlightBlock()

◆ highlightEnabled()

bool KLFLatexSyntaxHighlighter::highlightEnabled ( ) const
inline

Definition at line 244 of file klflatexedit.h.

◆ highlightLonelyParens()

bool KLFLatexSyntaxHighlighter::highlightLonelyParens ( ) const
inline

Definition at line 246 of file klflatexedit.h.

◆ highlightParensOnly()

bool KLFLatexSyntaxHighlighter::highlightParensOnly ( ) const
inline

Definition at line 245 of file klflatexedit.h.

◆ newSymbolTyped

◆ parsedBlocksForPos()

QList< KLFLatexSyntaxHighlighter::ParsedBlock > KLFLatexSyntaxHighlighter::parsedBlocksForPos ( int pos,
unsigned int filter_type = 0xffffffff ) const
Parameters
posis the position in the text to look for parsed blocks
filter_typeis a OR'ed binary mask of wanted ParsedBlock::TypeMask. Only those parsed-block types will be returned, the others will be filtered out.

Definition at line 454 of file klflatexedit.cpp.

References klfDbg, klfFmtCC, and type.

◆ parsedContent()

QList< ParsedBlock > KLFLatexSyntaxHighlighter::parsedContent ( ) const
inline

Definition at line 236 of file klflatexedit.h.

◆ refreshAll

void KLFLatexSyntaxHighlighter::refreshAll ( )
slot

Definition at line 480 of file klflatexedit.cpp.

References QSyntaxHighlighter::rehighlight().

Referenced by newSymbolTyped().

◆ resetEditing

void KLFLatexSyntaxHighlighter::resetEditing ( )
slot

This clears for example the list of already typed symbols.

Definition at line 819 of file klflatexedit.cpp.

Referenced by newSymbolTyped().

◆ setCaretPos

void KLFLatexSyntaxHighlighter::setCaretPos ( int position)
slot

Definition at line 475 of file klflatexedit.cpp.

Referenced by highlightBlock(), and newSymbolTyped().

◆ setFmtComment

void KLFLatexSyntaxHighlighter::setFmtComment ( const QTextFormat & f)
slot

◆ setFmtKeyword

void KLFLatexSyntaxHighlighter::setFmtKeyword ( const QTextFormat & f)
slot

◆ setFmtLonelyParen

void KLFLatexSyntaxHighlighter::setFmtLonelyParen ( const QTextFormat & f)
slot

◆ setFmtParenMatch

void KLFLatexSyntaxHighlighter::setFmtParenMatch ( const QTextFormat & f)
slot

◆ setFmtParenMismatch

void KLFLatexSyntaxHighlighter::setFmtParenMismatch ( const QTextFormat & f)
slot

◆ setHighlightEnabled

void KLFLatexSyntaxHighlighter::setHighlightEnabled ( bool on)
slot

Definition at line 412 of file klflatexedit.cpp.

Referenced by newSymbolTyped().

◆ setHighlightLonelyParens

void KLFLatexSyntaxHighlighter::setHighlightLonelyParens ( bool on)
slot

Definition at line 421 of file klflatexedit.cpp.

Referenced by newSymbolTyped().

◆ setHighlightParensOnly

void KLFLatexSyntaxHighlighter::setHighlightParensOnly ( bool on)
slot

Definition at line 417 of file klflatexedit.cpp.

Referenced by newSymbolTyped().

Property Documentation

◆ fmtComment

QTextFormat KLFLatexSyntaxHighlighter::fmtComment
readwrite

Definition at line 195 of file klflatexedit.h.

◆ fmtKeyword

QTextFormat KLFLatexSyntaxHighlighter::fmtKeyword
readwrite

Definition at line 194 of file klflatexedit.h.

◆ fmtLonelyParen

QTextFormat KLFLatexSyntaxHighlighter::fmtLonelyParen
readwrite

Definition at line 198 of file klflatexedit.h.

◆ fmtParenMatch

QTextFormat KLFLatexSyntaxHighlighter::fmtParenMatch
readwrite

Definition at line 196 of file klflatexedit.h.

◆ fmtParenMismatch

QTextFormat KLFLatexSyntaxHighlighter::fmtParenMismatch
readwrite

Definition at line 197 of file klflatexedit.h.

◆ highlightEnabled

bool KLFLatexSyntaxHighlighter::highlightEnabled
readwrite

Definition at line 191 of file klflatexedit.h.

◆ highlightLonelyParens

bool KLFLatexSyntaxHighlighter::highlightLonelyParens
readwrite

Definition at line 193 of file klflatexedit.h.

◆ highlightParensOnly

bool KLFLatexSyntaxHighlighter::highlightParensOnly
readwrite

Definition at line 192 of file klflatexedit.h.


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

Generated by doxygen 1.14.0