forked from qt-creator/qt-creator
TextEditors: Separate away methods that actually work on a document
Introduces ITextEditorDocument. This is part of a more general "use documents instead of editors whereever possible". It will allow to move to e.g. ITextEditor::openedTextDocumentContents() instead of ITextEditor::openedTextEditorsContents(). Change-Id: I5ebceaa257a0d2c3e8ac4ac51b9b08b6faa42487 Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "texteditor_global.h"
|
||||
|
||||
#include <coreplugin/textdocument.h>
|
||||
#include "itexteditor.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QTextCursor;
|
||||
@@ -49,7 +49,7 @@ class ExtraEncodingSettings;
|
||||
class SyntaxHighlighter;
|
||||
class BaseTextDocumentPrivate;
|
||||
|
||||
class TEXTEDITOR_EXPORT BaseTextDocument : public Core::TextDocument
|
||||
class TEXTEDITOR_EXPORT BaseTextDocument : public ITextEditorDocument
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -57,6 +57,11 @@ public:
|
||||
BaseTextDocument();
|
||||
virtual ~BaseTextDocument();
|
||||
|
||||
// ITextEditorDocument
|
||||
QString contents() const;
|
||||
QString textAt(int pos, int length) const;
|
||||
QChar characterAt(int pos) const;
|
||||
|
||||
void setTypingSettings(const TypingSettings &typingSettings);
|
||||
void setStorageSettings(const StorageSettings &storageSettings);
|
||||
void setTabSettings(const TabSettings &tabSettings);
|
||||
|
||||
Reference in New Issue
Block a user