forked from qt-creator/qt-creator
Editors: Move auto-completion code out of the editor
This is basically a continuation of the commits which refactor code out of the base text editor. For instance,36fa1de4c6and3a684586fa. Also removed the doXXXX() forwarding methods.
This commit is contained in:
@@ -51,32 +51,23 @@ public:
|
||||
virtual ~Indenter();
|
||||
|
||||
// Returns true if key triggers an indent.
|
||||
bool isElectricCharacter(const QChar &ch) const;
|
||||
virtual bool isElectricCharacter(const QChar &ch) const;
|
||||
|
||||
// Indent a text block based on previous line. Default does nothing
|
||||
void indentBlock(QTextDocument *doc,
|
||||
const QTextBlock &block,
|
||||
const QChar &typedChar,
|
||||
BaseTextEditor *editor);
|
||||
virtual void indentBlock(QTextDocument *doc,
|
||||
const QTextBlock &block,
|
||||
const QChar &typedChar,
|
||||
BaseTextEditor *editor);
|
||||
|
||||
// Indent at cursor. Calls indentBlock for selection or current line.
|
||||
void indent(QTextDocument *doc,
|
||||
const QTextCursor &cursor,
|
||||
const QChar &typedChar,
|
||||
BaseTextEditor *editor);
|
||||
virtual void indent(QTextDocument *doc,
|
||||
const QTextCursor &cursor,
|
||||
const QChar &typedChar,
|
||||
BaseTextEditor *editor);
|
||||
|
||||
// Reindent at cursor. Selection will be adjusted according to the indentation
|
||||
// change of the first block.
|
||||
void reindent(QTextDocument *doc, const QTextCursor &cursor, BaseTextEditor *editor);
|
||||
|
||||
private:
|
||||
virtual bool doIsElectricalCharacter(const QChar &ch) const;
|
||||
virtual void doIndentBlock(QTextDocument *doc,
|
||||
const QTextBlock &block,
|
||||
const QChar &typedChar,
|
||||
BaseTextEditor *editor);
|
||||
virtual void doIndent(QTextDocument *doc,
|
||||
const QTextCursor &cursor,
|
||||
const QChar &typedChar,
|
||||
BaseTextEditor *editor);
|
||||
virtual void doReindent(QTextDocument *doc, const QTextCursor &cursor, BaseTextEditor *editor);
|
||||
virtual void reindent(QTextDocument *doc, const QTextCursor &cursor, BaseTextEditor *editor);
|
||||
};
|
||||
|
||||
} // namespace TextEditor
|
||||
|
||||
Reference in New Issue
Block a user