forked from qt-creator/qt-creator
Editor: add formatter support
Change-Id: I65590273b2541e08a39970cd9bb4739a5634b2f7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "texteditor_global.h"
|
||||
#include "formatter.h"
|
||||
#include "indenter.h"
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
@@ -93,11 +94,13 @@ public:
|
||||
int currentCursorPosition = -1);
|
||||
void autoReindent(const QTextCursor &cursor, int currentCursorPosition = -1);
|
||||
void autoFormatOrIndent(const QTextCursor &cursor);
|
||||
QTextCursor indent(const QTextCursor &cursor, bool blockSelection = false, int column = 0,
|
||||
int *offset = nullptr);
|
||||
QTextCursor indent(const QTextCursor &cursor, bool blockSelection, int column, int *offset);
|
||||
QTextCursor unindent(const QTextCursor &cursor, bool blockSelection = false, int column = 0,
|
||||
int *offset = nullptr);
|
||||
|
||||
void setFormatter(Formatter *indenter); // transfers ownership
|
||||
void autoFormat(const QTextCursor &cursor);
|
||||
|
||||
TextMarks marks() const;
|
||||
bool addMark(TextMark *mark);
|
||||
TextMarks marksAt(int line) const;
|
||||
|
||||
Reference in New Issue
Block a user