git-svn-id: svn://db.shs.com.ru/libs@32 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include <QDebug>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QTreeWidget>
|
||||
#include <QScrollBar>
|
||||
#include "iconedlabel.h"
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
@@ -36,6 +38,7 @@ public:
|
||||
QRect cursorRect() const {return textCode->cursorRect();}
|
||||
QRect cursorRect(const QTextCursor & cursor) const {return textCode->cursorRect(cursor);}
|
||||
QString text() const {return textCode->toPlainText();}
|
||||
QString helpWord() const {return es_cursor.cursor.selectedText();}
|
||||
bool showSpaces() const {return spaces_;}
|
||||
bool showLineNumbers() const {return textLines->isVisible();}
|
||||
|
||||
@@ -50,7 +53,12 @@ protected:
|
||||
|
||||
virtual ACList autoCompletitionList(const QStringList & scope, const QString & written) const {return ACList();}
|
||||
virtual void parse() {}
|
||||
QString selectArg(QString s, int arg);
|
||||
void raiseHelp(QTextCursor tc, int arg = -1);
|
||||
void hideHelp();
|
||||
QTextCursor functionStart(QTextCursor tc, int * arg);
|
||||
ACList wordsCompletitionList(const QString & written) const;
|
||||
QPair<QStringList, QString> getScope(QTextCursor tc, bool * ok = 0);
|
||||
static int skipRange(const QString & s, int pos, QChar oc, QChar cc, QChar sc = QChar());
|
||||
static int skipCWord(const QString & s, int pos);
|
||||
static bool matchWritten(QString s, QString w);
|
||||
@@ -66,12 +74,13 @@ private:
|
||||
};
|
||||
|
||||
QPlainTextEdit * textCode, * textLines;
|
||||
QTreeWidget completer;
|
||||
QTextEdit::ExtraSelection es_line;
|
||||
QTreeWidget * completer;
|
||||
IconedLabel * lbl_help;
|
||||
QTextEdit::ExtraSelection es_line, es_cursor;
|
||||
QList<QTextEdit::ExtraSelection> es_selected, es_custom;
|
||||
QMap<int, ACClass> ac_classes;
|
||||
int prev_lc, auto_comp_pl, timer;
|
||||
bool spaces_, _ignore_focus_out, _first;
|
||||
bool spaces_, _ignore_focus_out, _first, _destructor;
|
||||
|
||||
bool eventFilter(QObject * o, QEvent * e);
|
||||
void showEvent(QShowEvent * );
|
||||
@@ -81,6 +90,7 @@ private:
|
||||
void previousCompletition();
|
||||
|
||||
private slots:
|
||||
void syncScrolls();
|
||||
void deleteLine();
|
||||
void copyLineUp();
|
||||
void copyLineDown();
|
||||
@@ -89,7 +99,6 @@ private slots:
|
||||
void indent();
|
||||
void deindent();
|
||||
void autoIndent();
|
||||
void updateLines();
|
||||
void invokeAutoCompletition(bool force = false);
|
||||
void commitCompletition();
|
||||
void textEdit_cursorPositionChanged();
|
||||
@@ -97,6 +106,8 @@ private slots:
|
||||
void textEdit_selectionChanged();
|
||||
|
||||
public slots:
|
||||
void updateLines();
|
||||
void scrollToTop();
|
||||
void setFocus() {textCode->setFocus();}
|
||||
void setText(const QString & t) {textCode->setPlainText(t);}
|
||||
void setShowSpaces(bool yes);
|
||||
|
||||
Reference in New Issue
Block a user