git-svn-id: svn://db.shs.com.ru/libs@34 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2015-09-25 11:20:12 +00:00
parent 94d9cc2c31
commit fd7aad5149
2 changed files with 5 additions and 1 deletions

View File

@@ -724,6 +724,8 @@ void QCodeEdit::raiseHelp(QTextCursor tc, int arg) {
lbl_help->resize(lbl_help->sizeHint());
lbl_help->move(textCode->mapToGlobal(textCode->cursorRect(tc).topLeft() - QPoint(0, lbl_help->height() + 8)));
lbl_help->show();
cursor_scope = scope.first;
cursor_scope << scope.second;
//qDebug() << "tooltip" << st;
}
@@ -731,6 +733,7 @@ void QCodeEdit::raiseHelp(QTextCursor tc, int arg) {
void QCodeEdit::hideHelp() {
lbl_help->hide();
es_cursor.cursor = QTextCursor();
cursor_scope.clear();
applyExtraSelection();
}

View File

@@ -38,7 +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();}
QStringList cursorScope() const {return cursor_scope;}
bool showSpaces() const {return spaces_;}
bool showLineNumbers() const {return textLines->isVisible();}
@@ -79,6 +79,7 @@ private:
QTextEdit::ExtraSelection es_line, es_cursor;
QList<QTextEdit::ExtraSelection> es_selected, es_custom;
QMap<int, ACClass> ac_classes;
QStringList cursor_scope;
int prev_lc, auto_comp_pl, timer;
bool spaces_, _ignore_focus_out, _first, _destructor;