0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-02 03:53:19 +03:00

Script highlighter has been finished

This commit is contained in:
Arin Alexander
2017-09-19 19:05:38 +03:00
parent aa66b6a057
commit f4dbddafad
6 changed files with 295 additions and 22 deletions

View File

@@ -3,6 +3,7 @@
#include <QPlainTextEdit>
#include <QSyntaxHighlighter>
#include "lrscripthighlighter.h"
QT_BEGIN_NAMESPACE
class QWidget;
@@ -28,11 +29,17 @@ protected:
void resizeEvent(QResizeEvent *event);
private:
QString textUnderCursor() const;
bool matchLeftParenthesis(QTextBlock currentBlock, QChar parenthesisType, int i, int numLeftParentheses);
bool matchRightParenthesis(QTextBlock currentBlock, QChar parenthesisType, int i, int numRightParentheses);
void createParenthesisSelection(int pos);
bool charIsParenthesis(QChar character, ParenthesisType type);
QChar getParenthesisReverceChar(QChar parenthesisChar);
private slots:
void insertCompletion(const QString& completion);
void updateLineNumberAreaWidth(int newBlockCount);
void highlightCurrentLine();
void updateLineNumberArea(const QRect &rect, int dy);
void matchParentheses();
private:
QCompleter* m_compleater;
QWidget *lineNumberArea;