24 #ifndef KLFLATEXEDIT_H 25 #define KLFLATEXEDIT_H 32 #include <QContextMenuEvent> 34 #include <QSyntaxHighlighter> 35 #include <QTextCharFormat> 55 Q_PROPERTY(
int heightHintLines READ heightHintLines WRITE setHeightHintLines) ;
78 virtual QSize sizeHint()
const;
94 void setLatex(
const QString& latex);
98 void setHeightHintLines(
int lines);
102 void insertDelimiter(
const QString& delim,
int charsBack = 1);
110 void slotInsertFromActionSender();
118 int pHeightHintLines;
135 void setCaretPos(
int position);
139 enum { Enabled = 0x01,
140 HighlightParensOnly = 0x02,
141 HighlightLonelyParen = 0x04 };
144 void newSymbolTyped(
const QString& symbolName);
158 enum Format { FNormal = 0, FKeyWord, FComment, FParenMatch, FParenMismatch, FLonelyParen };
161 FormatRule(
int ps = -1,
int l = 0, Format f = FNormal,
bool needsfocus =
false)
162 : pos(ps), len(l),
format(f), onlyIfFocus(needsfocus) { }
165 int end()
const {
return pos + len; }
171 ParenItem(
int ps = -1,
bool h =
false,
char c = 0,
bool l =
false)
172 : pos(ps), highlight(h), ch(c), left(l) { }
181 void parseEverything();
canInsertFromMimeData(const QMimeData *source)
highlightBlock(const QString &text)
int heightHintLines() const
KLFLatexSyntaxHighlighter * syntaxHighlighter()
void setMainWinDataOpener(KLFMainWin *mainwin)
A text edit field that edits latex code.
insertFromMimeData(const QMimeData *source)