diff options
Diffstat (limited to 'src/plugins/texteditor/tabsettings.h')
-rw-r--r-- | src/plugins/texteditor/tabsettings.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/plugins/texteditor/tabsettings.h b/src/plugins/texteditor/tabsettings.h index 885f4b23308..2eded67970c 100644 --- a/src/plugins/texteditor/tabsettings.h +++ b/src/plugins/texteditor/tabsettings.h @@ -49,11 +49,11 @@ namespace TextEditor { class TEXTEDITOR_EXPORT TabSettings { public: - // This enum must match the indexes of tabKeyBehavior widget - enum TabKeyBehavior { - TabNeverIndents = 0, - TabAlwaysIndents = 1, - TabLeadingWhitespaceIndents = 2 + + enum TabPolicy { + SpacesOnlyTabPolicy = 0, + TabsOnlyTabPolicy = 1, + MixedTabPolicy = 2 }; // This enum must match the indexes of continuationAlignBehavior widget @@ -63,13 +63,6 @@ public: ContinuationAlignWithIndent = 2 }; - // This enum must match the indexes of smartBackspaceBehavior widget - enum SmartBackspaceBehavior { - BackspaceNeverIndents = 0, - BackspaceFollowsPreviousIndents = 1, - BackspaceUnindents = 2 - }; - TabSettings(); void toSettings(const QString &category, QSettings *s) const; @@ -97,17 +90,12 @@ public: int trailingWhitespaces(const QString &text) const; bool isIndentationClean(const QTextBlock &block) const; - bool tabShouldIndent(const QTextDocument *document, QTextCursor cursor, int *suggestedPosition = 0) const; bool guessSpacesForTabs(const QTextBlock &block) const; - bool m_spacesForTabs; - bool m_autoSpacesForTabs; - bool m_autoIndent; + TabPolicy m_tabPolicy; int m_tabSize; int m_indentSize; - TabKeyBehavior m_tabKeyBehavior; ContinuationAlignBehavior m_continuationAlignBehavior; - SmartBackspaceBehavior m_smartBackspaceBehavior; bool equals(const TabSettings &ts) const; }; |