forked from qt-creator/qt-creator
TextEditor: Introduce some convenience text accessors in the editor
And adjust users. Change-Id: I9329257cfa5f3298731deb07c2881bc37d9a051d Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -140,10 +140,17 @@ public:
|
||||
static BaseTextEditor *currentTextEditor();
|
||||
|
||||
BaseTextEditorWidget *ensureWidget() const;
|
||||
BaseTextDocumentPtr ensureDocument();
|
||||
BaseTextDocumentPtr ensureDocument() const;
|
||||
|
||||
BaseTextEditorWidget *editorWidget() const;
|
||||
BaseTextDocument *textDocument();
|
||||
BaseTextDocument *textDocument() const;
|
||||
|
||||
// Some convenience text access
|
||||
QTextDocument *qdocument() const;
|
||||
void setTextCursor(const QTextCursor &cursor);
|
||||
QTextCursor textCursor() const;
|
||||
QChar characterAt(int pos) const;
|
||||
QString textAt(int from, int to) const;
|
||||
|
||||
void addContext(Core::Id id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user